Skip to content

DNS

All applications in a environment will be deployed to a subdomain of oslo.systems.

The default domain for your environment is {Environment}.oslo.systems. Each new application will use a subdomain of this domain.

Step 1: Add and configure the dns package

repo-iac/environments/dev/
ok pkg add dns
cd dns

Update package-config.yml:

dns/package-config.yml
StackName: "dns"

Step 2: Install and apply the package

dns/
ok pkg install
terraform init
terraform apply

Once terraform apply completes, name servers will be printed to the console.

Output from terraform apply
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 3: Verify

aws route53 list-hosted-zones | jq '.HostedZones[].Name'

Output should contain the domain you created.

Login to AWS console and navigate to Route 53. Select Hosted zones.

List should contain the domain you created.


Step 4: Add DNS Name Servers

The output from Step 2 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 default configuration, set the root_domain variable in dns/config_override.tf.

The domain pirates-dev.oslo.systems should now resolve to applications you deploy.

Step 5: Verify

To verify the subdomain is properly registered with a name server (after completing step 4):

dig NS +short {Environment}.oslo.systems

This should return name servers corresponding to the list printed after terraform apply in step 2.

If you don't have dig installed, use this DNS lookup tool to check {your-subdomain}.oslo.systems.

Next step

Set up networking.