Add steps to clean up service provider setup #14
@ -14,63 +14,7 @@ To get started, follow the [installation](../README.md#installation) guide to se
|
|||||||
|
|
||||||
## Setup a new User
|
## Setup a new User
|
||||||
|
|
||||||
- Create a new `hosts.ini` file:
|
Follow steps from [Setup a user](../user-setup/README.md#setup-a-user) to setup a new user with passwordless sudo
|
||||||
|
|
||||||
```bash
|
|
||||||
cp ../hosts.example.ini hosts.ini
|
|
||||||
```
|
|
||||||
|
|
||||||
- Edit the [`hosts.ini`](./hosts.ini) file to run the playbook on a remote machine:
|
|
||||||
|
|
||||||
```ini
|
|
||||||
[root_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:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
ansible all -m ping -i hosts.ini
|
|
||||||
|
|
||||||
# Expected output:
|
|
||||||
|
|
||||||
# <host_name> | SUCCESS => {
|
|
||||||
# "ansible_facts": {
|
|
||||||
# "discovered_interpreter_python": "/usr/bin/python3.10"
|
|
||||||
# },
|
|
||||||
# "changed": false,
|
|
||||||
# "ping": "pong"
|
|
||||||
# }
|
|
||||||
```
|
|
||||||
|
|
||||||
- Setup `user-vars.yml` using the example file
|
|
||||||
|
|
||||||
```bash
|
|
||||||
cp vars/user-vars.example.yml vars/user-vars.yml
|
|
||||||
```
|
|
||||||
|
|
||||||
- Edit the `user-vars.yml` file:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# name of the user you want to setup on the target host
|
|
||||||
username: ""
|
|
||||||
|
|
||||||
# password of the user you want to setup on the target host
|
|
||||||
password: ""
|
|
||||||
|
|
||||||
# path to the ssh key on your machine, eg: "/home/user/.ssh/id_rsa.pub"
|
|
||||||
path_to_ssh_key: ""
|
|
||||||
```
|
|
||||||
|
|
||||||
- Execute the `setup-user.yml` Ansible playbook to create a user with passwordless sudo permissions:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
LANG=en_US.utf8 ansible-playbook setup-user.yml -i hosts.ini --extra-vars='{ "target_host": "deployment_host" }'
|
|
||||||
```
|
|
||||||
|
|
||||||
## Become a Service Provider
|
## Become a Service Provider
|
||||||
|
|
||||||
@ -131,9 +75,6 @@ To get started, follow the [installation](../README.md#installation) guide to se
|
|||||||
- Update the [`hosts.ini`](./hosts.ini) file:
|
- Update the [`hosts.ini`](./hosts.ini) file:
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
[root_host]
|
|
||||||
<host_name> ansible_host=<target_ip> ansible_user=root ansible_ssh_common_args='-o ForwardAgent=yes'
|
|
||||||
|
|
||||||
[deployment_host]
|
[deployment_host]
|
||||||
<host_name> ansible_host=<target_ip> ansible_user=<new_username> ansible_ssh_common_args='-o ForwardAgent=yes'
|
<host_name> ansible_host=<target_ip> ansible_user=<new_username> ansible_ssh_common_args='-o ForwardAgent=yes'
|
||||||
```
|
```
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
# stack-orchestrator-setup
|
# stack-orchestrator-setup
|
||||||
|
|
||||||
## Setup Ansible
|
## Prerequisites
|
||||||
|
|
||||||
To get started, follow the [installation](../README.md#installation) guide to setup ansible on your machine.
|
- Setup Ansible: To get started, follow the [installation](../README.md#installation) guide to setup ansible on your machine.
|
||||||
|
|
||||||
|
- Setup user: Follow steps from [Setup a user](../user-setup/README.md#setup-a-user) to setup a new user with passwordless sudo
|
||||||
|
|
||||||
## Setup Stack Orchestrator
|
## Setup Stack Orchestrator
|
||||||
|
|
||||||
@ -10,18 +12,6 @@ This playbook will install Docker and Stack Orchestrator (laconic-so) on the mac
|
|||||||
|
|
||||||
Run the following commands in the [`stack-orchestrator-setup`](./) directory.
|
Run the following commands in the [`stack-orchestrator-setup`](./) directory.
|
||||||
|
|
||||||
### On Local Host
|
|
||||||
|
|
||||||
To setup stack orchestrator and docker 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:
|
- Create a new `hosts.ini` file:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@ -55,7 +45,7 @@ To run the playbook on a remote host:
|
|||||||
# }
|
# }
|
||||||
```
|
```
|
||||||
|
|
||||||
- Execute the `setup-laconic-so.yml` Ansible playbook for setting up stack orchestrator and docker on a remote machine:
|
- Execute the `setup-laconic-so.yml` Ansible playbook for setting up stack orchestrator and docker on the target machine:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
LANG=en_US.utf8 ansible-playbook setup-laconic-so.yml -i hosts.ini --extra-vars='{ "target_host": "deployment_host"}' --user $USER -kK
|
LANG=en_US.utf8 ansible-playbook setup-laconic-so.yml -i hosts.ini --extra-vars='{ "target_host": "deployment_host"}' --user $USER -kK
|
||||||
|
Loading…
Reference in New Issue
Block a user