From d8eb7d5c986b5a29d5fe215ba5fa526d9f3ab984 Mon Sep 17 00:00:00 2001 From: Adw8 Date: Wed, 18 Sep 2024 14:49:40 +0530 Subject: [PATCH] Add README for setting up DNS in DigitalOcean --- service-provider-setup/README.md | 42 +++++++++++++++++++++ service-provider-setup/dns-vars.example.yml | 4 +- service-provider-setup/dns-vars.yml | 4 +- 3 files changed, 46 insertions(+), 4 deletions(-) diff --git a/service-provider-setup/README.md b/service-provider-setup/README.md index 509529c..4cec153 100644 --- a/service-provider-setup/README.md +++ b/service-provider-setup/README.md @@ -1 +1,43 @@ # service-provider-setup + +## Configure DNS + +### Prerequisites + +- Buy a domain and configure nameservers to DigitalOcean + +- Generate a DigitalOcean access token + +### Create DNS entries in DigitalOcean + +- Copy the [`dns-vars.example.yml`](./dns-vars.example.yml) vars file + + ```bash + cp dns-vars.example.yml dns-vars.yml + ``` + +- Enter the `dns-vars.yml` file + + ```bash + # primary domain for which DNS records will be managed + # eg: laconic.com + domain: "" + + # specific prefix for subdomains + # eg: lcn-cad + subdomain_prefix: "" + + # The IP address to be used for the A record of the cluster control machine + # eg: 23.111.78.179 + cluster_control_ip: "" + + # DigitalOcean access token + # eg: dop_v1... + do_api_token: "" + ``` + +- Run the [`setup-dns.yml`](./setup-dns.yml) ansible playbook to create the necessary DNS entries in DigitalOcean + + ```bash + ansible-playbook setup-dns.yml + ``` diff --git a/service-provider-setup/dns-vars.example.yml b/service-provider-setup/dns-vars.example.yml index 602656a..a0b441b 100644 --- a/service-provider-setup/dns-vars.example.yml +++ b/service-provider-setup/dns-vars.example.yml @@ -1,5 +1,5 @@ domain: "" -subdomain: "" -subdomain_cluster_control: "{{ subdomain }}-cluster-control" +subdomain_prefix: "" +subdomain_cluster_control: "{{ subdomain_prefix }}-cluster-control" cluster_control_ip: "" do_api_token: "" diff --git a/service-provider-setup/dns-vars.yml b/service-provider-setup/dns-vars.yml index 85c403e..5e0b0c0 100644 --- a/service-provider-setup/dns-vars.yml +++ b/service-provider-setup/dns-vars.yml @@ -1,5 +1,5 @@ domain: "test.wireitin.com" -subdomain: "dss-ind" -subdomain_cluster_control: "{{ subdomain }}-cluster-control" +subdomain_prefix: "dss-ind" +subdomain_cluster_control: "{{ subdomain_prefix }}-cluster-control" cluster_control_ip: "64.227.134.44" do_api_token: ""