From 4631b6b95da69e7fd9728fe0537fa2c13d25fd61 Mon Sep 17 00:00:00 2001 From: Adw8 Date: Tue, 10 Sep 2024 13:45:29 +0530 Subject: [PATCH] Add instructions to add laconic-so download location to PATH --- README.md | 1 + stack-orchestrator-setup/README.md | 27 ++++++++++++++++--- stack-orchestrator-setup/setup-docker.yml | 19 ++++++------- stack-orchestrator-setup/setup-laconic-so.yml | 7 ----- 4 files changed, 35 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 4031661..3c7b3d7 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,7 @@ ## Playbooks +- [stack-orchestrator-setup](./stack-orchestrator-setup/README.md) - [l2-setup](./l2-setup/README.md) - [nitro-node-setup](./nitro-nodes-setup/README.md) - [nitro-bridge-setup](./nitro-bridge-setup/README.md) diff --git a/stack-orchestrator-setup/README.md b/stack-orchestrator-setup/README.md index 07fbcd5..35baf50 100644 --- a/stack-orchestrator-setup/README.md +++ b/stack-orchestrator-setup/README.md @@ -2,11 +2,13 @@ ## Setup Ansible -To get started, follow the [installation](../README.md#installation) guide to setup ansible on your machine +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. This playbook will install Docker and Stack Orchestrator on the machine if they aren't already present +This playbook will install Docker and Stack Orchestrator (laconic-so) on the machine if they aren't already present. + +Run the following commands in the [`stack-orchestrator-setup`](./) directory. ### On Local Host @@ -61,12 +63,31 @@ To run the playbook on a remote host: ## Verify Installation -- To verify installtion, run the following commands: +- After the installation is complete, ensure that `$HOME/bin` is added to your `PATH` to access `laconic-so` from anywhere in the terminal. You can do this by running the following command: + + ```bash + export PATH="$HOME/bin:$PATH" + ``` + +- To make this change permanent, add the following line to your shell configuration file (`~/.bashrc` or `~/.zshrc`, depending on your shell): + + ```bash + # For bash users + echo 'export PATH="$HOME/bin:$PATH"' >> ~/.bashrc + + # For zsh users + echo 'export PATH="$HOME/bin:$PATH"' >> ~/.zshrc + ``` + +- Once the PATH is set, verify the installation by running the following commands: ```bash # Check version of docker docker --version + # Check version of docker compose + docker compose version + # Check version of Stack Orchestrator laconic-so version ``` diff --git a/stack-orchestrator-setup/setup-docker.yml b/stack-orchestrator-setup/setup-docker.yml index 2be8496..c4392dc 100644 --- a/stack-orchestrator-setup/setup-docker.yml +++ b/stack-orchestrator-setup/setup-docker.yml @@ -68,21 +68,22 @@ state: latest notify: Restart Docker - - name: Verify Docker installation by running the hello world image - command: docker run hello-world - register: hello_world_output - ignore_errors: true - - - name: Display hello-world output - debug: - var: hello_world_output.stdout_lines - - name: Add user to docker group user: name: "{{ ansible_user }}" groups: docker append: true + - name: Verify Docker installation by running the hello world image + command: docker run hello-world + register: hello_world_output + ignore_errors: true + become: no + + - name: Display hello-world output + debug: + var: hello_world_output.stdout_lines + handlers: - name: Restart Docker service: diff --git a/stack-orchestrator-setup/setup-laconic-so.yml b/stack-orchestrator-setup/setup-laconic-so.yml index 5c1ca1b..0696efc 100644 --- a/stack-orchestrator-setup/setup-laconic-so.yml +++ b/stack-orchestrator-setup/setup-laconic-so.yml @@ -43,13 +43,6 @@ mode: '0755' force: yes - - name: Ensure ~/bin is on the PATH in .zshrc - lineinfile: - path: "{{ ansible_env.HOME }}/.zshrc" - regexp: '^export PATH=.*{{ ansible_env.HOME }}/bin' - line: 'export PATH="{{ ansible_env.HOME }}/bin:$PATH"' - state: present - - name: Ensure ~/.laconic-so directory exists file: path: "{{ ansible_env.HOME }}/.laconic-so"