Alternative 2: Ansible - Step-by-Step
Step-by-step deployment option uses kubectl and Helm commands to facilitate a more customized deployment plan
Set-up the Deployer
Rierino platform uses a central deployment coordinator, facilitated through Kubernetes jobs and services. As the first step for deployment, this coordinator should be configured.
kubectl create namespace deployment
kubectl create serviceaccount --namespace=deployment deployer-sa
kubectl create clusterrole deployer-admin --verb=* --resource=*
kubectl create clusterrolebinding deployer-admin:deployment:deployer-sa --clusterrole=deployer-admin --serviceaccount=deployment:deployer-sa --namespace=deployment
helm upgrade --install global-deployment https://rierino-open.github.io/helm-charts/unit/global --namespace=deployment
Add your provided Rierino username and password for the Maven repository:
kubectl patch secret global-secrets-env --namespace deployment --type=json -p='[{"op" : "add", "path" : "/data/MAVEN_USER", "value" : "[BASE64 ENCODED USERNAME]"}]'
kubectl patch secret global-secrets-env --namespace deployment --type=json -p='[{"op" : "add", "path" : "/data/MAVEN_PASSWORD", "value" : "[BASE64 ENCODED PASSWORD]"}]'
Add your provided Rierino token for Git repositoryd including Ansible playbooks:
kubectl patch secret global-secrets-env --namespace deployment --type=json -p='[{"op" : "replace", "path" : "/data/GIT_TOKEN", "value" : "[BASE64 ENCODED TOKEN]"}]'
Add your provided Rierino token for Git repository including deployment assets:
kubectl patch secret global-secrets-env --namespace deployment --type=json -p='[{"op" : "replace", "path" : "/data/ASSET_TOKEN", "value" : "[BASE64 ENCODED TOKEN]"}]'
Add your provided Rierino username and password for the Docker repository:
kubectl patch secret global-secrets-env --namespace deployment --type=json -p='[{"op" : "add", "path" : "/data/DOCKER_USER", "value" : "[BASE64 ENCODED USERNAME]"}]'
kubectl patch secret global-secrets-env --namespace deployment --type=json -p='[{"op" : "add", "path" : "/data/DOCKER_PASSWORD", "value" : "[BASE64 ENCODED PASSWORD]"}]'
If you are using AWS as the cloud provider, add your AWS credentials:
kubectl patch secret global-secrets-env --namespace deployment --type=json -p='[{"op" : "add", "path" : "/data/AWS_ACCESS_KEY_ID", "value" : "[BASE64 ENCODED AWS_ACCESS_KEY_ID]"}]'
kubectl patch secret global-secrets-env --namespace deployment --type=json -p='[{"op" : "add", "path" : "/data/AWS_SECRET_KEY", "value" : "[BASE64 ENCODED AWS_SECRET_KEY]"}]'
If you are using GCP as the cloud provider, add your service account file:
kubectl patch secret global-secrets --namespace deployment --type=json -p='[{"op" : "add", "path" : "/data/service_account.json", "value" : "[BASE64 ENCODED SERVICE ACCOUNT FILE]"}]'
helm upgrade --install --force global-deployerapi https://rierino-open.github.io/helm-charts/unit/deployerapi --namespace=deployment --set cloud=gcp --set pool=infra-pool
Now, you can start deploying Rierino workloads and services using the deployer job and deployer api service.
Populate Assets
Rierino deployment requires various configurations on prerequisite systems, which are executed using initialization playbooks.
helm upgrade --install global-deployer-job https://rierino-open.github.io/helm-charts/unit/deployer --namespace=deployment --set playbook=playbooks/_application/mongodb-import.yml --set cloud=
helm upgrade --install global-deployer-job https://rierino-open.github.io/helm-charts/unit/deployer --namespace=deployment --set playbook=playbooks/_application/kafka-create-topic.yml --set cloud=gcp
helm upgrade --install global-deployer-job https://rierino-open.github.io/helm-charts/unit/deployer --namespace=deployment --set playbook=playbooks/_application/keycloak-create-realm.yml --set cloud=gcp--set values.keycloak_admin_user=[KEYCLOAK_USER] --set values.keycloak_admin_password=[KEYCLOAK_PASSWORD]
Deploy Admin Core Runners
The first set of Rierino services provide the admin core runners, which can be utilized afterwards to deploy additional services through the admin UI itself.
Prepare Namespace
kubectl create namespace admin-backend
helm upgrade --install global-deployer-job https://rierino-open.github.io/helm-charts/unit/deployer --namespace=deployment --set playbook=playbooks/_application/global-helm.yml --set cloud= --set values.assetSource= --set values.namespace=
Deploy Core Runners
helm upgrade --install global-deployer-job https://rierino-open.github.io/helm-charts/unit/deployer --namespace=deployment --set playbook=playbooks/_application/runner-helm.yml --set cloud=gcp --set values.assetSource=core --set values.source= --set values.deploymentId=
Deploy Authentication Runner
helm upgrade --install global-deployer-job https://rierino-open.github.io/helm-charts/unit/deployer --namespace=deployment --set playbook=playbooks/_application/runner-helm.yml --set cloud=gcp --set values.assetSource=core --set values.source= --set values.deploymentId=
Deploy Admin Gateway Services
Next set of Rierino services provide the admin gateway and authentication services, which expose backend runners to outside the cluster.
Prepare Namespace
kubectl create namespace admin-gateway
helm upgrade --install global-deployer-job https://rierino-open.github.io/helm-charts/unit/deployer --namespace=deployment --set playbook=playbooks/_application/global-helm.yml --set cloud= --set values.assetSource= --set values.namespace=
Add secrets required by admin gateway:
kubectl patch secret global-secrets --namespace admin-gateway --type=json -p='[{"op" : "add", "path" : "/data/properties", "value" : "[BASE64 ENCODED PROPERTIES]"}]'
Where properties should include:
rierinoKV.shared.gateway.secret=
Deploy API Gateway
helm upgrade --install global-deployer-job https://rierino-open.github.io/helm-charts/unit/deployer --namespace=deployment --set playbook=playbooks/_application/gateway-helm.yml --set cloud=gcp --set values.assetSource=core --set values.controller=gateway_admin
Deploy Admin UI
Last component to deploy for initialization of Rierino core platform is the admin UI, which allows user interaction with backend services.
Prepare Namespace
kubectl create namespace admin-ui
helm upgrade --install global-deployer-job https://rierino-open.github.io/helm-charts/unit/deployer --namespace=deployment --set playbook=playbooks/_application/global-helm.yml --set cloud= --set values.assetSource= --set values.namespace=
Deploy Front-end
helm upgrade --install global-deployer-job https://rierino-open.github.io/helm-charts/unit/deployer --namespace=deployment --set playbook=playbooks/_application/adminui-helm.yml --set cloud=gcp --set values.call_values.rierinoPullPolicy=Always
Last updated