# stack-orchestrator-setup ## Setup Ansible To get started, follow the [installation](../README.md#installation) guide to setup ansible on your machine ## Setup Stack Orchestrator The following commands have to be executed in the [`stack-orchestrator-setup`](./) directory: ### On Local Host To setup stack orchestrator locally, execute the `setup-laconic-so.yml` Ansible playbook: ```bash 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: ```bash cp ../hosts.example.ini hosts.ini ``` - Edit the [`hosts.ini`](./hosts.ini) file to run the playbook on a remote machine: ```ini [] ansible_host= ansible_user= ansible_ssh_common_args='-o ForwardAgent=yes' ``` - Replace `` with the alias of your choice - Replace `` with the IP address or hostname of the target machine - Replace `` with the SSH username (e.g., dev, ubuntu) - Verify that you are able to connect to the host using the following command ```bash ansible all -m ping -i hosts.ini -k # Expected output: # | SUCCESS => { # "ansible_facts": { # "discovered_interpreter_python": "/usr/bin/python3.10" # }, # "changed": false, # "ping": "pong" # } ``` - Execute the `deploy-contracts.yml` Ansible playbook for remote deployment: ```bash LANG=en_US.utf8 ansible-playbook setup-laconic-so.yml -i hosts.ini --extra-vars='{ "target_host": "deployment_host"}' --user $USER -kK ```