Skip to content

Commit 153c1d6

Browse files
renamed to QuickStart, added support for new SKU, changed offerid
1 parent a41fabc commit 153c1d6

File tree

9 files changed

+28
-27
lines changed

9 files changed

+28
-27
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
tmp*.json
22
*.bicepparam
33
e2e-demo-params.sh
4+
quickstart-params.sh

00-setup-machine.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ echo "Asking user to log in...";
9595
az login
9696
if [ $? == 0 ]; then
9797
echosuccess "
98-
Your machine should be ready! Now proceed with './deploy-e2e-demo.sh' or './01-deploy-prerequisities.sh' script
98+
Your machine should be ready! Now proceed with './deploy-quickstart.sh' or './01-deploy-prerequisities.sh' script
9999
100100
";
101101
else

README.md

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The Bicep framework for CBS deployment comes with Bicep templates and bash scrip
88

99
- **Module #03 (Test VM)** - This module provisions a test Virtual Machine (VM) of Windows Server 2019 with pre-installed MS SQL server and configures test volumes in CBS instance to mount them via iSCSI protocol.
1010

11-
- **Module #04 (E2E Demo Deployment) 🧪** - For hands-on/testing purposes, this module combines all modules #01-#03 (described above) and deploys all required resources, CBS Managed App and a test Virtual Machine in the single deployment script.
11+
- **Module #04 (QuickStart Demo Deployment) 🧪** - For hands-on/testing purposes, this module combines all modules #01-#03 (described above) and deploys all required resources, CBS Managed App and a test Virtual Machine in the single deployment script.
1212

1313
## Prerequisites
1414
- bash
@@ -42,7 +42,7 @@ You can also run all commands in this repo on your computer or in container usin
4242

