Skip to content

Commit

Permalink
images/capi/packer/azure/packer.json: allow building from SIG
Browse files Browse the repository at this point in the history
Signed-off-by: Mateusz Gozdek <[email protected]>
  • Loading branch information
invidian committed Dec 12, 2022
1 parent 90c8dba commit cb445c0
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 6 deletions.
2 changes: 2 additions & 0 deletions docs/book/src/capi/providers/azure.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ list, and greater explanation can be found in the

| Variable | Description | Default |
|----------|-------------|---------|
| `community_gallery_image_id` | Use image from a Community gallery as a base image instead of default one from the marketplace. Depending on the target distro, fields like `image_offer` etc. might need to be explicitly emptied. | `""` |
| `direct_shared_gallery_image_id` | Use image from Directly shared gallery as a base image instead of default one from the marketplace. Depending on the target distro, fields like `image_offer` etc. might need to be explicitly emptied. | `""` |
| `private_virtual_network_with_public_ip` | This value allows you to set a virtual_network_name and obtain a public IP. If this value is not set and virtual_network_name is defined Packer is only allowed to be executed from a host on the same subnet / virtual network. | `""` |
| `virtual_network_name` | Use a pre-existing virtual network for the VM. This option enables private communication with the VM, no public IP address is used or provisioned (unless you set private_virtual_network_with_public_ip). | `""` |
| `virtual_network_resource_group_name` | If virtual_network_name is set, this value may also be set. If virtual_network_name is set, and this value is not set the builder attempts to determine the resource group containing the virtual network. If the resource group cannot be found, or it cannot be disambiguated, this value should be set. | `""` |
Expand Down
22 changes: 19 additions & 3 deletions images/capi/packer/azure/packer-windows.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,15 @@
"os_type": "Windows",
"private_virtual_network_with_public_ip": "{{user `private_virtual_network_with_public_ip`}}",
"shared_gallery_image_version_exclude_from_latest": "{{ user `exclude_from_latest` }}",
"shared_image_gallery": {
"community_gallery_image_id": "{{ user `community_gallery_image_id` }}",
"direct_shared_gallery_image_id": "{{ user `direct_shared_gallery_image_id` }}",
"gallery_name": "{{user `source_sig_name`}}",
"image_name": "{{user `source_sig_image_name`}}",
"image_version": "{{user `source_sig_image_version`}}",
"resource_group": "{{user `source_sig_resource_group_name`}}",
"subscription": "{{user `source_sig_subscription_id`}}"
},
"shared_image_gallery_destination": {
"gallery_name": "{{user `shared_image_gallery_name`}}",
"image_name": "{{user `image_name`}}-{{user `runtime`}}",
Expand Down Expand Up @@ -199,21 +208,28 @@
"cloudbase_metadata_services_unattend": "cloudbaseinit.metadata.services.base.EmptyMetadataService",
"cloudbase_plugins": "cloudbaseinit.plugins.common.ephemeraldisk.EphemeralDiskPlugin, cloudbaseinit.plugins.windows.azureguestagent.AzureGuestAgentPlugin, cloudbaseinit.plugins.common.mtu.MTUPlugin, cloudbaseinit.plugins.common.sethostname.SetHostNamePlugin",
"cloudbase_plugins_unattend": "cloudbaseinit.plugins.common.mtu.MTUPlugin",
"community_gallery_image_id": "",
"containerd_url": "",
"containerd_version": null,
"direct_shared_gallery_image_id": "",
"exclude_from_latest": "false",
"gmsa_keyvault_url": "https://kubernetesartifacts.azureedge.net/ccgakvplugin/v1.1.4/binaries/windows-gmsa-ccgakvplugin-v1.1.4.zip",
"ib_version": "{{env `IB_VERSION`}}",
"image_offer": null,
"image_publisher": null,
"image_sku": null,
"image_offer": "",
"image_publisher": "",
"image_sku": "",
"image_version": "latest",
"kubernetes_base_url": "https://kubernetesreleases.blob.core.windows.net/kubernetes/{{user `kubernetes_semver`}}/binaries/node/windows/{{user `kubernetes_goarch`}}",
"manifest_output": "manifest.json",
"nssm_url": null,
"os_disk_size_gb": "",
"prepull": null,
"private_virtual_network_with_public_ip": "",
"source_sig_image_name": "",
"source_sig_image_version": "",
"source_sig_name": "",
"source_sig_resource_group_name": "",
"source_sig_subscription_id": "",
"storage_account_type": "",
"subscription_id": null,
"virtual_network_name": "",
Expand Down
22 changes: 19 additions & 3 deletions images/capi/packer/azure/packer.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,15 @@
},
"private_virtual_network_with_public_ip": "{{user `private_virtual_network_with_public_ip`}}",
"shared_gallery_image_version_exclude_from_latest": "{{ user `exclude_from_latest` }}",
"shared_image_gallery": {
"community_gallery_image_id": "{{ user `community_gallery_image_id` }}",
"direct_shared_gallery_image_id": "{{ user `direct_shared_gallery_image_id` }}",
"gallery_name": "{{user `source_sig_name`}}",
"image_name": "{{user `source_sig_image_name`}}",
"image_version": "{{user `source_sig_image_version`}}",
"resource_group": "{{user `source_sig_resource_group_name`}}",
"subscription": "{{user `source_sig_subscription_id`}}"
},
"shared_image_gallery_destination": {
"gallery_name": "{{user `shared_image_gallery_name`}}",
"image_name": "{{user `image_name`}}",
Expand Down Expand Up @@ -201,20 +210,22 @@
"build_timestamp": "{{timestamp}}",
"client_id": null,
"client_secret": null,
"community_gallery_image_id": "",
"containerd_sha256": null,
"containerd_url": "https://github.com/containerd/containerd/releases/download/v{{user `containerd_version`}}/cri-containerd-cni-{{user `containerd_version`}}-linux-amd64.tar.gz",
"containerd_version": null,
"crictl_url": "https://github.com/kubernetes-sigs/cri-tools/releases/download/v{{user `crictl_version`}}/crictl-v{{user `crictl_version`}}-linux-amd64.tar.gz",
"crictl_version": null,
"direct_shared_gallery_image_id": "",
"distribution": null,
"distribution_release": null,
"distribution_version": null,
"exclude_from_latest": "false",
"existing_ansible_ssh_args": "{{env `ANSIBLE_SSH_ARGS`}}",
"ib_version": "{{env `IB_VERSION`}}",
"image_offer": null,
"image_publisher": null,
"image_sku": null,
"image_offer": "",
"image_publisher": "",
"image_sku": "",
"image_version": "latest",
"kubernetes_cni_deb_version": null,
"kubernetes_cni_http_source": null,
Expand All @@ -241,6 +252,11 @@
"plan_image_sku": "",
"private_virtual_network_with_public_ip": "",
"provisioner_remote_folder": "/tmp",
"source_sig_image_name": "",
"source_sig_image_version": "",
"source_sig_name": "",
"source_sig_resource_group_name": "",
"source_sig_subscription_id": "",
"storage_account_type": "",
"subscription_id": null,
"virtual_network_name": "",
Expand Down

0 comments on commit cb445c0

Please sign in to comment.