testnet-ops/service-provider-setup
2024-09-23 13:49:40 +05:30
..
templates Add playbook to setup webapp deployer backend 2024-09-23 13:49:40 +05:30
.gitignore Add steps to reserve authority 2024-09-20 14:33:39 +05:30
container-vars.example.yml Add playbook to setup container-registry 2024-09-20 12:15:14 +05:30
deploy-backend.yml Add playbook to setup webapp deployer backend 2024-09-23 13:49:40 +05:30
dns-vars.example.yml Add README for setting up DNS in DigitalOcean 2024-09-18 14:49:40 +05:30
k8s-vars.example.yml Add template files for modifying service-provider-template repo 2024-09-19 11:07:13 +05:30
README.md Add README steps to create user dev 2024-09-20 10:04:16 +05:30
run-laconic-console.yml Add steps to reserve authority 2024-09-20 14:33:39 +05:30
run-laconicd.yml Add playbooks to setup fixturenet-laconicd and laconic-console 2024-09-20 14:11:12 +05:30
setup-container-registry.yml Add playbook to setup webapp deployer backend 2024-09-23 13:49:40 +05:30
setup-dns.yml Add playbook to setup so user 2024-09-18 15:38:38 +05:30
setup-k8s.yml Add playbook to setup container-registry 2024-09-20 12:15:14 +05:30
setup-user.yml Add README steps to create user dev 2024-09-20 10:04:16 +05:30
webapp-vars.example.yml Add steps to reserve authority 2024-09-20 14:33:39 +05:30

service-provider-setup

Setup Ansible

To get started, follow the installation guide to setup ansible on your machine

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 vars file

    cp dns-vars.example.yml dns-vars.yml
    
  • Enter the dns-vars.yml file

    # 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 ansible playbook to create the necessary DNS entries in DigitalOcean

    ansible-playbook setup-dns.yml
    

Setup User dev

  • Create a new hosts.ini file:

    cp ../hosts.example.ini hosts.ini
    
  • Edit the hosts.ini file to run the playbook on a remote machine:

    [deployment_host]
    <host_name> ansible_host=<target_ip> ansible_user=<ssh_user> ansible_ssh_common_args='-o ForwardAgent=yes'
    
    • Replace <host_name> with the desired hostname of the remote machine
    • Replace <target_ip> with the IP address or hostname of the target machine
    • Replace <ssh_user> with root
  • Verify that you are able to connect to the host using the following command:

    ansible all -m ping -i hosts.ini -k
    
    # Expected output:
    
    # <host_name> | SUCCESS => {
    #  "ansible_facts": {
    #      "discovered_interpreter_python": "/usr/bin/python3.10"
    #  },
    #  "changed": false,
    #  "ping": "pong"
    # }
    
  • Execute the setup-user.yml Ansible playbook to create a user dev with sudo permissions:

    ansible-playbook setup-user.yml -i hosts.ini --extra-vars='{ "target_host": "deployment_host" }'