4343
1. Add permissions to execute scripts:
4444
```bash
45-
$ chmod +x 00-setup-machine.sh 01-deploy-prerequisities.sh 02-deploy-cbs.sh 03-deploy-test-vm.sh deploy-e2e-demo.sh
45+
$ chmod +x 00-setup-machine.sh 01-deploy-prerequisities.sh 02-deploy-cbs.sh 03-deploy-test-vm.sh deploy-quickstart.sh
4646
```
4747
1. Run the `00-setup-machine.sh` script to install all required tooling and log into Azure.
4848
```bash
@@ -151,33 +151,30 @@ Password: *pureuser*
151151
152152
<br><br>
153153
154-
### Module #04 - E2E DEMO Deployment
154+
### Module #04 - QuickStart DEMO Deployment
155155
156-
This repository contains a script `deploy-e2e-demo.sh` that combines all modules in the repository and enables easy testing and hands-on experience of the CBS (Pure Cloud Block Store) on Azure.
156+
This repository contains a script `deploy-quickstart.sh` that combines all modules in the repository and enables easy testing and hands-on experience of the CBS (Pure Cloud Block Store) on Azure.
157157
With just one script, you can quickly set up and run a test environment to explore the features and capabilities of the CBS.
158158
159159
The script includes all required CBS resources and sets up a test Windows SQL Server VM with mounted CBS volumes via iSCSI.
160160
161-
![Deployed resources with deploy-e2e-demo.sh script](./static/deployed-resources.png)
161+
![Deployed resources with deploy-quickstart.sh script](./static/deployed-resources.png)
162162
163163
To use this script:
164-
1. rename the file `e2e-demo-params.sh.example` to `e2e-demo-params.sh`
164+
165+
1. rename the file `quickstart-params.sh.example` to `quickstart-params.sh`:
165166
```bash
166-
$ mv e2e-demo-params.sh.example e2e-demo-params.sh
167+
$ mv quickstart-params.sh.example quickstart-params.sh
167168
```
168-
1. enter the necessary values into the `e2e-demo-params.sh` file
169-
1. execute the script
169+
1. enter the necessary values into the `quickstart-params.sh` file
170+
1. execute the script:
170171
```bash
171-
$ ./deploy-e2e-demo.sh
172+
$ ./deploy-quickstart.sh
172173
```
173174
174-
175-
176-
177175
## Limitations / Troubleshooting
178176
179-
180-
### Common Deployment vNET
177+
### Common Deployment vNET
181178
182179
The prerequisites (Module #01) only supports a single virtual network scenario where all required subnets are deployed within one common vNET, as this is considered best practice. The use of multiple vNETs that are peered with each other is not supported by this framework.
183180
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22
set -e
33
SHOW_DEBUG_OUTPUT=false
4-
source $(dirname $0)/e2e-demo-params.sh
4+
source $(dirname $0)/quickstart-params.sh
55

66
source $(dirname $0)/script-modules/common.sh
77

@@ -10,7 +10,7 @@ source $(dirname $0)/script-modules/ascii-logo.sh
1010

1111
echo -e "
1212
------------------------------------------------------------
13-
Pure Cloud Block Store - E2E DEMO Deployment
13+
Pure Cloud Block Store - QuickStart DEMO Deployment
1414
(c) 2023 Pure Storage
1515
v$CLI_VERSION
1616
------------------------------------------------------------
@@ -32,7 +32,7 @@ Location: $location
3232

3333
# Deploy our infrastructure
3434
output=$(az deployment sub create \
35-
--name "CBS-E2E-deploy-prereq-bicep-sh" \
35+
--name "CBS-E2E-$location-deploy-prereq-bicep-sh" \
3636
--location $location \
3737
--subscription $subscriptionId \
3838
--template-file "templates/prerequisites.bicep" \
@@ -102,7 +102,7 @@ echo -e "${C_BLUE3}${C_GREY85}
102102
"
103103

104104
#in E2E demo we use the latest version
105-
latestPlan=`(echo '{"plans":[';curl 'https://catalogapi.azure.com/offers/purestoragemarketplaceadmin.pure_storage_cloud_block_store_deployment?api-version=2018-08-01-beta&market=US&includeStopSoldPlans=true&x-ms-effective-locale=en.en-us' 2> /dev/null | jq -c '.plans | to_entries | .[] | select(.value.isStopSell == false) | select(.value.isHidden == false) | [.value.planId,.value.displayName, (.value.artifacts | .[] | select(.name == "DefaultTemplate").uri)]' | while IFS=$"\n" read -r line; do let "i=i+1";[[ $i == 1 ]] && add="" || add=","; echo $add;planId=\`echo $line | jq -r '.[0]'\`;displayName=\`echo $line | jq -r '.[1]'\`;uri=\`echo $line | jq -r '.[2]'\`;planVersion=\`curl "$uri" 2>/dev/null | jq -r '.resources | .[] | select(.type == "Microsoft.Solutions/applications").plan.version'\`;echo "{\"planId\":\"$planId\",\"planDisplayName\":\"$displayName\",\"planVersion\":\"$planVersion\"}";done;echo "]}") | jq '(.plans | sort_by(.planId) | reverse)[0]'`
105+
latestPlan=`(echo '{"plans":[';curl 'https://catalogapi.azure.com/offers/purestoragemarketplaceadmin.pure_cloud_block_store_product_deployment?api-version=2018-08-01-beta&market=US&includeStopSoldPlans=true&x-ms-effective-locale=en.en-us' 2> /dev/null | jq -c '.plans | to_entries | .[] | select(.value.isStopSell == false) | select(.value.isHidden == false) | [.value.planId,.value.displayName, (.value.artifacts | .[] | select(.name == "DefaultTemplate").uri)]' | while IFS=$"\n" read -r line; do let "i=i+1";[[ $i == 1 ]] && add="" || add=","; echo $add;planId=\`echo $line | jq -r '.[0]'\`;displayName=\`echo $line | jq -r '.[1]'\`;uri=\`echo $line | jq -r '.[2]'\`;planVersion=\`curl "$uri" 2>/dev/null | jq -r '.resources | .[] | select(.type == "Microsoft.Solutions/applications").plan.version'\`;echo "{\"planId\":\"$planId\",\"planDisplayName\":\"$displayName\",\"planVersion\":\"$planVersion\"}";done;echo "]}") | jq '(.plans | sort_by(.planId) | reverse)[0]'`
106106

107107

108108
AZURE_MARKETPLACE_PLAN_NAME=`echo $latestPlan | jq -r .planId`
@@ -136,7 +136,7 @@ jitApprovers="[{'displayName':'$AZURE_LOGGED_USER_EMAIL','id':'$AZURE_LOGGED_USE
136136

137137
# Deploy CBS
138138
output=$(az deployment group create \
139-
--name "CBS-E2E-deploy-sh" \
139+
--name "CBS-E2E-$location-deploy-sh" \
140140
--resource-group $resourceGroupName \
141141
--subscription $subscriptionId \
142142
--template-file "templates/cbs-managed-app.bicep" \
@@ -228,7 +228,7 @@ echo -e "${C_BLUE3}${C_GREY85}
228228

229229
# Deploy our infrastructure
230230
output=$(az deployment group create \
231-
--name "CBS-E2E-test-vm-deploy-sh" \
231+
--name "CBS-E2E-$location-test-vm-deploy-sh" \
232232
--resource-group $resourceGroupName \
233233
--subscription $subscriptionId \
234234
--template-file "templates/test-vm.bicep" \
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ location='<< location >>'
55
subscriptionId='<< subscription ID >>'
66

77
# resource group (RG) where the all resources will be deployed
8-
resourceGroupName="test-cbs-e2e-"`date '+%F-%H-%M-%S'`"-rg"
8+
resourceGroupName="test-cbs-qs-"`date '+%F-%H-%M-%S'`"-rg"
99

1010
# the availability zone (AZ) for VMs inside CBS, e.g. 1
1111
# check support article if given AZ is currently supported within region

script-modules/common.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
CLI_VERSION='1.0.5'
3+
CLI_VERSION='1.1.0'
44

55

66
# terminal colors

templates/cbs-managed-app.bicep

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ param alertRecipients string
3333
@description('CBS array name in Purity')
3434
param arrayName string
3535

36-
@allowed(['V10MUR1', 'V20MUR1', 'V20MP2R2'])
36+
@allowed(['V10MUR1', 'V10MP2R2', 'V20MUR1', 'V20MP2R2'])
3737
param cbsModelSku string
3838

3939
@allowed([1,2,3])
@@ -103,7 +103,7 @@ param azureMarketPlacePlanPublisher string = 'purestoragemarketplaceadmin'
103103
param azureMarketPlacePlanVersion string = '1.0.3'
104104
param azureMarketPlacePlanName string = 'cbs_azure_6_4_10'
105105

106-
param azureMarketPlacePlanOffer string = 'pure_storage_cloud_block_store_deployment'
106+
param azureMarketPlacePlanOffer string = 'pure_cloud_block_store_product_deployment'
107107

108108
@description('''
109109
This access will not be used, but enabling JIT increases security - with turned on, Azure will not provide any default access to CBS resources (Managed App) to service provider.

templates/modules/cbs-vnet.bicep

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
6868
{
6969
service: 'Microsoft.KeyVault'
7070
}
71+
{
72+
service: 'Microsoft.Storage'
73+
}
7174
]
7275
natGateway: {
7376
id: natgateway.id

templates/prerequisites.bicep

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ module vnetMngmtCustomRbacRole 'modules/custom-role.bicep' = {
6666
name: 'vnetMngmtCustomRbacRoleDeploy'
6767
params: {
6868
actions: [
69-
'Microsoft.Network/virtualNetworks/subnets/joinViaServiceEndpoint/action'
69+
'Microsoft.Network/virtualNetworks/subnets/joinViaServiceEndpoint/action', 'Microsoft.Network/virtualNetworks/subnets/join/action'
7070
]
7171
roleName: variables.outputs.vnetMngmtCustomRbacRoleName
7272
roleDescription: 'Used for deployment of Pure CBS into vNET'

0 commit comments

Comments
 (0)