This is demo gitops git repository for IBM Cloud Paks.
This demo repo have a default selection to deploy IBM App Connect (ACE).
-
Install the OpenShift CLI
oc
, download latest oc version 4.7 or 4.8 -
Install kubeseal CLI
-
Create Github account
-
Install the Github
gh
CLI and login https://github.com/cli/cli -
Create a new organization on github https://docs.github.com/en/organizations/collaborating-with-groups-in-organizations/creating-a-new-organization-from-scratch
-
Generate a GitHub Personal Access Token (PAT) with the following scopes
- repo
- admin:org
- read:org
- admin:repo_hook
- admin:org_hook
-
Make sure you are logged in OpenShift with admin rights
oc login ...
-
Make sure you are connected to the correct OpenShift cluster
oc whoami --show-console
-
Log in with the Github CLI
gh auth login
-
Setup a local git directory to clone all the git repositories
mkdir -p ace-production
-
Download sealed-secrets-ibm-demo-key.yaml and save in the default location
~/Downloads/sealed-secrets-ibm-demo-key.yaml
. You can override the location when running the script withSEALED_SECRET_KEY_FILE
. Remember do not check this file to git. -
Run the bootstrap script, specify the git user
GIT_USER
, the git orgGIT_ORG
,the Github personal access tokenGIT_TOKEN
and the output directory to clone all reposOUTPUT_DIR
.You can useDEBUG=true
for verbose outputcurl -sfL https://raw.githubusercontent.com/cloud-native-toolkit-demos/multi-tenancy-gitops-ace/master/scripts/bootstrap.sh | \ GIT_USER=$REPLACE_WITH_GIT_USER \ GIT_ORG=$REPLACE_WITH_GIT_ORG \ GIT_TOKEN=$REPLACE_WITH_GIT_TOKEN \ OUTPUT_DIR=ace-production \ sh
-
You can open the output directory containing all the git repositories with VSCode
code ace-production
-
To extract the url and password you can use the following commands
echo "The ArgoCD URL and admin password:" oc get route -n openshift-gitops openshift-gitops-cntk-server -o template --template='https://{{.spec.host}}' oc extract secrets/openshift-gitops-cntk-cluster --keys=admin.password -n openshift-gitops --to=- echo "----" echo "The Cloud Pak console and admin password" oc get route -n tools integration-navigator-pn -o template --template='https://{{.spec.host}}' oc extract -n ibm-common-services secrets/platform-auth-idp-credentials --keys=admin_username,admin_password --to=-
-
The following git repositories will be fork into a new github organization
- This repository shows the reference architecture for gitops directory structure for more info https://cloudnativetoolkit.dev/adopting/use-cases/gitops/gitops-ibm-cloud-paks/