Skip to content

Commit 1f9da7d

Browse files
maulik-shah999GitHub Enterprise
authored andcommitted
Merge pull request #376 from PrivateCloud-analytics/ms-olm-utils-azure
ARO: Support for 4.5.0 version and OLM Utils Integration
2 parents 1e060e4 + e06da7e commit 1f9da7d

29 files changed

+2182
-1355
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
2+
.DS_Store
3+
managed-openshift/azure/arm/azuredeploy.parameters.json

managed-openshift/azure/arm/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Cloud Pak for Data 4.0 on Azure Red Hat OpenShift (ARO)
1+
# Cloud Pak for Data 4.5 on Azure Red Hat OpenShift (ARO)
22

33
Cloud Pak for Data is an end to end platform that helps organizations in their journey to AI. It enables data engineers, data stewards, data scientists, and business analysts to collaborate using an integrated multiple-cloud platform.
44
Cloud Pak for Data uses IBM’s deep analytics portfolio to help organizations meet data and analytics challenges. The required building blocks (collect, organize, analyze, infuse) for information architecture are available using Cloud Pak for Data on Azure.
@@ -13,7 +13,7 @@ This reference deployment provides ARM templates to deploy Azure ARO Cluster wit
1313
- A highly available storage infrastructure with OpenShift Container Storage.
1414
- Scalable OpenShift compute nodes running Cloud Pak for Data services. See [Services](#cloud-pak-for-data-services) for the services that are enabled in this deployment.
1515

16-
Note: ARO at this time provisions OpenShift Container Platform v4.8.x. This may be changed when new versions are released. See support lifecycle [here](https://docs.microsoft.com/en-us/azure/openshift/support-lifecycle)
16+
Note: ARO at this time provisions OpenShift Container Platform v4.10.x. This may be changed when new versions are released. See support lifecycle [here](https://docs.microsoft.com/en-us/azure/openshift/support-lifecycle)
1717

1818
## Cost and licenses
1919
Cloud Pak for Data offers a try and buy experience.

managed-openshift/azure/arm/aro/azuredeploy.json

Lines changed: 292 additions & 119 deletions
Large diffs are not rendered by default.

managed-openshift/azure/arm/aro/nested/cloudpakdeploy.json

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,6 @@
2626
"description": "Admin Username"
2727
}
2828
},
29-
"ocuser": {
30-
"type": "string",
31-
"metadata": {
32-
"description": "OpenShift Username"
33-
}
34-
},
35-
"ocpassword": {
36-
"type": "securestring",
37-
"metadata": {
38-
"description": "OpenShift Password"
39-
}
40-
},
4129
"storageOption": {
4230
"type": "string",
4331
"metadata": {
@@ -123,7 +111,7 @@
123111
"type": "Microsoft.Compute/virtualMachines/extensions",
124112
"name": "[concat(parameters('bastionHostname'), '/deployOpenshift')]",
125113
"location": "[parameters('location')]",
126-
"apiVersion": "2019-07-01",
114+
"apiVersion": "2021-11-01",
127115
"tags": {
128116
"displayName": "DeployCloudPak",
129117
"app": "[parameters('redHatTags').app]",

managed-openshift/azure/arm/aro/nested/clusternode.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
"type": "Microsoft.Compute/virtualMachines",
9797
"name": "[parameters('hostname')]",
9898
"location": "[parameters('location')]",
99-
"apiVersion": "2019-07-01",
99+
"apiVersion": "2021-11-01",
100100
"tags": {
101101
"Role": "[parameters('role')]",
102102
"app": "[parameters('redHatTags').app]",
@@ -141,7 +141,7 @@
141141
"diagnosticsProfile": {
142142
"bootDiagnostics": {
143143
"enabled": true,
144-
"storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts', parameters('diagStorageAccount')), '2019-06-01').primaryEndpoints['blob']]"
144+
"storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts', parameters('diagStorageAccount')), '2021-08-01').primaryEndpoints['blob']]"
145145
}
146146
}
147147
}

managed-openshift/azure/arm/aro/nested/ocs.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
}
4646
},
4747
"openshiftPassword": {
48-
"type": "string",
48+
"type": "securestring",
4949
"metadata": {
5050
"description": "Openshift Password"
5151
}
@@ -101,7 +101,7 @@
101101
"type": "Microsoft.Compute/virtualMachines/extensions",
102102
"name": "[concat(parameters('bastionHostname'), '/deployOpenshift')]",
103103
"location": "[parameters('location')]",
104-
"apiVersion": "2019-07-01",
104+
"apiVersion": "2021-11-01",
105105
"tags": {
106106
"displayName": "InstallOCS",
107107
"app": "[parameters('redHatTags').app]",

managed-openshift/azure/arm/aro/prereqs/prereq.azuredeploy.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
"resources": [
7474
{
7575
"type": "Microsoft.DomainRegistration/domains",
76-
"apiVersion": "2019-08-01",
76+
"apiVersion": "2021-03-01",
7777
"dependsOn": [
7878
"[resourceId('Microsoft.Network/dnszones', parameters('dnsZoneName'))]"
7979
],
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
#!/bin/sh
2+
3+
set -x
4+
5+
export LOCATION=$1
6+
export DOMAINNAME=$2
7+
export SUDOUSER=$3
8+
export WORKERNODECOUNT=$4
9+
export CPDNAMESPACE=$5
10+
export STORAGEOPTION=$6
11+
export APIKEY=$7
12+
export OPENSHIFTUSER=$8
13+
export OPENSHIFTPASSWORD=$9
14+
export CUSTOMDOMAIN=${10}
15+
export CLUSTERNAME=${11}
16+
export CHANNEL=${12}
17+
export VERSION=${13}
18+
19+
export OPERATORNAMESPACE=ibm-common-services
20+
export INSTALLERHOME=/home/$SUDOUSER/.ibm
21+
export OCPTEMPLATES=/home/$SUDOUSER/.openshift/templates
22+
export CPDTEMPLATES=/mnt/.cpd/templates
23+
24+
runuser -l $SUDOUSER -c "mkdir -p $INSTALLERHOME"
25+
runuser -l $SUDOUSER -c "mkdir -p $OCPTEMPLATES"
26+
runuser -l $SUDOUSER -c "sudo mkdir -p $CPDTEMPLATES"
27+
28+
#CPD Config
29+
30+
# runuser -l $SUDOUSER -c "wget https://github.com/IBM/cloud-pak-cli/releases/download/v3.8.0/cloudctl-linux-amd64.tar.gz -O $CPDTEMPLATES/cloudctl-linux-amd64.tar.gz"
31+
# runuser -l $SUDOUSER -c "https://github.com/IBM/cloud-pak-cli/releases/download/v3.8.0/cloudctl-linux-amd64.tar.gz.sig -O $CPDTEMPLATES/cloudctl-linux-amd64.tar.gz.sig"
32+
# runuser -l $SUDOUSER -c "cd $CPDTEMPLATES && sudo tar -xvf cloudctl-linux-amd64.tar.gz -C /usr/bin"
33+
# runuser -l $SUDOUSER -c "chmod +x /usr/bin/cloudctl-linux-amd64"
34+
# runuser -l $SUDOUSER -c "sudo mv /usr/bin/cloudctl-linux-amd64 /usr/bin/cloudctl"
35+
36+
### Install Prereqs: CPD CLI, JQ, and Podman
37+
## Download & Install CPD CLI
38+
runuser -l $SUDOUSER -c "sudo wget https://github.com/IBM/cpd-cli/releases/download/v11.0.0/cpd-cli-linux-EE-11.0.0.tgz -O $CPDTEMPLATES/cpd-cli-linux-EE-11.0.0.tgz"
39+
runuser -l $SUDOUSER -c "cd $CPDTEMPLATES && sudo tar -xvf cpd-cli-linux-EE-11.0.0.tgz"
40+
# Move cpd-cli, plugins and license in the CPDTEMPLATES folder
41+
runuser -l $SUDOUSER -c "sudo mv $CPDTEMPLATES/cpd-cli-linux-EE-11.0.0-20/* $CPDTEMPLATES"
42+
runuser -l $SUDOUSER -c "sudo rm -rf $CPDTEMPLATES/cpd-cli-linux-EE-11.0.0*"
43+
44+
# Service Account Token for CPD installation
45+
runuser -l $SUDOUSER -c "oc new-project $CPDNAMESPACE"
46+
47+
# Service Account Token for CPD installation
48+
runuser -l $SUDOUSER -c "oc new-project $OPERATORNAMESPACE"
49+
50+
## Installing jq
51+
runuser -l $SUDOUSER -c "sudo wget https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 -O $CPDTEMPLATES/jq"
52+
runuser -l $SUDOUSER -c "sudo mv $CPDTEMPLATES/jq /usr/bin"
53+
runuser -l $SUDOUSER -c "sudo chmod +x /usr/bin/jq"
54+
55+
## Installing Podman
56+
runuser -l $SUDOUSER -c "sudo yum install podman -y"
57+
58+
# Set url
59+
if [[ $CUSTOMDOMAIN == "true" || $CUSTOMDOMAIN == "True" ]];then
60+
export SUBURL="${CLUSTERNAME}.${DOMAINNAME}"
61+
else
62+
export SUBURL="${DOMAINNAME}.${LOCATION}.aroapp.io"
63+
fi
64+
65+
#Login
66+
var=1
67+
while [ $var -ne 0 ]; do
68+
echo "Attempting to login $OPENSHIFTUSER to https://api.${SUBURL}:6443"
69+
oc login "https://api.${SUBURL}:6443" -u $OPENSHIFTUSER -p $OPENSHIFTPASSWORD --insecure-skip-tls-verify=true
70+
var=$?
71+
echo "exit code: $var"
72+
done
73+
74+
# CPD CLI OCP Login
75+
runuser -l $SUDOUSER -c "sudo $CPDTEMPLATES/cpd-cli manage login-to-ocp --server \"https://api.${SUBURL}:6443\" -u $OPENSHIFTUSER -p $OPENSHIFTPASSWORD"
76+
77+
# Update global pull secret
78+
79+
export ENTITLEMENT_USER=cp
80+
export ENTITLEMENT_KEY=$APIKEY
81+
pull_secret=$(echo -n "$ENTITLEMENT_USER:$ENTITLEMENT_KEY" | base64 -w0)
82+
oc get secret/pull-secret -n openshift-config -o jsonpath='{.data.\.dockerconfigjson}' | base64 -d > $OCPTEMPLATES/dockerconfig.json
83+
sed -i -e 's|:{|:{"cp.icr.io":{"auth":"'$pull_secret'"\},|' $OCPTEMPLATES/dockerconfig.json
84+
oc set data secret/pull-secret -n openshift-config --from-file=.dockerconfigjson=$OCPTEMPLATES/dockerconfig.json
85+
86+
# Check nodestatus if they are ready.
87+
88+
while true; do
89+
node_status=$(oc get nodes | grep -E "SchedulingDisabled|NotReady")
90+
if [[ -z $node_status ]]; then
91+
echo -e "\n******All nodes are running now.******"
92+
break
93+
fi
94+
echo -e "\n******Waiting for nodes to get ready.******"
95+
oc get nodes --no-headers | awk '{print $1 " " $2}'
96+
echo -e "\n******sleeping for 60Secs******"
97+
sleep 60
98+
done

0 commit comments

Comments
 (0)