adorsys / ops-adorsys-kubernetes-platform

Infrastructure Setup of adorsys Test/Poc projects
Apache License 2.0
2 stars 2 forks source link

Setup new AWS SubAccount #56

Open nce opened 1 year ago

nce commented 1 year ago

We need to switch to a new Account and recreate Clusters. I'll document all the steps for a working setup here.

Local Machine

  1. Create a new AWS Profile for the account in ~/.aws/credentials
  2. Export that profile on the cli export AWS_PROFILE=xxx

Initial TF Bucketsetup/Github User

  1. run terraform in the root folder (picking up init.tf)
  2. Gather the outputs (access & secret key) and put them in the repo as secrets

DNS

  1. In the new account switch to route53 and create a new hosted zone.
  2. In the root account, in r53 modify our adorsys.io Domain to point to the new NS of the newly created Zone in the new subaccount

Kubermatic

  1. In the dev-intern project create/modify the k8s clusters by managing with the webui
  2. Download the kubeconfig and place it in the clusters-name folder as .kubeconfig

Clusterconfig

Create a new folder with the name of your cluster, like: foobar-cluster

  1. Modify the variables.tf and add name & kubermatic cluster id
  2. Modify the terraform.tf and rename the tf s3 bucket
  3. Modify the provider.tf and rename the tags with correct cluster name
  4. Modify the main.tf as you see fit

AWS Secretsmanager

  1. Go through all secrets in /kaas/ evaluate; migrate to new account
  2. Copy/Update those secrets
nce commented 1 year ago

Most work was done in the linked commits and this PR: https://github.com/adorsys/ops-k8s-bootstrap/pull/57