To install Obsrv, you will need to clone the Obsrv Automation repository. It provides support for installation across major cloud providers. Please check here for all the various configurations across all components.
You will require terragrunt
to install Obsrv components. Please see Install Terragrunt for installation help.
AWS
Prerequisites:
- You will need a
key-secret
pair to access AWS. Learn how to create or manage these at Managing access keys for IAM users. Please export these variables in terminal session.export AWS_ACCESS_KEY_ID=mykey export AWS_SECRET_ACCESS_KEY=mysecret
- You will require an S3 bucket to store tf-state. Learn how to create or manage these at Create an Amazon S3 bucket. Please export this variable at
export AWS_TERRAFORM_BACKEND_BUCKET_NAME=mybucket export AWS_TERRAFORM_BACKEND_BUCKET_REGION=myregion
- You will need
velero cli
to create the cluster backups. Learn how to install velero cli at (Velero cli)
-
Execute the below steps in the same terminal session:
export KUBE_CONFIG_PATH=~/.kube/config cd terraform/aws terragrunt init terrahelp decrypt -simple-key=<decryption_key> -file=vars/dev.tfvars terragrunt apply -target=module.eks -var-file=vars/cluster_overrides.tfvars -var-file=vars/dev.tfvars -auto-approve terragrunt apply -target=module.get_kubeconfig -var-file=vars/cluster_overrides.tfvars -var-file=vars/dev.tfvars -auto-approve terragrunt apply -var-file=vars/cluster_overrides.tfvars -var-file=vars/dev.tfvars -auto-approve
Make necessary configuration changes to vars/cluster_overrides.tfvars file:
- Modify values like env and building block and region. It is deployed in
us-east-2
by default
- Modify values like env and building block and region. It is deployed in
-
Create a velero backup:
- After the cluster is created velero backup needs to be triggered manually
- We need to create a backup and schedule manually
- Run the below commands to create a backup and schedule
velero backup create <backup_name> velero backup schedule <backup_schedule_name>
- Below example Creates a backup and schedule it for every 24h and retain the backup for 50h
velero backup create obsrv-dev-full-cluster-backup velero backup schedule obsrv-dev-full-cluster-daily-backup --schedule="@every 24h" --ttl 50h0m0s
Add -auto-approve
to the above terragrunt
command to install without providing user inputs as shown below
terragrunt apply -target=module.eks -var-file=vars/cluster_overrides.tfvars -var-file=vars/dev.tfvars -auto-approve && terragrunt apply -var-file=vars/cluster_overrides.tfvars -var-file=vars/dev.tfvars -target=module.get_kubeconfig -auto-approve && terragrunt apply -var-file=vars/cluster_overrides.tfvars -var-file=vars/dev.tfvars -auto-approve
*** GCP ***
- Setup the gcoud CLI. Please see Installing Google Cloud SDK for reference.
- Initialize and Authenticate the gcloud CLI. Please see Initializing Cloud SDK for reference.
gcloud init
gcloud auth application-default login
- Install additional dependencies to authenticate with GKE. Please see Installing the gke-gcloud-auth-plugin for reference.
gcloud components install gke-gcloud-auth-plugin
- Create a project and export it as variable. Please see Creating and Managing Projects for reference.
export GOOGLE_PROJECT_ID=myproject
GOOGLE_TERRAFORM_BACKEND_LOCATION=mylocation
export GOOGLE_TERRAFORM_BACKEND_BUCKET=mybucket
-
Enable the Kubernets Engine API for the created project. Please see Enabling the Kubernetes Engine API for reference.
-
Update the
terraform/gcp/vars/cluster_overrides.tfvars
file with the necessary values.
In order to complete the installation, please run the below steps in the same terminal.
cd terraform/gcp
terragrunt init
terrahelp decrypt -simple-key=<decryption_key> -file=vars/dev.tfvars
terragrunt plan --var-file=vars/cluster_overrides.tfvars --var-file=vars/dev.tfvars
terragrunt apply --var-file=vars/cluster_overrides.tfvars --var-file=vars/dev.tfvars
- Set
KUBECONFIG
variable in your environment to point to the kubeconfig file.
export KUBECONFIG=$(pwd)/credentials/config-<building_block>-<env>.yaml
- Navigate to
helmcharts
directory under the root diretory
cd ../../helmcharts/kitchen
- Update the
global-cloud-values-gcp.yaml
file with the necessary values. The values to be updated are:
project_id:
cloud_storage_config:
cloud_storage_region:
cloud_storage_bucket:
postgresql_backup_cloud_bucket:
checkpoint_bucket:
redis_backup_cloud_bucket:
velero_backup_cloud_bucket:
serviceAccounts:
-- update project_id in each service account
- Run the below command to install the helm charts
cd kitchen/
CLOUD_ENV=gcp bash install.sh bootstrap
CLOUD_ENV=gcp bash install.sh coredb
- Get the IP address of the LoadBalancer Service by Kong
kubectl get svc -n kong-ingress
-
Update
../global-values.yaml
with the domain as<ip>.sslip.io
or a complete domain name if DNS is mapped -
Follow the steps to complete the installation
bash install.sh migrations
bash install.sh monitoring
bash install.sh coreinfra
bash install.sh obsrvtools
bash install.sh additional
- Check if the ingress routes are created
kubectl get ingress -A
- Navigate to /console to access the web console
Azure
- Log into your cloud environment in your terminal. Please see Sign in with Azure CLI for reference.
az login --allow-no-subscriptions
- Create a storage account and export the below variables in your terminal. Please see Create a storage container for reference. Export the below variables in your terminal session
export AZURE_TERRAFORM_BACKEND_RG=myregion export AZURE_TERRAFORM_BACKEND_STORAGE_ACCOUNT=mystorage export AZURE_TERRAFORM_BACKEND_CONTAINER=mycontainer
- Execute the below commands in the same terminal session:
cd terraform/azure terragrunt init terragrunt apply -target module.aks -auto-approve
- Pass the following variables when prompted:
env: dev building_block: obsrv location: East US 2
- Note: All the above variable values are given for example
- Export the below variables:
export KUBE_CONFIG_PATH=<path_to_kubeconfig>( default to current directory) export KUBECONFIG=<path_to_kubeconfig>( default to current directory)
- Execute the below commands in the same terminal session:
terragrunt apply -auto-approve kubectl get ingress superset -n superset
- Pass the following variables when prompted:
env: dev building_block: obsrv location: East US 2
- Note: All the above variable values are given for example
- Replace the ingress ip in terraform variables:
web_console_base_url superset_base_url
- Execute the below commands in the same terminal session:
terragrunt apply -target module.unified_helm -auto-approve
- Pass the following variables when prompted:
env: dev building_block: obsrv location: East US 2
- Note: All the above variable values are given for example