-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cleanup and using backend.hcl to share vars
- Loading branch information
Showing
3 changed files
with
66 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,34 @@ | ||
# How To Configure Bootstrap | ||
|
||
For a working example see the [acme example](examples/acme/main.tf). One thing to note is the `source` setting needs to reference the Git URL rather than a path. | ||
For a working example see the [acme example](examples/acme/main.tf). | ||
|
||
You can run the follwing commands inside the docker container produced by the release of this repo. Run the image with the following command (which will mount your ~/.aws/credentials into the docker container): | ||
|
||
docker run -it -v ~/.aws:/root/.aws ghcr.io/mojaloop/iac-aws-bootstrap:currentver | ||
|
||
You need to create the backend.hcl file by using the iac-aws-backend repo and setting the appropriate variables when prompted. | ||
|
||
Copy the backend.hcl file into the same dir as the primary main.tf file. | ||
|
||
Edit the main.tf file to set the appropriate domain variable (base domain) and the tenancy variable. This will create a zone for tenancy.domain so you will have hosts with FQDNs such as gitlab.tenancy.domain and wireguard.tenancy.domain, etc. | ||
|
||
You can also change the number of zones to use if you wish to have the switch create worker nodes in different zones and have the load balancers balance accross those different zones. Or leave it at 1 and everything will be in the same zone. | ||
|
||
You need to create a group that has admin access and that group must be set here: | ||
|
||
iac_group_name = .... | ||
|
||
After you finish modifying the settings in main.tf you will need to run the following commands: | ||
|
||
1. terraform init --backend-config=backend.hcl | ||
2. terraform apply -var-file=backend.hcl | ||
3. cd post-config | ||
4. terraform init --backend-config=../backend.hcl | ||
5. terraform apply -var-file=../backend.hcl | ||
|
||
Now you can log in to gitlab.tenancy.domain using root and the result of running this command from the main directory: | ||
|
||
terraform output gitlab_root_pw | ||
|
||
Use google authenticator or other appropriate app to configure MFA on gitlab for the root user. | ||
|
||
The Git URL to use is `git::git@github.com:mojaloop/iac-aws-bootstrap.git?ref=v0.1.0` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters