Skip to content

Commit 6c5e77f

Browse files
authored
Merge pull request #235304 from dramasamy/main
Update the variable names (caps) and remove unused vars
2 parents b7c499d + 921911e commit 6c5e77f

File tree

2 files changed

+120
-124
lines changed

2 files changed

+120
-124
lines changed

articles/operator-nexus/template-cloud-native-network-function-deployment.md

Lines changed: 54 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -27,42 +27,41 @@ vNET, and finally the AKS-Hybrid cluster that will host the CNF.
2727
## Common parameters
2828

2929
```bash
30-
export myloc="eastus"
31-
export myrg="****"
32-
export MSYS_NO_PATHCONV=1
33-
export mysub="******"
34-
export mynfid='******'
35-
export myplatcustloc='******'
36-
export myhakscustloc='******'
30+
export DC_LOCATION="eastus"
31+
export RESOURCE_GROUP="****"
32+
export SUBSCRIPTION="******"
33+
export CUSTOM_LOCATION='******'
34+
export HAKS_CUSTOM_LOCATION='******'
35+
export L3_ISD='******'
3736
```
3837

3938
## Initialization
4039

41-
Set `$mysub` as the active subscription for your Operator Nexus instance.
40+
Set `$SUBSCRIPTION` as the active subscription for your Operator Nexus instance.
4241

4342
```azurecli
44-
az account set --subscription "$mysub"
43+
az account set --subscription "$SUBSCRIPTION"
4544
```
4645

47-
Get list of `internalnetworks` in the L3 isolation-domain `$myl3isd`
46+
Get list of `internalnetworks` in the L3 isolation-domain `$L3_ISD`
4847

4948
```azurecli
50-
az nf internalnetwork list --l3domain "$myl3isd" \
51-
-g "$myrg" --subscription "$mysub"
49+
az nf internalnetwork list --l3domain "$L3_ISD" \
50+
-g "$RESOURCE_GROUP" --subscription "$SUBSCRIPTION"
5251
```
5352

5453
## Create Cloud Services Network
5554

5655
```bash
57-
export mycsn="******"
56+
export CLOUD_SERVICES_NETWORK="******"
5857
```
5958

