DNS
All applications in a environment will be deployed to a subdomain of oslo.systems
.
The default domain for your environment set up by this guide is: {Environment}.oslo.systems
, subsequent applications will be set up as subdomains of this domain.
Step 1: Create a new configuration file
Create a new configuration file for DNS:
Step 2: Add and install the dns
package
Run the following command in the repo-iac/environments/dev/
directory:
This will add the package you want to install to packages.yml
. If you want to know more about how this works, read the reference documentation for packages.yml
.
Then, run the following command to install the package:
Step 3: Initialize and apply the dns
stack
Once terraform apply
completes, a list of name servers will be printed to the console.
name_servers = tolist([
"ns-123.awsdns-44.org",
"ns-321.awsdns-29.co.uk",
"ns-213.awsdns-35.com",
"ns-231.awsdns-18.net",
])
Step 4: Verify
Verify in the AWS CLI
Run the following command:
The output list should contain the name of the domain you just created.
Verify in the AWS console
Login to the AWS console and navigate to Route 53. Select Hosted zones in the left-hand menu.
The hosted zone list should contain the name of the domain you just created.
Step 5: Add DNS Name Servers
The output from Step 3 are the name servers for the root domain specified in _gp_dns.tf
. Because oslo.systems
was specified as the root domain, follow the guide Adding a subdomain to oslo.systems
to complete the setup.
To override the default configuration you can set the root_domain
variable in dns/config_override.tf
to the desired value.
The domain pirates-dev.oslo.systems
should now resolve to the application or applications you deploy in the next steps of the guide.
Step 6: Verify
To verify that the subdomain is properly registered with a name server (after the guide in step 5 have been completed):
This should give you a list of name servers corresponding to the list printed after the terraform apply
command in step 3.
If you don't have dig
installed, use this DNS lookup tool to check {your-subdomain}.oslo.systems
.
Commit your files
At this stage it is a good idea to commit your files.
Next step
Set up networking.