|
2 | 2 | apiVersion: tekton.dev/v1beta1 |
3 | 3 | kind: Pipeline |
4 | 4 | metadata: |
5 | | - name: mas-masdevops-deploy |
| 5 | + name: mas-cli-deploy |
6 | 6 | namespace: default |
7 | 7 | spec: |
8 | 8 | workspaces: |
|
13 | 13 | default: "maximo-suite" |
14 | 14 | - name: mas-instance-id |
15 | 15 | type: string |
16 | | - default: "maximo" |
| 16 | + default: "inst1" |
17 | 17 | - name: mas-workspace-id |
18 | 18 | type: string |
19 | 19 | default: "maxworkspace" |
@@ -209,20 +209,16 @@ spec: |
209 | 209 | image: quay.io/congxdev/ibm-pak-ubi:latest |
210 | 210 | script: | |
211 | 211 | ### this is the method to load certs to the mas installer |
212 | | - mkdir -p $(workspaces.ws.path)/masconfig/certs/core/ |
213 | | - wget -qO - https://letsencrypt.org/certs/lets-encrypt-r3.pem > $(workspaces.ws.path)/masconfig/certs/core/ca.crt |
214 | | - oc get secret letsencrypt-certs -n openshift-config -o jsonpath="{.data['tls\.key']}" | base64 -d > $(workspaces.ws.path)/masconfig/certs/core/tls.key |
215 | | - oc get secret letsencrypt-certs -n openshift-config -o jsonpath="{.data['tls\.crt']}" | base64 -d > $(workspaces.ws.path)/masconfig/certs/core/tls.crt |
216 | | - ls $(workspaces.ws.path)/masconfig/certs/core/ |
217 | | - cat $(workspaces.ws.path)/masconfig/certs/core/tls.key |
218 | | - cat $(workspaces.ws.path)/masconfig/certs/core/tls.crt |
| 212 | + #mkdir -p $(workspaces.ws.path)/masconfig/certs |
| 213 | + #wget -qO - https://letsencrypt.org/certs/lets-encrypt-r3.pem > $(workspaces.ws.path)/masconfig/certs/ca.crt |
| 214 | + #oc get secret letsencrypt-certs -n openshift-config -o jsonpath="{.data['tls\.key']}" | base64 -d > $(workspaces.ws.path)/masconfig/certs/tls.key |
| 215 | + #oc get secret letsencrypt-certs -n openshift-config -o jsonpath="{.data['tls\.crt']}" | base64 -d > $(workspaces.ws.path)/masconfig/certs/tls.crt |
| 216 | + #ls $(workspaces.ws.path)/masconfig/certs/ |
| 217 | + #cat $(workspaces.ws.path)/masconfig/certs/tls.key |
| 218 | + #cat $(workspaces.ws.path)/masconfig/certs/tls.crt |
219 | 219 |
|
220 | 220 | # copy letsencrypt-certs secret to the name where maximo is expecting to find it. |
221 | | - if oc get secret -n openshift-ingress router-certs-default; then |
222 | | - echo "router-certs-default secret already exists" |
223 | | - else |
224 | | - oc get secret letsencrypt-certs -n openshift-ingress -o yaml | yq '.metadata["name"]="router-certs-default"' | oc apply -n openshift-ingress -f - |
225 | | - fi |
| 221 | + oc get secret letsencrypt-certs -n openshift-ingress -o yaml | yq '.metadata["name"]="router-certs-default"' | oc apply -n openshift-ingress -f - |
226 | 222 | - name: install-mas |
227 | 223 | retries: 2 |
228 | 224 | runAfter: |
@@ -277,21 +273,25 @@ spec: |
277 | 273 | script: | |
278 | 274 | #!/usr/bin/env bash |
279 | 275 | # extract license id from license.dat |
280 | | - export SLS_LICENSE_ID=$(cat $(workspaces.ws.path)/license.dat | head -1 | cut -d ' ' -f3) |
281 | | - export SLS_LICENSE_FILE=$(workspaces.ws.path)/license.dat |
282 | | -
|
283 | | - export IBM_ENTITLEMENT_KEY=$(cat $(workspaces.ws.path)/ek.dat) |
284 | | -
|
285 | | - export MAS_INSTANCE_ID=$(params.mas-instance-id) |
286 | | -
|
287 | | - export MAS_CONFIG_DIR=$(workspaces.ws.path)/masconfig |
288 | | - export MAS_MANUAL_CERT_MGMT=True |
| 276 | + export LICENSE_ID=$(cat $(workspaces.ws.path)/license.dat | head -1 | cut -d ' ' -f3) |
289 | 277 |
|
290 | | - export UDS_CONTACT_EMAIL=$(params.uds-email) |
291 | | - export UDS_CONTACT_FIRSTNAME=$(params.uds-firstname) |
292 | | - export UDS_CONTACT_LASTNAME=$(params.uds-lastname) |
| 278 | + export ENTITLEMENT_KEY=$(cat $(workspaces.ws.path)/ek.dat) |
293 | 279 |
|
294 | | - export MAS_WORKSPACE_ID=$(params.mas-workspace-id) |
295 | | - export MAS_WORKSPACE_NAME=$(params.mas-workspace-name) |
| 280 | + #possible setup for manual cert management |
| 281 | + # got this via https://github.com/ibm-mas/ansible-devops/pull/501 |
| 282 | + #export MAS_CONFIG_DIR=$(workspaces.ws.path)/masconfig |
| 283 | + #export MAS_MANUAL_CERT_MGMT=True |
296 | 284 |
|
297 | | - ansible-playbook ibm.mas_devops.oneclick_core |
| 285 | + #run mas install non-interactively |
| 286 | + mas install -i $(params.mas-instance-id) \ |
| 287 | + --accept-license \ |
| 288 | + -w $(params.mas-workspace-id) \ |
| 289 | + -W "$(params.mas-workspace-name)" \ |
| 290 | + -c $(params.mas-catalog-version) \ |
| 291 | + --mas-channel $(params.mas-channel) \ |
| 292 | + --ibm-entitlement-key $ENTITLEMENT_KEY \ |
| 293 | + --license-id $LICENSE_ID --license-file $(workspaces.ws.path)/license.dat \ |
| 294 | + --uds-email $(params.uds-email) --uds-firstname $(params.uds-firstname) --uds-lastname $(params.uds-lastname) \ |
| 295 | + --storage-rwo $(params.storage-rwo) --storage-rwx $(params.storage-rwx) \ |
| 296 | + --storage-pipeline $(params.storage-pipeline) --storage-accessmode $(params.storage-accessmode) \ |
| 297 | + --no-confirm |
0 commit comments