We will use the DevSpaces web IDE as our code editor and toolbench for setting up the AIMLOPS Platform.
-
Login to your DevSpaces Editor as your data science user USER_NAME e.g. user1 - be sure to select the FreeIPA identity provider when logging in.
The first time round, you will be taken through the OAuth workflow, click the Allow selected permissions button.
-
We are using a private github repository for the Rainforest code at the moment. DevSpaces supports this, let's create a credential secret to be able to access the repo. The GITHUB_TOKEN will be provided by your instructor.
export GITHUB_TOKEN=<token>
oc -n ${USER_NAME}-devspaces apply -f - <<EOF kind: Secret apiVersion: v1 metadata: name: devspaces-git-creds annotations: controller.devfile.io/mount-path: /tmp/.git-credentials/ labels: controller.devfile.io/git-credential: "true" controller.devfile.io/watch-secret: "true" controller.devfile.io/mount-to-devworkspace: "true" stringData: credentials: https://foo:${GITHUB_TOKEN}@github.com EOF
-
Create your workspace. On DevSpaces Workspaces, Create Workspace > Import from Git
For OpenShift 4.11+ - Enter this URL to load the dev stack:
Select Create & Open
This will open a new tab, download the devspaces stack image, clone the Rainforest codebase and start your IDE.
You will be prompted to Trust the Authors for the git project, tick the checkbox and click the button.
-
Login to Terminal in DevSpaces by selecting the hamburger menu in top left - Terminal > New Terminal.
-
Export our environment variables and launch zsh shell. You can paste using CTRL+SHIFT+V in the terminal, accept any first time cut-n-paste browser/prompts.
echo export TEAM_NAME="<TEAM_NAME>" | tee -a ~/.bashrc -a ~/.zshrc echo export CLUSTER_DOMAIN="<CLUSTER_DOMAIN>" | tee -a ~/.bashrc -a ~/.zshrc echo export GIT_SERVER="<GIT_SERVER>" | tee -a ~/.bashrc -a ~/.zshrc
zsh
-
Check if you can connect to OpenShift. Run the command below.
export USER_NAME=<USER NAME> export USER_PASSWORD=<USER PASSWORD>
oc login --server=https://api.${CLUSTER_DOMAIN##apps.}:6443 -u ${USER_NAME} -p ${USER_PASSWORD}
🪄🪄 Now, let's carry on and configure our GitOps tooling ... !🪄🪄