├── LICENSE ├── README.md ├── mtc ├── README.md ├── bookbag │ ├── .workshop │ │ ├── build │ │ ├── develop-settings.sh │ │ ├── scripts │ │ │ ├── .gitignore │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── VERSION │ │ │ ├── build-workshop.sh │ │ │ ├── default-settings.sh │ │ │ ├── delete-images.sh │ │ │ ├── delete-personal.sh │ │ │ ├── delete-resources.sh │ │ │ ├── delete-spawner.sh │ │ │ ├── delete-workshop.sh │ │ │ ├── deploy-katacoda.sh │ │ │ ├── deploy-personal.sh │ │ │ ├── deploy-spawner.sh │ │ │ ├── katacoda-volumes.json │ │ │ ├── parse-arguments.sh │ │ │ ├── prepull-images.sh │ │ │ └── setup-environment.sh │ │ ├── settings.sh │ │ └── setup │ ├── Dockerfile │ ├── README.adoc │ ├── build-template.yaml │ ├── deploy-template.yaml │ ├── deploy │ │ ├── bookbag-template-old.yaml │ │ └── sample-cm.yaml │ ├── envvars │ │ ├── gateway.sh │ │ ├── terminal.sh │ │ └── workshop.sh │ ├── workshop │ │ ├── config.js │ │ ├── content │ │ │ ├── Conclusion.adoc │ │ │ ├── Debug.adoc │ │ │ ├── Environment.adoc │ │ │ ├── Hooks.adoc │ │ │ ├── Intro.adoc │ │ │ ├── Overview.adoc │ │ │ ├── Prereqs.adoc │ │ │ ├── _includes │ │ │ │ └── include-file │ │ │ ├── exercises │ │ │ │ ├── Ex1.adoc │ │ │ │ ├── Ex2.adoc │ │ │ │ ├── Ex3.adoc │ │ │ │ ├── Ex4.adoc │ │ │ │ └── debug │ │ │ │ │ ├── gvk.adoc │ │ │ │ │ ├── misconfig.adoc │ │ │ │ │ └── stage-pods.adoc │ │ │ ├── files │ │ │ │ ├── cpma.yaml │ │ │ │ ├── mssql-scc.yaml │ │ │ │ └── sock-shop-scc.yaml │ │ │ ├── screenshots │ │ │ │ ├── debug │ │ │ │ │ ├── ex1 │ │ │ │ │ │ ├── mtc-cluster-edit.png │ │ │ │ │ │ ├── mtc-cluster-error.png │ │ │ │ │ │ ├── mtc-cluster-failure.png │ │ │ │ │ │ ├── mtc-cluster-fixed.png │ │ │ │ │ │ └── mtc-update-cluster.png │ │ │ │ │ ├── ex2 │ │ │ │ │ │ ├── copy-options.png │ │ │ │ │ │ └── stage-pods.png │ │ │ │ │ └── ex3 │ │ │ │ │ │ ├── debug-view-clicked.png │ │ │ │ │ │ ├── debug-view.png │ │ │ │ │ │ ├── migmigration-complete-warnings.png │ │ │ │ │ │ ├── migmigration-failed.png │ │ │ │ │ │ ├── migplan.png │ │ │ │ │ │ ├── migstorage-bucket.png │ │ │ │ │ │ └── pipeline-view.png │ │ │ │ ├── lab1 │ │ │ │ │ ├── LabEnv (1).png │ │ │ │ │ ├── LabEnv.png │ │ │ │ │ ├── lab-env-overview.png │ │ │ │ │ ├── labenv-overview.png │ │ │ │ │ ├── labenv-overview2.png │ │ │ │ │ └── request-env-gg.png │ │ │ │ ├── lab2 │ │ │ │ │ ├── minio-bucket-creation.png │ │ │ │ │ ├── minio-mybucket.png │ │ │ │ │ ├── minio_login.png │ │ │ │ │ ├── mtc-replication-repository.png │ │ │ │ │ ├── mtcUI.png │ │ │ │ │ ├── noobaa-mgmt.png │ │ │ │ │ └── ssh-details-gg.png │ │ │ │ ├── lab3 │ │ │ │ │ ├── cam-main-screen.png │ │ │ │ │ ├── cam-main-screen.png.old.png │ │ │ │ │ ├── copypv.png │ │ │ │ │ ├── copypv.png.old.png │ │ │ │ │ ├── mig-process.png │ │ │ │ │ ├── migtooling.png │ │ │ │ │ ├── movepv.png │ │ │ │ │ ├── movepv.png.old.png │ │ │ │ │ ├── mtcprocess.png │ │ │ │ │ ├── stage-migrate.png │ │ │ │ │ └── velero.png │ │ │ │ ├── lab4 │ │ │ │ │ ├── cam-add-cluster-success.png │ │ │ │ │ ├── cam-add-cluster.png │ │ │ │ │ ├── cam-add-repo-success.png │ │ │ │ │ ├── cam-add-repo.png │ │ │ │ │ ├── cam-clusters-added.png │ │ │ │ │ ├── cam-main-screen.png │ │ │ │ │ ├── cam-mig-plan-1.png │ │ │ │ │ ├── cam-mig-plan-2.png │ │ │ │ │ ├── cam-mig-plan-3.png │ │ │ │ │ ├── cam-mig-plan-4.png │ │ │ │ │ ├── cam-mig-plan-5.png │ │ │ │ │ ├── cam-mig-plan-added.png │ │ │ │ │ ├── cam-migration-complete.png │ │ │ │ │ ├── cam-progress-bar.png │ │ │ │ │ ├── cam-quiesce.png │ │ │ │ │ ├── cam-repo-added.png │ │ │ │ │ ├── cpma-mssql-report.png │ │ │ │ │ ├── file-upload-arch.png │ │ │ │ │ ├── file-uploader-app.png │ │ │ │ │ ├── file-uploader-app.png.old.png │ │ │ │ │ ├── file-uploader-destination.png │ │ │ │ │ ├── file-uploader-ui.png │ │ │ │ │ ├── mtc-add-cluster.png │ │ │ │ │ ├── mtc-add-migration-plan.png │ │ │ │ │ ├── mtc-clusters-added.png │ │ │ │ │ ├── mtc-main-screen.png │ │ │ │ │ ├── mtc-mig-plan-added.png │ │ │ │ │ ├── mtc-mig-plan-copyoptions.png │ │ │ │ │ ├── mtc-mig-plan-general.png │ │ │ │ │ ├── mtc-mig-plan-hooks.png │ │ │ │ │ ├── mtc-mig-plan-migoptions.png │ │ │ │ │ ├── mtc-mig-plan-namespaces.png │ │ │ │ │ ├── mtc-mig-plan-pvolumes.png │ │ │ │ │ ├── mtc-mig-plan-validation.png │ │ │ │ │ ├── mtc-migration-complete.png │ │ │ │ │ ├── mtc-progress-bar.png │ │ │ │ │ ├── mtc-quiesce.png │ │ │ │ │ ├── mtc-startmig.png │ │ │ │ │ └── old │ │ │ │ │ │ ├── mtc-add-cluster.png │ │ │ │ │ │ ├── mtc-mig-plan-added.png │ │ │ │ │ │ ├── mtc-migration-complete.png │ │ │ │ │ │ └── mtc-quiesce.png │ │ │ │ ├── lab5 │ │ │ │ │ ├── cam-add-cluster-success.png │ │ │ │ │ ├── cam-add-cluster.png │ │ │ │ │ ├── cam-add-repo-success.png │ │ │ │ │ ├── cam-add-repo.png │ │ │ │ │ ├── cam-clusters-added.png │ │ │ │ │ ├── cam-main-screen.png │ │ │ │ │ ├── cam-mig-plan-1.png │ │ │ │ │ ├── cam-mig-plan-2.png │ │ │ │ │ ├── cam-mig-plan-3.png │ │ │ │ │ ├── cam-mig-plan-4.png │ │ │ │ │ ├── cam-mig-plan-5.png │ │ │ │ │ ├── cam-mig-plan-added.png │ │ │ │ │ ├── cam-migration-complete.png │ │ │ │ │ ├── cam-progress-bar.png │ │ │ │ │ ├── cam-quiesce.png │ │ │ │ │ ├── cam-repo-added.png │ │ │ │ │ ├── cpma-mssql-report.png │ │ │ │ │ ├── mssql-add-product.png │ │ │ │ │ ├── mssql-add-product.png.old.png │ │ │ │ │ ├── mssql-added-product.png │ │ │ │ │ ├── mssql-added-product.png.old.png │ │ │ │ │ ├── mssql-app-route.png │ │ │ │ │ ├── mssql-namespace-detail.png │ │ │ │ │ ├── mssql-persistent-app-ocp4.png │ │ │ │ │ ├── mssql-persistent-app-ocp4.png.old.png │ │ │ │ │ ├── mssql-product-catalog.png │ │ │ │ │ ├── mssql-product-catalog.png.old.png │ │ │ │ │ ├── mssql-pv-yaml.png │ │ │ │ │ ├── mssql-pv.png │ │ │ │ │ ├── mssql-pvc.png │ │ │ │ │ ├── mssql-pvcs-cpma.png │ │ │ │ │ ├── mssql-sccs-cpma.png │ │ │ │ │ ├── mtc-migplan-complete.png │ │ │ │ │ ├── mtc-migplan-copyoptions.png │ │ │ │ │ ├── mtc-migplan-general.png │ │ │ │ │ ├── mtc-migplan-hooks.png │ │ │ │ │ ├── mtc-migplan-migrate.png │ │ │ │ │ ├── mtc-migplan-namespaces.png │ │ │ │ │ ├── mtc-migplan-progress.png │ │ │ │ │ ├── mtc-migplan-pvs.png │ │ │ │ │ ├── mtc-migplan-quiesce.png │ │ │ │ │ ├── mtc-migplan-validated.png │ │ │ │ │ ├── mtc-migplan-warning.png │ │ │ │ │ ├── mtc-migplans.png │ │ │ │ │ ├── ocp-4-console.png │ │ │ │ │ └── old │ │ │ │ │ │ ├── mtc-migplan-complete.png │ │ │ │ │ │ ├── mtc-migplan-migrate.png │ │ │ │ │ │ ├── mtc-migplan-progress.png │ │ │ │ │ │ └── mtc-migplan-quiesce.png │ │ │ │ ├── lab6 │ │ │ │ │ ├── ocp4-sock-shop-pv-yaml.png │ │ │ │ │ ├── ocp4-sock-shop-pvcs.png │ │ │ │ │ ├── ocp4-sock-shop.png │ │ │ │ │ ├── sock-shop-arch.png │ │ │ │ │ ├── sock-shop-main.png │ │ │ │ │ ├── sock-shop-mig-plan-2.png │ │ │ │ │ ├── sock-shop-mig-plan-3.png │ │ │ │ │ ├── sock-shop-mig-plan-4.png │ │ │ │ │ ├── sock-shop-mig-plan-5.png │ │ │ │ │ ├── sock-shop-mig-plan-complete.png │ │ │ │ │ ├── sock-shop-mig-plan-quiesce.png │ │ │ │ │ ├── sock-shop-mig-plan-view.png │ │ │ │ │ ├── sock-shop-mig-plan.png │ │ │ │ │ ├── sock-shop-progress.png │ │ │ │ │ ├── sock-shop-pvc-cpma.png │ │ │ │ │ ├── sock-shop-register.png │ │ │ │ │ ├── sock-shop-scc-cpma.png │ │ │ │ │ ├── sockshop-frontend.png │ │ │ │ │ ├── ssArchitecture.png │ │ │ │ │ └── success.png │ │ │ │ ├── lab7 │ │ │ │ │ ├── mig-custom-resources.png │ │ │ │ │ ├── mig-plan-failed.png │ │ │ │ │ ├── mig-view-debug-resources_1.png │ │ │ │ │ └── mig-view-debug-resources_2.png │ │ │ │ └── lab8 │ │ │ │ │ ├── mediawiki.png │ │ │ │ │ ├── mtc-migplan-complete.png │ │ │ │ │ ├── mtc-migplan-copyoptions.png │ │ │ │ │ ├── mtc-migplan-emptyhooks.png │ │ │ │ │ ├── mtc-migplan-general.png │ │ │ │ │ ├── mtc-migplan-hookadded.png │ │ │ │ │ ├── mtc-migplan-hooks1.png │ │ │ │ │ ├── mtc-migplan-hooks2.png │ │ │ │ │ ├── mtc-migplan-migrate.png │ │ │ │ │ ├── mtc-migplan-namespaces.png │ │ │ │ │ ├── mtc-migplan-progress.png │ │ │ │ │ ├── mtc-migplan-pvs.png │ │ │ │ │ ├── mtc-migplan-validated.png │ │ │ │ │ └── old │ │ │ │ │ ├── mtc-migplan-complete.png │ │ │ │ │ ├── mtc-migplan-hooks1.png │ │ │ │ │ ├── mtc-migplan-hooks2.png │ │ │ │ │ └── mtc-migplan-progress.png │ │ │ └── scripts │ │ │ │ ├── cors.yaml │ │ │ │ └── lab8 │ │ │ │ ├── deploy.sh │ │ │ │ ├── destroy.sh │ │ │ │ └── probe.sh │ │ ├── modules.yaml │ │ └── workshop.yaml │ └── workshop_vars.json └── screenshots │ ├── bookbag-docs.png │ ├── rhpds-myservices.png │ └── rhpds.png └── oadp ├── README.md ├── bookbag ├── .workshop │ ├── build │ ├── develop-settings.sh │ ├── scripts │ │ ├── .gitignore │ │ ├── LICENSE │ │ ├── README.md │ │ ├── VERSION │ │ ├── build-workshop.sh │ │ ├── default-settings.sh │ │ ├── delete-images.sh │ │ ├── delete-personal.sh │ │ ├── delete-resources.sh │ │ ├── delete-spawner.sh │ │ ├── delete-workshop.sh │ │ ├── deploy-katacoda.sh │ │ ├── deploy-personal.sh │ │ ├── deploy-spawner.sh │ │ ├── katacoda-volumes.json │ │ ├── parse-arguments.sh │ │ ├── prepull-images.sh │ │ └── setup-environment.sh │ ├── settings.sh │ └── setup ├── Dockerfile ├── README.adoc ├── apps │ ├── data-mover-example │ │ └── minimal-3csivol.yaml │ ├── minimal-3csivol │ │ └── minimal-3csivol.yaml │ ├── mssql-persistent │ │ └── mssql-persistent-template.yaml │ ├── mysql-persistent │ │ └── mysql-persistent-csi.yaml │ ├── nginx-stateless │ │ └── nginx-stateless-template.yaml │ └── parks-app │ │ └── manifest.yaml ├── build-template.yaml ├── deploy-template.yaml ├── envvars │ ├── gateway.sh │ ├── terminal.sh │ └── workshop.sh └── workshop │ ├── config.js │ ├── content │ ├── Conclusion.adoc │ ├── Environment.adoc │ ├── Hooks.adoc │ ├── Intro.adoc │ ├── Overview.adoc │ ├── Prereqs.adoc │ ├── Troubleshooting.adoc │ ├── _includes │ │ └── include-file │ ├── exercises │ │ ├── Ex1.adoc │ │ ├── Ex2.adoc │ │ ├── Ex3.adoc │ │ ├── Ex4.adoc │ │ └── troubleshooting │ │ │ ├── crashloopbackoff.adoc │ │ │ ├── csi-labels.adoc │ │ │ └── velero-pod-errors.adoc │ ├── lab-reset.adoc │ ├── screenshots │ │ ├── OperatorHub-OADP.png │ │ └── lab5 │ │ │ ├── datamoverBackup.png │ │ │ ├── datamoverRestore.png │ │ │ ├── mssql-add-product.png │ │ │ ├── mssql-added-product.png │ │ │ ├── mssql-product-catalog.png │ │ │ ├── mysql-todolist-add.png │ │ │ ├── mysql-todolist-added.png │ │ │ ├── mysql-todolist-webUI.png │ │ │ └── nginx-webUI.png │ └── slides │ │ ├── OADP Architecture │ │ └── 4.jpg │ │ └── OADP Solution Overview │ │ └── 9.jpg │ ├── modules.yaml │ └── workshop.yaml ├── deploy.sh ├── install-deploy.sh └── screenshots ├── bookbag-docs.png ├── rhpds-myservices.png └── rhpds.png /README.md: -------------------------------------------------------------------------------- 1 | # labs 2 | Tutorials and labs focused on educating users 3 | -------------------------------------------------------------------------------- /mtc/README.md: -------------------------------------------------------------------------------- 1 | # OpenShift Migration Tookit for Containers (MTC) Lab 2 | 3 | This guide will provide you with hands-on exposure to the new OpenShift Migration Tooling through a series of labs migrating application workloads (both stateful and stateless) between OpenShift Clusters. 4 | 5 | ## Description 6 | 7 | Migrates application workloads from Cluster A to Cluster B (includes ui, controller, Velero/Restic, plugins, etc). This application is available for installation through the Operator Hub/OLM. This course requires both the MTC OCP3 and OCP4 services from RHPDS. 8 | 9 | ## Goals 10 | 11 | * Migrating applications from Red Hat OpenShift 3 clusters to Red Hat OpenShift 12 | 4 clusters using the Migration Toolkit for Containers (MTC) provided by OpenShift 13 | Container Platform 4 leveraging both the UI and API. 14 | 15 | * Use cases that migrate applications preserving state, including how to migrate 16 | OpenShift Container Storage 3 (Gluster) to OpenShift Container Storage 4 (Ceph). 17 | 18 | * Tips, techniques, and best-practices for debugging failed migrations. 19 | 20 | ## Setup Steps 21 | 22 | Step 1: Browse to RHPDS: https://rhpds.redhat.com 23 | 24 | ![RHPDS](screenshots/rhpds.png) 25 | 26 | Step 2: Login with your RHPDS username/password. 27 | 28 | Step 3: Hover over Services Menu >> Click the Catalogs menu and open the “Openshift Workshop” catalog. 29 | 30 | Step 4: Order two services as follows: 31 | 32 | * Migration Toolkit for Containers (OCP3) 33 | * Migration Toolkit for Containers (OCP4) 34 | 35 | Step 5: Wait for both services to become available. ```This will take ~60 min.```. When the environment has finished provisioning you will receive an email with confirmation and access details for the labs. 36 | 37 | ![RHPDS-MyServices](screenshots/rhpds-myservices.png) 38 | 39 | Step 6: Open a terminal window. You will use this to SSH into your OCP4 cluster. SSH into the OCP4 bastion host using the information provided in RHPDS for the provisioned service. 40 | 41 | ```bash 42 | $ ssh tsanders-redhat.com@bastion.clayton-a831.example.opentlc.com 43 | The authenticity of host 'bastion.clayton-a831.example.opentlc.com (54.196.40.213)' can't be established. 44 | ECDSA key fingerprint is SHA256:GmGLppSGEshB6jBVODuMnAQrZhOVUTnflNZV4WIfn+E. 45 | Are you sure you want to continue connecting (yes/no/[fingerprint])? yes 46 | Warning: Permanently added 'bastion.clayton-a831.example.opentlc.com,54.196.40.213' (ECDSA) to the list of known hosts. 47 | tsanders-redhat.com@bastion.clayton-a831.example.opentlc.com's password: 48 | ``` 49 | 50 | As soon as you log in, you will be greeted by a "Welcome to MTC LAB" screen. This will ask you to provide the bastion hostname of the OCP3 cluster for your lab. This will be the first Master of your OCP3. You can find this information in the email you received after your OCP3 cluster was provisioned. Paste the whole hostname of OCP3 bastion host into the terminal. 51 | It will look something like: 52 | 53 | ``` 54 | Please enter your OCP3 bastion hostname. 55 | That is the one you received FOR YOUR OCP3 environment: master1.fp62b.sandbox1012.opentlc.com 56 | ``` 57 | 58 | Step 7: After entering the bastion hostname, press enter, sit back and relax while the scripts provision Bookbag instruction pages for you. Be patient while the script configures and deploys the necessary pods. The process takes around 2 minutes. 59 | When the script finishes, it will present you with a web page address which will lead you through the rest of the lab, and it will look similar to this: 60 | 61 | ``` 62 | 63 | Your Bookbag is up and running. 64 | You can reach it via: 65 | 66 | https://bookbag-lab-instructions.apps.cluster-a6c4.a6c4.sandbox1878.opentlc.com 67 | 68 | ``` 69 | 70 | 71 | Step 8: Make a note of the Bookbag address. This is where your lab instructions will be accessible at. Launch the auto-generated bookbag documentation by going to the supplied address in your web browser. You may need to accept self-signed certificates. When loaded Lab Instructions page will look like this: 72 | 73 | ![Bookbag-Docs](screenshots/bookbag-docs.png) 74 | 75 | Step 9. Proceed with Lab by following steps outlined in bookbag documentation. 76 | -------------------------------------------------------------------------------- /mtc/bookbag/.workshop/build: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # This 'build' script is where you can add steps that should be run when 4 | # building the image for your custom workshop. 5 | 6 | # Move the workshop content to '/opt/app-root/workshop'. It could be left 7 | # at it's default location of '/opt/app-root/src/workshop', but by moving it, 8 | # it is out of view of the user doing the workshop and they aren't likely to 9 | # delete it by accident and break the display of the workshop content. 10 | mv workshop /opt/app-root/workshop 11 | 12 | # Move the workshop envvars 13 | mv envvars /opt/app-root/envvars 14 | 15 | # Also delete some of the other files from the top of the Git repository we 16 | # don't need for running the workshop. 17 | rm -f Dockerfile README.md LICENSE 18 | 19 | # If the workshop requires Git, it is necessary to set some defaults for 20 | # the name and email of the user for Git. 21 | #git config --global user.email "user@example.com" 22 | #git config --global user.name "Example User" 23 | -------------------------------------------------------------------------------- /mtc/bookbag/.workshop/develop-settings.sh: -------------------------------------------------------------------------------- 1 | AUTH_USERNAME=workshop 2 | AUTH_PASSWORD=workshop 3 | -------------------------------------------------------------------------------- /mtc/bookbag/.workshop/scripts/.gitignore: -------------------------------------------------------------------------------- 1 | *.swp 2 | -------------------------------------------------------------------------------- /mtc/bookbag/.workshop/scripts/README.md: -------------------------------------------------------------------------------- 1 | Workshop Scripts 2 | ================ 3 | 4 | This repository contains scripts to help with deploying and building workshops. It should be added as a Git submodule at the location ``.workshop/scripts`` of a Git repository for a workshop. 5 | 6 | Adding the Sub Module 7 | --------------------- 8 | 9 | To add this Git repository as a Git submodule to an existing Git repository for a workshop, run: 10 | 11 | ``` 12 | git submodule add -b stable/1.x https://github.com/openshift-homeroom/spawner-scripts.git .workshop/scripts 13 | ``` 14 | 15 | Once added as a Git submodule, to pull the source code for it, run: 16 | 17 | ``` 18 | git submodule update --remote 19 | ``` 20 | 21 | Configuring Deployments 22 | ----------------------- 23 | 24 | To configure the deployments created by the scripts, create in your Git repository the file ``.workshop/settings.sh``. In this file, you need to set the name of the workshop, the location of any pre-built image for the workshop if one exists, and other appropriate settings to control the workshop spawner. 25 | 26 | ``` 27 | WORKSHOP_NAME=lab-markdown-sample 28 | WORKSHOP_IMAGE=quay.io/openshifthomeroom/lab-markdown-sample:master 29 | RESOURCE_BUDGET=medium 30 | MAX_SESSION_AGE=3600 31 | IDLE_TIMEOUT=300 32 | ``` 33 | 34 | Deploying the Spawner 35 | ---------------------- 36 | 37 | To deploy the spawner for the workshop, create a project in OpenShift into which the workshop is to be deployed. 38 | 39 | ``` 40 | oc new-project workshops 41 | ``` 42 | 43 | From within the top level of your Git repository that you added this Git repository as a submodule, you can now run: 44 | 45 | ``` 46 | .workshop/scripts/deploy-spawner.sh 47 | ``` 48 | 49 | You must be a cluster admin to be able to deploy the workshop using the spawner. 50 | 51 | The name of the deployment will be dictated by the value of ``WORKSHOP_NAME`` in the ``.workshop/settings.sh`` file. 52 | 53 | Building the Workshop 54 | --------------------- 55 | 56 | The deployment created above will use the declared pre-existing image for the workshop, or an empty workshop image if none is provided. 57 | 58 | To deploy the workshop content from your Git repository, or make changes to the workshop content and test them, run: 59 | 60 | ``` 61 | .workshop/scripts/build-workshop.sh 62 | ``` 63 | 64 | This will replace the existing image used by the active deployment. 65 | 66 | If you are running an existing instance of the workshop, from your web browser select "Restart Workshop" from the menu top right of the workshop environment dashboard. 67 | 68 | When you are happy with your changes, push them back to the remote Git repository. 69 | 70 | If you need to change the RBAC definitions, or what resources are created when a project is created, change the definitions in the ``resources`` and ``templates`` directory if you have them. You can then re-run: 71 | 72 | ``` 73 | .workshop/scripts/deploy-spawner.sh 74 | ``` 75 | 76 | and it will update the active definitions. 77 | 78 | Note that if you do this, you will need to re-run: 79 | 80 | ``` 81 | .workshop/scripts/build-workshop.sh 82 | ``` 83 | 84 | to have any local content changes be used once again as it will revert back to using the original image for the workshop. 85 | 86 | Deleting the Workshop 87 | --------------------- 88 | 89 | To delete the spawner and any active sessions, run: 90 | 91 | ``` 92 | .workshop/scripts/delete-spawner.sh 93 | ``` 94 | 95 | To delete the build configuration for the workshop image, run: 96 | 97 | ``` 98 | .workshop/scripts/delete-workshop.sh 99 | ``` 100 | 101 | To delete any special resources for CRDs and cluster roles, run: 102 | 103 | ``` 104 | .workshop/scripts/delete-resources.sh 105 | ``` 106 | 107 | Personal Deployment 108 | ------------------- 109 | 110 | If you don't want to deploy the workshop for multiple users, you can instead deploy a single instance of the workshop. 111 | 112 | To do this, ensure that you have first deleted any spawner deployment created using the commands above. 113 | 114 | Then run: 115 | 116 | ``` 117 | .workshop/scripts/deploy-personal.sh 118 | ``` 119 | 120 | You do not need to be cluster admin to deploy a single instance of the workshop. 121 | 122 | If you need to deploy the workshop from the local content, as for when using the spawner, run: 123 | 124 | ``` 125 | .workshop/scripts/build-workshop.sh 126 | ``` 127 | 128 | You do not need to force a re-deployment as it will happen automatically. 129 | 130 | To delete the workshop instance run: 131 | 132 | ``` 133 | .workshop/scripts/delete-personal.sh 134 | ``` 135 | 136 | Also run the scripts to delete the build configuration and resources. 137 | -------------------------------------------------------------------------------- /mtc/bookbag/.workshop/scripts/VERSION: -------------------------------------------------------------------------------- 1 | stable/1.x 2 | -------------------------------------------------------------------------------- /mtc/bookbag/.workshop/scripts/build-workshop.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPTS_DIR=`dirname $0` 4 | 5 | . $SCRIPTS_DIR/setup-environment.sh 6 | 7 | echo "### Checking if already have a build configuration." 8 | 9 | oc get bc "$WORKSHOP_NAME" -o name 2>/dev/null 10 | 11 | if [ "$?" != "0" ]; then 12 | echo "..." 13 | 14 | echo "### Creating build configuration for workshop." 15 | 16 | oc new-build --binary --name "$WORKSHOP_NAME" 17 | 18 | if [ "$?" != "0" ]; then 19 | fail "Failed to create build configuration." 20 | exit 1 21 | fi 22 | fi 23 | 24 | echo "### Building workshop from local content." 25 | 26 | oc start-build "$WORKSHOP_NAME" --from-dir . --follow 27 | 28 | if [ "$?" != "0" ]; then 29 | fail "Failed to build workshop content." 30 | exit 1 31 | fi 32 | -------------------------------------------------------------------------------- /mtc/bookbag/.workshop/scripts/default-settings.sh: -------------------------------------------------------------------------------- 1 | TERMINAL_IMAGE=quay.io/openshifthomeroom/workshop-terminal:3.0.0 2 | DASHBOARD_IMAGE=quay.io/openshifthomeroom/workshop-dashboard:4.1.1 3 | SPAWNER_IMAGE=quay.io/openshifthomeroom/workshop-spawner:6.2.1 4 | CONSOLE_IMAGE=quay.io/openshift/origin-console:4.1 5 | 6 | HOMEROOM_NAME=homeroom 7 | WORKSHOP_TITLE= 8 | WORKSHOP_DESCRIPTION= 9 | 10 | SPAWNER_REPO=openshift-homeroom/workshop-spawner 11 | SPAWNER_VERSION=6.2.1 12 | SPAWNER_MODE=learning-portal 13 | SPAWNER_VARIANT=production 14 | SPAWNER_ROLE=admin 15 | SPAWNER_PASSWORD= 16 | 17 | DASHBOARD_REPO=openshift-homeroom/workshop-dashboard 18 | DASHBOARD_VERSION=4.1.1 19 | DASHBOARD_MODE= 20 | DASHBOARD_VARIANT=production 21 | 22 | DOWNLOAD_URL= 23 | WORKSHOP_FILE= 24 | 25 | WORKSHOP_MEMORY=512Mi 26 | RESOURCE_BUDGET=medium 27 | SERVER_LIMIT=8 28 | MAX_SESSION_AGE=3600 29 | IDLE_TIMEOUT=300 30 | LETS_ENCRYPT=false 31 | -------------------------------------------------------------------------------- /mtc/bookbag/.workshop/scripts/delete-images.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPTS_DIR=`dirname $0` 4 | 5 | . $SCRIPTS_DIR/parse-arguments.sh 6 | 7 | . $SCRIPTS_DIR/setup-environment.sh 8 | 9 | echo "### Delete daemon set for pre-pulling images." 10 | 11 | oc delete daemonset/$WORKSHOP_NAME-prepull -n "$PROJECT_NAME" 12 | -------------------------------------------------------------------------------- /mtc/bookbag/.workshop/scripts/delete-personal.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPTS_DIR=`dirname $0` 4 | 5 | . $SCRIPTS_DIR/parse-arguments.sh 6 | 7 | . $SCRIPTS_DIR/setup-environment.sh 8 | 9 | echo "### Delete project resources." 10 | 11 | APPLICATION_LABELS="app=$DASHBOARD_APPLICATION" 12 | 13 | PROJECT_RESOURCES="all,serviceaccount,rolebinding,configmap" 14 | 15 | oc delete "$PROJECT_RESOURCES" -n "$PROJECT_NAME" --selector "$APPLICATION_LABELS" 16 | -------------------------------------------------------------------------------- /mtc/bookbag/.workshop/scripts/delete-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPTS_DIR=`dirname $0` 4 | 5 | . $SCRIPTS_DIR/setup-environment.sh 6 | 7 | echo "### Delete extra resources." 8 | 9 | if [ -d $WORKSHOP_DIR/resources/ ]; then 10 | oc delete -f $WORKSHOP_DIR/resources/ --recursive 11 | fi 12 | -------------------------------------------------------------------------------- /mtc/bookbag/.workshop/scripts/delete-spawner.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPTS_DIR=`dirname $0` 4 | 5 | . $SCRIPTS_DIR/parse-arguments.sh 6 | 7 | . $SCRIPTS_DIR/setup-environment.sh 8 | 9 | echo "### Delete project resources." 10 | 11 | APPLICATION_LABELS="app=$SPAWNER_APPLICATION-$PROJECT_NAME,spawner=$SPAWNER_MODE" 12 | 13 | PROJECT_RESOURCES="services,routes,deploymentconfigs,imagestreams,secrets,configmaps,serviceaccounts,rolebindings,serviceaccounts,rolebindings,persistentvolumeclaims,pods" 14 | 15 | oc delete "$PROJECT_RESOURCES" -n "$PROJECT_NAME" --selector "$APPLICATION_LABELS" 16 | 17 | echo "### Delete global resources." 18 | 19 | CLUSTER_RESOURCES="clusterrolebindings,clusterroles" 20 | 21 | oc delete "$CLUSTER_RESOURCES" -n "$PROJECT_NAME" --selector "$APPLICATION_LABELS" 22 | 23 | if [ x"$PREPULL_IMAGES" == x"true" ]; then 24 | echo "### Delete daemon set for pre-pulling images." 25 | 26 | oc delete daemonset/$WORKSHOP_NAME-prepull -n "$PROJECT_NAME" 27 | fi 28 | -------------------------------------------------------------------------------- /mtc/bookbag/.workshop/scripts/delete-workshop.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPTS_DIR=`dirname $0` 4 | 5 | . $SCRIPTS_DIR/setup-environment.sh 6 | 7 | echo "### Delete build configuration." 8 | 9 | oc delete all --selector build="$WORKSHOP_NAME" 10 | -------------------------------------------------------------------------------- /mtc/bookbag/.workshop/scripts/deploy-katacoda.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPTS_DIR=`dirname $0` 4 | 5 | SETTINGS_NAME=katacoda 6 | 7 | . $SCRIPTS_DIR/setup-environment.sh 8 | 9 | # Run Katacoda script which waits on OpenShift cluster being ready. 10 | 11 | /usr/local/bin/launch.sh 12 | 13 | # Make sure that cluster is ready. Gauge this by continually trying to 14 | # to add ability to pull images to any users. 15 | 16 | for i in {1..200}; do 17 | oc policy add-role-to-user system:image-puller system:anonymous && \ 18 | break || sleep 1; 19 | done 20 | 21 | # Start pulling down workshop image and console image in background. 22 | # This will hopefully speed things up while set up everything else. 23 | 24 | echo "### Start pulling down workshop and console images." 25 | 26 | docker pull "$WORKSHOP_IMAGE" > /dev/null 2>&1 & 27 | docker pull "$CONSOLE_IMAGE" > /dev/null 2>&1 & 28 | 29 | # Now create the volumes. Create a fixed number for now. 30 | 31 | echo "### Create persistent volumes." 32 | 33 | for i in $(seq -f "%02g" 1 10); do 34 | mkdir -p /data/pv-$i 35 | done 36 | 37 | chmod 0777 /data/pv-* 38 | 39 | chcon -t svirt_sandbox_file_t /data/pv-* 40 | 41 | oc apply -f $SCRIPTS_DIR/katacoda-volumes.json 42 | 43 | # Grant developer cluster admin access. 44 | 45 | echo "### Give developer cluster admin access." 46 | 47 | oc adm policy add-cluster-role-to-user cluster-admin developer > /dev/null 2>&1 48 | 49 | # Login as developer rather than system:admin. 50 | 51 | echo "### Login as developer to OpenShift." 52 | 53 | SERVER_ADDRESS=`oc get --raw /.well-known/oauth-authorization-server | grep '"issuer":' | sed -e 's%.*https://%%' -e 's%",%%'` 54 | CLUSTER_SUBDOMAIN=`echo $SERVER_ADDRESS | sed -e 's/-8443-/-80-/' -e 's/:.*//'` 55 | 56 | oc login -u developer -p developer --insecure-skip-tls-verify https://$SERVER_ADDRESS > /dev/null 57 | 58 | echo "### Deploying workshop using Homeroom." 59 | 60 | oc new-project workshop > /dev/null 61 | 62 | cat >> $WORKSHOP_DIR/katacoda-settings.sh << EOF 63 | WORKSHOP_NAME=workshop 64 | DASHBOARD_MODE=cluster-admin 65 | OPENSHIFT_PROJECT=homeroom 66 | CLUSTER_SUBDOMAIN=$CLUSTER_SUBDOMAIN 67 | AUTH_USERNAME=* 68 | AUTH_PASSWORD= 69 | EOF 70 | 71 | $SCRIPTS_DIR/deploy-personal.sh --settings=katacoda 72 | 73 | echo "### Creating route for Homeroom access." 74 | 75 | oc expose svc/workshop --name homeroom 76 | 77 | echo "### Homeroom Ready." 78 | -------------------------------------------------------------------------------- /mtc/bookbag/.workshop/scripts/deploy-personal.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPTS_DIR=`dirname $0` 4 | 5 | . $SCRIPTS_DIR/parse-arguments.sh 6 | 7 | . $SCRIPTS_DIR/setup-environment.sh 8 | 9 | TEMPLATE_REPO=https://raw.githubusercontent.com/$DASHBOARD_REPO 10 | 11 | TEMPLATE_FILE=$DASHBOARD_VARIANT.json 12 | 13 | if [ x"$DASHBOARD_MODE" != x"" ]; then 14 | TEMPLATE_FILE=$DASHBOARD_VARIANT-$DASHBOARD_MODE.json 15 | fi 16 | 17 | TEMPLATE_PATH=$TEMPLATE_REPO/$DASHBOARD_VERSION/templates/$TEMPLATE_FILE 18 | 19 | echo "### Install static resource definitions." 20 | 21 | if [ -d $WORKSHOP_DIR/resources/ ]; then 22 | oc apply -n "$PROJECT_NAME" -f $WORKSHOP_DIR/resources/ --recursive 23 | 24 | if [ "$?" != "0" ]; then 25 | fail "Failed to create static resource definitions." 26 | exit 1 27 | fi 28 | fi 29 | 30 | echo "### Creating workshop deployment." 31 | 32 | TEMPLATE_ARGS="" 33 | 34 | TEMPLATE_ARGS="$TEMPLATE_ARGS --param APPLICATION_NAME=$DASHBOARD_APPLICATION" 35 | TEMPLATE_ARGS="$TEMPLATE_ARGS --param TERMINAL_IMAGE=$WORKSHOP_IMAGE" 36 | TEMPLATE_ARGS="$TEMPLATE_ARGS --param DOWNLOAD_URL=$DOWNLOAD_URL" 37 | TEMPLATE_ARGS="$TEMPLATE_ARGS --param WORKSHOP_FILE=$WORKSHOP_FILE" 38 | TEMPLATE_ARGS="$TEMPLATE_ARGS --param WORKSHOP_ENVVARS=$WORKSHOP_ENVVARS" 39 | 40 | if [ x"$DASHBOARD_MODE" == x"" ]; then 41 | TEMPLATE_ARGS="$TEMPLATE_ARGS --param AUTH_USERNAME=$AUTH_USERNAME" 42 | 43 | if [ ! -z ${AUTH_USERNAME+x} ]; then 44 | TEMPLATE_ARGS="$TEMPLATE_ARGS --param AUTH_PASSWORD=$AUTH_PASSWORD" 45 | fi 46 | 47 | TEMPLATE_ARGS="$TEMPLATE_ARGS --param GATEWAY_ENVVARS=$GATEWAY_ENVVARS" 48 | TEMPLATE_ARGS="$TEMPLATE_ARGS --param TERMINAL_ENVVARS=$TERMINAL_ENVVARS" 49 | TEMPLATE_ARGS="$TEMPLATE_ARGS --param CONSOLE_IMAGE=$CONSOLE_IMAGE" 50 | TEMPLATE_ARGS="$TEMPLATE_ARGS --param CLUSTER_SUBDOMAIN=$CLUSTER_SUBDOMAIN" 51 | TEMPLATE_ARGS="$TEMPLATE_ARGS --param OPENSHIFT_PROJECT=$OPENSHIFT_PROJECT" 52 | TEMPLATE_ARGS="$TEMPLATE_ARGS --param OPENSHIFT_USERNAME=$OPENSHIFT_USERNAME" 53 | TEMPLATE_ARGS="$TEMPLATE_ARGS --param OPENSHIFT_PASSWORD=$OPENSHIFT_PASSWORD" 54 | fi 55 | 56 | if [ x"$DASHBOARD_MODE" == x"cluster-admin" ]; then 57 | TEMPLATE_ARGS="$TEMPLATE_ARGS --param AUTH_USERNAME=$AUTH_USERNAME" 58 | 59 | if [ ! -z ${AUTH_USERNAME+x} ]; then 60 | TEMPLATE_ARGS="$TEMPLATE_ARGS --param AUTH_PASSWORD=$AUTH_PASSWORD" 61 | fi 62 | 63 | TEMPLATE_ARGS="$TEMPLATE_ARGS --param GATEWAY_ENVVARS=$GATEWAY_ENVVARS" 64 | TEMPLATE_ARGS="$TEMPLATE_ARGS --param TERMINAL_ENVVARS=$TERMINAL_ENVVARS" 65 | TEMPLATE_ARGS="$TEMPLATE_ARGS --param CONSOLE_IMAGE=$CONSOLE_IMAGE" 66 | TEMPLATE_ARGS="$TEMPLATE_ARGS --param PROJECT_NAME=$PROJECT_NAME" 67 | TEMPLATE_ARGS="$TEMPLATE_ARGS --param CLUSTER_SUBDOMAIN=$CLUSTER_SUBDOMAIN" 68 | TEMPLATE_ARGS="$TEMPLATE_ARGS --param OPENSHIFT_PROJECT=$OPENSHIFT_PROJECT" 69 | fi 70 | 71 | oc process -n "$PROJECT_NAME" -f $TEMPLATE_PATH $TEMPLATE_ARGS | \ 72 | oc apply -n "$PROJECT_NAME" -f - 73 | 74 | if [ "$?" != "0" ]; then 75 | fail "Failed to create deployment for dashboard." 76 | exit 1 77 | fi 78 | 79 | echo "### Waiting for the dashboard to deploy." 80 | 81 | oc rollout status dc/"$DASHBOARD_APPLICATION" -n "$PROJECT_NAME" 82 | 83 | if [ "$?" != "0" ]; then 84 | fail "Deployment of dashboard failed to complete." 85 | exit 1 86 | fi 87 | 88 | echo "### Waiting for the dashboard to deploy." 89 | 90 | oc rollout status dc/"$DASHBOARD_APPLICATION" -n "$PROJECT_NAME" 91 | 92 | if [ "$?" != "0" ]; then 93 | fail "Deployment of dashboard failed to complete." 94 | exit 1 95 | fi 96 | 97 | echo "### Route details for the dashboard are as follows." 98 | 99 | oc get route "${DASHBOARD_APPLICATION}" -n "$PROJECT_NAME" \ 100 | -o template --template '{{.spec.host}}{{"\n"}}' 101 | -------------------------------------------------------------------------------- /mtc/bookbag/.workshop/scripts/parse-arguments.sh: -------------------------------------------------------------------------------- 1 | echo "### Parsing command line arguments." 2 | 3 | overrides=() 4 | 5 | while [[ $# -gt 0 ]] 6 | do 7 | i="$1" 8 | case $i in 9 | --event=*|--settings=*) 10 | SETTINGS_NAME="${i#*=}" 11 | shift 12 | ;; 13 | --event|--settings) 14 | shift 15 | SETTINGS_NAME="$1" 16 | shift 17 | ;; 18 | --project=*) 19 | PROJECT_NAME="${i#*=}" 20 | shift 21 | ;; 22 | --project) 23 | shift 24 | PROJECT_NAME="$1" 25 | shift 26 | ;; 27 | --override=@*) 28 | overrides+=(${i#*=}) 29 | shift 30 | ;; 31 | --override=*) 32 | p="${i#*=}" 33 | key=${p%%=*} 34 | value=${p#*=} 35 | mapped_key=override_${key} 36 | declare ${mapped_key}="$value" 37 | overrides+=(${key}) 38 | shift 39 | ;; 40 | --override) 41 | shift 42 | i="$1" 43 | case $1 in 44 | @*) 45 | overrides+=($i) 46 | ;; 47 | *) 48 | key=${i%%=*} 49 | value=${i#*=} 50 | mapped_key=override_${key} 51 | declare ${mapped_key}="$value" 52 | overrides+=(${key}) 53 | ;; 54 | esac 55 | shift 56 | ;; 57 | *) 58 | shift 59 | ;; 60 | esac 61 | done 62 | -------------------------------------------------------------------------------- /mtc/bookbag/.workshop/scripts/prepull-images.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPTS_DIR=`dirname $0` 4 | 5 | . $SCRIPTS_DIR/parse-arguments.sh 6 | 7 | . $SCRIPTS_DIR/setup-environment.sh 8 | 9 | echo "### Deploy daemon set to pre-pull images." 10 | 11 | cat << EOF | oc apply -n "$PROJECT_NAME" -f - 12 | apiVersion: apps/v1 13 | kind: DaemonSet 14 | metadata: 15 | name: $WORKSHOP_NAME-prepull 16 | spec: 17 | selector: 18 | matchLabels: 19 | app: $WORKSHOP_NAME-prepull 20 | template: 21 | metadata: 22 | labels: 23 | app: $WORKSHOP_NAME-prepull 24 | spec: 25 | initContainers: 26 | - name: prepull-spawner 27 | image: $SPAWNER_IMAGE 28 | command: ["/bin/true"] 29 | resources: 30 | limits: 31 | memory: 128Mi 32 | - name: prepull-terminal 33 | image: $TERMINAL_IMAGE 34 | command: ["/bin/true"] 35 | resources: 36 | limits: 37 | memory: 128Mi 38 | requests: 39 | memory: 128Mi 40 | - name: prepull-workshop 41 | image: $WORKSHOP_IMAGE 42 | command: ["/bin/true"] 43 | resources: 44 | limits: 45 | memory: 128Mi 46 | requests: 47 | memory: 128Mi 48 | - name: prepull-console 49 | image: $CONSOLE_IMAGE 50 | command: ["/bin/true"] 51 | resources: 52 | limits: 53 | memory: 128Mi 54 | requests: 55 | memory: 128Mi 56 | containers: 57 | - name: pause 58 | image: gcr.io/google_containers/pause 59 | resources: 60 | limits: 61 | memory: 128Mi 62 | requests: 63 | memory: 128Mi 64 | EOF 65 | 66 | if [ "$?" != "0" ]; then 67 | fail "Creation of daemonset to pre-pull images failed." 68 | exit 1 69 | fi 70 | -------------------------------------------------------------------------------- /mtc/bookbag/.workshop/scripts/setup-environment.sh: -------------------------------------------------------------------------------- 1 | fail() 2 | { 3 | echo "Error:" $* 1>&2 4 | exit 1 5 | } 6 | 7 | warn() 8 | { 9 | echo "Warning:" $* 1>&2 10 | } 11 | 12 | trim() 13 | { 14 | local trimmed="$1" 15 | 16 | # Strip leading space. 17 | trimmed="${trimmed## }" 18 | # Strip trailing space. 19 | trimmed="${trimmed%% }" 20 | 21 | echo "$trimmed" 22 | } 23 | 24 | SCRIPTS_DIR=`dirname $0` 25 | WORKSHOP_DIR=`dirname $SCRIPTS_DIR` 26 | SOURCE_DIR=`dirname $WORKSHOP_DIR` 27 | 28 | REPOSITORY_NAME=`basename $SOURCE_DIR` 29 | 30 | if [ `basename $WORKSHOP_DIR` != ".workshop" ]; then 31 | fail "Failed to find workshop directory." 32 | exit 1 33 | fi 34 | 35 | echo "### Reading the default configuration." 36 | 37 | . $SCRIPTS_DIR/default-settings.sh 38 | 39 | echo "### Reading the workshop configuration." 40 | 41 | if [ ! -f $WORKSHOP_DIR/settings.sh ]; then 42 | warn "Cannot find any workshop settings." 43 | else 44 | . $WORKSHOP_DIR/settings.sh 45 | fi 46 | 47 | if [ x"$SETTINGS_NAME" != x"" ]; then 48 | if [ ! -f $WORKSHOP_DIR/$SETTINGS_NAME-settings.sh ]; then 49 | warn "Cannot find any custom workshop settings." 50 | else 51 | . $WORKSHOP_DIR/$SETTINGS_NAME-settings.sh 52 | fi 53 | fi 54 | 55 | for key in "${overrides[@]}"; do 56 | case $key in 57 | @*) 58 | file="${key#*@}" 59 | if [ -f "$file" ]; then 60 | . $file 61 | fi 62 | ;; 63 | *) 64 | mapped_key="override_${key}" 65 | value="${!mapped_key}" 66 | declare ${key}="${value}" 67 | ;; 68 | esac 69 | done 70 | 71 | if [ x"$WORKSHOP_IMAGE" == x"" ]; then 72 | WORKSHOP_IMAGE=$DASHBOARD_IMAGE 73 | fi 74 | 75 | if [ -f "$WORKSHOP_DIR/jupyterhub_config.py" ]; then 76 | JUPYTERHUB_CONFIG=`cat $WORKSHOP_DIR/jupyterhub_config.py` 77 | fi 78 | 79 | if [ -f "$WORKSHOP_DIR/jupyterhub_config.sh" ]; then 80 | JUPYTERHUB_ENVVARS=`cat $WORKSHOP_DIR/jupyterhub_config.sh` 81 | fi 82 | 83 | if [ -f "$WORKSHOP_DIR/terminal.sh" ]; then 84 | TERMINAL_ENVVARS=`cat $WORKSHOP_DIR/terminal.sh` 85 | fi 86 | 87 | if [ -f "$WORKSHOP_DIR/workshop.sh" ]; then 88 | WORKSHOP_ENVVARS=`cat $WORKSHOP_DIR/workshop.sh` 89 | fi 90 | 91 | if [ -f "$WORKSHOP_DIR/gateway.sh" ]; then 92 | GATEWAY_ENVVARS=`cat $WORKSHOP_DIR/gateway.sh` 93 | fi 94 | 95 | echo "### Setting the workshop application." 96 | 97 | WORKSHOP_NAME=${WORKSHOP_NAME:-$REPOSITORY_NAME} 98 | 99 | SPAWNER_APPLICATION=${SPAWNER_APPLICATION:-$WORKSHOP_NAME} 100 | DASHBOARD_APPLICATION=${DASHBOARD_APPLICATION:-$WORKSHOP_NAME} 101 | 102 | if [ x"$PROJECT_NAME" == x"" ]; then 103 | PROJECT_NAME=`oc project --short 2>/dev/null` 104 | fi 105 | 106 | if [ x"$PROJECT_NAME" == x"" ]; then 107 | fail "Cannot determine name of project." 108 | exit 1 109 | fi 110 | 111 | oc get project "$PROJECT_NAME" > /dev/null 2>&1 112 | 113 | if [ "$?" != "0" ]; then 114 | fail "Project $PROJECT_NAME does not exist." 115 | exit 1 116 | fi 117 | -------------------------------------------------------------------------------- /mtc/bookbag/.workshop/settings.sh: -------------------------------------------------------------------------------- 1 | WORKSHOP_NAME=ocp4-disconnected-install 2 | RESOURCE_BUDGET=medium 3 | MAX_SESSION_AGE=3600 4 | IDLE_TIMEOUT=300 5 | -------------------------------------------------------------------------------- /mtc/bookbag/.workshop/setup: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # This 'setup' script is where you can add steps that should be run each 4 | # time the container for the workshop is started. Note that if you are 5 | # using persistent storage with a workshop and make changes to files from 6 | # this script, or are deploying applications, your scripts must cope with 7 | # the steps having already been run. This is because this script will be 8 | # run a second time if the container were restarted for some reason. 9 | -------------------------------------------------------------------------------- /mtc/bookbag/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM quay.io/openshifthomeroom/workshop-dashboard:5.0.0 2 | 3 | USER root 4 | 5 | COPY . /tmp/src 6 | 7 | RUN rm -rf /tmp/src/.git* && \ 8 | chown -R 1001 /tmp/src && \ 9 | chgrp -R 0 /tmp/src && \ 10 | chmod -R g+w /tmp/src 11 | 12 | USER 1001 13 | 14 | RUN /usr/libexec/s2i/assemble 15 | -------------------------------------------------------------------------------- /mtc/bookbag/build-template.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: template.openshift.io/v1 2 | kind: Template 3 | message: | 4 | Created ${NAME} BuildConfig and ImageStream instance 5 | 6 | metadata: 7 | annotations: 8 | openshift.io/display-name: Bookbag Build 9 | tags: gpte 10 | template.openshift.io/bindable: "false" 11 | name: bookbag-build 12 | 13 | parameters: 14 | - name: NAME 15 | required: true 16 | value: bookbag 17 | - name: BUILDER_IMAGE 18 | required: true 19 | value: quay.io/openshifthomeroom/workshop-dashboard:5.0.0 20 | - name: GIT_REPO 21 | value: https://github.com/konveyor/labs.git 22 | 23 | objects: 24 | - apiVersion: image.openshift.io/v1 25 | kind: ImageStream 26 | metadata: 27 | name: ${NAME} 28 | 29 | - apiVersion: build.openshift.io/v1 30 | kind: BuildConfig 31 | metadata: 32 | name: ${NAME} 33 | spec: 34 | output: 35 | to: 36 | kind: ImageStreamTag 37 | name: ${NAME}:latest 38 | source: 39 | contextDir: mtc/bookbag 40 | git: 41 | ref: master 42 | uri: ${GIT_REPO} 43 | type: Git 44 | strategy: 45 | sourceStrategy: 46 | from: 47 | kind: DockerImage 48 | name: ${BUILDER_IMAGE} 49 | type: Source 50 | triggers: [] 51 | -------------------------------------------------------------------------------- /mtc/bookbag/deploy-template.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: template.openshift.io/v1 3 | kind: Template 4 | message: | 5 | Created ${NAME} Deployment, Service, and Route 6 | 7 | metadata: 8 | annotations: 9 | openshift.io/display-name: Bookbag 10 | tags: gpte 11 | template.openshift.io/bindable: "false" 12 | name: bookbag 13 | 14 | parameters: 15 | - name: NAME 16 | required: true 17 | value: bookbag 18 | - name: IMAGE_STREAM_NAME 19 | required: true 20 | value: bookbag 21 | - name: IMAGE_STREAM_NAMESPACE 22 | - name: IMAGE 23 | value: set-by-trigger 24 | - name: WORKSHOP_VARS 25 | required: true 26 | value: '{}' 27 | - name: AUTH_USERNAME 28 | required: true 29 | value: '*' 30 | - name: AUTH_PASSWORD 31 | value: '' 32 | 33 | objects: 34 | - apiVersion: apps.openshift.io/v1 35 | kind: DeploymentConfig 36 | metadata: 37 | labels: 38 | app: ${NAME} 39 | name: ${NAME} 40 | spec: 41 | replicas: 1 42 | selector: 43 | name: ${NAME} 44 | strategy: 45 | type: Recreate 46 | triggers: 47 | - type: ConfigChange 48 | - type: ImageChange 49 | imageChangeParams: 50 | automatic: true 51 | containerNames: 52 | - terminal 53 | from: 54 | kind: ImageStreamTag 55 | name: ${IMAGE_STREAM_NAME}:latest 56 | namespace: ${IMAGE_STREAM_NAMESPACE} 57 | template: 58 | metadata: 59 | labels: 60 | app: ${NAME} 61 | name: ${NAME} 62 | spec: 63 | dnsPolicy: ClusterFirst 64 | restartPolicy: Always 65 | containers: 66 | - name: terminal 67 | env: 68 | - name: APPLICATION_NAME 69 | value: ${NAME} 70 | - name: AUTH_USERNAME 71 | value: ${AUTH_USERNAME} 72 | - name: AUTH_PASSWORD 73 | value: ${AUTH_PASSWORD} 74 | - name: CLUSTER_SUBDOMAIN 75 | - name: OAUTH_SERVICE_ACCOUNT 76 | value: ${NAME} 77 | - name: DOWNLOAD_URL 78 | - name: WORKSHOP_FILE 79 | - name: OC_VERSION 80 | - name: ODO_VERSION 81 | - name: KUBECTL_VERSION 82 | - name: WORKSHOP_VARS 83 | value: ${WORKSHOP_VARS} 84 | image: ${IMAGE} 85 | imagePullPolicy: IfNotPresent 86 | ports: 87 | - containerPort: 10080 88 | protocol: TCP 89 | resources: {} 90 | 91 | - apiVersion: v1 92 | kind: Service 93 | metadata: 94 | labels: 95 | app: ${NAME} 96 | name: ${NAME} 97 | spec: 98 | ports: 99 | - name: 10080-tcp 100 | port: 10080 101 | protocol: TCP 102 | targetPort: 10080 103 | selector: 104 | name: ${NAME} 105 | type: ClusterIP 106 | 107 | - apiVersion: route.openshift.io/v1 108 | kind: Route 109 | metadata: 110 | labels: 111 | app: ${NAME} 112 | name: ${NAME} 113 | spec: 114 | port: 115 | targetPort: 10080-tcp 116 | tls: 117 | insecureEdgeTerminationPolicy: Redirect 118 | termination: edge 119 | to: 120 | kind: Service 121 | name: ${NAME} 122 | -------------------------------------------------------------------------------- /mtc/bookbag/deploy/sample-cm.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | data: 3 | username: "panni-redhat.com" 4 | guid: "acdc" 5 | kind: ConfigMap 6 | metadata: 7 | labels: 8 | app: bookbag-004 9 | name: bookbag-004-userinfo 10 | -------------------------------------------------------------------------------- /mtc/bookbag/envvars/gateway.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # The default terminal tab includes a single terminal. 4 | # The TERMINAL_TAB variable may be configured with the following values: 5 | # 6 | # split - Split for two vertically stacked terminals 7 | # split/2 - Split twice for three vertically stacked terminals 8 | # 9 | #export TERMINAL_TAB='split' 10 | 11 | # Disable OpenShift Console, this is not appropriate for Red Hat Summit as it 12 | # would point to the wrong cluster. 13 | #export CONSOLE_URL='http://0.0.0.0:10083' 14 | 15 | # Enable the following line to disable the right-hand pane entirely. 16 | # Only use this if you have no terminal, no slides, and no console. 17 | export DEFAULT_PAGE='workshop' 18 | 19 | # Flags to explicitly enable/disable specific components 20 | #ENABLE_CONSOLE='false' 21 | #ENABLE_DASHBOARD='false' 22 | #ENABLE_SLIDES='false' 23 | #ENABLE_TERMINAL='false' 24 | #ENABLE_WEBDAV='false' 25 | #ENABLE_WORKSHOP='true' 26 | -------------------------------------------------------------------------------- /mtc/bookbag/envvars/terminal.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Environment variables to set for the terminal 4 | -------------------------------------------------------------------------------- /mtc/bookbag/envvars/workshop.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Environment variables to set for the workshop 4 | -------------------------------------------------------------------------------- /mtc/bookbag/workshop/config.js: -------------------------------------------------------------------------------- 1 | var fs = require('fs'); 2 | 3 | function initialize(workshop) { 4 | workshop.load_workshop(); 5 | 6 | try { 7 | files = fs.readdirSync('/var/run/workshop-vars') 8 | for (var i=0; i < files.length; i++) { 9 | console.log(files[i]) 10 | if (files[i].match(/^[a-zA-Z_][a-zA-Z0-9_]+$/)) { 11 | console.log(files[i]) 12 | workshop.data_variable(files[i], fs.readFileSync('/var/run/workshop-vars/' + files[i], 'utf8')); 13 | } 14 | } 15 | } catch(err) { 16 | console.log(err) 17 | } 18 | 19 | try { 20 | workshop_vars = JSON.parse(process.env['WORKSHOP_VARS']) 21 | for (var varname in workshop_vars) { 22 | workshop.data_variable(varname, workshop_vars[varname]); 23 | } 24 | } catch(err) {} 25 | } 26 | 27 | exports.default = initialize; 28 | 29 | module.exports = exports.default; 30 | -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/Conclusion.adoc: -------------------------------------------------------------------------------- 1 | :sectlinks: 2 | :markup-in-source: verbatim,attributes,quotes 3 | 4 | *Congratulations* and *Thank You* for participating in the OpenShift Migration Toolkit for Containers (MTC) Lab. We hope you have found it to be both informative and thorough. By now you have completed the following activities: 5 | 6 | * Familiarized yourself with the MTC WebUI 7 | * Migrated multiple applications (stateless and stateful) from OpenShift 3 to OpenShift 4 8 | * Performed both Copy and Move operations for handling Persistent Volumes 9 | * Leveraged the API to migrate multiple namespaces in a single Migration Plan 10 | 11 | We’ve included a couple of additional applications in the 3.11 cluster deployment (Parks App, Robot Shop & Rocket-Chat). Feel Free to perform migrations of these applications too (time permitting). 12 | 13 | === More Information 14 | 15 | [width="100%",cols="50%,50%",options="header",] 16 | |=== 17 | |Type |Link 18 | |Source Code |https://github.com/konveyor/mig-operator 19 | |Source Code |https://github.com/konveyor/mig-ui 20 | |Source Code |https://github.com/konveyor/mig-controller 21 | |Source Code |https://github.com/konveyor/mig-demo-apps 22 | |Best Practices Guide |https://github.com/redhat-cop/openshift-migration-best-practices 23 | |YouTube Channel |https://www.youtube.com/channel/UCBDU5UK5Okg3mlIMygpkbNA?view_as=subscriber 24 | |=== 25 | -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/Environment.adoc: -------------------------------------------------------------------------------- 1 | :sectlinks: 2 | :markup-in-source: verbatim,attributes,quotes 3 | :OCP3_GUID: %ocp3_guid% 4 | :OCP3_DOMAIN: %ocp3_domain% 5 | :OCP3_SSH_USER: %ocp3_ssh_user% 6 | :OCP3_PASSWORD: %ocp3_password% 7 | :OCP3_BASTION: %ocp3_bastion% 8 | :OCP4_BASTION: %ocp4_bastion% 9 | :OCP4_GUID: %ocp4_guid% 10 | :OCP4_DOMAIN: %ocp4_domain% 11 | :OCP4_SSH_USER: %ocp4_ssh_user% 12 | :OCP4_PASSWORD: %ocp4_password% 13 | 14 | == Overview 15 | 16 | The following lab environment has been provisioned for you for use with this Lab. 17 | You can open this page in a separate tab as well, so that you will have the following information at hand when needed later during the Lab. 18 | 19 | image::screenshots/lab1/labenv-overview2.png[Lab Environment Overview, width=50%, align="center"] 20 | 21 | === OpenShift 3 Cluster 22 | 23 | [width="100%",cols="50%,50%",options="header",] 24 | |=== 25 | |Key |Value 26 | |GUID | {OCP3_GUID} 27 | |OCP Console |https://master.{OCP3_GUID}.{OCP3_DOMAIN}/console 28 | |Password |{OCP3_PASSWORD} 29 | |API |https://master.{OCP3_GUID}.{OCP3_DOMAIN} 30 | |OCP admin user/password| admin/{OCP3_PASSWORD} 31 | |Bastion Host |{OCP3_BASTION} 32 | |Bastion SSH user/password |{OCP3_SSH_USER}/{OCP3_PASSWORD} 33 | |=== 34 | 35 | === OpenShift 4 Cluster 36 | 37 | [width="100%",cols="50%,50%",options="header",] 38 | |=== 39 | |Key |Value 40 | |GUID | {OCP4_GUID} 41 | |OCP Console |http://console-openshift-console.apps.cluster-{OCP4_GUID}.{OCP4_GUID}.{OCP4_DOMAIN} 42 | |Password |{OCP4_PASSWORD} 43 | |API |https://api.cluster-{OCP4_GUID}.{OCP4_GUID}.{OCP4_DOMAIN}:6443 44 | |OCP admin user/password| admin/{OCP4_PASSWORD} 45 | |Bastion Host |{OCP4_BASTION} 46 | |Bastion SSH user/password |{OCP4_SSH_USER}/{OCP4_PASSWORD} 47 | |=== 48 | -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/Intro.adoc: -------------------------------------------------------------------------------- 1 | == OpenShift Migration Toolkit for Containers (MTC) Lab 2 | 3 | === Migrating from OCP 3.x to OCP 4.x 4 | 5 | This guide will provide you with hands-on exposure to the OpenShift Migration + 6 | Tooling through a series of exercises migrating application workloads (both + 7 | stateful and stateless) between OpenShift Clusters. 8 | 9 | === Goals 10 | 11 | In this instructor-led, hands-on lab, you’ll experience: 12 | 13 | * Migrating applications from Red Hat OpenShift 3 clusters to Red Hat OpenShift + 14 | 4 clusters using the Migration Toolkit for Containers (MTC) provided by OpenShift + 15 | Container Platform 4 leveraging both the UI and API. 16 | 17 | * Use cases that migrate applications preserving state, including how to migrate + 18 | OpenShift Container Storage 3 (Gluster) to OpenShift Container Storage 4 (Ceph). 19 | 20 | * Tips, techniques, and best-practices for debugging failed migrations. 21 | 22 | === Modules 23 | 24 | link:/workshop/Intro[Module 1 - Introduction] + 25 | link:/workshop/Environment[Module 2 - Environment] + 26 | link:/workshop/Prereqs[Module 3 - Prerequisites] + 27 | link:/workshop/Overview[Module 4 - MTC Overview] + 28 | link:/workshop/exercises/Ex1[Module 5 - Migration Exercise (Migrate File-Uploader Application)] + 29 | link:/workshop/exercises/Ex2[Module 6 - Migration Exercise (Migrate MSSQL Server Application)] + 30 | link:/workshop/exercises/Ex3[Module 7 - Migration Exercise (Migrate Sock-Shop Application)] + 31 | link:/workshop/exercises/Ex4[Module 8 - Migration Exercise (Migration at Scale via API)] + 32 | link:/workshop/Hooks[Module 9 - Migration Hooks] + 33 | link:/workshop/Debug[Module 10 - Debugging Failed Migrations (with optional break-fix exercises)] + 34 | link:/workshop/Conclusion[Module 11 - Conclusion] 35 | -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/Overview.adoc: -------------------------------------------------------------------------------- 1 | :sectlinks: 2 | :markup-in-source: verbatim,attributes,quotes 3 | :OCP3_GUID: %ocp3_guid% 4 | :OCP3_DOMAIN: %ocp3_domain% 5 | :OCP3_SSH_USER: %ocp3_ssh_user% 6 | :OCP3_PASSWORD: %ocp3_password% 7 | :OCP4_GUID: %ocp4_guid% 8 | :OCP4_DOMAIN: %ocp4_domain% 9 | :OCP4_SSH_USER: %ocp4_ssh_user% 10 | :OCP4_PASSWORD: %ocp4_password% 11 | :OCP3_BASTION: %ocp3_bastion% 12 | :OCP4_BASTION: %ocp4_bastion% 13 | 14 | The Migration Toolkit for Containers (MTC) is designed to migrate Application Workloads between OpenShift clusters. Specifically, MTC handles migration of k8s resource objects, persistent volumes, and internal images. MTC is designed to provide a migration experience while focusing on minimizing application downtime through the process. 15 | 16 | === Upstream Projects 17 | 18 | MTC leverages two upstream projects: https://velero.io/[Velero] and https://restic.net/[Restic]. Velero (formerly Heptio Ark) gives you tools to back up and restore your Kubernetes cluster resources and persistent volumes. Restic is a backup program that is fast, efficient and secure. 19 | 20 | === Architecture 21 | 22 | MTC is implemented as a native k8s API extension through custom resource definitions. MTC orchestrates usage of Velero for performing backup/restores. OpenShift specific functionality is implemented in a series of Velero plugins. MTC is also equipped with a React/Patternfly 4 web UI to provide simple interactive experience. 23 | 24 | 25 | IMPORTANT: Migration is at scope of a Namespace. + 26 | 27 | IMPORTANT: `cluster-admin` role is currently required to execute migrations. + 28 | 29 | image:./screenshots/lab3/mtcprocess.png[MTC Process] 30 | 31 | === Persistent Volume Handling 32 | 33 | MTC provides two methods for migrating persistent volumes: 34 | 35 | *Move*:: Move or "`swinging`" the PV recreates the PVC/PV definitions from source cluster to destination cluster. This option is highly desirable for environments with shared storage between the source and target clusters (i.e. NFS). 36 | 37 | image:./screenshots/lab3/movepv.png[Move PV Diagram] 38 | 39 | *Copy*:: Copy creates a copy of the data from source cluster into the destination cluster. This option involves creating a PVC on destination and allowing cluster to find a PV to bind to the claim. We then copy data into the PV. 40 | 41 | image:./screenshots/lab3/copypv.png[Copy PV Diagram] 42 | 43 | === Actions (Stage and Migrate) 44 | 45 | MTC introduces two actions on a Migration Plan: 46 | 47 | * *Stage* - Seeds data while leaving application up and running. 48 | * *Migrate* - Optionally quiesces the application and migrates deltas from stage runs. 49 | 50 | NOTE: Stage can be run multiple times on a Migration Plan 51 | 52 | NOTE: Migrate can only be run once. 53 | 54 | === Migration Process 55 | 56 | There are 3 steps to the migration process within MTC: 57 | 58 | 59 | . *Plan* 60 | 61 | * Select source cluster 62 | * Select destination cluster 63 | * Specify intermediate object storage 64 | * Select namespaces 65 | * Choose Copy or Move for each Persistent volume 66 | 67 | . *Stage* 68 | 69 | * Stages the data from source to destination cluster 70 | * May be run multiple times 71 | * No downtime during this step for source applications 72 | 73 | . *Migrate* 74 | 75 | * Optionally quiesce the application 76 | * Migrate any delta state since last stage run 77 | * Migrate other related resources 78 | 79 | === WebUI 80 | 81 | We should already have MTC UI opened from the previous steps. In case you don't have it open let’s bring up the webUI in preparation for our first Application Migration in Lab 4. In the destination OCP 4 cluster terminal, let’s run the following commands to get the route: 82 | 83 | [source,subs="{markup-in-source}"] 84 | -------------------------------------------------------------------------------- 85 | $ **oc get routes migration -n openshift-migration -o jsonpath='{.spec.host}{"\n"}'** 86 | migration-openshift-migration.apps.cluster-{OCP4_GUID}.{OCP4_GUID}.{OCP4_DOMAIN} 87 | -------------------------------------------------------------------------------- 88 | 89 | Next, open a browser to the route from above. + 90 | https://migration-openshift-migration.apps.cluster-{OCP4_GUID}.{OCP4_GUID}.{OCP4_DOMAIN} 91 | 92 | image:./screenshots/lab2/mtcUI.png[MTC Main Screen] 93 | 94 | We are now ready to perform our first Application Migration. 95 | -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/_includes/include-file: -------------------------------------------------------------------------------- 1 | :sectlinks: 2 | :markup-in-source: verbatim,attributes,quotes 3 | :OCP3_GUID: %ocp3_guid% 4 | :OCP3_DOMAIN: %ocp3_domain% 5 | :OCP3_SSH_USER: %ocp3_ssh_user% 6 | :OCP3_PASSWORD: %ocp3_password% 7 | :OCP3_VERSION: 3.11 8 | :OCP4_GUID: %ocp4_guid% 9 | :OCP4_DOMAIN: %ocp4_domain% 10 | :OCP4_SSH_USER: %ocp4_ssh_user% 11 | :OCP4_PASSWORD: %ocp4_password% 12 | :OCP3_BASTION: %ocp3_bastion% 13 | :OCP4_BASTION: %ocp4_bastion% 14 | :OCP4_VERSION: 4.3 15 | -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/exercises/Ex3.adoc: -------------------------------------------------------------------------------- 1 | :sectlinks: 2 | :markup-in-source: verbatim,attributes,quotes 3 | :OCP3_GUID: %ocp3_guid% 4 | :OCP3_DOMAIN: %ocp3_domain% 5 | :OCP3_SSH_USER: %ocp3_ssh_user% 6 | :OCP3_PASSWORD: %ocp3_password% 7 | :OCP4_GUID: %ocp4_guid% 8 | :OCP4_DOMAIN: %ocp4_domain% 9 | :OCP4_SSH_USER: %ocp4_ssh_user% 10 | :OCP4_PASSWORD: %ocp4_password% 11 | 12 | == Migrate Sock-Shop Application 13 | 14 | ACME Corporation is in the process of upgrading the production environment of their online socks store from OCP 3 to OCP 4. The application consists of various micro-services, and uses a shared NFS cluster for storage. ACME has already installed the OCP 4 cluster, and you have been asked to migrate the Socks-Shop application from their OCP 3 environment. 15 | 16 | The application and all of its resources are contained within the `sock-shop` namespace. 17 | 18 | image:../screenshots/lab6/sock-shop-main.png[SS Main] 19 | 20 | image:../screenshots/lab6/sock-shop-arch.png[SS Main] 21 | 22 | Rather than provide a step-by-step walkthrough as we have in the previous two labs, you’ll be on your own for this round. 23 | 24 | The high-level steps are as follows: 25 | 26 | [arabic] 27 | . Launch the MTC WebUI. 28 | . Add a new Migration Plan (name it `socks-shop-mig-plan`). 29 | . Use Move ('swing' the PV) for each of the four persistent volumes as the transfer option; 30 | . Execute a `Migration` of the Plan. 31 | . Verify the application is functioning on the destination cluster. 32 | 33 | Next, we’ve added a lab covering multi-namespace migrations using the API directly for large scale operations. 34 | -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/exercises/debug/misconfig.adoc: -------------------------------------------------------------------------------- 1 | :sectlinks: 2 | :markup-in-source: verbatim,attributes,quotes 3 | :OCP3_GUID: %ocp3_guid% 4 | :OCP3_DOMAIN: %ocp3_domain% 5 | :OCP3_SSH_USER: %ocp3_ssh_user% 6 | :OCP3_PASSWORD: %ocp3_password% 7 | :OCP4_GUID: %ocp4_guid% 8 | :OCP4_DOMAIN: %ocp4_domain% 9 | :OCP4_SSH_USER: %ocp4_ssh_user% 10 | :OCP4_PASSWORD: %ocp4_password% 11 | 12 | == Exercise 1 : Misconfiguration 13 | 14 | In this exercise we will create some misconfigured MTC custom resources. We will then locate and fix those resources to drive towards a successful migration. 15 | 16 | === Create Misconfigured CRs 17 | 18 | On the OCP4 Bastion Host, you will find a ~/files/debug/ex1 directory. oc login to your destination OCP 4 cluster and apply the `01-misconfig.yml` CRs using: 19 | 20 | [source,subs="{markup-in-source}"] 21 | -------------------------------------------------------------------------------- 22 | $ **oc apply -f 01-misconfig.yml** 23 | secret/source-cluster-secret created 24 | migcluster.migration.openshift.io/source-cluster created 25 | secret/s3-repository created 26 | migstorage.migration.openshift.io/s3-repository created 27 | -------------------------------------------------------------------------------- 28 | 29 | This will create _Cluster_ and _Replication Repository_ resources that are intentionally misconfigured. 30 | 31 | Let's bring up the MTC UI: 32 | 33 | image:../../screenshots/debug/ex1/mtc-cluster-error.png[MTC Cluster Errored] 34 | 35 | As you can see the new source-cluster entry has a status of **Connection Failed**. Let's click on the elipses and select `Edit`: 36 | 37 | image:../../screenshots/debug/ex1/mtc-cluster-edit.png[MTC Cluster Edit] 38 | 39 | A Connection Failure is likely caused by an *incorrectly specified cluster URL* and/or an *incorrectly specified Service account token*. Let's proceed with updating both for our source OCP3 cluster and re-validate the connection. Enter in the correct information for URL and SA token and click `Update cluster`. 40 | 41 | image:../../screenshots/debug/ex1/mtc-cluster-failure.png[MTC Cluster Failure] 42 | 43 | 44 | Reminder: The Service account token can be found with the following command on the OCP 3 cluster: 45 | 46 | [source,subs="{markup-in-source}"] 47 | -------------------------------------------------------------------------------- 48 | $ **oc sa get-token migration-controller -n openshift-migration** 49 | eyJhbGciOiJSUzI1NiIsImtpZCI6IiJ9.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJvcGVuc2hpZnQtbWlncmF0aW9uIiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9zZWNyZXQubmFtZSI6Im1pZ3JhdGlvbi1jb250cm9sbGVyLXRva2VuLThibTQ3Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9zZXJ2aWNlLWFjY291bnQubmFtZSI6Im1pZ3JhdGlvbi1jb250cm9sbGVyIiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9zZXJ2aWNlLWFjY291bnQudWlkIjoiMDdlMmU1ZmYtMTdkZC0xMWViLTlhMjEtMDI3MDQ5NzNlNzgzIiwic3ViIjoic3lzdGVtOnNlcnZpY2VhY2NvdW50Om9wZW5zaGlmdC1taWdyYXRpb246bWlncmF0aW9uLWNvbnRyb2xsZXIifQ.iXYDHX7WdGeSE7ugspm9t4_sEBzGp6SNGM_0Y31uGywECESTJ2C7K_nEIIfSp8q1WsAfrRJcZh1cA-EjB-eV1syjWZeIz00MGmIPKLXPwBP990PSkFvRRPjwhCMWn4dbgyJiwjxVW2CqR06XcpHefcAd2zbyg96as36_RR8XP_qovBEQHAoeMfnEcSrdMLE5J5R8HBgmcgSvsVpSv7-RoavfMUcHT-e91277eLZJcdNM-4tGAyOk2C6LlZXzVJdOVdUawqC7f80eCgDkaDutt6RLqRQ3F4r8_Awr0olmdv8dxeLbm7IVEt8wX3ZrtM6l8vphJZAsXYtuX6mXRkh-BQ 50 | -------------------------------------------------------------------------------- 51 | 52 | image:../../screenshots/debug/ex1/mtc-update-cluster.png[MTC Update Cluster] 53 | 54 | Upon update, the cluster connection will be re-validated. If successful, the status will change to *Connected*, and we are ready to use this source cluster in our Migration Plans. 55 | 56 | image:../../screenshots/debug/ex1/mtc-cluster-fixed.png[MTC Cluster Fixed] 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/exercises/debug/stage-pods.adoc: -------------------------------------------------------------------------------- 1 | :sectlinks: 2 | :markup-in-source: verbatim,attributes,quotes 3 | :OCP3_GUID: %ocp3_guid% 4 | :OCP3_DOMAIN: %ocp3_domain% 5 | :OCP3_SSH_USER: %ocp3_ssh_user% 6 | :OCP3_PASSWORD: %ocp3_password% 7 | :OCP4_GUID: %ocp4_guid% 8 | :OCP4_DOMAIN: %ocp4_domain% 9 | :OCP4_SSH_USER: %ocp4_ssh_user% 10 | :OCP4_PASSWORD: %ocp4_password% 11 | 12 | == Exercise 2 : Stage Pod Failures 13 | 14 | When filesystem copy mode is selected, MTC makes use of temporary pods which attach the PVs and trigger a filesystem copy through Restic. In this exercise, we will trigger a failure in the Stage Pods and try to fix the issue manually. 15 | 16 | ## Prepare 17 | 18 | MTC uses `migration-cluster-config` configmap to allow users to modify image used for temporary stage pods. 19 | 20 | Open the terminal to your *source* cluster and edit the configmap using the script in ~/files/debug/ex2 on the bastion host: 21 | 22 | [source,subs="{markup-in-source}"] 23 | -------------------------------------------------------------------------------- 24 | $ **./02-stage-pod.sh** 25 | migrationcontroller.migration.openshift.io/migration-controller patched 26 | configmap "migration-cluster-config" deleted 27 | -------------------------------------------------------------------------------- 28 | 29 | This script will replace the migration stage image destination with an invalid image URL used for the Stage pod. 30 | Wait until the operator recreates a new configmap: 31 | 32 | [source,subs="{markup-in-source}"] 33 | -------------------------------------------------------------------------------- 34 | $ **oc get configmap migration-cluster-config -n openshift-migration** 35 | NAME DATA AGE 36 | migration-cluster-config 2 1m 37 | -------------------------------------------------------------------------------- 38 | 39 | ## Migrate 40 | 41 | Now we will migrate an application (Rocket Chat) from source to the destination cluster. When creating a migplan, make sure you choose 'File System Copy' mode for PVs: 42 | 43 | image:../../screenshots/debug/ex2/copy-options.png[Copy Options] 44 | 45 | Once the migplan is created successfully, migrate the application. 46 | This time make sure though that we are *NOT* using the DirectImage Migration. 47 | 48 | Notice that the migration will get stuck at `StageBackup` phase: 49 | 50 | image:../../screenshots/debug/ex2/stage-pods.png[Stage Pods] 51 | 52 | This is expected as we deliberately set a wrong image for stage pods. 53 | 54 | ### Investigate 55 | 56 | Login to your source cluster and see if the Stage Pods are running: 57 | 58 | ```sh 59 | [pranav@dragonfly 02-Stage-Pods]$ oc get pods -n rocket-chat 60 | NAME READY STATUS RESTARTS AGE 61 | rocketchat-1-8bpr5 1/1 Running 4 1h 62 | rocketchat-db-1-v62wm 1/1 Running 0 1h 63 | stage-rocketchat-db-1-v62wm-rc8hk 0/1 ImagePullBackOff 0 6m 64 | ``` 65 | 66 | Note that the stage pods are created in the namespace in which the application is running. In this case, we are migrating an app deployed in `rocket-chat` namespace. It is clear from that the stage pods are in `ImagePullBackOff` state because of the wrong image we provided. 67 | 68 | ## Fix 69 | 70 | 71 | ### Cancel the migration 72 | 73 | We will now use the `Cancel` migration feature to cancel the ongoing migration. From the dropdown menu on the right side of the stuck Migration, click `Cancel` option and wait until the migration is canceled completely. Canceling an ongoing migration will also delete the pending Stage Pods. 74 | 75 | ### Fix the stage pod image 76 | 77 | In order to fix this, we will configure the right path to the Stage image. Restore the correct stage pod image URL using the following script: 78 | 79 | ```sh 80 | ./02-stage-pod-restore.sh 81 | ``` 82 | 83 | ### Retry migration 84 | 85 | Once the original image is restored, retry the migration of the same application. 86 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/files/cpma.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | connection: local 4 | tasks: 5 | - name: "Reading v4 variables" 6 | include_vars: "../4.x/my_vars.yml" 7 | 8 | - name: "Setting facts" 9 | set_fact: 10 | guid_v4: "{{ guid }}" 11 | subdomain_v4: "{{ subdomain_base_suffix }}" 12 | 13 | - name: "Reading v3 variables" 14 | include_vars: "../3.x/my_vars.yml" 15 | 16 | - name: "Setting facts" 17 | set_fact: 18 | guid_v3: "{{ guid }}" 19 | subdomain_v3: "{{ subdomain_base_suffix }}" 20 | output_dir_v3: "{{ output_dir }}" 21 | 22 | - name: "Registering host" 23 | add_host: 24 | hostname: "bastion.{{ guid_v3 }}{{ subdomain_v3 }}" 25 | groups: "remote" 26 | 27 | - hosts: remote 28 | vars_files: 29 | - "../3.x/my_vars.yml" 30 | vars: 31 | ansible_ssh_private_key_file: "{{ output_dir }}/{{ guid }}key" 32 | ansible_user: ec2-user 33 | tasks: 34 | - name: "Including v4 variables" 35 | include_vars: "../4.x/my_vars.yml" 36 | delegate_to: localhost 37 | 38 | - name: Copy ssh key to bastion host 39 | copy: 40 | src: ~/.ssh/libra.pem 41 | dest: /home/ec2-user/.ssh/libra.pem 42 | owner: ec2-user 43 | group: ec2-user 44 | mode: '0600' 45 | 46 | - name: Create directory if it does not exist 47 | file: 48 | path: ~/cpma/bin 49 | state: directory 50 | mode: '0755' 51 | 52 | - name: Download cpma binary 53 | get_url: 54 | url: https://cpma.s3.us-east-2.amazonaws.com/cpma 55 | dest: ~/cpma/bin/cpma 56 | mode: 'u+rwx' 57 | -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/files/mssql-scc.yaml: -------------------------------------------------------------------------------- 1 | allowHostDirVolumePlugin: false 2 | allowHostIPC: false 3 | allowHostNetwork: false 4 | allowHostPID: false 5 | allowHostPorts: false 6 | allowPrivilegeEscalation: true 7 | allowPrivilegedContainer: true 8 | allowedCapabilities: null 9 | apiVersion: security.openshift.io/v1 10 | defaultAddCapabilities: null 11 | fsGroup: 12 | type: RunAsAny 13 | groups: [] 14 | kind: SecurityContextConstraints 15 | metadata: 16 | creationTimestamp: null 17 | name: mssql-persistent-scc 18 | selfLink: /apis/security.openshift.io/v1/securitycontextconstraints/mssql-persistent-scc 19 | priority: null 20 | readOnlyRootFilesystem: false 21 | requiredDropCapabilities: null 22 | runAsUser: 23 | type: RunAsAny 24 | seLinuxContext: 25 | type: RunAsAny 26 | supplementalGroups: 27 | type: RunAsAny 28 | users: 29 | - system:admin 30 | - system:serviceaccount:mssql-persistent:mssql-persistent-sa 31 | volumes: 32 | - awsElasticBlockStore 33 | - azureDisk 34 | - azureFile 35 | - cephFS 36 | - cinder 37 | - configMap 38 | - downwardAPI 39 | - emptyDir 40 | - fc 41 | - flexVolume 42 | - flocker 43 | - gcePersistentDisk 44 | - gitRepo 45 | - glusterfs 46 | - iscsi 47 | - nfs 48 | - persistentVolumeClaim 49 | - photonPersistentDisk 50 | - portworxVolume 51 | - projected 52 | - quobyte 53 | - rbd 54 | - scaleIO 55 | - secret 56 | - storageOS 57 | - vsphere 58 | -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/files/sock-shop-scc.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | kind: SecurityContextConstraints 3 | apiVersion: v1 4 | metadata: 5 | name: sock-shop 6 | readOnlyRootFilesystem: true 7 | allowPrivilegedContainer: true 8 | runAsUser: 9 | type: RunAsAny 10 | seLinuxContext: 11 | type: RunAsAny 12 | supplementalGroups: 13 | type: RunAsAny 14 | volumes: 15 | - '*' 16 | users: 17 | - system:admin 18 | - system:serviceaccount:sock-shop:sock-shop 19 | requiredDropCapabilities: 20 | - all 21 | defaultAddCapabilities: 22 | - CHOWN 23 | - SETGID 24 | - SETUID 25 | - NET_BIND_SERVICE 26 | - DAC_OVERRIDE -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/debug/ex1/mtc-cluster-edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/debug/ex1/mtc-cluster-edit.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/debug/ex1/mtc-cluster-error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/debug/ex1/mtc-cluster-error.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/debug/ex1/mtc-cluster-failure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/debug/ex1/mtc-cluster-failure.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/debug/ex1/mtc-cluster-fixed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/debug/ex1/mtc-cluster-fixed.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/debug/ex1/mtc-update-cluster.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/debug/ex1/mtc-update-cluster.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/debug/ex2/copy-options.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/debug/ex2/copy-options.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/debug/ex2/stage-pods.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/debug/ex2/stage-pods.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/debug/ex3/debug-view-clicked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/debug/ex3/debug-view-clicked.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/debug/ex3/debug-view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/debug/ex3/debug-view.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/debug/ex3/migmigration-complete-warnings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/debug/ex3/migmigration-complete-warnings.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/debug/ex3/migmigration-failed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/debug/ex3/migmigration-failed.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/debug/ex3/migplan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/debug/ex3/migplan.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/debug/ex3/migstorage-bucket.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/debug/ex3/migstorage-bucket.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/debug/ex3/pipeline-view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/debug/ex3/pipeline-view.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab1/LabEnv (1).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab1/LabEnv (1).png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab1/LabEnv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab1/LabEnv.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab1/lab-env-overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab1/lab-env-overview.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab1/labenv-overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab1/labenv-overview.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab1/labenv-overview2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab1/labenv-overview2.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab1/request-env-gg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab1/request-env-gg.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab2/minio-bucket-creation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab2/minio-bucket-creation.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab2/minio-mybucket.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab2/minio-mybucket.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab2/minio_login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab2/minio_login.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab2/mtc-replication-repository.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab2/mtc-replication-repository.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab2/mtcUI.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab2/mtcUI.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab2/noobaa-mgmt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab2/noobaa-mgmt.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab2/ssh-details-gg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab2/ssh-details-gg.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab3/cam-main-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab3/cam-main-screen.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab3/cam-main-screen.png.old.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab3/cam-main-screen.png.old.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab3/copypv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab3/copypv.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab3/copypv.png.old.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab3/copypv.png.old.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab3/mig-process.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab3/mig-process.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab3/migtooling.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab3/migtooling.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab3/movepv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab3/movepv.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab3/movepv.png.old.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab3/movepv.png.old.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab3/mtcprocess.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab3/mtcprocess.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab3/stage-migrate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab3/stage-migrate.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab3/velero.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab3/velero.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab4/cam-add-cluster-success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab4/cam-add-cluster-success.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab4/cam-add-cluster.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab4/cam-add-cluster.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab4/cam-add-repo-success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab4/cam-add-repo-success.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab4/cam-add-repo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab4/cam-add-repo.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab4/cam-clusters-added.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab4/cam-clusters-added.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab4/cam-main-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab4/cam-main-screen.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab4/cam-mig-plan-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab4/cam-mig-plan-1.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab4/cam-mig-plan-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab4/cam-mig-plan-2.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab4/cam-mig-plan-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab4/cam-mig-plan-3.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab4/cam-mig-plan-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab4/cam-mig-plan-4.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab4/cam-mig-plan-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab4/cam-mig-plan-5.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab4/cam-mig-plan-added.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab4/cam-mig-plan-added.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab4/cam-migration-complete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab4/cam-migration-complete.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab4/cam-progress-bar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab4/cam-progress-bar.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab4/cam-quiesce.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab4/cam-quiesce.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab4/cam-repo-added.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab4/cam-repo-added.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab4/cpma-mssql-report.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab4/cpma-mssql-report.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab4/file-upload-arch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab4/file-upload-arch.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab4/file-uploader-app.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab4/file-uploader-app.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab4/file-uploader-app.png.old.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab4/file-uploader-app.png.old.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab4/file-uploader-destination.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab4/file-uploader-destination.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab4/file-uploader-ui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab4/file-uploader-ui.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab4/mtc-add-cluster.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab4/mtc-add-cluster.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab4/mtc-add-migration-plan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab4/mtc-add-migration-plan.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab4/mtc-clusters-added.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab4/mtc-clusters-added.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab4/mtc-main-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab4/mtc-main-screen.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab4/mtc-mig-plan-added.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab4/mtc-mig-plan-added.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab4/mtc-mig-plan-copyoptions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab4/mtc-mig-plan-copyoptions.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab4/mtc-mig-plan-general.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab4/mtc-mig-plan-general.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab4/mtc-mig-plan-hooks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab4/mtc-mig-plan-hooks.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab4/mtc-mig-plan-migoptions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab4/mtc-mig-plan-migoptions.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab4/mtc-mig-plan-namespaces.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab4/mtc-mig-plan-namespaces.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab4/mtc-mig-plan-pvolumes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab4/mtc-mig-plan-pvolumes.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab4/mtc-mig-plan-validation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab4/mtc-mig-plan-validation.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab4/mtc-migration-complete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab4/mtc-migration-complete.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab4/mtc-progress-bar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab4/mtc-progress-bar.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab4/mtc-quiesce.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab4/mtc-quiesce.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab4/mtc-startmig.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab4/mtc-startmig.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab4/old/mtc-add-cluster.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab4/old/mtc-add-cluster.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab4/old/mtc-mig-plan-added.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab4/old/mtc-mig-plan-added.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab4/old/mtc-migration-complete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab4/old/mtc-migration-complete.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab4/old/mtc-quiesce.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab4/old/mtc-quiesce.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab5/cam-add-cluster-success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab5/cam-add-cluster-success.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab5/cam-add-cluster.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab5/cam-add-cluster.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab5/cam-add-repo-success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab5/cam-add-repo-success.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab5/cam-add-repo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab5/cam-add-repo.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab5/cam-clusters-added.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab5/cam-clusters-added.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab5/cam-main-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab5/cam-main-screen.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab5/cam-mig-plan-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab5/cam-mig-plan-1.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab5/cam-mig-plan-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab5/cam-mig-plan-2.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab5/cam-mig-plan-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab5/cam-mig-plan-3.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab5/cam-mig-plan-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab5/cam-mig-plan-4.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab5/cam-mig-plan-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab5/cam-mig-plan-5.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab5/cam-mig-plan-added.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab5/cam-mig-plan-added.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab5/cam-migration-complete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab5/cam-migration-complete.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab5/cam-progress-bar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab5/cam-progress-bar.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab5/cam-quiesce.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab5/cam-quiesce.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab5/cam-repo-added.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab5/cam-repo-added.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab5/cpma-mssql-report.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab5/cpma-mssql-report.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab5/mssql-add-product.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab5/mssql-add-product.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab5/mssql-add-product.png.old.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab5/mssql-add-product.png.old.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab5/mssql-added-product.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab5/mssql-added-product.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab5/mssql-added-product.png.old.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab5/mssql-added-product.png.old.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab5/mssql-app-route.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab5/mssql-app-route.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab5/mssql-namespace-detail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab5/mssql-namespace-detail.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab5/mssql-persistent-app-ocp4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab5/mssql-persistent-app-ocp4.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab5/mssql-persistent-app-ocp4.png.old.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab5/mssql-persistent-app-ocp4.png.old.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab5/mssql-product-catalog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab5/mssql-product-catalog.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab5/mssql-product-catalog.png.old.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab5/mssql-product-catalog.png.old.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab5/mssql-pv-yaml.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab5/mssql-pv-yaml.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab5/mssql-pv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab5/mssql-pv.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab5/mssql-pvc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab5/mssql-pvc.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab5/mssql-pvcs-cpma.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab5/mssql-pvcs-cpma.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab5/mssql-sccs-cpma.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab5/mssql-sccs-cpma.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab5/mtc-migplan-complete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab5/mtc-migplan-complete.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab5/mtc-migplan-copyoptions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab5/mtc-migplan-copyoptions.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab5/mtc-migplan-general.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab5/mtc-migplan-general.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab5/mtc-migplan-hooks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab5/mtc-migplan-hooks.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab5/mtc-migplan-migrate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab5/mtc-migplan-migrate.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab5/mtc-migplan-namespaces.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab5/mtc-migplan-namespaces.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab5/mtc-migplan-progress.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab5/mtc-migplan-progress.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab5/mtc-migplan-pvs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab5/mtc-migplan-pvs.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab5/mtc-migplan-quiesce.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab5/mtc-migplan-quiesce.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab5/mtc-migplan-validated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab5/mtc-migplan-validated.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab5/mtc-migplan-warning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab5/mtc-migplan-warning.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab5/mtc-migplans.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab5/mtc-migplans.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab5/ocp-4-console.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab5/ocp-4-console.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab5/old/mtc-migplan-complete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab5/old/mtc-migplan-complete.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab5/old/mtc-migplan-migrate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab5/old/mtc-migplan-migrate.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab5/old/mtc-migplan-progress.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab5/old/mtc-migplan-progress.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab5/old/mtc-migplan-quiesce.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab5/old/mtc-migplan-quiesce.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab6/ocp4-sock-shop-pv-yaml.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab6/ocp4-sock-shop-pv-yaml.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab6/ocp4-sock-shop-pvcs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab6/ocp4-sock-shop-pvcs.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab6/ocp4-sock-shop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab6/ocp4-sock-shop.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab6/sock-shop-arch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab6/sock-shop-arch.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab6/sock-shop-main.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab6/sock-shop-main.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab6/sock-shop-mig-plan-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab6/sock-shop-mig-plan-2.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab6/sock-shop-mig-plan-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab6/sock-shop-mig-plan-3.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab6/sock-shop-mig-plan-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab6/sock-shop-mig-plan-4.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab6/sock-shop-mig-plan-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab6/sock-shop-mig-plan-5.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab6/sock-shop-mig-plan-complete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab6/sock-shop-mig-plan-complete.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab6/sock-shop-mig-plan-quiesce.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab6/sock-shop-mig-plan-quiesce.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab6/sock-shop-mig-plan-view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab6/sock-shop-mig-plan-view.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab6/sock-shop-mig-plan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab6/sock-shop-mig-plan.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab6/sock-shop-progress.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab6/sock-shop-progress.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab6/sock-shop-pvc-cpma.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab6/sock-shop-pvc-cpma.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab6/sock-shop-register.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab6/sock-shop-register.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab6/sock-shop-scc-cpma.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab6/sock-shop-scc-cpma.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab6/sockshop-frontend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab6/sockshop-frontend.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab6/ssArchitecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab6/ssArchitecture.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab6/success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab6/success.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab7/mig-custom-resources.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab7/mig-custom-resources.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab7/mig-plan-failed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab7/mig-plan-failed.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab7/mig-view-debug-resources_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab7/mig-view-debug-resources_1.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab7/mig-view-debug-resources_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab7/mig-view-debug-resources_2.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab8/mediawiki.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab8/mediawiki.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab8/mtc-migplan-complete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab8/mtc-migplan-complete.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab8/mtc-migplan-copyoptions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab8/mtc-migplan-copyoptions.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab8/mtc-migplan-emptyhooks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab8/mtc-migplan-emptyhooks.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab8/mtc-migplan-general.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab8/mtc-migplan-general.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab8/mtc-migplan-hookadded.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab8/mtc-migplan-hookadded.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab8/mtc-migplan-hooks1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab8/mtc-migplan-hooks1.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab8/mtc-migplan-hooks2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab8/mtc-migplan-hooks2.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab8/mtc-migplan-migrate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab8/mtc-migplan-migrate.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab8/mtc-migplan-namespaces.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab8/mtc-migplan-namespaces.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab8/mtc-migplan-progress.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab8/mtc-migplan-progress.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab8/mtc-migplan-pvs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab8/mtc-migplan-pvs.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab8/mtc-migplan-validated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab8/mtc-migplan-validated.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab8/old/mtc-migplan-complete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab8/old/mtc-migplan-complete.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab8/old/mtc-migplan-hooks1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab8/old/mtc-migplan-hooks1.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab8/old/mtc-migplan-hooks2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab8/old/mtc-migplan-hooks2.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/screenshots/lab8/old/mtc-migplan-progress.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/bookbag/workshop/content/screenshots/lab8/old/mtc-migplan-progress.png -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/scripts/cors.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | connection: local 4 | tasks: 5 | - name: "Fixing permissions of the key file" 6 | file: 7 | path: "/home/{{ lookup('env', 'USER') }}/.ssh/openshift_key" 8 | owner: "{{ lookup('env', 'USER') }}" 9 | mode: "0600" 10 | become: yes 11 | 12 | - hosts: masters 13 | vars: 14 | ansible_user: ec2-user 15 | ansible_ssh_private_key_file: "/home/{{ lookup('env', 'USER') }}/.ssh/openshift_key" 16 | guid_v4: "{{ lookup('env', 'GUID_4') }}" 17 | subdomain: "{{ lookup('env', 'DOMAIN') |d('events.opentlc.com') }}" 18 | tasks: 19 | - block: 20 | - name: "Adding new CORS rules" 21 | lineinfile: 22 | insertafter: "corsAllowedOrigins:" 23 | line: "- (?i)//migration-mig\\.apps\\.cluster-{{ guid_v4 }}\\.{{ guid_v4 }}\\.{{ subdomain }}" 24 | path: /etc/origin/master/master-config.yaml 25 | become: yes 26 | 27 | - name: "Checking if atomic-openshift services exist" 28 | shell: "systemctl status atomic-openshift-master-api" 29 | register: status 30 | become: yes 31 | ignore_errors: yes 32 | 33 | - name: "Applying new configuration [atomic-openshift services]" 34 | service: 35 | name: "{{ item }}" 36 | state: restarted 37 | loop: 38 | - atomic-openshift-master-api 39 | - atomic-openshift-master-controllers 40 | become: yes 41 | when: status.rc == 0 42 | 43 | - name: "Applying new configuration [master-restart]" 44 | shell: "/usr/local/bin/master-restart {{ item }}" 45 | loop: 46 | - api 47 | - controller 48 | when: status.rc != 0 49 | become: yes 50 | -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/scripts/lab8/deploy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # deploys "Hello, OpenShift" app to random X number of namespaces 4 | 5 | echo "Number of namespaces? "; read x 6 | 7 | echo $x > .ns 8 | 9 | ns_prefix="hello-openshift-" 10 | app_manifest=https://raw.githubusercontent.com/openshift/origin/master/examples/hello-openshift/hello-pod.json 11 | 12 | for i in $(seq 1 $x); do 13 | oc create namespace "$ns_prefix""$i" 14 | oc apply -f $app_manifest -n "$ns_prefix""$i" 15 | oc expose pod hello-openshift -n "$ns_prefix""$i" 16 | oc expose svc hello-openshift -n "$ns_prefix""$i" 17 | done 18 | 19 | echo "Finding routes..." 20 | 21 | for i in $(seq 1 $x); do 22 | oc get route hello-openshift -n "$ns_prefix""$i" -o go-template='{{ .spec.host }}{{ println }}' 23 | done 24 | 25 | -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/scripts/lab8/destroy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # deletes "Hello, OpenShift" app previously deployed to X namespaces using deploy.sh 4 | 5 | x=$(cat .ns) 6 | 7 | ns_prefix="hello-openshift-" 8 | app_manifest=https://raw.githubusercontent.com/openshift/origin/master/examples/hello-openshift/hello-pod.json 9 | 10 | for i in $(seq 1 $x); do 11 | oc delete project "$ns_prefix""$i" 12 | done 13 | 14 | echo "Done..." 15 | -------------------------------------------------------------------------------- /mtc/bookbag/workshop/content/scripts/lab8/probe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # wgets routes created in previously deployed "Hello,OpenShift" app 4 | 5 | GREEN='\033[0;33m' 6 | NC='\033[0m' 7 | 8 | x=$(cat .ns) 9 | 10 | ns_prefix="hello-openshift-" 11 | 12 | for i in $(seq 1 $x); do 13 | echo -e "${GREEN}Probing app in namespace ""$ns_prefix""$i""${NC}" 14 | route=$(oc get route hello-openshift -n "$ns_prefix""$i" -o go-template='{{ .spec.host }}{{ println }}') 15 | curl http://${route} 16 | done 17 | 18 | -------------------------------------------------------------------------------- /mtc/bookbag/workshop/modules.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | modules: 3 | Intro: 4 | name: 1.0 Introduction 5 | exit_sign: 2.0 Environment 6 | Environment: 7 | name: 2.0 Environment 8 | exit_sign: 3.0 Prerequisites 9 | Prereqs: 10 | name: 3.0 Prerequisites 11 | exit_sign: 4.0 MTC Overview 12 | Overview: 13 | name: 4.0 MTC Overview 14 | exit_sign: 5.0 Migration Exercise I 15 | exercises/Ex1: 16 | name: 5.0 Migration Exercise I 17 | exit_sign: 6.0 Migration Exercise II 18 | exercises/Ex2: 19 | name: 6.0 Migration Exercise II 20 | exit_sign: 7.0 Migration Exercise III 21 | exercises/Ex3: 22 | name: 7.0 Migration Exercise III 23 | exit_sign: 8.0 Migration Exercise IV 24 | exercises/Ex4: 25 | name: 8.0 Migration Exercise IV 26 | exit_sign: 9.0 Migration Hooks 27 | Hooks: 28 | name: 9.0 Migration Hooks 29 | exit_sign: 10.0 Debugging 30 | Debug: 31 | name: 10.0 Debugging 32 | exit_sign: 10.1 Break-Fix Exercise I (Optional) 33 | exercises/debug/misconfig: 34 | name: 10.1 Break-Fix Exercise I (Optional) 35 | exit_sign: 10.2 Break-Fix Exercise II (Optional) 36 | exercises/debug/stage-pods: 37 | name: 10.2 Break-Fix Exercise II (Optional) 38 | exit_sign: 10.3 GVK Incompatability Exercise III (Optional) 39 | exercises/debug/gvk: 40 | name: 10.3 GVK Incompatability Exercise III (Optional) 41 | exit_sign: 11.0 Conclusion 42 | Conclusion: 43 | name: 11.0 Conclusion 44 | -------------------------------------------------------------------------------- /mtc/bookbag/workshop/workshop.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | name: OpenShift Migration Toolkit for Containers (MTC) Lab 3 | modules: 4 | activate: 5 | - Intro 6 | - Environment 7 | - Prereqs 8 | - Overview 9 | - exercises/Ex1 10 | - exercises/Ex2 11 | - exercises/Ex3 12 | - exercises/Ex4 13 | - Hooks 14 | - Debug 15 | - exercises/debug/misconfig 16 | - exercises/debug/stage-pods 17 | - exercises/debug/gvk 18 | - Conclusion 19 | -------------------------------------------------------------------------------- /mtc/bookbag/workshop_vars.json: -------------------------------------------------------------------------------- 1 | { 2 | "ocp3_guid": "7xhdt", 3 | "ocp3_domain": "events.opentlc.com", 4 | "ocp3_ssh_user": "lab-user", 5 | "ocp3_password": "r3dh4t1!", 6 | "ocp3_version": "3.11", 7 | "ocp4_guid": "7xhdt", 8 | "ocp4_domain": "events.opentlc.com", 9 | "ocp4_ssh_user": "lab-user", 10 | "ocp4_password": "r3dh4t1!", 11 | "ocp4_version": "4.3" 12 | } 13 | -------------------------------------------------------------------------------- /mtc/screenshots/bookbag-docs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/screenshots/bookbag-docs.png -------------------------------------------------------------------------------- /mtc/screenshots/rhpds-myservices.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/screenshots/rhpds-myservices.png -------------------------------------------------------------------------------- /mtc/screenshots/rhpds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/mtc/screenshots/rhpds.png -------------------------------------------------------------------------------- /oadp/README.md: -------------------------------------------------------------------------------- 1 | # OpenShift API for Data Protection (OADP) Lab 2 | 3 | This guide will provide you with hands-on exposure to the new OpenShift API for Data Protection through a series of labs backup and restore workloads (both stateful and stateless) on the same OpenShift cluster. 4 | 5 | ## Description 6 | 7 | Backup and restore stateless and stateful application workloads. This application is available for installation through the Operator Hub/OLM. This course requires OCP4 services from [RHPDS](http://rhpds.redhat.com/). 8 | 9 | ## Goals 10 | 11 | * Backup and restore applications on OpenShift 4 clusters using the OpenShift API for Data Protection (OADP)) provided by OpenShift 12 | Container Platform 4 leveraging both the UI and API. 13 | 14 | * Tips, techniques, and best-practices for debugging failed backups/restores. 15 | 16 | ## Setup Steps 17 | ### Option 1: RHPDS OADP 18 | 19 | Step 1: Browse to RHPDS: https://rhpds.redhat.com 20 | 21 | ![RHPDS](screenshots/rhpds.png) 22 | 23 | Step 2: Login with your RHPDS username/password. 24 | 25 | Step 3: Hover over Services Menu >> Click the Catalogs menu and open the “Openshift Workshop” catalog. 26 | 27 | Step 4: Order **APIs For Data Protection (OADP)** 28 | 29 | Step 5: Wait for services to become available. ```This will take ~60 min.```. When the environment has finished provisioning you will receive an email with confirmation and access details for the labs. 30 | 31 | ![RHPDS-MyServices](screenshots/rhpds-myservices.png) 32 | 33 | Step 6. Proceed with Lab by following steps outlined in bookbag documentation. 34 | 35 | ### Option 2: Use any OpenShift 4.7-4.8 cluster that you have cluster-admin login with kubeadmin-password. 36 | The cluster should not have existing `openshift-storage` and `openshift-adp` namespace 37 | 38 | After `oc login` run the following and fill out any prompts for cluster-admin username and password. 39 | ```bash 40 | curl https://raw.githubusercontent.com/kaovilai/labs/master/oadp/install-deploy.sh -o install-deploy.sh; 41 | chmod +x ./install-deploy.sh 42 | ./install-deploy.sh 43 | ``` -------------------------------------------------------------------------------- /oadp/bookbag/.workshop/build: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # This 'build' script is where you can add steps that should be run when 4 | # building the image for your custom workshop. 5 | 6 | # Move the workshop content to '/opt/app-root/workshop'. It could be left 7 | # at it's default location of '/opt/app-root/src/workshop', but by moving it, 8 | # it is out of view of the user doing the workshop and they aren't likely to 9 | # delete it by accident and break the display of the workshop content. 10 | mv workshop /opt/app-root/workshop 11 | 12 | # Move the workshop envvars 13 | mv envvars /opt/app-root/envvars 14 | 15 | # Also delete some of the other files from the top of the Git repository we 16 | # don't need for running the workshop. 17 | rm -f Dockerfile README.md LICENSE 18 | 19 | # If the workshop requires Git, it is necessary to set some defaults for 20 | # the name and email of the user for Git. 21 | #git config --global user.email "user@example.com" 22 | #git config --global user.name "Example User" 23 | -------------------------------------------------------------------------------- /oadp/bookbag/.workshop/develop-settings.sh: -------------------------------------------------------------------------------- 1 | AUTH_USERNAME=workshop 2 | AUTH_PASSWORD=workshop 3 | -------------------------------------------------------------------------------- /oadp/bookbag/.workshop/scripts/.gitignore: -------------------------------------------------------------------------------- 1 | *.swp 2 | -------------------------------------------------------------------------------- /oadp/bookbag/.workshop/scripts/README.md: -------------------------------------------------------------------------------- 1 | Workshop Scripts 2 | ================ 3 | 4 | This repository contains scripts to help with deploying and building workshops. It should be added as a Git submodule at the location ``.workshop/scripts`` of a Git repository for a workshop. 5 | 6 | Adding the Sub Module 7 | --------------------- 8 | 9 | To add this Git repository as a Git submodule to an existing Git repository for a workshop, run: 10 | 11 | ``` 12 | git submodule add -b stable/1.x https://github.com/openshift-homeroom/spawner-scripts.git .workshop/scripts 13 | ``` 14 | 15 | Once added as a Git submodule, to pull the source code for it, run: 16 | 17 | ``` 18 | git submodule update --remote 19 | ``` 20 | 21 | Configuring Deployments 22 | ----------------------- 23 | 24 | To configure the deployments created by the scripts, create in your Git repository the file ``.workshop/settings.sh``. In this file, you need to set the name of the workshop, the location of any pre-built image for the workshop if one exists, and other appropriate settings to control the workshop spawner. 25 | 26 | ``` 27 | WORKSHOP_NAME=lab-markdown-sample 28 | WORKSHOP_IMAGE=quay.io/openshifthomeroom/lab-markdown-sample:master 29 | RESOURCE_BUDGET=medium 30 | MAX_SESSION_AGE=3600 31 | IDLE_TIMEOUT=300 32 | ``` 33 | 34 | Deploying the Spawner 35 | ---------------------- 36 | 37 | To deploy the spawner for the workshop, create a project in OpenShift into which the workshop is to be deployed. 38 | 39 | ``` 40 | oc new-project workshops 41 | ``` 42 | 43 | From within the top level of your Git repository that you added this Git repository as a submodule, you can now run: 44 | 45 | ``` 46 | .workshop/scripts/deploy-spawner.sh 47 | ``` 48 | 49 | You must be a cluster admin to be able to deploy the workshop using the spawner. 50 | 51 | The name of the deployment will be dictated by the value of ``WORKSHOP_NAME`` in the ``.workshop/settings.sh`` file. 52 | 53 | Building the Workshop 54 | --------------------- 55 | 56 | The deployment created above will use the declared pre-existing image for the workshop, or an empty workshop image if none is provided. 57 | 58 | To deploy the workshop content from your Git repository, or make changes to the workshop content and test them, run: 59 | 60 | ``` 61 | .workshop/scripts/build-workshop.sh 62 | ``` 63 | 64 | This will replace the existing image used by the active deployment. 65 | 66 | If you are running an existing instance of the workshop, from your web browser select "Restart Workshop" from the menu top right of the workshop environment dashboard. 67 | 68 | When you are happy with your changes, push them back to the remote Git repository. 69 | 70 | If you need to change the RBAC definitions, or what resources are created when a project is created, change the definitions in the ``resources`` and ``templates`` directory if you have them. You can then re-run: 71 | 72 | ``` 73 | .workshop/scripts/deploy-spawner.sh 74 | ``` 75 | 76 | and it will update the active definitions. 77 | 78 | Note that if you do this, you will need to re-run: 79 | 80 | ``` 81 | .workshop/scripts/build-workshop.sh 82 | ``` 83 | 84 | to have any local content changes be used once again as it will revert back to using the original image for the workshop. 85 | 86 | Deleting the Workshop 87 | --------------------- 88 | 89 | To delete the spawner and any active sessions, run: 90 | 91 | ``` 92 | .workshop/scripts/delete-spawner.sh 93 | ``` 94 | 95 | To delete the build configuration for the workshop image, run: 96 | 97 | ``` 98 | .workshop/scripts/delete-workshop.sh 99 | ``` 100 | 101 | To delete any special resources for CRDs and cluster roles, run: 102 | 103 | ``` 104 | .workshop/scripts/delete-resources.sh 105 | ``` 106 | 107 | Personal Deployment 108 | ------------------- 109 | 110 | If you don't want to deploy the workshop for multiple users, you can instead deploy a single instance of the workshop. 111 | 112 | To do this, ensure that you have first deleted any spawner deployment created using the commands above. 113 | 114 | Then run: 115 | 116 | ``` 117 | .workshop/scripts/deploy-personal.sh 118 | ``` 119 | 120 | You do not need to be cluster admin to deploy a single instance of the workshop. 121 | 122 | If you need to deploy the workshop from the local content, as for when using the spawner, run: 123 | 124 | ``` 125 | .workshop/scripts/build-workshop.sh 126 | ``` 127 | 128 | You do not need to force a re-deployment as it will happen automatically. 129 | 130 | To delete the workshop instance run: 131 | 132 | ``` 133 | .workshop/scripts/delete-personal.sh 134 | ``` 135 | 136 | Also run the scripts to delete the build configuration and resources. 137 | -------------------------------------------------------------------------------- /oadp/bookbag/.workshop/scripts/VERSION: -------------------------------------------------------------------------------- 1 | stable/1.x 2 | -------------------------------------------------------------------------------- /oadp/bookbag/.workshop/scripts/build-workshop.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPTS_DIR=`dirname $0` 4 | 5 | . $SCRIPTS_DIR/setup-environment.sh 6 | 7 | echo "### Checking if already have a build configuration." 8 | 9 | oc get bc "$WORKSHOP_NAME" -o name 2>/dev/null 10 | 11 | if [ "$?" != "0" ]; then 12 | echo "..." 13 | 14 | echo "### Creating build configuration for workshop." 15 | 16 | oc new-build --binary --name "$WORKSHOP_NAME" 17 | 18 | if [ "$?" != "0" ]; then 19 | fail "Failed to create build configuration." 20 | exit 1 21 | fi 22 | fi 23 | 24 | echo "### Building workshop from local content." 25 | 26 | oc start-build "$WORKSHOP_NAME" --from-dir . --follow 27 | 28 | if [ "$?" != "0" ]; then 29 | fail "Failed to build workshop content." 30 | exit 1 31 | fi 32 | -------------------------------------------------------------------------------- /oadp/bookbag/.workshop/scripts/default-settings.sh: -------------------------------------------------------------------------------- 1 | TERMINAL_IMAGE=quay.io/openshifthomeroom/workshop-terminal:3.0.0 2 | DASHBOARD_IMAGE=quay.io/openshifthomeroom/workshop-dashboard:4.1.1 3 | SPAWNER_IMAGE=quay.io/openshifthomeroom/workshop-spawner:6.2.1 4 | CONSOLE_IMAGE=quay.io/openshift/origin-console:4.1 5 | 6 | HOMEROOM_NAME=homeroom 7 | WORKSHOP_TITLE= 8 | WORKSHOP_DESCRIPTION= 9 | 10 | SPAWNER_REPO=openshift-homeroom/workshop-spawner 11 | SPAWNER_VERSION=6.2.1 12 | SPAWNER_MODE=learning-portal 13 | SPAWNER_VARIANT=production 14 | SPAWNER_ROLE=admin 15 | SPAWNER_PASSWORD= 16 | 17 | DASHBOARD_REPO=openshift-homeroom/workshop-dashboard 18 | DASHBOARD_VERSION=4.1.1 19 | DASHBOARD_MODE= 20 | DASHBOARD_VARIANT=production 21 | 22 | DOWNLOAD_URL= 23 | WORKSHOP_FILE= 24 | 25 | WORKSHOP_MEMORY=512Mi 26 | RESOURCE_BUDGET=medium 27 | SERVER_LIMIT=8 28 | MAX_SESSION_AGE=3600 29 | IDLE_TIMEOUT=300 30 | LETS_ENCRYPT=false 31 | -------------------------------------------------------------------------------- /oadp/bookbag/.workshop/scripts/delete-images.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPTS_DIR=`dirname $0` 4 | 5 | . $SCRIPTS_DIR/parse-arguments.sh 6 | 7 | . $SCRIPTS_DIR/setup-environment.sh 8 | 9 | echo "### Delete daemon set for pre-pulling images." 10 | 11 | oc delete daemonset/$WORKSHOP_NAME-prepull -n "$PROJECT_NAME" 12 | -------------------------------------------------------------------------------- /oadp/bookbag/.workshop/scripts/delete-personal.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPTS_DIR=`dirname $0` 4 | 5 | . $SCRIPTS_DIR/parse-arguments.sh 6 | 7 | . $SCRIPTS_DIR/setup-environment.sh 8 | 9 | echo "### Delete project resources." 10 | 11 | APPLICATION_LABELS="app=$DASHBOARD_APPLICATION" 12 | 13 | PROJECT_RESOURCES="all,serviceaccount,rolebinding,configmap" 14 | 15 | oc delete "$PROJECT_RESOURCES" -n "$PROJECT_NAME" --selector "$APPLICATION_LABELS" 16 | -------------------------------------------------------------------------------- /oadp/bookbag/.workshop/scripts/delete-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPTS_DIR=`dirname $0` 4 | 5 | . $SCRIPTS_DIR/setup-environment.sh 6 | 7 | echo "### Delete extra resources." 8 | 9 | if [ -d $WORKSHOP_DIR/resources/ ]; then 10 | oc delete -f $WORKSHOP_DIR/resources/ --recursive 11 | fi 12 | -------------------------------------------------------------------------------- /oadp/bookbag/.workshop/scripts/delete-spawner.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPTS_DIR=`dirname $0` 4 | 5 | . $SCRIPTS_DIR/parse-arguments.sh 6 | 7 | . $SCRIPTS_DIR/setup-environment.sh 8 | 9 | echo "### Delete project resources." 10 | 11 | APPLICATION_LABELS="app=$SPAWNER_APPLICATION-$PROJECT_NAME,spawner=$SPAWNER_MODE" 12 | 13 | PROJECT_RESOURCES="services,routes,deploymentconfigs,imagestreams,secrets,configmaps,serviceaccounts,rolebindings,serviceaccounts,rolebindings,persistentvolumeclaims,pods" 14 | 15 | oc delete "$PROJECT_RESOURCES" -n "$PROJECT_NAME" --selector "$APPLICATION_LABELS" 16 | 17 | echo "### Delete global resources." 18 | 19 | CLUSTER_RESOURCES="clusterrolebindings,clusterroles" 20 | 21 | oc delete "$CLUSTER_RESOURCES" -n "$PROJECT_NAME" --selector "$APPLICATION_LABELS" 22 | 23 | if [ x"$PREPULL_IMAGES" == x"true" ]; then 24 | echo "### Delete daemon set for pre-pulling images." 25 | 26 | oc delete daemonset/$WORKSHOP_NAME-prepull -n "$PROJECT_NAME" 27 | fi 28 | -------------------------------------------------------------------------------- /oadp/bookbag/.workshop/scripts/delete-workshop.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPTS_DIR=`dirname $0` 4 | 5 | . $SCRIPTS_DIR/setup-environment.sh 6 | 7 | echo "### Delete build configuration." 8 | 9 | oc delete all --selector build="$WORKSHOP_NAME" 10 | -------------------------------------------------------------------------------- /oadp/bookbag/.workshop/scripts/deploy-katacoda.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPTS_DIR=`dirname $0` 4 | 5 | SETTINGS_NAME=katacoda 6 | 7 | . $SCRIPTS_DIR/setup-environment.sh 8 | 9 | # Run Katacoda script which waits on OpenShift cluster being ready. 10 | 11 | /usr/local/bin/launch.sh 12 | 13 | # Make sure that cluster is ready. Gauge this by continually trying to 14 | # to add ability to pull images to any users. 15 | 16 | for i in {1..200}; do 17 | oc policy add-role-to-user system:image-puller system:anonymous && \ 18 | break || sleep 1; 19 | done 20 | 21 | # Start pulling down workshop image and console image in background. 22 | # This will hopefully speed things up while set up everything else. 23 | 24 | echo "### Start pulling down workshop and console images." 25 | 26 | docker pull "$WORKSHOP_IMAGE" > /dev/null 2>&1 & 27 | docker pull "$CONSOLE_IMAGE" > /dev/null 2>&1 & 28 | 29 | # Now create the volumes. Create a fixed number for now. 30 | 31 | echo "### Create persistent volumes." 32 | 33 | for i in $(seq -f "%02g" 1 10); do 34 | mkdir -p /data/pv-$i 35 | done 36 | 37 | chmod 0777 /data/pv-* 38 | 39 | chcon -t svirt_sandbox_file_t /data/pv-* 40 | 41 | oc apply -f $SCRIPTS_DIR/katacoda-volumes.json 42 | 43 | # Grant developer cluster admin access. 44 | 45 | echo "### Give developer cluster admin access." 46 | 47 | oc adm policy add-cluster-role-to-user cluster-admin developer > /dev/null 2>&1 48 | 49 | # Login as developer rather than system:admin. 50 | 51 | echo "### Login as developer to OpenShift." 52 | 53 | SERVER_ADDRESS=`oc get --raw /.well-known/oauth-authorization-server | grep '"issuer":' | sed -e 's%.*https://%%' -e 's%",%%'` 54 | CLUSTER_SUBDOMAIN=`echo $SERVER_ADDRESS | sed -e 's/-8443-/-80-/' -e 's/:.*//'` 55 | 56 | oc login -u developer -p developer --insecure-skip-tls-verify https://$SERVER_ADDRESS > /dev/null 57 | 58 | echo "### Deploying workshop using Homeroom." 59 | 60 | oc new-project workshop > /dev/null 61 | 62 | cat >> $WORKSHOP_DIR/katacoda-settings.sh << EOF 63 | WORKSHOP_NAME=workshop 64 | DASHBOARD_MODE=cluster-admin 65 | OPENSHIFT_PROJECT=homeroom 66 | CLUSTER_SUBDOMAIN=$CLUSTER_SUBDOMAIN 67 | AUTH_USERNAME=* 68 | AUTH_PASSWORD= 69 | EOF 70 | 71 | $SCRIPTS_DIR/deploy-personal.sh --settings=katacoda 72 | 73 | echo "### Creating route for Homeroom access." 74 | 75 | oc expose svc/workshop --name homeroom 76 | 77 | echo "### Homeroom Ready." 78 | -------------------------------------------------------------------------------- /oadp/bookbag/.workshop/scripts/deploy-personal.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPTS_DIR=`dirname $0` 4 | 5 | . $SCRIPTS_DIR/parse-arguments.sh 6 | 7 | . $SCRIPTS_DIR/setup-environment.sh 8 | 9 | TEMPLATE_REPO=https://raw.githubusercontent.com/$DASHBOARD_REPO 10 | 11 | TEMPLATE_FILE=$DASHBOARD_VARIANT.json 12 | 13 | if [ x"$DASHBOARD_MODE" != x"" ]; then 14 | TEMPLATE_FILE=$DASHBOARD_VARIANT-$DASHBOARD_MODE.json 15 | fi 16 | 17 | TEMPLATE_PATH=$TEMPLATE_REPO/$DASHBOARD_VERSION/templates/$TEMPLATE_FILE 18 | 19 | echo "### Install static resource definitions." 20 | 21 | if [ -d $WORKSHOP_DIR/resources/ ]; then 22 | oc apply -n "$PROJECT_NAME" -f $WORKSHOP_DIR/resources/ --recursive 23 | 24 | if [ "$?" != "0" ]; then 25 | fail "Failed to create static resource definitions." 26 | exit 1 27 | fi 28 | fi 29 | 30 | echo "### Creating workshop deployment." 31 | 32 | TEMPLATE_ARGS="" 33 | 34 | TEMPLATE_ARGS="$TEMPLATE_ARGS --param APPLICATION_NAME=$DASHBOARD_APPLICATION" 35 | TEMPLATE_ARGS="$TEMPLATE_ARGS --param TERMINAL_IMAGE=$WORKSHOP_IMAGE" 36 | TEMPLATE_ARGS="$TEMPLATE_ARGS --param DOWNLOAD_URL=$DOWNLOAD_URL" 37 | TEMPLATE_ARGS="$TEMPLATE_ARGS --param WORKSHOP_FILE=$WORKSHOP_FILE" 38 | TEMPLATE_ARGS="$TEMPLATE_ARGS --param WORKSHOP_ENVVARS=$WORKSHOP_ENVVARS" 39 | 40 | if [ x"$DASHBOARD_MODE" == x"" ]; then 41 | TEMPLATE_ARGS="$TEMPLATE_ARGS --param AUTH_USERNAME=$AUTH_USERNAME" 42 | 43 | if [ ! -z ${AUTH_USERNAME+x} ]; then 44 | TEMPLATE_ARGS="$TEMPLATE_ARGS --param AUTH_PASSWORD=$AUTH_PASSWORD" 45 | fi 46 | 47 | TEMPLATE_ARGS="$TEMPLATE_ARGS --param GATEWAY_ENVVARS=$GATEWAY_ENVVARS" 48 | TEMPLATE_ARGS="$TEMPLATE_ARGS --param TERMINAL_ENVVARS=$TERMINAL_ENVVARS" 49 | TEMPLATE_ARGS="$TEMPLATE_ARGS --param CONSOLE_IMAGE=$CONSOLE_IMAGE" 50 | TEMPLATE_ARGS="$TEMPLATE_ARGS --param CLUSTER_SUBDOMAIN=$CLUSTER_SUBDOMAIN" 51 | TEMPLATE_ARGS="$TEMPLATE_ARGS --param OPENSHIFT_PROJECT=$OPENSHIFT_PROJECT" 52 | TEMPLATE_ARGS="$TEMPLATE_ARGS --param OPENSHIFT_USERNAME=$OPENSHIFT_USERNAME" 53 | TEMPLATE_ARGS="$TEMPLATE_ARGS --param OPENSHIFT_PASSWORD=$OPENSHIFT_PASSWORD" 54 | fi 55 | 56 | if [ x"$DASHBOARD_MODE" == x"cluster-admin" ]; then 57 | TEMPLATE_ARGS="$TEMPLATE_ARGS --param AUTH_USERNAME=$AUTH_USERNAME" 58 | 59 | if [ ! -z ${AUTH_USERNAME+x} ]; then 60 | TEMPLATE_ARGS="$TEMPLATE_ARGS --param AUTH_PASSWORD=$AUTH_PASSWORD" 61 | fi 62 | 63 | TEMPLATE_ARGS="$TEMPLATE_ARGS --param GATEWAY_ENVVARS=$GATEWAY_ENVVARS" 64 | TEMPLATE_ARGS="$TEMPLATE_ARGS --param TERMINAL_ENVVARS=$TERMINAL_ENVVARS" 65 | TEMPLATE_ARGS="$TEMPLATE_ARGS --param CONSOLE_IMAGE=$CONSOLE_IMAGE" 66 | TEMPLATE_ARGS="$TEMPLATE_ARGS --param PROJECT_NAME=$PROJECT_NAME" 67 | TEMPLATE_ARGS="$TEMPLATE_ARGS --param CLUSTER_SUBDOMAIN=$CLUSTER_SUBDOMAIN" 68 | TEMPLATE_ARGS="$TEMPLATE_ARGS --param OPENSHIFT_PROJECT=$OPENSHIFT_PROJECT" 69 | fi 70 | 71 | oc process -n "$PROJECT_NAME" -f $TEMPLATE_PATH $TEMPLATE_ARGS | \ 72 | oc apply -n "$PROJECT_NAME" -f - 73 | 74 | if [ "$?" != "0" ]; then 75 | fail "Failed to create deployment for dashboard." 76 | exit 1 77 | fi 78 | 79 | echo "### Waiting for the dashboard to deploy." 80 | 81 | oc rollout status dc/"$DASHBOARD_APPLICATION" -n "$PROJECT_NAME" 82 | 83 | if [ "$?" != "0" ]; then 84 | fail "Deployment of dashboard failed to complete." 85 | exit 1 86 | fi 87 | 88 | echo "### Waiting for the dashboard to deploy." 89 | 90 | oc rollout status dc/"$DASHBOARD_APPLICATION" -n "$PROJECT_NAME" 91 | 92 | if [ "$?" != "0" ]; then 93 | fail "Deployment of dashboard failed to complete." 94 | exit 1 95 | fi 96 | 97 | echo "### Route details for the dashboard are as follows." 98 | 99 | oc get route "${DASHBOARD_APPLICATION}" -n "$PROJECT_NAME" \ 100 | -o template --template '{{.spec.host}}{{"\n"}}' 101 | -------------------------------------------------------------------------------- /oadp/bookbag/.workshop/scripts/parse-arguments.sh: -------------------------------------------------------------------------------- 1 | echo "### Parsing command line arguments." 2 | 3 | overrides=() 4 | 5 | while [[ $# -gt 0 ]] 6 | do 7 | i="$1" 8 | case $i in 9 | --event=*|--settings=*) 10 | SETTINGS_NAME="${i#*=}" 11 | shift 12 | ;; 13 | --event|--settings) 14 | shift 15 | SETTINGS_NAME="$1" 16 | shift 17 | ;; 18 | --project=*) 19 | PROJECT_NAME="${i#*=}" 20 | shift 21 | ;; 22 | --project) 23 | shift 24 | PROJECT_NAME="$1" 25 | shift 26 | ;; 27 | --override=@*) 28 | overrides+=(${i#*=}) 29 | shift 30 | ;; 31 | --override=*) 32 | p="${i#*=}" 33 | key=${p%%=*} 34 | value=${p#*=} 35 | mapped_key=override_${key} 36 | declare ${mapped_key}="$value" 37 | overrides+=(${key}) 38 | shift 39 | ;; 40 | --override) 41 | shift 42 | i="$1" 43 | case $1 in 44 | @*) 45 | overrides+=($i) 46 | ;; 47 | *) 48 | key=${i%%=*} 49 | value=${i#*=} 50 | mapped_key=override_${key} 51 | declare ${mapped_key}="$value" 52 | overrides+=(${key}) 53 | ;; 54 | esac 55 | shift 56 | ;; 57 | *) 58 | shift 59 | ;; 60 | esac 61 | done 62 | -------------------------------------------------------------------------------- /oadp/bookbag/.workshop/scripts/prepull-images.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPTS_DIR=`dirname $0` 4 | 5 | . $SCRIPTS_DIR/parse-arguments.sh 6 | 7 | . $SCRIPTS_DIR/setup-environment.sh 8 | 9 | echo "### Deploy daemon set to pre-pull images." 10 | 11 | cat << EOF | oc apply -n "$PROJECT_NAME" -f - 12 | apiVersion: apps/v1 13 | kind: DaemonSet 14 | metadata: 15 | name: $WORKSHOP_NAME-prepull 16 | spec: 17 | selector: 18 | matchLabels: 19 | app: $WORKSHOP_NAME-prepull 20 | template: 21 | metadata: 22 | labels: 23 | app: $WORKSHOP_NAME-prepull 24 | spec: 25 | initContainers: 26 | - name: prepull-spawner 27 | image: $SPAWNER_IMAGE 28 | command: ["/bin/true"] 29 | resources: 30 | limits: 31 | memory: 128Mi 32 | - name: prepull-terminal 33 | image: $TERMINAL_IMAGE 34 | command: ["/bin/true"] 35 | resources: 36 | limits: 37 | memory: 128Mi 38 | requests: 39 | memory: 128Mi 40 | - name: prepull-workshop 41 | image: $WORKSHOP_IMAGE 42 | command: ["/bin/true"] 43 | resources: 44 | limits: 45 | memory: 128Mi 46 | requests: 47 | memory: 128Mi 48 | - name: prepull-console 49 | image: $CONSOLE_IMAGE 50 | command: ["/bin/true"] 51 | resources: 52 | limits: 53 | memory: 128Mi 54 | requests: 55 | memory: 128Mi 56 | containers: 57 | - name: pause 58 | image: gcr.io/google_containers/pause 59 | resources: 60 | limits: 61 | memory: 128Mi 62 | requests: 63 | memory: 128Mi 64 | EOF 65 | 66 | if [ "$?" != "0" ]; then 67 | fail "Creation of daemonset to pre-pull images failed." 68 | exit 1 69 | fi 70 | -------------------------------------------------------------------------------- /oadp/bookbag/.workshop/scripts/setup-environment.sh: -------------------------------------------------------------------------------- 1 | fail() 2 | { 3 | echo "Error:" $* 1>&2 4 | exit 1 5 | } 6 | 7 | warn() 8 | { 9 | echo "Warning:" $* 1>&2 10 | } 11 | 12 | trim() 13 | { 14 | local trimmed="$1" 15 | 16 | # Strip leading space. 17 | trimmed="${trimmed## }" 18 | # Strip trailing space. 19 | trimmed="${trimmed%% }" 20 | 21 | echo "$trimmed" 22 | } 23 | 24 | SCRIPTS_DIR=`dirname $0` 25 | WORKSHOP_DIR=`dirname $SCRIPTS_DIR` 26 | SOURCE_DIR=`dirname $WORKSHOP_DIR` 27 | 28 | REPOSITORY_NAME=`basename $SOURCE_DIR` 29 | 30 | if [ `basename $WORKSHOP_DIR` != ".workshop" ]; then 31 | fail "Failed to find workshop directory." 32 | exit 1 33 | fi 34 | 35 | echo "### Reading the default configuration." 36 | 37 | . $SCRIPTS_DIR/default-settings.sh 38 | 39 | echo "### Reading the workshop configuration." 40 | 41 | if [ ! -f $WORKSHOP_DIR/settings.sh ]; then 42 | warn "Cannot find any workshop settings." 43 | else 44 | . $WORKSHOP_DIR/settings.sh 45 | fi 46 | 47 | if [ x"$SETTINGS_NAME" != x"" ]; then 48 | if [ ! -f $WORKSHOP_DIR/$SETTINGS_NAME-settings.sh ]; then 49 | warn "Cannot find any custom workshop settings." 50 | else 51 | . $WORKSHOP_DIR/$SETTINGS_NAME-settings.sh 52 | fi 53 | fi 54 | 55 | for key in "${overrides[@]}"; do 56 | case $key in 57 | @*) 58 | file="${key#*@}" 59 | if [ -f "$file" ]; then 60 | . $file 61 | fi 62 | ;; 63 | *) 64 | mapped_key="override_${key}" 65 | value="${!mapped_key}" 66 | declare ${key}="${value}" 67 | ;; 68 | esac 69 | done 70 | 71 | if [ x"$WORKSHOP_IMAGE" == x"" ]; then 72 | WORKSHOP_IMAGE=$DASHBOARD_IMAGE 73 | fi 74 | 75 | if [ -f "$WORKSHOP_DIR/jupyterhub_config.py" ]; then 76 | JUPYTERHUB_CONFIG=`cat $WORKSHOP_DIR/jupyterhub_config.py` 77 | fi 78 | 79 | if [ -f "$WORKSHOP_DIR/jupyterhub_config.sh" ]; then 80 | JUPYTERHUB_ENVVARS=`cat $WORKSHOP_DIR/jupyterhub_config.sh` 81 | fi 82 | 83 | if [ -f "$WORKSHOP_DIR/terminal.sh" ]; then 84 | TERMINAL_ENVVARS=`cat $WORKSHOP_DIR/terminal.sh` 85 | fi 86 | 87 | if [ -f "$WORKSHOP_DIR/workshop.sh" ]; then 88 | WORKSHOP_ENVVARS=`cat $WORKSHOP_DIR/workshop.sh` 89 | fi 90 | 91 | if [ -f "$WORKSHOP_DIR/gateway.sh" ]; then 92 | GATEWAY_ENVVARS=`cat $WORKSHOP_DIR/gateway.sh` 93 | fi 94 | 95 | echo "### Setting the workshop application." 96 | 97 | WORKSHOP_NAME=${WORKSHOP_NAME:-$REPOSITORY_NAME} 98 | 99 | SPAWNER_APPLICATION=${SPAWNER_APPLICATION:-$WORKSHOP_NAME} 100 | DASHBOARD_APPLICATION=${DASHBOARD_APPLICATION:-$WORKSHOP_NAME} 101 | 102 | if [ x"$PROJECT_NAME" == x"" ]; then 103 | PROJECT_NAME=`oc project --short 2>/dev/null` 104 | fi 105 | 106 | if [ x"$PROJECT_NAME" == x"" ]; then 107 | fail "Cannot determine name of project." 108 | exit 1 109 | fi 110 | 111 | oc get project "$PROJECT_NAME" > /dev/null 2>&1 112 | 113 | if [ "$?" != "0" ]; then 114 | fail "Project $PROJECT_NAME does not exist." 115 | exit 1 116 | fi 117 | -------------------------------------------------------------------------------- /oadp/bookbag/.workshop/settings.sh: -------------------------------------------------------------------------------- 1 | WORKSHOP_NAME=ocp4-disconnected-install 2 | RESOURCE_BUDGET=medium 3 | MAX_SESSION_AGE=3600 4 | IDLE_TIMEOUT=300 5 | -------------------------------------------------------------------------------- /oadp/bookbag/.workshop/setup: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # This 'setup' script is where you can add steps that should be run each 4 | # time the container for the workshop is started. Note that if you are 5 | # using persistent storage with a workshop and make changes to files from 6 | # this script, or are deploying applications, your scripts must cope with 7 | # the steps having already been run. This is because this script will be 8 | # run a second time if the container were restarted for some reason. 9 | -------------------------------------------------------------------------------- /oadp/bookbag/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM quay.io/openshifthomeroom/workshop-dashboard:5.0.1 2 | 3 | USER root 4 | 5 | COPY . /tmp/src 6 | 7 | RUN rm -rf /tmp/src/.git* && \ 8 | chown -R 1001 /tmp/src && \ 9 | chgrp -R 0 /tmp/src && \ 10 | chmod -R g+w /tmp/src 11 | 12 | USER 1001 13 | 14 | RUN /usr/libexec/s2i/assemble 15 | -------------------------------------------------------------------------------- /oadp/bookbag/apps/data-mover-example/minimal-3csivol.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | # Test quickly with: 3 | # oc delete ns minimal-3csivol && oc create -f ./tests/e2e/sample-applications/minimal-3csivol/list.yaml && oc wait --for condition=available deployment/minimal-3csivol --timeout -1h && oc logs deploy/minimal-3csivol -f; 4 | 5 | # namespace minimal-3csivol 6 | apiVersion: v1 7 | kind: Namespace 8 | metadata: 9 | name: minimal-3csivol 10 | --- 11 | # test deployment with 8 volumeMounts, 8 volumes, 8 PVCs. 12 | # container mounts 8 PVC volumes. 13 | # Appends current time to each volume ./$(date +%s).txt once if does not exists. 14 | # Continuously cat each file in volume to stdout. 15 | # container echoes the contents of each volume to stdout. 16 | # Note: If you see deployment stuck with this error: pods "minimal-3csivol-59f59dd6fc-lhc5k" is forbidden: unable to validate 17 | # against any security context constraint: 18 | # [pod.metadata.annotations.container.seccomp.security.alpha.kubernetes.io/alpine: 19 | # Forbidden: seccomp may not be set provider "anyuid": Forbidden: not 20 | # usable by user or serviceaccount provider "nonroot": Forbidden: not 21 | # usable by user or serviceaccount provider "hostmount-anyuid": Forbidden: 22 | # not usable by user or serviceaccount provider 23 | # "machine-api-termination-handler": Forbidden: not usable by user or 24 | # serviceaccount provider "hostnetwork": Forbidden: not usable by user or 25 | # serviceaccount provider "hostaccess": Forbidden: not usable by user or 26 | # serviceaccount provider "mssql-persistent-scc": Forbidden: not usable by 27 | # user or serviceaccount provider "mysql-persistent-scc": Forbidden: not 28 | # usable by user or serviceaccount provider "node-exporter": Forbidden: 29 | # not usable by user or serviceaccount provider "privileged": Forbidden: 30 | # not usable by user or serviceaccount] 31 | # Resolve this issue by executing the command `oc adm policy add-scc-to-user privileged -z default -n minimal-3csivol` 32 | apiVersion: apps/v1 33 | kind: Deployment 34 | metadata: 35 | name: minimal-3csivol 36 | namespace: minimal-3csivol 37 | spec: 38 | replicas: 1 39 | selector: 40 | matchLabels: 41 | app: minimal-3csivol 42 | template: 43 | metadata: 44 | labels: 45 | app: minimal-3csivol 46 | spec: 47 | containers: 48 | - name: alpine 49 | resources: 50 | requests: 51 | cpu: 100m 52 | memory: 100Mi 53 | limits: 54 | cpu: 100m 55 | memory: 100Mi 56 | image: alpine 57 | securityContext: 58 | runAsNonRoot: true 59 | allowPrivilegeEscalation: false 60 | capabilities: 61 | drop: 62 | - ALL 63 | seccompProfile: 64 | type: RuntimeDefault 65 | tty: true 66 | interactive: true 67 | command: ["/bin/sh"] 68 | args: 69 | - "-c" 70 | - | 71 | date +%s > /mnt/volume1/$(date +%s).txt 72 | date +%s > /mnt/volume2/$(date +%s).txt 73 | date +%s > /mnt/volume3/$(date +%s).txt 74 | while true; do 75 | ls -l /mnt/volume*/* | grep -v lost+found | grep -v total 76 | sleep 1 77 | done 78 | # Output on initial creation 79 | # -rw-r--r-- 1 10012100 10012100 11 Feb 27 23:03 /mnt/volume1/1677538986.txt 80 | # -rw-r--r-- 1 10012100 10012100 11 Feb 27 23:03 /mnt/volume2/1677538986.txt 81 | # -rw-r--r-- 1 10012100 10012100 11 Feb 27 23:03 /mnt/volume3/1677538986.txt 82 | 83 | # If restore works, we would expect to see two files per volume 84 | # -rw-r--r-- 1 10012100 10012100 11 Feb 27 23:03 /mnt/volume1/1677538986.txt 85 | # -rw-r--r-- 1 10012100 10012100 11 Feb 27 23:14 /mnt/volume1/1677539648.txt 86 | # -rw-r--r-- 1 10012100 10012100 11 Feb 27 23:03 /mnt/volume2/1677538986.txt 87 | # -rw-r--r-- 1 10012100 10012100 11 Feb 27 23:14 /mnt/volume2/1677539648.txt 88 | # -rw-r--r-- 1 10012100 10012100 11 Feb 27 23:03 /mnt/volume3/1677538986.txt 89 | # -rw-r--r-- 1 10012100 10012100 11 Feb 27 23:14 /mnt/volume3/1677539648.txt 90 | 91 | volumeMounts: 92 | - name: volume1 93 | mountPath: /mnt/volume1 94 | - name: volume2 95 | mountPath: /mnt/volume2 96 | - name: volume3 97 | mountPath: /mnt/volume3 98 | volumes: 99 | - name: volume1 100 | persistentVolumeClaim: 101 | claimName: volume1 102 | - name: volume2 103 | persistentVolumeClaim: 104 | claimName: volume2 105 | - name: volume3 106 | persistentVolumeClaim: 107 | claimName: volume3 108 | --- 109 | apiVersion: v1 110 | kind: PersistentVolumeClaim 111 | metadata: 112 | name: volume1 113 | namespace: minimal-3csivol 114 | spec: 115 | accessModes: 116 | - ReadWriteOnce 117 | resources: 118 | requests: 119 | storage: 1Gi 120 | --- 121 | apiVersion: v1 122 | kind: PersistentVolumeClaim 123 | metadata: 124 | name: volume2 125 | namespace: minimal-3csivol 126 | spec: 127 | accessModes: 128 | - ReadWriteOnce 129 | resources: 130 | requests: 131 | storage: 1Gi 132 | --- 133 | apiVersion: v1 134 | kind: PersistentVolumeClaim 135 | metadata: 136 | name: volume3 137 | namespace: minimal-3csivol 138 | spec: 139 | accessModes: 140 | - ReadWriteOnce 141 | resources: 142 | requests: 143 | storage: 1Gi -------------------------------------------------------------------------------- /oadp/bookbag/apps/minimal-3csivol/minimal-3csivol.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | # Test quickly with: 3 | # oc delete ns minimal-3csivol && oc create -f ./tests/e2e/sample-applications/minimal-3csivol/list.yaml && oc wait --for condition=available deployment/minimal-3csivol --timeout -1h && oc logs deploy/minimal-3csivol -f; 4 | 5 | # namespace minimal-3csivol 6 | apiVersion: v1 7 | kind: Namespace 8 | metadata: 9 | name: minimal-3csivol 10 | --- 11 | # test deployment with 8 volumeMounts, 8 volumes, 8 PVCs. 12 | # container mounts 8 PVC volumes. 13 | # Appends current time to each volume ./$(date +%s).txt once if does not exists. 14 | # Continuously cat each file in volume to stdout. 15 | # container echoes the contents of each volume to stdout. 16 | # Note: If you see deployment stuck with this error: pods "minimal-3csivol-59f59dd6fc-lhc5k" is forbidden: unable to validate 17 | # against any security context constraint: 18 | # [pod.metadata.annotations.container.seccomp.security.alpha.kubernetes.io/alpine: 19 | # Forbidden: seccomp may not be set provider "anyuid": Forbidden: not 20 | # usable by user or serviceaccount provider "nonroot": Forbidden: not 21 | # usable by user or serviceaccount provider "hostmount-anyuid": Forbidden: 22 | # not usable by user or serviceaccount provider 23 | # "machine-api-termination-handler": Forbidden: not usable by user or 24 | # serviceaccount provider "hostnetwork": Forbidden: not usable by user or 25 | # serviceaccount provider "hostaccess": Forbidden: not usable by user or 26 | # serviceaccount provider "mssql-persistent-scc": Forbidden: not usable by 27 | # user or serviceaccount provider "mysql-persistent-scc": Forbidden: not 28 | # usable by user or serviceaccount provider "node-exporter": Forbidden: 29 | # not usable by user or serviceaccount provider "privileged": Forbidden: 30 | # not usable by user or serviceaccount] 31 | # Resolve this issue by executing the command `oc adm policy add-scc-to-user privileged -z default -n minimal-3csivol` 32 | apiVersion: apps/v1 33 | kind: Deployment 34 | metadata: 35 | name: minimal-3csivol 36 | namespace: minimal-3csivol 37 | spec: 38 | replicas: 1 39 | selector: 40 | matchLabels: 41 | app: minimal-3csivol 42 | template: 43 | metadata: 44 | labels: 45 | app: minimal-3csivol 46 | spec: 47 | containers: 48 | - name: alpine 49 | resources: 50 | requests: 51 | cpu: 100m 52 | memory: 100Mi 53 | limits: 54 | cpu: 100m 55 | memory: 100Mi 56 | image: alpine 57 | securityContext: 58 | runAsNonRoot: true 59 | allowPrivilegeEscalation: false 60 | capabilities: 61 | drop: 62 | - ALL 63 | seccompProfile: 64 | type: RuntimeDefault 65 | tty: true 66 | interactive: true 67 | command: ["/bin/sh"] 68 | args: 69 | - "-c" 70 | - | 71 | date +%s > /mnt/volume1/$(date +%s).txt 72 | date +%s > /mnt/volume2/$(date +%s).txt 73 | date +%s > /mnt/volume3/$(date +%s).txt 74 | while true; do 75 | ls -l /mnt/volume*/* | grep -v lost+found | grep -v total 76 | sleep 1 77 | done 78 | # Output on initial creation 79 | # -rw-r--r-- 1 10012100 10012100 11 Feb 27 23:03 /mnt/volume1/1677538986.txt 80 | # -rw-r--r-- 1 10012100 10012100 11 Feb 27 23:03 /mnt/volume2/1677538986.txt 81 | # -rw-r--r-- 1 10012100 10012100 11 Feb 27 23:03 /mnt/volume3/1677538986.txt 82 | 83 | # If restore works, we would expect to see two files per volume 84 | # -rw-r--r-- 1 10012100 10012100 11 Feb 27 23:03 /mnt/volume1/1677538986.txt 85 | # -rw-r--r-- 1 10012100 10012100 11 Feb 27 23:14 /mnt/volume1/1677539648.txt 86 | # -rw-r--r-- 1 10012100 10012100 11 Feb 27 23:03 /mnt/volume2/1677538986.txt 87 | # -rw-r--r-- 1 10012100 10012100 11 Feb 27 23:14 /mnt/volume2/1677539648.txt 88 | # -rw-r--r-- 1 10012100 10012100 11 Feb 27 23:03 /mnt/volume3/1677538986.txt 89 | # -rw-r--r-- 1 10012100 10012100 11 Feb 27 23:14 /mnt/volume3/1677539648.txt 90 | 91 | volumeMounts: 92 | - name: volume1 93 | mountPath: /mnt/volume1 94 | - name: volume2 95 | mountPath: /mnt/volume2 96 | - name: volume3 97 | mountPath: /mnt/volume3 98 | volumes: 99 | - name: volume1 100 | persistentVolumeClaim: 101 | claimName: volume1 102 | - name: volume2 103 | persistentVolumeClaim: 104 | claimName: volume2 105 | - name: volume3 106 | persistentVolumeClaim: 107 | claimName: volume3 108 | --- 109 | apiVersion: v1 110 | kind: PersistentVolumeClaim 111 | metadata: 112 | name: volume1 113 | namespace: minimal-3csivol 114 | spec: 115 | accessModes: 116 | - ReadWriteOnce 117 | storageClassName: gp2-csi 118 | resources: 119 | requests: 120 | storage: 1Gi 121 | --- 122 | apiVersion: v1 123 | kind: PersistentVolumeClaim 124 | metadata: 125 | name: volume2 126 | namespace: minimal-3csivol 127 | spec: 128 | accessModes: 129 | - ReadWriteOnce 130 | storageClassName: gp2-csi 131 | resources: 132 | requests: 133 | storage: 1Gi 134 | --- 135 | apiVersion: v1 136 | kind: PersistentVolumeClaim 137 | metadata: 138 | name: volume3 139 | namespace: minimal-3csivol 140 | spec: 141 | accessModes: 142 | - ReadWriteOnce 143 | storageClassName: gp2-csi 144 | resources: 145 | requests: 146 | storage: 1Gi 147 | -------------------------------------------------------------------------------- /oadp/bookbag/apps/mssql-persistent/mssql-persistent-template.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: List 3 | items: 4 | - kind: Namespace 5 | apiVersion: v1 6 | metadata: 7 | name: mssql-persistent 8 | labels: 9 | app: mssql 10 | - apiVersion: v1 11 | kind: Secret 12 | metadata: 13 | name: mssql-secret 14 | namespace: mssql-persistent 15 | labels: 16 | app: mssql 17 | stringData: 18 | mssql-password: P@ssw0rd1! 19 | - apiVersion: v1 20 | kind: ServiceAccount 21 | metadata: 22 | name: mssql-persistent-sa 23 | namespace: mssql-persistent 24 | labels: 25 | component: mssql-persistent 26 | - apiVersion: v1 27 | kind: PersistentVolumeClaim 28 | metadata: 29 | name: mssql-pvc 30 | namespace: mssql-persistent 31 | labels: 32 | app: mssql 33 | spec: 34 | storageClassName: ocs-storagecluster-ceph-rbd 35 | accessModes: 36 | - ReadWriteOnce 37 | resources: 38 | requests: 39 | storage: 10Gi 40 | - kind: SecurityContextConstraints 41 | apiVersion: security.openshift.io/v1 42 | metadata: 43 | name: mssql-persistent-scc 44 | allowPrivilegeEscalation: true 45 | allowPrivilegedContainer: true 46 | runAsUser: 47 | type: RunAsAny 48 | seLinuxContext: 49 | type: RunAsAny 50 | fsGroup: 51 | type: RunAsAny 52 | supplementalGroups: 53 | type: RunAsAny 54 | volumes: 55 | - '*' 56 | users: 57 | - system:admin 58 | - system:serviceaccount:mssql-persistent:mssql-persistent-sa 59 | - apiVersion: apps.openshift.io/v1 60 | kind: DeploymentConfig 61 | metadata: 62 | name: mssql-deployment 63 | namespace: mssql-persistent 64 | labels: 65 | e2e-app: "true" 66 | app: mssql 67 | spec: 68 | replicas: 1 69 | selector: 70 | name: mssql 71 | strategy: 72 | type: Recreate 73 | template: 74 | metadata: 75 | labels: 76 | e2e-app: "true" 77 | name: mssql 78 | app: mssql 79 | spec: 80 | serviceAccountName: mssql-persistent-sa 81 | containers: 82 | - env: 83 | - name: ACCEPT_EULA 84 | value: "Y" 85 | - name: SA_PASSWORD 86 | valueFrom: 87 | secretKeyRef: 88 | key: mssql-password 89 | name: mssql-secret 90 | image: quay.io/ocpmigrate/mssql-server:latest 91 | imagePullPolicy: Always 92 | name: mssql 93 | securityContext: 94 | privileged: true 95 | ports: 96 | - containerPort: 1433 97 | resources: 98 | limits: 99 | memory: "3Gi" 100 | cpu: "0.5" 101 | requests: 102 | memory: "3Gi" 103 | cpu: "0.5" 104 | volumeMounts: 105 | - mountPath: "/var/opt/mssql/data" 106 | name: mssql-vol 107 | volumes: 108 | - name: mssql-vol 109 | persistentVolumeClaim: 110 | claimName: mssql-pvc 111 | - apiVersion: v1 112 | kind: Service 113 | metadata: 114 | name: mssql-service 115 | namespace: mssql-persistent 116 | spec: 117 | selector: 118 | app: mssql 119 | ports: 120 | - protocol: TCP 121 | port: 1433 122 | targetPort: 1433 123 | type: ClusterIP 124 | - apiVersion: apps/v1 125 | kind: Deployment 126 | metadata: 127 | name: mssql-app-deployment 128 | namespace: mssql-persistent 129 | labels: 130 | e2e-app: "true" 131 | spec: 132 | replicas: 1 133 | selector: 134 | matchLabels: 135 | app: mssql-app 136 | template: 137 | metadata: 138 | labels: 139 | e2e-app: "true" 140 | app: mssql-app 141 | spec: 142 | terminationGracePeriodSeconds: 10 143 | serviceAccountName: mssql-persistent-sa 144 | containers: 145 | - name: mssql-app 146 | image: quay.io/ocpmigrate/mssql-sample-app:microsoft 147 | imagePullPolicy: Always 148 | ports: 149 | - containerPort: 5000 150 | securityContext: 151 | privileged: true 152 | env: 153 | - name: ConnString 154 | value: "Server=mssql-service.mssql-persistent.svc.cluster.local;Database=ProductCatalog;User ID=WebLogin; password=SQLPass1234!" 155 | - apiVersion: v1 156 | kind: Service 157 | metadata: 158 | name: mssql-app-service 159 | namespace: mssql-persistent 160 | spec: 161 | selector: 162 | app: mssql-app 163 | ports: 164 | - name: "tcp" 165 | protocol: TCP 166 | port: 5000 167 | targetPort: 5000 168 | - apiVersion: route.openshift.io/v1 169 | kind: Route 170 | metadata: 171 | name: mssql-app-route 172 | namespace: mssql-persistent 173 | spec: 174 | path: "/" 175 | to: 176 | kind: Service 177 | name: mssql-app-service 178 | -------------------------------------------------------------------------------- /oadp/bookbag/apps/mysql-persistent/mysql-persistent-csi.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: List 3 | items: 4 | - apiVersion: snapshot.storage.k8s.io/v1 5 | kind: VolumeSnapshotClass 6 | metadata: 7 | name: oadp-example-snapclass 8 | labels: 9 | velero.io/csi-volumesnapshot-class: 'true' 10 | driver: ebs.csi.aws.com 11 | deletionPolicy: Retain 12 | - kind: Namespace 13 | apiVersion: v1 14 | metadata: 15 | name: mysql-persistent 16 | labels: 17 | app: mysql 18 | - apiVersion: v1 19 | kind: ServiceAccount 20 | metadata: 21 | name: mysql-persistent-sa 22 | namespace: mysql-persistent 23 | labels: 24 | component: mysql-persistent 25 | - kind: SecurityContextConstraints 26 | apiVersion: security.openshift.io/v1 27 | metadata: 28 | name: mysql-persistent-scc 29 | allowPrivilegeEscalation: true 30 | allowPrivilegedContainer: true 31 | runAsUser: 32 | type: RunAsAny 33 | seLinuxContext: 34 | type: RunAsAny 35 | fsGroup: 36 | type: RunAsAny 37 | supplementalGroups: 38 | type: RunAsAny 39 | volumes: 40 | - '*' 41 | users: 42 | - system:admin 43 | - system:serviceaccount:mysql-persistent:mysql-persistent-sa 44 | - apiVersion: v1 45 | kind: Service 46 | metadata: 47 | annotations: 48 | template.openshift.io/expose-uri: mariadb://{.spec.clusterIP}:{.spec.ports[?(.name=="mysql")].port} 49 | name: mysql 50 | namespace: mysql-persistent 51 | labels: 52 | app: mysql 53 | service: mysql 54 | spec: 55 | ports: 56 | - protocol: TCP 57 | name: mysql 58 | port: 3306 59 | selector: 60 | app: mysql 61 | - apiVersion: v1 62 | kind: PersistentVolumeClaim 63 | metadata: 64 | name: mysql 65 | namespace: mysql-persistent 66 | labels: 67 | app: mysql 68 | spec: 69 | accessModes: 70 | - ReadWriteOnce 71 | storageClassName: gp2-csi 72 | resources: 73 | requests: 74 | storage: 1Gi 75 | - apiVersion: apps/v1 76 | kind: Deployment 77 | metadata: 78 | annotations: 79 | template.alpha.openshift.io/wait-for-ready: 'true' 80 | name: mysql 81 | namespace: mysql-persistent 82 | labels: 83 | e2e-app: "true" 84 | spec: 85 | selector: 86 | matchLabels: 87 | app: mysql 88 | strategy: 89 | type: Recreate 90 | template: 91 | metadata: 92 | labels: 93 | e2e-app: "true" 94 | app: mysql 95 | spec: 96 | securityContext: 97 | runAsGroup: 27 98 | runAsUser: 27 99 | fsGroup: 27 100 | privileged: true 101 | serviceAccountName: mysql-persistent-sa 102 | containers: 103 | - image: registry.redhat.io/rhel8/mariadb-105:latest 104 | name: mysql 105 | securityContext: 106 | runAsGroup: 27 107 | runAsUser: 27 108 | fsGroup: 27 109 | privileged: true 110 | env: 111 | - name: MYSQL_USER 112 | value: changeme 113 | - name: MYSQL_PASSWORD 114 | value: changeme 115 | - name: MYSQL_ROOT_PASSWORD 116 | value: root 117 | - name: MYSQL_DATABASE 118 | value: todolist 119 | ports: 120 | - containerPort: 3306 121 | name: mysql 122 | resources: 123 | limits: 124 | memory: 512Mi 125 | volumeMounts: 126 | - name: mysql-data 127 | mountPath: /var/lib/mysql 128 | volumes: 129 | - name: mysql-data 130 | persistentVolumeClaim: 131 | claimName: mysql 132 | - apiVersion: v1 133 | kind: Service 134 | metadata: 135 | name: todolist 136 | namespace: mysql-persistent 137 | labels: 138 | app: todolist 139 | service: todolist 140 | e2e-app: "true" 141 | spec: 142 | ports: 143 | - name: web 144 | port: 8000 145 | targetPort: 8000 146 | selector: 147 | app: todolist 148 | service: todolist 149 | - apiVersion: apps.openshift.io/v1 150 | kind: DeploymentConfig 151 | metadata: 152 | name: todolist 153 | namespace: mysql-persistent 154 | labels: 155 | app: todolist 156 | service: todolist 157 | e2e-app: "true" 158 | spec: 159 | replicas: 1 160 | selector: 161 | app: todolist 162 | service: todolist 163 | strategy: 164 | type: Recreate 165 | template: 166 | metadata: 167 | labels: 168 | app: todolist 169 | service: todolist 170 | e2e-app: "true" 171 | spec: 172 | containers: 173 | - name: todolist 174 | image: quay.io/konveyor/todolist-mariadb-go:v2_4 175 | env: 176 | - name: foo 177 | value: bar 178 | ports: 179 | - containerPort: 8000 180 | protocol: TCP 181 | initContainers: 182 | - name: init-myservice 183 | image: registry.access.redhat.com/ubi8/ubi:latest 184 | command: ['sh', '-c', 'sleep 10; until getent hosts mysql; do echo waiting for mysql; sleep 5; done;'] 185 | - apiVersion: route.openshift.io/v1 186 | kind: Route 187 | metadata: 188 | name: todolist-route 189 | namespace: mysql-persistent 190 | spec: 191 | path: "/" 192 | to: 193 | kind: Service 194 | name: todolist -------------------------------------------------------------------------------- /oadp/bookbag/apps/nginx-stateless/nginx-stateless-template.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2017 the Heptio Ark contributors. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | apiVersion: v1 16 | kind: List 17 | items: 18 | - apiVersion: v1 19 | kind: Namespace 20 | metadata: 21 | name: nginx-example 22 | labels: 23 | app: nginx 24 | - apiVersion: apps/v1 25 | kind: Deployment 26 | metadata: 27 | name: nginx-deployment 28 | namespace: nginx-example 29 | spec: 30 | replicas: 2 31 | selector: 32 | matchLabels: 33 | app: nginx 34 | template: 35 | metadata: 36 | labels: 37 | app: nginx 38 | spec: 39 | containers: 40 | - image: docker.io/bitnami/nginx 41 | name: nginx 42 | ports: 43 | - containerPort: 8080 44 | - apiVersion: v1 45 | kind: Service 46 | metadata: 47 | labels: 48 | app: nginx 49 | name: my-nginx 50 | namespace: nginx-example 51 | spec: 52 | ports: 53 | - port: 8080 54 | targetPort: 8080 55 | selector: 56 | app: nginx 57 | type: LoadBalancer 58 | - apiVersion: route.openshift.io/v1 59 | kind: Route 60 | metadata: 61 | name: my-nginx 62 | namespace: nginx-example 63 | labels: 64 | app: nginx 65 | service: my-nginx 66 | spec: 67 | to: 68 | kind: Service 69 | name: my-nginx 70 | port: 71 | targetPort: 8080 -------------------------------------------------------------------------------- /oadp/bookbag/build-template.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: template.openshift.io/v1 2 | kind: Template 3 | message: | 4 | Created ${NAME} BuildConfig and ImageStream instance 5 | 6 | metadata: 7 | annotations: 8 | openshift.io/display-name: Bookbag Build 9 | tags: gpte 10 | template.openshift.io/bindable: "false" 11 | name: bookbag-build 12 | 13 | parameters: 14 | - name: NAME 15 | required: true 16 | value: bookbag 17 | - name: BUILDER_IMAGE 18 | required: true 19 | value: quay.io/openshifthomeroom/workshop-dashboard:5.0.1 20 | - name: GIT_REPO 21 | value: https://github.com/hhpatel14/labs.git 22 | 23 | objects: 24 | - apiVersion: image.openshift.io/v1 25 | kind: ImageStream 26 | metadata: 27 | name: ${NAME} 28 | 29 | - apiVersion: build.openshift.io/v1 30 | kind: BuildConfig 31 | metadata: 32 | name: ${NAME} 33 | spec: 34 | output: 35 | to: 36 | kind: ImageStreamTag 37 | name: ${NAME}:latest 38 | source: 39 | contextDir: oadp/bookbag 40 | git: 41 | ref: master 42 | uri: ${GIT_REPO} 43 | type: Git 44 | strategy: 45 | sourceStrategy: 46 | from: 47 | kind: DockerImage 48 | name: ${BUILDER_IMAGE} 49 | type: Source 50 | triggers: [] 51 | -------------------------------------------------------------------------------- /oadp/bookbag/deploy-template.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: template.openshift.io/v1 3 | kind: Template 4 | message: | 5 | Created ${NAME} Deployment, Service, and Route 6 | 7 | metadata: 8 | annotations: 9 | openshift.io/display-name: Bookbag 10 | tags: gpte 11 | template.openshift.io/bindable: "false" 12 | name: bookbag 13 | 14 | parameters: 15 | - name: NAME 16 | required: true 17 | value: bookbag 18 | - name: IMAGE_STREAM_NAME 19 | required: true 20 | value: bookbag 21 | - name: IMAGE_STREAM_NAMESPACE 22 | - name: IMAGE 23 | value: set-by-trigger 24 | - name: WORKSHOP_VARS 25 | required: true 26 | value: '{}' 27 | - name: AUTH_USERNAME 28 | required: true 29 | value: '*' 30 | - name: AUTH_PASSWORD 31 | value: '' 32 | 33 | objects: 34 | - apiVersion: apps.openshift.io/v1 35 | kind: DeploymentConfig 36 | metadata: 37 | labels: 38 | app: ${NAME} 39 | name: ${NAME} 40 | spec: 41 | replicas: 1 42 | selector: 43 | name: ${NAME} 44 | strategy: 45 | type: Recreate 46 | triggers: 47 | - type: ConfigChange 48 | - type: ImageChange 49 | imageChangeParams: 50 | automatic: true 51 | containerNames: 52 | - terminal 53 | from: 54 | kind: ImageStreamTag 55 | name: ${IMAGE_STREAM_NAME}:latest 56 | namespace: ${IMAGE_STREAM_NAMESPACE} 57 | template: 58 | metadata: 59 | labels: 60 | app: ${NAME} 61 | name: ${NAME} 62 | spec: 63 | dnsPolicy: ClusterFirst 64 | restartPolicy: Always 65 | containers: 66 | - name: terminal 67 | env: 68 | - name: APPLICATION_NAME 69 | value: ${NAME} 70 | - name: AUTH_USERNAME 71 | value: ${AUTH_USERNAME} 72 | - name: AUTH_PASSWORD 73 | value: ${AUTH_PASSWORD} 74 | - name: CLUSTER_SUBDOMAIN 75 | - name: OAUTH_SERVICE_ACCOUNT 76 | value: ${NAME} 77 | - name: DOWNLOAD_URL 78 | - name: WORKSHOP_FILE 79 | - name: OC_VERSION 80 | - name: ODO_VERSION 81 | - name: KUBECTL_VERSION 82 | - name: WORKSHOP_VARS 83 | value: ${WORKSHOP_VARS} 84 | image: ${IMAGE} 85 | imagePullPolicy: IfNotPresent 86 | ports: 87 | - containerPort: 10080 88 | protocol: TCP 89 | resources: {} 90 | 91 | - apiVersion: v1 92 | kind: Service 93 | metadata: 94 | labels: 95 | app: ${NAME} 96 | name: ${NAME} 97 | spec: 98 | ports: 99 | - name: 10080-tcp 100 | port: 10080 101 | protocol: TCP 102 | targetPort: 10080 103 | selector: 104 | name: ${NAME} 105 | type: ClusterIP 106 | 107 | - apiVersion: route.openshift.io/v1 108 | kind: Route 109 | metadata: 110 | labels: 111 | app: ${NAME} 112 | name: ${NAME} 113 | spec: 114 | port: 115 | targetPort: 10080-tcp 116 | tls: 117 | insecureEdgeTerminationPolicy: Redirect 118 | termination: edge 119 | to: 120 | kind: Service 121 | name: ${NAME} 122 | -------------------------------------------------------------------------------- /oadp/bookbag/envvars/gateway.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # The default terminal tab includes a single terminal. 4 | # The TERMINAL_TAB variable may be configured with the following values: 5 | # 6 | # split - Split for two vertically stacked terminals 7 | # split/2 - Split twice for three vertically stacked terminals 8 | # 9 | export TERMINAL_TAB='split' 10 | 11 | # Disable OpenShift Console, this is not appropriate for Red Hat Summit as it 12 | # would point to the wrong cluster. 13 | # export CONSOLE_URL='http://0.0.0.0:10083' 14 | 15 | # Enable the following line to disable the right-hand pane entirely. 16 | # Only use this if you have no terminal, no slides, and no console. 17 | # export DEFAULT_PAGE='workshop' 18 | 19 | # Flags to explicitly enable/disable specific components 20 | # ENABLE_CONSOLE='false' 21 | #ENABLE_DASHBOARD='false' 22 | #ENABLE_SLIDES='false' 23 | ENABLE_TERMINAL='true' 24 | #ENABLE_WEBDAV='false' 25 | #ENABLE_WORKSHOP='true' 26 | -------------------------------------------------------------------------------- /oadp/bookbag/envvars/terminal.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Environment variables to set for the terminal 4 | pushd . 5 | # Install desired oc client version, from releases https://amd64.ocp.releases.ci.openshift.org/ 6 | mkdir /tmp/getupdatedocclient 7 | cd /tmp/getupdatedocclient 8 | curl https://mirror.openshift.com/pub/openshift-v4/clients/oc/latest/linux/oc.tar.gz -o /tmp/getupdatedocclient/occli.tar.gz 9 | tar -xvf /tmp/getupdatedocclient/occli.tar.gz 10 | mv oc ~/../bin/oc 11 | mv kubectl ~/../bin/kubectl 12 | 13 | # # Install velero CLI 14 | # mkdir /tmp/velero-client 15 | # cd /tmp/velero-client 16 | # curl -L https://github.com/vmware-tanzu/velero/releases/download/v1.7.0/velero-v1.7.0-linux-amd64.tar.gz -o /tmp/velero-client/velero-cli.tar.gz 17 | # tar -xvf /tmp/velero-client/velero-cli.tar.gz 18 | # mv velero-v1.7.0-linux-amd64/velero ~/../bin/velero 19 | echo $'alias velero=\'oc -n openshift-adp exec deployment/velero -c velero -it -- ./velero\'' >> ~/.bash_profile 20 | 21 | cd ~ 22 | curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" 23 | unzip ~/awscliv2.zip 24 | ~/aws/install -i ~/aws-cli 25 | 26 | echo "alias aws=~/aws-cli/v2/2.*/bin/aws" >> ~/.bash_profile 27 | echo "alias aws_completer=~/aws-cli/v2/2.*/bin/aws_completer" >> ~/.bash_profile 28 | 29 | echo "alias awsocs='aws --endpoint-url http://s3.openshift-storage.svc'" >> ~/.bash_profile 30 | popd -------------------------------------------------------------------------------- /oadp/bookbag/envvars/workshop.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Environment variables to set for the workshop 4 | -------------------------------------------------------------------------------- /oadp/bookbag/workshop/config.js: -------------------------------------------------------------------------------- 1 | var fs = require('fs'); 2 | 3 | function initialize(workshop) { 4 | workshop.load_workshop(); 5 | 6 | try { 7 | files = fs.readdirSync('/var/run/workshop-vars') 8 | for (var i=0; i < files.length; i++) { 9 | console.log(files[i]) 10 | if (files[i].match(/^[a-zA-Z_][a-zA-Z0-9_]+$/)) { 11 | console.log(files[i]) 12 | workshop.data_variable(files[i], fs.readFileSync('/var/run/workshop-vars/' + files[i], 'utf8')); 13 | } 14 | } 15 | } catch(err) { 16 | console.log(err) 17 | } 18 | 19 | try { 20 | workshop_vars = JSON.parse(process.env['WORKSHOP_VARS']) 21 | for (var varname in workshop_vars) { 22 | workshop.data_variable(varname, workshop_vars[varname]); 23 | } 24 | } catch(err) {} 25 | } 26 | 27 | exports.default = initialize; 28 | 29 | module.exports = exports.default; 30 | -------------------------------------------------------------------------------- /oadp/bookbag/workshop/content/Conclusion.adoc: -------------------------------------------------------------------------------- 1 | :sectlinks: 2 | :markup-in-source: verbatim,attributes,quotes 3 | 4 | *Congratulations* and *Thank You* for participating in the OpenShift API for Data Protection (OADP) Lab. We hope you have found it to be both informative and thorough. By now you have completed the following activities: 5 | 6 | * Familiarized yourself with the OADP Operator and Velero 7 | * learned how to use various velero selectors (namespace, kinds, labels, etc.) 8 | * Backed up and restore applications (stateless and stateful) on OpenShift 4 on AWS 9 | * Learned about enabling backup of Persistent Volumes using CSI plugin 10 | * Snapshotting OpenShift Ceph RBD volumes 11 | * Snapshotting AWS EBS volumes 12 | 13 | === More Information 14 | 15 | [width="100%",cols="50%,50%",options="header",] 16 | |=== 17 | |Type |Link 18 | |Source Code |https://github.com/openshift/oadp-operator 19 | |Velero Documentation |https://velero.io/docs/v1.11/ 20 | |YouTube Channel |https://www.youtube.com/channel/UCBDU5UK5Okg3mlIMygpkbNA?view_as=subscriber 21 | |=== 22 | -------------------------------------------------------------------------------- /oadp/bookbag/workshop/content/Environment.adoc: -------------------------------------------------------------------------------- 1 | :sectlinks: 2 | :markup-in-source: verbatim,attributes,quotes 3 | :OCP4_PASSWORD: %ocp4_password% 4 | :CLUSTER_ADMIN_USER: %cluster_admin_user% 5 | :CLUSTER_ADMIN_PASSWORD: %cluster_admin_password% 6 | :APPS_URL: %apps_url% 7 | :API_URL: %api_url% 8 | == Overview 9 | 10 | The following lab environment has been provisioned for you to use with this Lab. You can always come back to this section to review this information. 11 | 12 | // image::screenshots/lab1/labenv-overview2.png[Lab Environment Overview, width=50%, align="center"] 13 | 14 | === OpenShift 4 Cluster 15 | 16 | [width="100%",cols="50%,50%",options="header",] 17 | |=== 18 | |Key |Value 19 | |OCP Console |http://console-openshift-console.{APPS_URL} 20 | |API |{API_URL} 21 | |OCP admin username| {CLUSTER_ADMIN_USER} 22 | |OCP admin password| {CLUSTER_ADMIN_PASSWORD} 23 | |=== 24 | 25 | On the right, you will see two split terminals. We will generally use the lower terminal for most executions while upper terminal will be reserved for reviewing yaml files and watching result of executions. 26 | 27 | There are two types of lab buttons you will find in this lab. 28 | 29 | - The first two below are execute buttons which will send commands to either the upper or lower terminal. 30 | - The third is a command copy button. It will be used for copying content to be pasted later. 31 | 32 | Try the execute buttons 33 | [source,bash,role=execute] 34 | ---- 35 | echo upper terminal 36 | ---- 37 | [source,bash,role=execute-2] 38 | ---- 39 | echo lower terminal 40 | ---- 41 | [source,bash,role=copy] 42 | ---- 43 | echo copy 44 | ---- 45 | 46 | You copy `{CLUSTER_ADMIN_USER}` password here if you need it. 47 | [source,bash,role=copy] 48 | ---- 49 | %cluster_admin_password% 50 | ---- 51 | 52 | We have also setup credentials for aws cli to be used with openshift storage. 53 | We will be using alias `awsocs` to interact with the openshift storage endpoint. 54 | See what the awsocs alias is set to. 55 | [source,bash,role=execute-2] 56 | ---- 57 | alias awsocs 58 | ---- 59 | `s3.openshift-storage.svc` is an internal openshift storage endpoint address where s3 is the service name and openshift-storage is the namespace. 60 | 61 | In the next lab, we will be using the buttons above to login as {CLUSTER_ADMIN_USER} on the terminal. 62 | -------------------------------------------------------------------------------- /oadp/bookbag/workshop/content/Hooks.adoc: -------------------------------------------------------------------------------- 1 | :sectlinks: 2 | :markup-in-source: verbatim,attributes,quotes 3 | :OCP4_PASSWORD: %ocp4_password% 4 | :CLUSTER_ADMIN_USER: %cluster_admin_user% 5 | :APPS_URL: %apps_url% 6 | :API_URL: %api_url% 7 | 8 | == Introduction [WIP - BLOCKED] 9 | 10 | Backup/Restore hooks provide a means for running custom code at points in the Backup/Restore to handle logic unique to a Backup/Restore. 11 | This may include scenarios where custom quiesce logic is desired, manual data Backup/Restore of unsupported types is needed, or to handle application repair after it has been migrated to a new environment. 12 | 13 | There are 2 phases where hooks can be run. `Pre-` and `Post-` backup or restore. 14 | One hook may be run per phase for a maximum total of 2 hooks per backup or restore. 15 | 16 | The phases where hooks may be run are: 17 | 18 | * *PreBackup*: Before backup task is performed. 19 | * *PostBackup*: After backup tasks are complete. 20 | * *PreRestore*: Before restore tasks are performed. 21 | * *PostRestore*: After restore tasks are complete. 22 | 23 | === Backing up single namespace with pre and post backup hook 24 | 25 | We are going to add pre and post backup hooks to the previous single namespace backup exercise. 26 | 27 | In our source OCP 4 cluster terminal, we can see the app running: 28 | 29 | [source,bash,role=execute] 30 | ---- 31 | oc get pods -n mssql-persistent -l app=mssql 32 | ---- 33 | 34 | [source,subs="{markup-in-source}"] 35 | -------------------------------------------------------------------------------- 36 | NAME READY STATUS RESTARTS AGE 37 | mssql-deployment-1-dbxd7 1/1 Running 0 41m 38 | -------------------------------------------------------------------------------- 39 | ==== Adding pre and post backup hook 40 | 41 | Let's add a simple pre and post backup hooks to pod 42 | [source,bash,role=execute] 43 | ---- 44 | oc annotate pod -n mssql-persistent -l app=mssql \ 45 | pre.hook.backup.velero.io/command='["/bin/bash", "-c", "echo \"pre\" > /var/opt/mssql/data/lab-pre-backup"]' \ 46 | post.hook.backup.velero.io/command='["/bin/bash", "-c", "echo \"post\" > /var/opt/mssql/data/lab-post-backup"]' 47 | ---- 48 | 49 | Check that file pre-backup and post-backup did not exist in pod container 50 | [source,bash,role=execute] 51 | ---- 52 | oc -n mssql-persistent rsh deploymentconfig/mssql-deployment ls /var/opt/mssql/data/lab-pre-backup /var/opt/mssql/data/lab-post-backup 53 | ---- 54 | 55 | [source,subs="{markup-in-source}"] 56 | -------------------------------------------------------------------------------- 57 | ls: cannot access '/var/opt/mssql/data/lab-pre-backup': No such file or directory 58 | ls: cannot access '/var/opt/mssql/data/lab-post-backup': No such file or directory 59 | -------------------------------------------------------------------------------- 60 | 61 | 62 | ==== Using Velero to backup application namespace 63 | 64 | Let’s go ahead and create a backup of `mssql-persistent` namespace. 65 | [source,bash,role=execute-2] 66 | ---- 67 | velero backup create mssql-hooked-backup --include-namespaces mssql-persistent 68 | ---- 69 | 70 | You can check on the backup progress by running the following 71 | [source,bash,role=execute] 72 | ---- 73 | velero backup describe mssql-hooked-backup 74 | ---- 75 | 76 | Check that file pre-backup and post-backup exist in the pod container 77 | [source,bash,role=execute] 78 | ---- 79 | oc -n mssql-persistent rsh deploymentconfig/mssql-deployment ls /var/opt/mssql/data/lab-pre-backup /var/opt/mssql/data/lab-post-backup 80 | ---- 81 | 82 | [source,subs="{markup-in-source}"] 83 | -------------------------------------------------------------------------------- 84 | /var/opt/mssql/data/lab-post-backup /var/opt/mssql/data/lab-pre-backup 85 | -------------------------------------------------------------------------------- 86 | ==== Simulate a disaster 87 | When the backup `Phase:` is `Completed`, we'll proceed to simulate a disaster by deleting the namespace. 88 | [source,bash,role=execute] 89 | ---- 90 | oc delete ns mssql-persistent 91 | ---- 92 | 93 | Check that the application is no longer available. 94 | 95 | NOTE: Click http://mssql-app-route-mssql-persistent.{APPS_URL}[here] to open the application. 96 | 97 | When application is no longer available, proceed to next section. 98 | 99 | ==== Restoring deleted application 100 | We can restore applications deleted earlier by restoring from the backup we created. 101 | [source,bash,role=execute] 102 | ---- 103 | velero restore create mssql-hooked-restore --from-backup mssql-hooked-backup 104 | ---- 105 | 106 | We can check when the restore is completed by running the following. The restore is complete when `Phase:` is `Completed`. 107 | [source,bash,role=execute] 108 | ---- 109 | velero restore describe mssql-hooked-restore 110 | ---- 111 | 112 | Wait until pods become available. 113 | [source,bash,role=execute] 114 | ---- 115 | oc get pods -n mssql-persistent -l app=mssql 116 | ---- 117 | 118 | [source,subs="{markup-in-source}"] 119 | -------------------------------------------------------------------------------- 120 | NAME READY STATUS RESTARTS AGE 121 | mssql-deployment-1-dbxd7 1/1 Running 0 41m 122 | -------------------------------------------------------------------------------- 123 | 124 | Check that only pre-backup file exist in the pod container 125 | [source,bash,role=execute] 126 | ---- 127 | oc -n mssql-persistent rsh deploymentconfig/mssql-deployment ls /var/opt/mssql/data/lab-pre-backup /var/opt/mssql/data/lab-post-backup 128 | ---- 129 | 130 | [source,subs="{markup-in-source}"] 131 | -------------------------------------------------------------------------------- 132 | post-backup pre-backup 133 | -------------------------------------------------------------------------------- 134 | 135 | 136 | 137 | *Success!* 138 | In the next lab, we will explore some debugging techniques for when backups/restores don't go quite as planned. 139 | -------------------------------------------------------------------------------- /oadp/bookbag/workshop/content/Intro.adoc: -------------------------------------------------------------------------------- 1 | == OpenShift API for Data Protection (OADP) Lab 2 | 3 | This guide will show you how to use the OpenShift API for Data Protection Operator to suit your data protection needs. 4 | 5 | We will guide you through a series of exercises running backups of application workloads and restoring them when disaster strikes. Both https://www.redhat.com/en/topics/cloud-native-apps/stateful-vs-stateless[stateful and stateless] applications will be covered. 6 | 7 | === Goals 8 | 9 | In this instructor-led, hands-on lab, you’ll experience: 10 | 11 | * Backing up and restoring applications running on https://www.redhat.com/en/openshift-4[OpenShift Container Platform 4] using various selectors to protect specific workloads. 12 | 13 | * Tips, techniques, and best-practices for debugging failed backup and restore operations. 14 | 15 | Table of contents can be accessed on the left. If you cannot see it, resize the content area to see it. 16 | -------------------------------------------------------------------------------- /oadp/bookbag/workshop/content/Prereqs.adoc: -------------------------------------------------------------------------------- 1 | :sectlinks: 2 | :markup-in-source: verbatim,attributes,quotes 3 | :OCP4_PASSWORD: %ocp4_password% 4 | :CLUSTER_ADMIN_USER: %cluster_admin_user% 5 | :CLUSTER_ADMIN_PASSWORD: %cluster_admin_password% 6 | :APPS_URL: %apps_url% 7 | :API_URL: %api_url% 8 | 9 | 10 | Login as {CLUSTER_ADMIN_USER} 11 | [source,bash,role=execute] 12 | ---- 13 | oc login -u %cluster_admin_user% -p %cluster_admin_password% 14 | ---- 15 | 16 | Verify OpenShift version 17 | [source,bash,role=execute] 18 | ---- 19 | oc version 20 | ---- 21 | 22 | Verify OADP Version 23 | [source,bash,role=execute] 24 | ---- 25 | oc get clusterserviceversion -n openshift-adp 26 | ---- 27 | 28 | Verify Velero Version 29 | [source,bash,role=execute] 30 | ---- 31 | velero version 32 | ---- 33 | 34 | Required versions of products used: 35 | 36 | [cols=",",options="header",] 37 | |=== 38 | |Product |Versions 39 | |OpenShift Server 4.x |v4.11+ 40 | |OpenShift Client 4.x |v4.11+ 41 | |OADP |v1.2.0+ 42 | |velero server |v1.11.0+ 43 | |velero client |v1.11.0+ 44 | |=== 45 | 46 | We are now ready to learn how to create backups and restores using OADP 47 | -------------------------------------------------------------------------------- /oadp/bookbag/workshop/content/Troubleshooting.adoc: -------------------------------------------------------------------------------- 1 | == Troubleshooting 2 | You can generally find the root cause of the problem with OADP operator by finding errors in the running resources 3 | [source,bash,role=execute] 4 | ---- 5 | oc get all -n openshift-adp 6 | ---- 7 | 8 | If an issue is related to a specific backup or restore you may the following commands useful for troubleshooting: 9 | 10 | `velero backup describe ` - describe the details of a backup 11 | 12 | `velero backup logs ` - fetch the logs for this specific backup. Useful for viewing failures and warnings, including resources that could not be backed up. 13 | 14 | `velero restore describe ` - describe the details of a restore 15 | 16 | `velero restore logs ` - fetch the logs for this specific restore. Useful for viewing failures and warnings, including resources that could not be restored. 17 | 18 | `oc logs deployment/velero -n openshift-adp` - fetch the logs of the Velero server pod. This provides the output of the Velero server processes. -------------------------------------------------------------------------------- /oadp/bookbag/workshop/content/_includes/include-file: -------------------------------------------------------------------------------- 1 | :sectlinks: 2 | :markup-in-source: verbatim,attributes,quotes 3 | :OCP3_VERSION: 3.11 4 | :OCP4_PASSWORD: %ocp4_password% 5 | :OCP4_VERSION: 4.3 6 | -------------------------------------------------------------------------------- /oadp/bookbag/workshop/content/exercises/Ex1.adoc: -------------------------------------------------------------------------------- 1 | :sectlinks: 2 | :markup-in-source: verbatim,attributes,quotes 3 | :OCP4_PASSWORD: %ocp4_password% 4 | :CLUSTER_ADMIN_USER: %cluster_admin_user% 5 | :CLUSTER_ADMIN_PASSWORD: %cluster_admin_password% 6 | :APPS_URL: %apps_url% 7 | :API_URL: %api_url% 8 | 9 | == Backing up nginx Stateless application 10 | 11 | We are going to protect a simple nginx-stateless application. This application has already been deployed on your OCP 4 cluster in the `nginx-example` namespace. In the terminal of our source OCP 4 cluster, we can observe the running status of the app. 12 | [source,bash,role=execute] 13 | ---- 14 | oc get pods -n nginx-example 15 | ---- 16 | 17 | [source,subs="{markup-in-source}"] 18 | -------------------------------------------------------------------------------- 19 | NAME READY STATUS RESTARTS AGE 20 | nginx-deployment-56b7785cc7-vd76k 1/1 Running 0 40m 21 | nginx-deployment-56b7785cc7-z8kg7 1/1 Running 0 40m 22 | -------------------------------------------------------------------------------- 23 | 24 | Let's obtain the route to the application and access the web UI. 25 | [source,bash,role=execute] 26 | ---- 27 | oc get route -n nginx-example 28 | ---- 29 | NOTE: You can also click http://my-nginx-nginx-example.{APPS_URL}[here] to open the application. 30 | 31 | [source,subs="{markup-in-source}"] 32 | -------------------------------------------------------------------------------- 33 | NAME HOST/PORT PATH SERVICES PORT TERMINATION WILDCARD 34 | my-nginx my-nginx-nginx-example.{APPS_URL} my-nginx 8080 None 35 | -------------------------------------------------------------------------------- 36 | 37 | image:../screenshots/lab5/nginx-webUI.png[nginx-webUI] 38 | 39 | Let's proceed and save all application resources in `nginx-running-before.txt` before creating the backup. We will utilize this text file later in the process to compare the resources after the restore. 40 | [source,bash,role=execute] 41 | ---- 42 | oc get all -n nginx-example > nginx-running-before.txt 43 | ---- 44 | 45 | === Using Velero to backup application namespace 46 | 47 | Let's create a backup of the `nginx-example` namespace. 48 | [source,bash,role=execute-2] 49 | ---- 50 | velero backup create nginx-backup --include-namespaces nginx-example 51 | ---- 52 | 53 | You can monitor the progress of the backup by executing the following command. 54 | [source,bash,role=execute] 55 | ---- 56 | velero backup describe nginx-backup 57 | ---- 58 | 59 | When the backup `Phase:` is `Completed`, proceed to next section. 60 | [source,bash,role=execute] 61 | ---- 62 | velero backup describe nginx-backup | grep Phase: 63 | ---- 64 | 65 | === Viewing backup content in S3 storage 66 | 67 | Backup content is stored in S3 storage in the specified content in the prefix location under folder backup inside the backup name's folder. 68 | 69 | `//backups//` 70 | 71 | NOTE: awsocs is an alias of `awsocs='aws --endpoint-url http://s3.openshift-storage.svc'` 72 | [source,bash,role=execute] 73 | ---- 74 | awsocs s3 ls migstorage/velero/backups/nginx-backup/ 75 | ---- 76 | Content on these files are explained in https://velero.io/docs/v1.7/output-file-format/[Velero Docs]. 77 | 78 | === Simulate a disaster 79 | 80 | When the backup `Phase:` is `Completed`, we'll proceed to simulate a disaster by deleting the namespace. 81 | [source,bash,role=execute] 82 | ---- 83 | oc delete ns nginx-example 84 | ---- 85 | 86 | Check that the application is no longer available. 87 | 88 | NOTE: Click http://my-nginx-nginx-example.{APPS_URL}[here] to open the application. 89 | 90 | When application is no longer available, proceed to next section. 91 | 92 | === Restore deleted application 93 | 94 | We can restore the previously deleted applications using the backup we created. 95 | [source,bash,role=execute] 96 | ---- 97 | velero restore create nginx-restore --from-backup nginx-backup 98 | ---- 99 | 100 | We can monitor the progress of the restore by executing the following command. The restore process is considered complete when the `Phase` field displays `Completed`. 101 | [source,bash,role=execute] 102 | ---- 103 | velero restore describe nginx-restore && velero restore describe nginx-restore | grep Phase: 104 | ---- 105 | 106 | Wait until pods become available. 107 | [source,bash,role=execute] 108 | ---- 109 | oc get pods -n nginx-example 110 | ---- 111 | 112 | [source,subs="{markup-in-source}"] 113 | -------------------------------------------------------------------------------- 114 | NAME READY STATUS RESTARTS AGE 115 | nginx-deployment-56b7785cc7-g8xfj 1/1 Running 0 47s 116 | nginx-deployment-56b7785cc7-q824n 1/1 Running 0 47s 117 | -------------------------------------------------------------------------------- 118 | 119 | Verify webUI is available in the restored application. 120 | 121 | NOTE: Click http://my-nginx-nginx-example.{APPS_URL}[here] to open the application. 122 | 123 | Let's proceed and gather the restored nginx application resources in the `nginx-running-after.txt` file once the restore process reaches the `Completed` phase. 124 | [source,bash,role=execute] 125 | ---- 126 | oc get all -n nginx-example > nginx-running-after.txt 127 | ---- 128 | 129 | Compare `nginx-running-before.txt` and `nginx-running-after.txt` and verify resources. 130 | [source,bash,role=execute] 131 | ---- 132 | diff -uNr nginx-running-before.txt nginx-running-after.txt 133 | ---- 134 | -------------------------------------------------------------------------------- /oadp/bookbag/workshop/content/exercises/troubleshooting/crashloopbackoff.adoc: -------------------------------------------------------------------------------- 1 | :sectlinks: 2 | :markup-in-source: verbatim,attributes,quotes 3 | :OCP4_PASSWORD: %ocp4_password% 4 | :CLUSTER_ADMIN_USER: %cluster_admin_user% 5 | :APPS_URL: %apps_url% 6 | :API_URL: %api_url% 7 | == CrashLoopBackOff 8 | In some clusters it is possible to see oadp-operator pod not create successfully, with status CrashLoopBackOff. It is usually caused by the operator requiring more cpu and memory resources than the default values requested in the Operator's ClusterServiceVersion. 9 | 10 | You can see the currently requested resources 11 | [source,bash,role=execute] 12 | ---- 13 | oc get $(oc get clusterserviceversion -n openshift-adp -l operators.coreos.com/oadp-operator.openshift-adp -o name) -n openshift-adp -ojsonpath="{.spec.install.spec.deployments[?(@.name=='openshift-adp-controller-manager')].spec.template.spec.containers[?(@.name=='manager')].resources}" 14 | ---- 15 | 16 | Bumping this value up will resolve most CrashLoopBackOff errors on installation. 17 | You can edit ClusterServiceVersion by going to the http://console-openshift-console.{APPS_URL}/k8s/ns/openshift-adp/operators.coreos.com%7Ev1alpha1%7EClusterServiceVersion/[Installed Operators page] then editing the resources values in the YAML of OADP operators' ClusterServiceVersion or through `oc edit`. 18 | -------------------------------------------------------------------------------- /oadp/bookbag/workshop/content/exercises/troubleshooting/csi-labels.adoc: -------------------------------------------------------------------------------- 1 | :sectlinks: 2 | :markup-in-source: verbatim,attributes,quotes 3 | :OCP4_PASSWORD: %ocp4_password% 4 | :CLUSTER_ADMIN_USER: %cluster_admin_user% 5 | :APPS_URL: %apps_url% 6 | :API_URL: %api_url% 7 | == CSI Labels 8 | CAUTION: Once started, you should finish this lab fully before moving on to the next lab. 9 | 10 | Earlier in the exercise, we explored the requirements to get CSI snapshots to work with velero. 11 | 12 | In order to use CSI with velero, feature flag `EnableCSI` and plugin `csi` is required. It is specified in our DataProtectionApplication Custom Resource. 13 | 14 | You can look at the velero configuration by running the following command: 15 | [source,bash,role=execute] 16 | ---- 17 | oc get dpa example-dpa -n openshift-adp -o=jsonpath="{.spec.configuration.velero}" 18 | ---- 19 | 20 | Aside from enabling CSI from Velero side, the volume that is going to be backed up must be using a CSI driver with a corresponding VolumeSnapshotClass containing the following label `velero.io/csi-volumesnapshot-class: 'true'`. 21 | 22 | In previous exercises, the label `velero.io/csi-volumesnapshot-class: 'true'` was added to the VolumeSnapshotClass for you. 23 | 24 | The common mistake is when the user does not specify the `velero.io/csi-volumesnapshot-class: 'true'` label. 25 | 26 | If you create a backup without this label when the backup includes a volume that is using a CSI driver, backup will become `PartiallyFailed`. 27 | 28 | Check that the label still exists by running the following command: 29 | [source,bash,role=execute] 30 | ---- 31 | oc get VolumeSnapshotClass ocs-storagecluster-rbdplugin-snapclass -ojsonpath='{.metadata.labels}' 32 | ---- 33 | 34 | We will now remove the `velero.io/csi-volumesnapshot-class: 'true'` label from the VolumeSnapshotClass and try to create a backup to see what happens. 35 | [source,bash,role=execute] 36 | ---- 37 | oc label VolumeSnapshotClass ocs-storagecluster-rbdplugin-snapclass velero.io/csi-volumesnapshot-class- 38 | ---- 39 | 40 | Check that the label no longer exists by running the following command: 41 | [source,bash,role=execute] 42 | ---- 43 | oc get VolumeSnapshotClass ocs-storagecluster-rbdplugin-snapclass -ojsonpath='{.metadata.labels}' 44 | ---- 45 | 46 | Now create a backup and see what happens. 47 | [source,bash,role=execute] 48 | ---- 49 | velero backup create mssql-backup-no-vsc-label --include-namespaces mssql-persistent 50 | ---- 51 | 52 | Let's check on its status 53 | [source,bash,role=execute] 54 | ---- 55 | velero backup describe mssql-backup-no-vsc-label 56 | ---- 57 | 58 | You should eventually see the following: 59 | ```txt 60 | Phase: PartiallyFailed (run `velero backup logs mssql-backup-no-vsc-label` for more information) 61 | ``` 62 | 63 | Let's check logs for errors 64 | [source,bash,role=execute] 65 | ---- 66 | velero backup logs mssql-backup-no-vsc-label | grep error 67 | ---- 68 | 69 | You should see the following error: 70 | ```txt 71 | failed to get volumesnapshotclass for provisioner openshift-storage.rbd.csi.ceph.com, ensure that the desired volumesnapshot class has the velero.io/csi-volumesnapshot-class label 72 | ``` 73 | 74 | Now let's add the label back and try again. 75 | [source,bash,role=execute] 76 | ---- 77 | oc label VolumeSnapshotClass ocs-storagecluster-rbdplugin-snapclass velero.io/csi-volumesnapshot-class='true' 78 | ---- 79 | 80 | Create a backup and see what happens. 81 | [source,bash,role=execute] 82 | ---- 83 | velero backup create mssql-backup-vsc-label --include-namespaces mssql-persistent 84 | ---- 85 | 86 | Check on its status 87 | [source,bash,role=execute] 88 | ---- 89 | velero backup describe mssql-backup-vsc-label 90 | ---- 91 | 92 | You should eventually see the `Phase: Completed` 93 | 94 | Proceed to next section. -------------------------------------------------------------------------------- /oadp/bookbag/workshop/content/exercises/troubleshooting/velero-pod-errors.adoc: -------------------------------------------------------------------------------- 1 | 2 | == Velero pod errors 3 | Pre-requisite: Exercise 1 completed 4 | 5 | When a backup or restore is not completed successfully, inspect the backup/restore logs for errors. `velero logs -n 6 | 7 | View backup logs from exercise 1. 8 | [source,bash,role=execute] 9 | ---- 10 | velero backup logs mssql-backup 11 | ---- 12 | 13 | If there are errors, you can use `grep` to help find the errors. 14 | [source,bash,role=execute] 15 | ---- 16 | velero backup logs mssql-backup | grep -i error 17 | ---- 18 | We don't expect any errors here so the result should be empty. 19 | 20 | https://github.com/openshift/oadp-operator/blob/oadp-1.1/docs/TROUBLESHOOTING.md[Link to commonly encountered errors when using Velero to backup and restore Kubernetes clusters.] -------------------------------------------------------------------------------- /oadp/bookbag/workshop/content/lab-reset.adoc: -------------------------------------------------------------------------------- 1 | == Execute command to reset the lab 2 | [source,bash,role=execute] 3 | ---- 4 | velero delete backup --all --confirm 5 | oc delete ns mysql-persistent nginx-example minimal-3csivol 6 | oc apply -f apps/mysql-persistent/mysql-persistent-csi.yaml 7 | oc apply -f apps/nginx-stateless/nginx-stateless-template.yaml 8 | oc apply -f apps/data-mover-example/minimal-3csivol.yaml 9 | ---- -------------------------------------------------------------------------------- /oadp/bookbag/workshop/content/screenshots/OperatorHub-OADP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/oadp/bookbag/workshop/content/screenshots/OperatorHub-OADP.png -------------------------------------------------------------------------------- /oadp/bookbag/workshop/content/screenshots/lab5/datamoverBackup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/oadp/bookbag/workshop/content/screenshots/lab5/datamoverBackup.png -------------------------------------------------------------------------------- /oadp/bookbag/workshop/content/screenshots/lab5/datamoverRestore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/oadp/bookbag/workshop/content/screenshots/lab5/datamoverRestore.png -------------------------------------------------------------------------------- /oadp/bookbag/workshop/content/screenshots/lab5/mssql-add-product.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/oadp/bookbag/workshop/content/screenshots/lab5/mssql-add-product.png -------------------------------------------------------------------------------- /oadp/bookbag/workshop/content/screenshots/lab5/mssql-added-product.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/oadp/bookbag/workshop/content/screenshots/lab5/mssql-added-product.png -------------------------------------------------------------------------------- /oadp/bookbag/workshop/content/screenshots/lab5/mssql-product-catalog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/oadp/bookbag/workshop/content/screenshots/lab5/mssql-product-catalog.png -------------------------------------------------------------------------------- /oadp/bookbag/workshop/content/screenshots/lab5/mysql-todolist-add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/oadp/bookbag/workshop/content/screenshots/lab5/mysql-todolist-add.png -------------------------------------------------------------------------------- /oadp/bookbag/workshop/content/screenshots/lab5/mysql-todolist-added.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/oadp/bookbag/workshop/content/screenshots/lab5/mysql-todolist-added.png -------------------------------------------------------------------------------- /oadp/bookbag/workshop/content/screenshots/lab5/mysql-todolist-webUI.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/oadp/bookbag/workshop/content/screenshots/lab5/mysql-todolist-webUI.png -------------------------------------------------------------------------------- /oadp/bookbag/workshop/content/screenshots/lab5/nginx-webUI.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/oadp/bookbag/workshop/content/screenshots/lab5/nginx-webUI.png -------------------------------------------------------------------------------- /oadp/bookbag/workshop/content/slides/OADP Architecture/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/oadp/bookbag/workshop/content/slides/OADP Architecture/4.jpg -------------------------------------------------------------------------------- /oadp/bookbag/workshop/content/slides/OADP Solution Overview/9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/oadp/bookbag/workshop/content/slides/OADP Solution Overview/9.jpg -------------------------------------------------------------------------------- /oadp/bookbag/workshop/modules.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | modules: 3 | Intro: 4 | name: 1.0 Introduction 5 | exit_sign: 2.0 Environment 6 | Environment: 7 | name: 2.0 Environment 8 | exit_sign: 3.0 Prerequisites 9 | Prereqs: 10 | name: 3.0 Prerequisites 11 | exit_sign: 4.0 OADP Overview 12 | Overview: 13 | name: 4.0 OADP Overview 14 | exit_sign: 5.0 Data Protection Exercise I 15 | exercises/Ex1: 16 | name: 5.0 Data Protection Exercise I 17 | exit_sign: 6.0 Data Protection Exercise II 18 | exercises/Ex2: 19 | name: 6.0 Data Protection Exercise II 20 | exit_sign: 6.1 Data Protection Exercise II Extended 21 | exercises/Ex3: 22 | name: 6.1 Data Protection Exercise II Extended 23 | exit_sign: 7.0 Data Protection Exercise III 24 | exercises/Ex4: 25 | name: 7.0 Data Protection Exercise III 26 | exit_sign: 8.0 Troubleshooting 27 | # exercises/Ex3: 28 | # name: 6.0 Data Protection Exercise II 29 | # exit_sign: 7.0 Data Protection Hooks 30 | # Hooks: 31 | # name: 7.0 Data Protection Hooks 32 | # exit_sign: 8.0 Troubleshooting 33 | Troubleshooting: 34 | name: 8.0 Troubleshooting 35 | exit_sign: 8.1 Break-Fix Exercise I (Optional) 36 | exercises/troubleshooting/csi-labels: 37 | name: 8.1 Break-Fix Exercise I (Optional) 38 | exit_sign: 8.2 Break-Fix Exercise II (Optional) 39 | exercises/troubleshooting/crashloopbackoff: 40 | name: 8.2 Break-Fix Exercise II (Optional) 41 | exit_sign: 8.3 Break-Fix Exercise III (Optional) 42 | exercises/troubleshooting/velero-pod-errors: 43 | name: 8.3 Break-Fix Exercise III (Optional) 44 | exit_sign: 9.0 Conclusion 45 | Conclusion: 46 | name: 9.0 Conclusion 47 | lab-reset: 48 | name: Lab Reset 49 | -------------------------------------------------------------------------------- /oadp/bookbag/workshop/workshop.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | name: OpenShift API for Data Protection (OADP) Lab 3 | modules: 4 | activate: 5 | - Intro 6 | - Environment 7 | - Prereqs 8 | - Overview 9 | - exercises/Ex1 10 | - exercises/Ex2 11 | - exercises/Ex3 12 | - exercises/Ex4 13 | # - Hooks 14 | - Troubleshooting 15 | - exercises/troubleshooting/csi-labels 16 | - exercises/troubleshooting/crashloopbackoff 17 | - exercises/troubleshooting/velero-pod-errors 18 | - Conclusion 19 | - lab-reset 20 | -------------------------------------------------------------------------------- /oadp/deploy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | cd bookbag 3 | oc process -f build-template.yaml -p GIT_REPO="https://github.com/hhpatel14/labs.git" | oc apply -f - 4 | oc start-build bookbag --follow --from-dir=../.. && oc process -f deploy-template.yaml | oc apply -f -; 5 | cd .. -------------------------------------------------------------------------------- /oadp/install-deploy.sh: -------------------------------------------------------------------------------- 1 | pushd . 2 | 3 | if oc whoami > /dev/null 2>&1; then 4 | echo "You are logged in to the OpenShift cluster." 5 | else 6 | echo "You are not logged in to the OpenShift cluster." 7 | echo "Please log in to the OpenShift cluster and re-run this script." 8 | exit 1 9 | fi 10 | ANSIBLE_USER=$(whoami) 11 | 12 | # if these are not set, you won't be prompted again 13 | if [[ -n $CLUSTER_ADMIN_USER ]]; then 14 | echo "" 15 | else 16 | PS3='Please select the cluster admin user from the choices (1,2,3) above: ' 17 | options=("kubeadmin" "admin" "OTHER") 18 | select opt in "${options[@]}" 19 | do 20 | case $opt in 21 | "kubeadmin") 22 | CLUSTER_ADMIN_USER="kubeadmin" 23 | break 24 | ;; 25 | "admin") 26 | CLUSTER_ADMIN_USER="admin" 27 | break 28 | ;; 29 | "OTHER") 30 | read -p "Please enter the cluster admin user: " CLUSTER_ADMIN_USER 31 | break 32 | ;; 33 | *) echo "invalid option $REPLY";; 34 | esac 35 | done 36 | fi 37 | echo "CLUSTER_ADMIN_USER is set to $CLUSTER_ADMIN_USER" 38 | 39 | if [[ -n $STUDENT_PASSWORD ]]; then 40 | echo "STUDENT_PASSWORD is set to $STUDENT_PASSWORD" 41 | else 42 | echo "What is cluster admin password? example: XXXXX-XXXXX-XXXXX-XXXXX" 43 | read STUDENT_PASSWORD 44 | fi 45 | 46 | RAND_TMP_DIR=/tmp/oadp-lab-day-$RANDOM 47 | RAND_VENV_DIR=/tmp/oadp-lab-day-$RANDOM-venv 48 | OCS_NAMESPACE=openshift-storage 49 | echo "Using temp dir $RAND_TMP_DIR" 50 | mkdir $RAND_TMP_DIR 51 | cd $RAND_TMP_DIR 52 | python3 -m pip install pipenv 53 | python3 -m pipenv --three 54 | python3 -m pipenv install pip openshift ansible jmespath 55 | git clone https://github.com/redhat-cop/agnosticd.git --single-branch --branch development 56 | cd $RAND_TMP_DIR/agnosticd 57 | 58 | 59 | sed -i=.bak 's/hosts: all/hosts: localhost/g' ./ansible/configs/ocp-workloads/ocp-workload.yml 60 | sed -i=.bak 's/k8s_facts/kubernetes.core.k8s_info/g' ./ansible/roles/ocp4-workload-ocs-poc/tasks/workload.yml 61 | sed -i=.bak 's/k8s_facts/kubernetes.core.k8s_info/g' ./ansible/roles/ocp4-workload-ocs-poc/tasks/./pre_workload.yml 62 | 63 | ocs_mcg_pv_pool_bucket_name="migstorage" 64 | 65 | MCG_PHASE=$(oc get obc $ocs_mcg_pv_pool_bucket_name -n openshift-storage -ojsonpath=‘{.status.phase}’) 66 | if [[ $MCG_PHASE == *"Bound"* ]]; then 67 | echo "MCG is already deployed" 68 | else 69 | echo "Deploying MCG" 70 | python3 -m pipenv run ansible-playbook ./ansible/configs/ocp-workloads/ocp-workload.yml \ 71 | -e"ansible_user=${ANSIBLE_USER}" \ 72 | -e"ocp_workload=ocp4-workload-ocs-poc" \ 73 | -e"silent=False" \ 74 | -e"ocs_namespace=${OCS_NAMESPACE}" \ 75 | -e"ocs_mcg_pv_pool_bucket_name=${ocs_mcg_pv_pool_bucket_name}" \ 76 | -e"ACTION=create" 77 | fi 78 | 79 | # clear openshift-adp namespace to remove old operator if any 80 | echo "Please wait for openshift-adp namespace to delete if there are existing. This can take a while" 81 | oc delete namespace openshift-adp 82 | 83 | # install operator 84 | python3 -m pipenv run ansible-playbook ./ansible/configs/ocp-workloads/ocp-workload.yml \ 85 | -e"ansible_user=${ANSIBLE_USER}" \ 86 | -e"ocp_workload=ocp4-workload-oadp" \ 87 | -e"silent=False" \ 88 | -e"ocs_namespace=${OCS_NAMESPACE}" \ 89 | -e"cluster_admin_user=${CLUSTER_ADMIN_USER}" \ 90 | -e"student_password=${STUDENT_PASSWORD}" \ 91 | -e"ocs_migstorage=true" \ 92 | -e"ocs_mcg_pv_pool_bucket_name=${ocs_mcg_pv_pool_bucket_name}" \ 93 | -e"bookbag_repo=https://github.com/hhpatel/labs.git" \ 94 | -e"oadp_operator_subscription_release=v1.1.3" \ 95 | -e"ACTION=create" 96 | python3 -m pipenv --rm 97 | rm -rf $RAND_TMP_DIR 98 | rm -rf $RAND_VENV_DIR 99 | 100 | popd 101 | -------------------------------------------------------------------------------- /oadp/screenshots/bookbag-docs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/oadp/screenshots/bookbag-docs.png -------------------------------------------------------------------------------- /oadp/screenshots/rhpds-myservices.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/oadp/screenshots/rhpds-myservices.png -------------------------------------------------------------------------------- /oadp/screenshots/rhpds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/migtools/labs/c54b6f0d1215a8513eb93849c0a031065b0044f9/oadp/screenshots/rhpds.png --------------------------------------------------------------------------------