|
| 1 | +//Module included in the following assemblies: |
| 2 | +// hosted_control_planes/hcp-deploy/hcp-deploy-azure.adoc |
| 3 | + |
| 4 | +:_mod-docs-content-type: PROCEDURE |
| 5 | +[id="hcp-azure-infra_{context}"] |
| 6 | += Creating {azure-short} infrastructure |
| 7 | + |
| 8 | +[role="_abstract"] |
| 9 | +Create an {azure-short} infrastructure separately so that when you create a hosted cluster on {azure-short}, you can use pre-existing infrastructure. |
| 10 | + |
| 11 | +.Prerequisites |
| 12 | + |
| 13 | +* You have an {azure-short} credentials file with the following format: |
| 14 | ++ |
| 15 | +[source,json] |
| 16 | +---- |
| 17 | +{ |
| 18 | + "subscriptionId": "<my_subscription_id>", |
| 19 | + "tenantId": "<my_tenant_id>", |
| 20 | + "clientId": "<my_client_id>", |
| 21 | + "clientSecret": "<my_client_secret>" |
| 22 | +} |
| 23 | +---- |
| 24 | +
|
| 25 | +* You have an existing public DNS zone in your {azure-short} subscription for your base domain. |
| 26 | +
|
| 27 | +* You created Workload Identities. For more information, see "Creating {azure-short} Workload Identities". |
| 28 | +
|
| 29 | +.Procedure |
| 30 | + |
| 31 | +* To create the infrastructure with a new virtual network, subnet, and network security group, enter the following command: |
| 32 | ++ |
| 33 | +[source,terminal] |
| 34 | +---- |
| 35 | +$ hcp create infra azure \ |
| 36 | + --name <my_cluster_name> \ |
| 37 | + --infra-id <infra_id> \ |
| 38 | + --azure-creds <azure_credentials_file> \ |
| 39 | + --base-domain <base_domain> \ |
| 40 | + --location <location> \ |
| 41 | + --workload-identities-file <workload_identities_file> \ |
| 42 | + --assign-identity-roles \ |
| 43 | + --dns-zone-rg-name <dns_zone_rg> \ |
| 44 | + --output-file <output_infra_file> |
| 45 | +---- |
| 46 | ++ |
| 47 | +where: |
| 48 | ++ |
| 49 | +** `--name` specifies the name of the hosted cluster you intend to create. |
| 50 | +** `--infra-id` specifies a unique name that identifies your infrastructure. This value is used to name and tag {azure-short} resources. Typically, it is the name of your cluster with a suffix appended to it. |
| 51 | +** `--azure-creds` specifies an {azure-short} credentials file that has permission to create infrastructure resources, such as virtual networks, subnets, and load balancers. |
| 52 | +** `--base-domain` specifies the base domain for the ingress of your hosted cluster. The base domain must correspond to an existing public DNS zone in your {azure-short} subscription. |
| 53 | +** `--location` specifies the {azure-short} region where you want to create the infrastructure, such as `eastus` or `westus2`. |
| 54 | +** `--workload-identities-file` specifies the path to the JSON file that contains the Workload Identity configuration. |
| 55 | +** `--assign-identity-roles` specifies that automatic RBAC role assignment is enabled for Workload Identities. |
| 56 | +** `--dns-zone-rg-name` specifies the name of the resource group that contains your public DNS zone. |
| 57 | +** `--output-file` specifies the file where the details of the infrastructure are stored in YAML format. |
| 58 | +
|
| 59 | +* To create the infrastructure with an existing virtual network, subnet, and network security group, enter the following command: |
| 60 | ++ |
| 61 | +[source,terminal] |
| 62 | +---- |
| 63 | +$ hcp create infra azure \ |
| 64 | + --name <my_cluster_name> \ |
| 65 | + --infra-id <infra_id> \ |
| 66 | + --azure-creds <azure_credentials_file> \ |
| 67 | + --base-domain <base_domain> \ |
| 68 | + --location <location> \ |
| 69 | + --workload-identities-file <workload_identities_file> \ |
| 70 | + --vnet-id /subscriptions/<subscription_id>/resourceGroups/<resource_group>/providers/Microsoft.Network/virtualNetworks/<vnet_name> \ |
| 71 | + --subnet-id /subscriptions/<subscription_id>/resourceGroups/<resource_group>/providers/Microsoft.Network/virtualNetworks/<vnet_name>/subnets/<subnet_name> \ |
| 72 | + --network-security-group-id /subscriptions/<subscription_id>/resourceGroups/<resource_group>/providers/Microsoft.Network/networkSecurityGroups/<network_security_group_name> \ |
| 73 | + --assign-identity-roles \ |
| 74 | + --dns-zone-rg-name <dns_zone_rg> \ |
| 75 | + --output-file <output_infra_file> |
| 76 | +---- |
| 77 | ++ |
| 78 | +where: |
| 79 | ++ |
| 80 | +** `--name` specifies the name of the hosted cluster you intend to create. |
| 81 | +** `--infra-id` specifies a unique name that identifies your infrastructure. This value is used to name and tag {azure-short} resources. Typically, it is the name of your cluster with a suffix appended to it. |
| 82 | +** `--azure-creds` specifies an {azure-short} credentials file that has permission to create infrastructure resources, such as virtual networks, subnets, and load balancers. |
| 83 | +** `--base-domain` specifies the base domain for the ingress of your hosted cluster. The base domain must correspond to an existing public DNS zone in your {azure-short} subscription. |
| 84 | +** `--location` specifies the {azure-short} region where you want to create the infrastructure, such as `eastus` or `westus2`. |
| 85 | +** `--workload-identities-file` specifies the path to the JSON file that contains the Workload Identity configuration. |
| 86 | +** `--vnet-id` specifies your existing virtual network ID, which includes your subscription ID and your virtual network name. |
| 87 | +** `--subnet-id` specifies the ARM resource ID of your subnet, which includes your subscription ID, virtual network name, and subnet name. |
| 88 | +** `--network-security-group-id` specifies your existing network security group ID, which includes your subscription ID and your network security group name. |
| 89 | +** `--assign-identity-roles` specifies that automatic RBAC role assignment is enabled for Workload Identities. |
| 90 | +** `--dns-zone-rg-name` specifies the name of the resource group that contains your public DNS zone. |
| 91 | +** `--output-file` specifies the file where the details of the infrastructure are stored in YAML format. |
| 92 | +
|
0 commit comments