...
AWS Account
Terraform Cloud Account
Preconfigured access in
~/.terraformrc
. Get the token from https://app.terraform.io by going to Settings → Teams → Team API Token. Generate a new token and create the file~/.terraformrc
Code Block credentials "app.terraform.io" { token = "iz5o8MNxgBBPwQ...." }
# | Step | ||||||||
---|---|---|---|---|---|---|---|---|---|
1 | Setup |
| |||||||
2 | Create IAM User & Role |
The script creates:
| |||||||
3 | Create Ops Kubernetes Cluster |
The script creates:
| |||||||
4 | Import the Kubernetes Cluster connection config | Make sure you have AWS profile or key/secret/session environment variables set onto the terminal session Find the name of the Kubernetes cluster and update the local config with it
| |||||||
5 | Install Nginx |
| |||||||
6 | Install Jenkins | Use the helm chart for installing Jenkins onto the Kubernetes cluster created above.
Wait for Jenkins to start up. To view the Jenkins admin password: kubectl exec --namespace jenkins -it svc/jenkins -c jenkins -- /bin/cat /run/secrets/additional/chart-admin-password && echo Set up a cloud provisioned Jenkins node as defined in the Kubernetes plugin config in Jenkins. | |||||||
7 | Install Ansible Tower (AWX) | Create the AWX DB by connecting to the RDS PostgreSQL instance created via Terraform.
Install AWX with the Kustomize script.
Watch for the script failing and if it does run it again (timing issue due to the creation of the AWX RBAC) | |||||||
8 | Update DNS record |
Now Jenkins and AWX should be available via http://ops.d1.test.senofi.net/ and http://ops.d1.test.senofi.net/jenkins. | |||||||
9 | Terraform Cloud workspaces | We need to maintain two workspaces - one for the Fabric Kubernetes cluster and one for the openIDL applications. To create the workspaces use the tool located in senofi/openidl-devops:
| |||||||
10 | Configure Jenkins |
| |||||||
11 | Run Terraform Job |
|
...