Skip to content

Commit 700e298

Browse files
committed
update ansible readme; fixes #117
1 parent 3187c49 commit 700e298

File tree

1 file changed

+38
-37
lines changed

1 file changed

+38
-37
lines changed

deploy/ansible/README.md

Lines changed: 38 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
Copyright 2020 The KNIX Authors
2+
Copyright 2020-2021 The KNIX Authors
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
@@ -24,61 +24,62 @@ Tested on the following operating systems on the target machines:
2424

2525
## Prerequisites: on host machine
2626

27-
1. Install ansible on host machine
28-
29-
<https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html>
30-
31-
2. Install dependencies required by ansible
27+
1. Install dependencies required by ansible
3228

3329
```bash
3430
# for python2
3531
sudo pip install netaddr
36-
```
37-
or:
38-
39-
```bash
4032
# for python3
4133
sudo pip3 install netaddr
34+
# OR
35+
sudo apt install python-netaddr
4236
```
37+
2. Install ansible on host machine
38+
39+
<https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html>
4340

44-
## Prerequisites: on target machines
4541

46-
1. You can ssh into the target machines/VMs without a password. If not then run (on host machine):
42+
3. You should be able to ssh into the target machines/VMs without a password. If not then run (on host machine):
4743

4844
```bash
45+
# if not installed yet
46+
sudo apt-get install ssh
4947
ssh-keygen
48+
# you must ensure the target machine has ssh server installed already (see below)
5049
ssh-copy-id -i ~/.ssh/id_rsa your-username@your-target-hostname
5150
```
5251

53-
2. The login user (in step 1) on the target machines has been added to the sudoer group
54-
55-
3. Appropriate proxies (/etc/profile, /etc/bash.bashrc, and /etc/apt/apt.conf) are set on target machines
52+
## Prerequisites: on target machines
5653

57-
4. `python3`, `python3-dev`, `python3-pip` are installed on each of the target machines
54+
1. Ensure the ssh server is installed
5855

5956
```bash
60-
sudo apt-get update
61-
sudo apt-get install python3 python3-dev python3-pip
57+
sudo apt-get install ssh
6258
```
6359

64-
5. docker-ce is installed on target machines
60+
2. The login user (in step 1) on the target machines should be added to the sudoer group
6561

66-
* Install docker-ce:
67-
<https://docs.docker.com/install/linux/docker-ce/ubuntu/>
68-
<https://docs.docker.com/install/linux/docker-ce/debian/>
62+
3. Appropriate proxies (/etc/profile, /etc/bash.bashrc, and /etc/apt/apt.conf) should be set on target machines
6963

70-
* Enable sudo-less access to docker commands - add remote user to the docker group
64+
4. Appropriate packages should be installed on target machines:
7165

72-
```bash
73-
sudo usermod -a -G docker your-username
74-
#newgrp docker (if you don't want to log out and in to activate the change to group)
75-
```
76-
77-
* Set docker proxies by updating `/etc/systemd/system/docker.service.d/http-proxy.conf`
66+
```bash
67+
sudo apt-get update
68+
sudo apt-get install python3 python3-dev python3-pip
69+
# install docker-ce
70+
#<https://docs.docker.com/install/linux/docker-ce/ubuntu/>
71+
#<https://docs.docker.com/install/linux/docker-ce/debian/>
72+
# activate sudo-less access to docker commands
73+
sudo usermod -a -G docker your-username
74+
#if you don't want to log out and in to activate the change to group
75+
newgrp docker
76+
# set docker proxies by updating `/etc/systemd/system/docker.service.d/http-proxy.conf`
77+
sudo apt-get install rustc
78+
```
7879

79-
6. Hostname of the target machine resolves to the correct IP.
80+
5. Ensure that the hostname of the target machine resolves to the correct IP.
8081

81-
7. Remove any old installation of KNIX
82+
6. Remove any old installation of KNIX
8283

8384
```bash
8485
cd /opt/knix
@@ -88,9 +89,6 @@ or:
8889
sudo rm -rf knix
8990
```
9091

91-
*Note: If you find something wrong or missing, please consider opening an issue on [GitHub](https://github.com/knix-microfunctions/knix) and/or letting us know in our [Slack workspace](https://knix.slack.com). Thank you!*
92-
93-
9492
## Installation Steps (to be executed on host machine)
9593

9694
1. Create an `ansible.cfg` file
@@ -119,8 +117,8 @@ or:
119117
# For a single remote host installation, the hostname should be added to all groups.
120118
121119
# For a cluster of hosts (preferably 3 or more), all host names must be added to [riak] group.
122-
# Hosts with a NVIDIA GPU should be added to group [gpu_workstations] so that they can be used by KNIX workflow deployments.
123-
# Only one host name (referred to as the <nginx-hostname>) should be added for other groups [elasticsearch], [management], [triggers_frontend], and [nginx].
120+
# [nginx] and [elasticsearch] group should contain a single host.
121+
# At least one host should be in [management] and [triggers_frontend] group.
124122
```
125123

126124
3. Update `settings.json`
@@ -142,5 +140,8 @@ or:
142140
```bash
143141
make
144142
```
143+
6. Check *.log files for any errors
144+
145+
7. After installation, open a browser and access `http://<nginx-hostname>:<nginx_http_listen_port>/`
145146
146-
6. After installation, open a browser and access `http://<nginx-hostname>:<nginx_http_listen_port>/`
147+
*Note: If you find something wrong or missing, please consider opening an issue on [GitHub](https://github.com/knix-microfunctions/knix) and/or letting us know in our [Slack workspace](https://knix.slack.com). Thank you!*

0 commit comments

Comments
 (0)