6059
```azurecli
61-
az networkcloud cloudservicesnetwork create --name "$mycsn" \
62-
--resource-group "$myrg" \
63-
--subscription "$mysub" \
64-
--extended-location name="$myplatcustloc" type="CustomLocation" \
65-
--location "$myloc" \
60+
az networkcloud cloudservicesnetwork create --name "$CLOUD_SERVICES_NETWORK" \
61+
--resource-group "$RESOURCE_GROUP" \
62+
--subscription "$SUBSCRIPTION" \
63+
--extended-location name="$CUSTOM_LOCATION" type="CustomLocation" \
64+
--location "$DC_LOCATION" \
6665
--additional-egress-endpoints '[{
6766
"category": "azure-resource-management",
6867
"endpoints": [{
@@ -100,95 +99,94 @@ az networkcloud cloudservicesnetwork create --name "$mycsn" \
10099
### Validate Cloud Services Network has been created
101100

102101
```azurecli
103-
az networkcloud cloudservicesnetwork show --name "$mycsn" --resource-group "$myrg" --subscription "$mysub" -o table
102+
az networkcloud cloudservicesnetwork show --name "$CLOUD_SERVICES_NETWORK" --resource-group "$RESOURCE_GROUP" --subscription "$SUBSCRIPTION" -o table
104103
```
105104

106105
## Create Default CNI Network
107106

108107
```bash
109-
export myl3n=="******"
110-
export myalloctype="IPV4"
111-
export myvlan=****
112-
export myipv4sub=="******"
113-
export mymtu="9000"
114-
export myl3isdarm=="******"
108+
export DCN_NAME="******"
109+
export IP_ALLOCATION_TYPE="IPV4"
110+
export VLAN=****
111+
export IPV4_SUBNET="******"
112+
export L3_ISD_ARM="******"
115113
```
116114

117115
```azurecli
118-
az networkcloud defaultcninetwork create --name "$myl3n" \
119-
--resource-group "$myrg" \
120-
--subscription "$mysub" \
121-
--extended-location name="$myplatcustloc" type="CustomLocation" \
122-
--location "$myloc" \
116+
az networkcloud defaultcninetwork create --name "$DCN_NAME" \
117+
--resource-group "$RESOURCE_GROUP" \
118+
--subscription "$SUBSCRIPTION" \
119+
--extended-location name="$CUSTOM_LOCATION" type="CustomLocation" \
120+
--location "$DC_LOCATION" \
123121
--bgp-peers '[]' \
124122
--community-advertisements '[{"communities": ["65535:65281", "65535:65282"], "subnetPrefix": "10.244.0.0/16"}]' \
125123
--service-external-prefixes '["10.101.65.0/24"]' \
126124
--service-load-balancer-prefixes '["10.101.66.0/24"]' \
127-
--ip-allocation-type "$myalloctype" \
128-
--ipv4-connected-prefix "$myipv4sub" \
129-
--l3-isolation-domain-id "$myl3isdarm" \
130-
--vlan $myvlan
125+
--ip-allocation-type "$IP_ALLOCATION_TYPE" \
126+
--ipv4-connected-prefix "$IPV4_SUBNET" \
127+
--l3-isolation-domain-id "$L3_ISD_ARM" \
128+
--vlan $VLAN
131129
```
132130

133131
### Validate Default CNI Network has been created
134132

135133
```azurecli
136-
az networkcloud defaultcninetwork show --name "$myl3n" \
137-
--resource-group "$myrg" --subscription "$mysub" -o table
134+
az networkcloud defaultcninetwork show --name "$DCN_NAME" \
135+
--resource-group "$RESOURCE_GROUP" --subscription "$SUBSCRIPTION" -o table
138136
```
139137

140138
## Set AKS-Hybrid Extended Location
141139

142140
```bash
143-
export myhakscustloc=="******"
141+
export HAKS_CUSTOM_LOCATION="******"
144142
```
145143

146144
## Create AKS-Hybrid Network Cloud Services Network vNET
147145

148146
The AKS-Hybrid (HAKS) Virtual Networks are different from the Azure to on-premises Virtual Networks.
149147

150148
```bash
151-
export myhaksvnetname=="******"
152-
export myncnw=="******"
149+
export HAKS_VNET_NAME="******"
150+
export NC_NETWORK="******"
153151
```
154152

155153
```azurecli
156154
az hybridaks vnet create \
157-
--name "$myhaksvnetname" \
158-
--resource-group "$myrg" \
159-
--subscription "$mysub" \
160-
--custom-location "$myhakscustloc" \
161-
--aods-vnet-id "$myncnw"
155+
--name "$HAKS_VNET_NAME" \
156+
--resource-group "$RESOURCE_GROUP" \
157+
--subscription "$SUBSCRIPTION" \
158+
--custom-location "$HAKS_CUSTOM_LOCATION" \
159+
--aods-vnet-id "$NC_NETWORK"
162160
```
163161

164162
## Create AKS-Hybrid Cluster
165163

166164
The AKS-Hybrid (HAKS) cluster will be used to host the CNF.
167165

168166
```bash
169-
export myhaksvnet1=="******"
170-
export myhaksvnet2=="******"
171-
export myencodedkey=="******"
172-
export ="******"
173-
export myclustername=="******"
167+
export HAKS_VNET_1="******"
168+
export HAKS_VNET_2="******"
169+
export ENCODED_KEY="******"
170+
export AAD_ID="******"
171+
export HAKS_CLUSTER_NAME="******"
174172
```
175173

176174
```azurecli
177175
az hybridaks create \
178-
--name "$myclustername" \
179-
--resource-group "$myrg" \
180-
--subscription "$mysub" \
181-
--aad-admin-group-object-ids "$AADID" \
182-
--custom-location "$myhakscustloc" \
176+
--name "$HAKS_CLUSTER_NAME" \
177+
--resource-group "$RESOURCE_GROUP" \
178+
--subscription "$SUBSCRIPTION" \
179+
--aad-admin-group-object-ids "$AAD_ID" \
180+
--custom-location "$HAKS_CUSTOM_LOCATION" \
183181
--location eastus \
184182
--control-plane-vm-size NC_G4_v1 \
185183
--node-vm-size NC_H16_v1 \
186184
--kubernetes-version v1.22.11 \
187185
--load-balancer-sku stacked-kube-vip \
188186
--load-balancer-count 0 \
189187
--load-balancer-vm-size '' \
190-
--vnet-ids "$myhaksvnet1","$myhaksvnet2" \
191-
--ssh-key-value "$myencodedkey" \
188+
--vnet-ids "$HAKS_VNET_1","$HAKS_VNET_2" \
189+
--ssh-key-value "$ENCODED_KEY" \
192190
--control-plane-count 3 \
193191
--node-count 4
194192
```

0 commit comments

Comments
 (0)