Skip to content

Commit 63083c2

Browse files
micheleRPFeediver1
andauthored
Doc 530 azure byo vnet phase 1 (#121)
* DOC-530 BYO VNet for Azure minor edits doc edits minor edits to clean up minor edits minor doc edits * implement Paul's feedback * add API example to check cluster status * add blurb to What's New * minor edit similar to existing index pages * Update modules/get-started/pages/cluster-types/byoc/azure/vnet-azure.adoc Co-authored-by: Joyce Fee <[email protected]> --------- Co-authored-by: Joyce Fee <[email protected]>
1 parent b5218d8 commit 63083c2

File tree

8 files changed

+303
-8
lines changed

8 files changed

+303
-8
lines changed

modules/ROOT/nav.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
**** xref:get-started:cluster-types/byoc/aws/create-byoc-cluster-aws.adoc[]
1313
*** xref:get-started:cluster-types/byoc/azure/index.adoc[Azure]
1414
**** xref:get-started:cluster-types/byoc/azure/create-byoc-cluster-azure.adoc[]
15+
**** xref:get-started:cluster-types/byoc/azure/vnet-azure.adoc[]
1516
*** xref:get-started:cluster-types/byoc/gcp/index.adoc[GCP]
1617
**** xref:get-started:cluster-types/byoc/gcp/create-byoc-cluster-gcp.adoc[]
1718
**** xref:get-started:cluster-types/byoc/gcp/vpc-byo-gcp.adoc[]

modules/get-started/pages/cloud-overview.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Redpanda offers three types of fully-managed cloud clusters:
1515
* <<Dedicated Cloud>>: Single-tenant clusters hosted in Redpanda Cloud. This provides more control over your deployment.
1616
* <<Bring Your Own Cloud (BYOC)>>: Clusters hosted in your private cloud. This provides more control over your deployment and offers full data sovereignty.
1717
+
18-
NOTE: With standard BYOC clusters, Redpanda manages security policies and resources for your VPC, including service accounts, subnetworks, IAM roles, firewall rules, and storage buckets. For the most security, you can manage these resources yourself with a xref:get-started:cluster-types/byoc/vpc-byo-gcp.adoc[customer-managed VPC].
18+
NOTE: With standard BYOC clusters, Redpanda manages security policies and resources for your VPC, including service accounts, subnetworks, IAM roles, firewall rules, and storage buckets. For the most security, you can manage these resources yourself with a xref:get-started:cluster-types/byoc/gcp/vpc-byo-gcp.adoc[customer-managed VPC].
1919

2020
=== Serverless
2121

modules/get-started/pages/cluster-types/byoc/azure/create-byoc-cluster-azure.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
include::shared:partial$feature-flag.adoc[]
66

7+
NOTE: With standard BYOC clusters, Redpanda manages security policies and resources for your virtual network (VNet), including subnetworks, managed identities, IAM roles, security groups, and storage accounts. For the most security, you can manage these resources yourself with a xref:get-started:cluster-types/byoc/azure/vnet-azure.adoc[customer-managed VNet on Azure].
8+
79
== Prerequisites
810

911
Before you deploy a BYOC cluster on Azure, check all prerequisites to ensure that your Azure subscription meets requirements.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
= BYOC: Azure
22
:description: Learn how to create a BYOC cluster on Azure.
33
:page-layout: index
4-
:page-categories: Deployment
4+
:page-categories: Deployment
Lines changed: 286 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,286 @@
1+
= Create a Customer-Managed VNet on Azure
2+
:description: Connect Redpanda Cloud to your existing VNet for additional security.
3+
4+
include::shared:partial$feature-flag.adoc[]
5+
6+
With a standard BYOC cluster, Redpanda manages the networking lifecycle. For additional security, you can deploy the Redpanda glossterm:data plane[] into your existing virtual network (VNet) and manage the lifecycle yourself. When you create a customer-managed VNet cluster, you specify your VNet and managed identities. The Redpanda Cloud agent doesn't create any new resources or alter any settings in your account. With a *customer-managed* VNet:
7+
8+
* You provide your own VNet in your Azure account.
9+
* You maintain more control over your account, because Redpanda requires fewer permissions than standard BYOC clusters.
10+
* You control your security resources and policies, including subnets, user-assigned identities, IAM roles and assignments, security groups, storage accounts, and key vaults.
11+
12+
The https://github.com/redpanda-data/cloud-examples/tree/main/customer-managed/azure[Redpanda repository^] contains the code that deploys the resources you must create for a customer-managed Azure cluster. You create these resources in advance and provide them to Redpanda during cluster creation. The code is provided in https://developer.hashicorp.com/terraform[Terraform^]. There may be resources in the repository that already exist in your environment that you don't want to create (for example, the VNet). Variables are provided for this purpose.
13+
14+
See the code for the complete list of resources required to create and deploy Redpanda cluster. Customer-managed resources can be broken down into the following groups:
15+
16+
* Resource group resources
17+
* User-assigned identities
18+
* IAM roles and assignments
19+
* Network
20+
* Storage
21+
* Key vaults
22+
23+
== Prerequisites
24+
25+
* Access to an Azure subscription where you want to create your cluster
26+
* Knowledge of your internal VNet and subnet configuration
27+
* Permission to call the xref:manage:api/cloud-api-overview.adoc[Redpanda Cloud API]
28+
* Permission to create, modify, and delete the resources described by Terraform
29+
* https://developer.hashicorp.com/terraform/install[Terraform version 1.8.5 or later^]
30+
31+
== Limitations
32+
33+
* You cannot move existing clusters to a customer-managed VNet.
34+
* You cannot change to a different VNet after creating a cluster with a customer-managed VNet.
35+
36+
== Deploy customer-managed resources With Terraform
37+
38+
You may want to configure https://developer.hashicorp.com/terraform/language/state/remote[remote state^] for this Terraform. For simplicity, these instructions assume local state.
39+
40+
=== Configure the variables
41+
42+
Create a JSON file called `byovnet.auto.tfvars.json` inside the Terraform directory to configure variables for your specific needs:
43+
44+
```
45+
{
46+
"azure_tenant_id": "",
47+
"azure_subscription_id": "",
48+
"region": "",
49+
"resource_name_prefix": "",
50+
"tags": {},
51+
"redpanda_resource_group_name": "",
52+
"redpanda_storage_resource_group_name": "",
53+
"redpanda_network_resource_group_name": "",
54+
"redpanda_iam_resource_group_name": "",
55+
"redpanda_agent_identity_name": "",
56+
"redpanda_external_dns_identity_name": "",
57+
"redpanda_cluster_identity_name": "",
58+
"redpanda_cert_manager_identity_name": "",
59+
"aks_identity_name": "",
60+
"redpanda_console_identity_name": "",
61+
"kafka_connect_identity_name": "",
62+
"redpanda_management_storage_account_name": "",
63+
"redpanda_management_storage_container_name": "",
64+
"redpanda_tiered_storage_account_name": "",
65+
"redpanda_tiered_storage_container_name": "",
66+
"redpanda_management_key_vault_name": "",
67+
"redpanda_console_key_vault_name": "",
68+
"vnet_name": "",
69+
"vnet_addresses": "10.0.0.0/20",
70+
"private_subnets": {},
71+
"egress_subnets": {},
72+
"reserved_subnet_cidrs": {},
73+
"redpanda_security_group_name": ""
74+
}
75+
```
76+
77+
The https://github.com/redpanda-data/cloud-examples/blob/main/customer-managed/azure/terraform/README.md[Terraform Readme] has more information about the variable files:
78+
79+
* `vars.azure.tf`: Contains the variables related to Azure credentials.
80+
* `vars.condition.tf`: Contains the conditional variables; for example, on whether to create NAT.
81+
* `vars.customer_input.tf`: Contains the variables needed to create a cluster with the Cloud API.
82+
* `vars.iam.tf`: Contains the variables related to IAM roles.
83+
* `vars.misc.tf`: Contains the variables, regions, zones, tags, and resource name prefix.
84+
85+
=== Initialize Terraform
86+
87+
Initialize the working directory containing Terraform configuration files:
88+
89+
```
90+
terraform init
91+
```
92+
93+
=== Apply Terraform
94+
95+
```
96+
terraform apply
97+
```
98+
99+
The output of `terraform apply` displays output values. Note these values, because they are needed in subsequent steps. To continue with cluster creation, see https://github.com/redpanda-data/cloud-examples/tree/main/customer-managed/azure#create-azure-byo-vnet-redpanda-cluster[Create Azure VNet Redpanda Cluster^].
100+
101+
You can also get these values by running `terraform output`. For example:
102+
103+
```
104+
agent_private_subnet_name = "my-snet-agent-private"
105+
agent_user_assigned_identity_name = "my-agent-uai"
106+
aks_user_assigned_identity_name = "my-aks-uai"
107+
cert_manager_user_assigned_identity_name = "my-cert-manager-uai"
108+
cluster_user_assigned_identity_name = "my-cluster-uai"
109+
console_key_vault_name = "my-consolevault"
110+
console_user_assigned_identity_name = "my-console-uai"
111+
egress_subnet_name = "my-snet-agent-public"
112+
external_dns_user_assigned_identity_name = "my-external-dns-uai"
113+
iam_resource_group_name = "my-iam-rg"
114+
kafka_connect_pods_subnet_name = "my-snet-kafka-connect-pods"
115+
kafka_connect_user_assigned_identity_name = "my-kafka-connect-uai"
116+
kafka_connect_vnet_subnet_name = "my-snet-kafka-connect-vnet"
117+
management_bucket_storage_account_name = "mymanagement"
118+
management_bucket_storage_container_name = "mymanagement"
119+
management_key_vault_name = "my-redpandavault"
120+
network_resource_group_name = "my-network-rg"
121+
......
122+
redpanda_resource_group_name = "my-redpanda-rg"
123+
redpanda_security_group_name = "my-redpanda-nsg"
124+
......
125+
rp_0_pods_subnet_name = "my-snet-rp-0-pods"
126+
rp_0_vnet_subnet_name = "my-snet-rp-0-vnet"
127+
rp_1_pods_subnet_name = "my-snet-rp-1-pods"
128+
rp_1_vnet_subnet_name = "my-snet-rp-1-vnet"
129+
rp_2_pods_subnet_name = "my-snet-rp-2-pods"
130+
rp_2_vnet_subnet_name = "my-snet-rp-2-vnet"
131+
rp_connect_pods_subnet_name = "my-snet-connect-pods"
132+
rp_connect_vnet_subnet_name = "my-snet-connect-vnet"
133+
......
134+
storage_resource_group_name = "my-storage-rg"
135+
system_pods_subnet_name = "my-snet-system-pods"
136+
system_vnet_subnet_name = "my-snet-system-vnet"
137+
tiered_storage_account_name = "mytieredstorage"
138+
tiered_storage_container_name = "mytieredstorage"
139+
......
140+
vnet_name = "my-rp-vnet"
141+
```
142+
143+
== Create a network with the Cloud API
144+
145+
. Create a network with the POST body, and replace the variables with your actual values. To create a resource group and bearer token, follow the xref:manage:api/cloud-api-quickstart.adoc#try-the-cloud-api[Cloud API Quickstart].
146+
+
147+
```
148+
network_post_body=`cat << EOF
149+
{
150+
"cloud_provider": "CLOUD_PROVIDER_AZURE",
151+
"cluster_type": "TYPE_BYOC",
152+
"name": "$rp_cluster_name",
153+
"resource_group_id": "$resource_group_id",
154+
"region": "$region",
155+
"customer_managed_resources": {
156+
"azure" : {
157+
"management_bucket" : {
158+
"storage_account_name": "$redpanda_management_storage_account_name",
159+
"storage_container_name": "$redpanda_management_storage_container_name",
160+
"resource_group" : { "name" : "$redpanda_resource_group_name" }
161+
},
162+
"vnet" : {
163+
"name" : "$vnet_name",
164+
"resource_group" : { "name" : "$redpanda_network_resource_group_name" }
165+
},
166+
"subnets" : {
167+
"rp_0_pods" : { "name" : "$rp_0_pods_subnet_name" },
168+
"rp_0_vnet" : { "name" : "$rp_0_vnet_subnet_name" },
169+
"rp_1_pods" : { "name" : "$rp_1_pods_subnet_name" },
170+
"rp_1_vnet" : { "name" : "$rp_2_vnet_subnet_name" },
171+
"rp_2_pods" : { "name" : "$rp_2_pods_subnet_name" },
172+
"rp_2_vnet" : { "name" : "$rp_2_vnet_subnet_name" },
173+
"rp_connect_pods" : { "name" : "$rp_connect_pods_subnet_name" },
174+
"rp_connect_vnet" : { "name" : "$rp_connect_vnet_subnet_name" },
175+
"kafka_connect_pods" : { "name" : "$kafka_connect_pods_subnet_name" },
176+
"kafka_connect_vnet" : { "name" : "$kafka_connect_vnet_subnet_name" },
177+
"sys_pods" : { "name" : "$system_pods_subnet_name" },
178+
"sys_vnet" : { "name" : "$system_vnet_subnet_name" },
179+
"rp_agent" : { "name" : "$rp_agent_subnet_name" },
180+
"rp_egress_vnet" : { "name" : "$rp_egress_subnet_name" }
181+
}
182+
}
183+
}
184+
}
185+
EOF`
186+
```
187+
188+
. Make a Cloud API call to create a Redpanda network and get the network ID from the response in JSON `.operation.metadata.network_id`.
189+
+
190+
```
191+
curl -vv -X POST \
192+
-H "Content-Type: application/json" \
193+
-H "Authorization: Bearer $token" \
194+
-d "$network_post_body" $PUBLIC_API_ENDPOINT/v1beta2/networks
195+
```
196+
197+
== Create a cluster with the Cloud API
198+
199+
. A network ID is required to create a Redpanda cluster. Replace the variables with your actual values. To create a resource group and bearer token, follow the xref:manage:api/cloud-api-quickstart.adoc#try-the-cloud-api[Cloud API Quickstart].
200+
+
201+
```
202+
cluster_post_body=`cat << EOF
203+
{
204+
"cloud_provider": "CLOUD_PROVIDER_AZURE",
205+
"connection_type": "CONNECTION_TYPE_PRIVATE",
206+
"name": "$cluster_name",
207+
"resource_group_id": "$namespace_id",
208+
"network_id": "$network_id",
209+
"region": "$region",
210+
"zones": [ $zones ],
211+
"throughput_tier": "$tier",
212+
"type": "TYPE_BYOC",
213+
"customer_managed_resources" : {
214+
"azure" : {
215+
"cidrs" : {
216+
"aks_service_cidr" : "$aks_subnet_cidr"
217+
},
218+
"key_vaults": {
219+
"console_vault": { "name": "$redpanda_console_key_vault_name" },
220+
"management_vault": { "name": "$redpanda_management_key_vault_name" }
221+
},
222+
"resource_groups" : {
223+
"iam_resource_group" : { "name": "$redpanda_iam_resource_group_name" },
224+
"redpanda_resource_group" : { "name": "$redpanda_resource_group_name" },
225+
"storage_resource_group" : { "name": "$redpanda_storage_resource_group_name" }
226+
},
227+
"security_groups" : {
228+
"redpanda_security_group" : { "name": "$redpanda_security_group_name" }
229+
},
230+
"tiered_cloud_storage" : {
231+
"storage_account_name": "$redpanda_tiered_storage_account_name",
232+
"storage_container_name": "$redpanda_tiered_storage_container_name"
233+
},
234+
"user_assigned_identities" : {
235+
"agent_user_assigned_identity": { "name" : "$agent_user_assigned_identity_name" },
236+
"aks_user_assigned_identity": { "name" : "$aks_user_assigned_identity_name" },
237+
"cert_manager_assigned_identity": { "name" : "$cert_manager_assigned_identity_name" },
238+
"external_dns_assigned_identity": { "name" : "$external_dns_assigned_identity_name" },
239+
"redpanda_cluster_assigned_identity": { "name" : "$redpanda_cluster_assigned_identity_name" },
240+
"redpanda_console_assigned_identity": { "name" : "$redpanda_console_assigned_identity_name" },
241+
"kafka_connect_assigned_identity": { "name" : "$kafka_connect_assigned_identity_name" }
242+
}
243+
}
244+
}
245+
}
246+
EOF`
247+
```
248+
249+
. Make a Cloud API call to create a Redpanda network and get the network ID from the response in JSON `.operation.metadata.network_id`.
250+
+
251+
```
252+
curl -vv -X POST \
253+
-H "Content-Type: application/json" \
254+
-H "Authorization: Bearer $token" \
255+
-d "$cluster_post_body" $PUBLIC_API_ENDPOINT/v1beta2/clusters
256+
```
257+
258+
== Deploy the cluster
259+
260+
After getting a Redpanda cluster ID, deploy the cluster with `rpk`, replacing `$rp_id` and `$subscription_id` with your values:
261+
262+
```
263+
rpk cloud byoc azure apply --redpanda-id='$rp_id' --subscription-id='$subscription_id'
264+
```
265+
266+
== Check cluster status
267+
268+
You can check the cluster status with the Cloud API or the Redpanda Cloud UI.
269+
270+
Example using the returned `operation_id`:
271+
272+
```bash
273+
curl -X GET "https://api.redpanda.com/v1beta2/operations/<operation_id of operation from previous step>" \
274+
-H "accept: application/json"\
275+
-H "content-type: application/json" \
276+
-H "authorization: Bearer $YOUR_TOKEN"
277+
```
278+
279+
Example retrieving cluster:
280+
281+
```bash
282+
curl -X GET "https://api.redpanda.com/v1beta2/clusters/<resource_id of cluster from previous step>" \
283+
-H "accept: application/json"\
284+
-H "content-type: application/json" \
285+
-H "authorization: Bearer $YOUR_TOKEN"
286+
```

modules/get-started/pages/cluster-types/byoc/gcp/create-byoc-cluster-gcp.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
To create a Redpanda cluster in your virtual private cloud (VPC), follow the instructions in the Redpanda Cloud UI. The UI contains the parameters necessary to successfully run `rpk cloud byoc apply`.
66

7-
NOTE: With standard BYOC clusters, Redpanda manages security policies and resources for your VPC, including subnetworks, service accounts, IAM roles, firewall rules, and storage buckets. For the most security, you can manage these resources yourself with a xref:get-started:cluster-types/byoc/vpc-byo-gcp.adoc[customer-managed VPC on GCP].
7+
NOTE: With standard BYOC clusters, Redpanda manages security policies and resources for your VPC, including subnetworks, service accounts, IAM roles, firewall rules, and storage buckets. For the most security, you can manage these resources yourself with a xref:get-started:cluster-types/byoc/gcp/vpc-byo-gcp.adoc[customer-managed VPC on GCP].
88

99
See also: xref:get-started:cloud-overview.adoc#redpanda-cloud-architecture[Redpanda Cloud architecture].
1010

modules/get-started/pages/cluster-types/byoc/gcp/vpc-byo-gcp.adoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -473,9 +473,9 @@ gcloud iam service-accounts add-iam-policy-binding <gke-service-account-name>@<s
473473

474474
Log in to the https://cloud.redpanda.com[Redpanda Cloud UI^], and follow the steps to xref:get-started:cluster-types/byoc/gcp/create-byoc-cluster-gcp.adoc[create a BYOC cluster], with the following exceptions:
475475

476-
. On the *Network* page, select the *Customer-managed* network connection type, and enter the network, service account, and storage bucket information you created.
476+
. On the *Network* page, select the *Customer-managed* connection type, and enter the network, service account, and storage bucket information you created.
477477

478-
. With *customer-managed* networks, you must grant yourself (the user deploying the cluster with `rpk`) the following permissions.
478+
. With *customer-managed* networks, you must grant yourself (the user deploying the cluster with `rpk`) the following permissions:
479479
+
480480
.Expand permissions
481481
[%collapsible]
@@ -515,15 +515,15 @@ Log in to the https://cloud.redpanda.com[Redpanda Cloud UI^], and follow the ste
515515
+
516516
This can be done through a Google account, a service account, or any principal identity supported by GCP.
517517
+
518-
- If running `rpk` from a Google account, the user should first acquire new user credentials to use for https://cloud.google.com/sdk/gcloud/reference/auth/application-default/login[Application Default Credentials^].
519-
- If running `rpk` from a service account, the user should create a https://cloud.google.com/iam/docs/keys-create-delete#creating[service account key^], then https://cloud.google.com/docs/authentication/application-default-credentials#GAC[export GOOGLE_APPLICATION_CREDENTIALS^] and https://cloud.google.com/sdk/gcloud/reference/config/set[set the account as the default in gcloud^]:
518+
- If running `rpk` from a Google account, the user must acquire new user credentials to use for https://cloud.google.com/sdk/gcloud/reference/auth/application-default/login[Application Default Credentials^].
519+
- If running `rpk` from a service account, the user must create a https://cloud.google.com/iam/docs/keys-create-delete#creating[service account key^], then https://cloud.google.com/docs/authentication/application-default-credentials#GAC[export GOOGLE_APPLICATION_CREDENTIALS^] and https://cloud.google.com/sdk/gcloud/reference/config/set[set the account as the default in gcloud^]:
520520
+
521521
```bash
522522
export GOOGLE_APPLICATION_CREDENTIALS=<keyfile for service account>
523523
gcloud config set account $SERVICE_ACCOUNT@$PROJECT_ID.iam.gserviceaccount.com
524524
```
525525

526-
. Run the `rpk` command to validate your configuration:
526+
. Run the following `rpk` command to validate your configuration:
527527
+
528528
```bash
529529
rpk cloud byoc gcp apply --redpanda-id='<redpanda-id>' --project-id='<service-project-id>' --validate-only

modules/get-started/pages/whats-new-cloud.adoc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@
77

88
This page lists new features added in Redpanda Cloud.
99

10+
== November 2024
11+
12+
=== Customer-managed VNet on Azure
13+
14+
With standard BYOC clusters, Redpanda manages security policies and resources for your virtual network (VNet), including subnetworks, managed identities, IAM roles, security groups, and storage accounts. For the highest level of security, you can manage these resources yourself with a xref:get-started:cluster-types/byoc/azure/vnet-azure.adoc[customer-managed VNet on Azure].
15+
1016
== October 2024
1117

1218
=== Azure Marketplace for Dedicated clusters

0 commit comments

Comments
 (0)