testnet-ops/stack-orchestrator-setup
2024-09-10 11:33:32 +05:30
..
.gitignore Add playbooks for setting up docker and stack orchestrator 2024-09-10 10:34:23 +05:30
README.md Add instructions for running playbook to setup stack orchestrator 2024-09-10 11:33:32 +05:30
setup-docker.yml Add instructions for running playbook to setup stack orchestrator 2024-09-10 11:33:32 +05:30
setup-laconic-so.yml Add instructions for running playbook to setup stack orchestrator 2024-09-10 11:33:32 +05:30

stack-orchestrator-setup

Setup Ansible

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

Setup Stack Orchestrator

The following commands have to be executed in the stack-orchestrator-setup directory. This playbook will install Docker and Stack Orchestrator on the machine if they aren't already present

On Local Host

To setup stack orchestrator and docker locally, execute the setup-laconic-so.yml Ansible playbook:

LANG=en_US.utf8 ansible-playbook setup-laconic-so.yml --user $USER -kK

On Remote Host

To run the playbook on a remote host:

  • 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 alias of your choice
    • Replace <target_ip> with the IP address or hostname of the target machine
    • Replace <ssh_user> with the SSH username (e.g., dev, ubuntu)
  • 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-laconic-so.yml Ansible playbook for setting up stack orchestrator and docker on a remote machine:

    LANG=en_US.utf8 ansible-playbook setup-laconic-so.yml  -i hosts.ini  --extra-vars='{ "target_host": "deployment_host"}' --user $USER -kK
    

Verify Installation

  • To verify installtion, run the following commands:

    # Check version of docker
    docker --version
    
    # Check version of Stack Orchestrator
    laconic-so version