This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Updated for OCP 4.11.5 | |
| # https://gist.github.com/ralvares/976dce493b43c498cf781f8b8dff28d3 | |
| ## Download Artifacts | |
| # housekeep old vm if necessary | |
| virsh destroy master-sno | |
| virsh undefine master-sno | |
| ## openshift-client |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| kubectl create secret generic cloud-secret \ | |
| --namespace='sock-shop' \ | |
| --from-literal=apikey='xxxxx-xxxxx-xxxxx-xxxxx-xxxxx' | |
| ---- | |
| apiVersion: cert-manager.io/v1 | |
| kind: Issuer | |
| metadata: | |
| name: cloud-venafi-issuer | |
| namespace: sock-shop | |
| spec: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| kubectl create secret docker-registry regcred --docker-password=TOKEN --docker-username=USERNAME --docker-server=quay.io -n workshop | |
| kubectl patch serviceaccount pipeline -p '{"secrets": [{"name": "regcred"}]}' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: policy.open-cluster-management.io/v1 | |
| kind: Policy | |
| metadata: | |
| name: policy-anyuid-enforce | |
| namespace: default | |
| annotations: | |
| policy.open-cluster-management.io/categories: AC Access Control | |
| policy.open-cluster-management.io/controls: AC-3 Access Enforcement | |
| policy.open-cluster-management.io/standards: NIST SP 800-53 | |
| spec: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: policy.open-cluster-management.io/v1 | |
| kind: Policy | |
| metadata: | |
| name: policy-anyuid-status | |
| namespace: default | |
| annotations: | |
| policy.open-cluster-management.io/categories: AC Access Control | |
| policy.open-cluster-management.io/controls: AC-3 Access Enforcement | |
| policy.open-cluster-management.io/standards: NIST SP 800-53 | |
| spec: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #LOGIN TO HUB CLUSTER | |
| oc login | |
| #Create a cluster to Import | |
| export CLUSTER_NAME=sno-autoimport | |
| oc new-project ${CLUSTER_NAME} | |
| oc label namespace ${CLUSTER_NAME} cluster.open-cluster-management.io/managedCluster=${CLUSTER_NAME} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| USER=$(oc get AutomationController -n ansible-automation-platform -o=jsonpath='{.items..status.adminUser}') | |
| PASS=$(oc get -n ansible-automation-platform secret $(oc get AutomationController -n ansible-automation-platform -o=jsonpath='{.items..status.adminPasswordSecret}') -o go-template='{{index .data "password" | base64decode}}') | |
| FILENAME=$(cat manifest_ansible-tower.zip | base64) | |
| ROUTE=$(oc get AutomationController -n ansible-automation-platform -o=jsonpath='{.items..status.URL}') | |
| header="Content-Type: application/json" | |
| request_body=$(cat <<EOF | |
| { | |
| "eula_accepted": true, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## Download Artifacts | |
| ## openshift-client | |
| curl -s https://mirror.openshift.com/pub/openshift-v4/clients/ocp/4.9/openshift-client-linux.tar.gz | tar zxvf - oc && mv oc /usr/local/bin | |
| ## butane | |
| wget https://mirror.openshift.com/pub/openshift-v4/clients/butane/latest/butane -O /usr/local/bin/butane && chmod +x /usr/local/bin/butane |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ### Namespace per tier ### | |
| oc new-project kiosk-backend | |
| oc new-project kiosk-frontend | |
| oc new-project kiosk-database | |
| oc new-app https://github.com/jankleinert/concession-kiosk-backend --name backend -n kiosk-backend | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| My environment is below: | |
| Centos8 | |
| libvirtd (libvirt) 7.0.0 | |
| libvirt network: default - Range 192.168.122.0/24 | |
| Domain and Single Node IP: *.sno.local 192.168.122.10 | |
| Extracting openshift-baremetal-install | |
| export VERSION=latest-4.8 |