Via G. Falcone 5, Pollenza (MC), Italy
+39 0733 203595

Multiple services on multiple env: how do I find them?

In the previous articles we created our infrastructure on AWS and configured the services. All using Ansible and creating an infrastructure as code.

When the number of servers or services grows, keeping track of their names clearly can be complicated.

This article describes how to manage your servers automatically using AWS Route53.

We’ve chosen to give names to our servers by creating a third level domain. For example: example.madisoft.it.

Each server has a public and private name based on the IP assigned to it.

  • Public (IP) DNS
    • nuvola-prod-backend-3.example.madisoft.it
    • nuvola-prod-database-24.example.madisoft.it
    • nuvola-dev-database-34.example.madisoft.it
    • nuvola-issue8978-database-34.example.madisoft.it
  • Private (IP DNS
    • local-prod-backend-0.example.madisoft.it
    • local-prod-cache-sessioni-0.example.madisoft.it
    • local-dev-database-14.example.madisoft.it
    • local-issue8978-backend-0.example.madisoft.it

Within the playbook for creating the instance, we write a task that store its name on Route53. Below is the task for the public ip:

And here is for the private ip:

Now our servers are reachable with an easy-to-remember and easy-to-understand DNS name.

In the next article we’ll see how we migrated our content to the new provider.

Related Posts

Leave a reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.