Readme.md 2.79 KB
Newer Older
Dmitry Volodin's avatar
Dmitry Volodin committed
1
2
3
# NOC Tower
NOC Tower is the tool for deployment and maintaining multiple
NOC (http://nocproject.org/) installations.
Aleksey Shirokih's avatar
Aleksey Shirokih committed
4

Aleksey Shirokih's avatar
Aleksey Shirokih committed
5
[![build status](https://code.getnoc.com/noc/tower/badges/master/build.svg)](https://code.getnoc.com/noc/tower/commits/master)
Dmitry Volodin's avatar
Dmitry Volodin committed
6

EKbfh's avatar
EKbfh committed
7
8
9
10
11
12
## 100% Supported OSes for NOC
- Debian 9
- Debian 10
- Ubuntu 16 LTS
- Ubuntu 18 LTS
- Centos 7
EKbfh's avatar
EKbfh committed
13
- RHEL 7
EKbfh's avatar
EKbfh committed
14
15

## 90% Supported OSes for NOC
EKbfh's avatar
EKbfh committed
16
- FreeBSD 12
EKbfh's avatar
EKbfh committed
17
18
- Oracle Linux 7

Aleksey Shirokih's avatar
Aleksey Shirokih committed
19
## Install 
Aleksey Shirokih's avatar
Fix doc    
Aleksey Shirokih committed
20

Aleksey Shirokih's avatar
Aleksey Shirokih committed
21
The easiest method of installation and update is to use docker and docker-compose.yml 
Aleksey Shirokih's avatar
Fix doc    
Aleksey Shirokih committed
22

Aleksey Shirokih's avatar
Aleksey Shirokih committed
23
### Docker install
24

Aleksey Shirokih's avatar
Aleksey Shirokih committed
25
If tower and node does not have direct access to the internet [setup proxy](docs/proxy.md)
Aleksey Shirokih's avatar
Aleksey Shirokih committed
26

27
#### Install docker daemon
Aleksey Shirokih's avatar
Aleksey Shirokih committed
28
29
```
curl https://get.docker.com | sudo sh 
EKbfh's avatar
EKbfh committed
30
31
systemctl start docker
systemctl enable docker
Aleksey Shirokih's avatar
Aleksey Shirokih committed
32
```
33

34
#### Install docker compose 
35
```
EKbfh's avatar
EKbfh committed
36
sudo curl -L "https://github.com/docker/compose/releases/download/1.25.5/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
37
sudo chmod +x /usr/local/bin/docker-compose
EKbfh's avatar
EKbfh committed
38
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
Aleksey Shirokih's avatar
Aleksey Shirokih committed
39
mkdir /etc/docker-compose/tower -p
Dmitry Volodin's avatar
Dmitry Volodin committed
40
41
```

Aleksey Shirokih's avatar
Aleksey Shirokih committed
42
43
### Setup tower 
Place `docker-compose.yml` from project root to `/etc/docker-compose/tower`
44
```
Aleksey Shirokih's avatar
Aleksey Shirokih committed
45
curl https://code.getnoc.com/noc/tower/raw/master/docker-compose.yml > /etc/docker-compose/tower/docker-compose.yml
46
cd /etc/docker-compose/tower
Aleksey Shirokih's avatar
Aleksey Shirokih committed
47
docker-compose up -d 
48
```
Aleksey Shirokih's avatar
Aleksey Shirokih committed
49
That it. 
Dmitry Volodin's avatar
Dmitry Volodin committed
50

51
<details>
Aleksey Shirokih's avatar
Aleksey Shirokih committed
52
<summary>Also you can choose the long way of manual installation without docker.</summary>
53
54

<ul dir="auto">
Aleksey Shirokih's avatar
Aleksey Shirokih committed
55
56
57
58
59
<li><a href="docs/Debian.md">Debian</a></li>
<li><a href="docs/CentOS.md">Centos</a></li>
<li><a href="docs/Ubuntu.md">Ubuntu</a></li>
<li><a href="docs/RHEL.md">Red Hat</a></li>
<li><a href="docs/FreeBSD.md">FreeBSD</a></li>
60
61
</ul>
</details>
Dmitry Lukhtionov's avatar
Dmitry Lukhtionov committed
62

Dmitry Volodin's avatar
Dmitry Volodin committed
63

Aleksey Shirokih's avatar
Aleksey Shirokih committed
64
65
66
## Prepare nodes
On each node 
* double check that python2.7 is installed on nodes
EKbfh's avatar
EKbfh committed
67
68
* create ansible user (*ansible* by default) and define ansible user's password, you'll need it later.
```
EKbfh's avatar
EKbfh committed
69
useradd -d /home/ansible -s /bin/bash -m ansible
EKbfh's avatar
EKbfh committed
70
71
passwd ansible
``` 
EKbfh's avatar
EKbfh committed
72
* grant it passwordless `sudo` privileges(`ansible  ALL=(ALL) NOPASSWD:ALL` in /etc/sudoers) and copy Tower's public ssh key (*/opt/tower/var/tower/data/deploy_keys/id_rsa.pub*) to *ansible's*
Dmitry Lukhtionov's avatar
Dmitry Lukhtionov committed
73

74
```
Aleksey Shirokih's avatar
Aleksey Shirokih committed
75
/opt/tower# docker-compose exec tower ssh-copy-id  -f -i /opt/tower/var/tower/data/deploy_keys/id_rsa.pub ansible@192.168.1.88
76
```
EKbfh's avatar
EKbfh committed
77
where `192.168.1.88` is the node's IP address. Enter ansible's password, that you already defined somewhere above.
Dmitry Volodin's avatar
Dmitry Volodin committed
78

79
## Deploying
80

Aleksey Shirokih's avatar
Aleksey Shirokih committed
81
 - Enter noc control tower.
Dmitry Volodin's avatar
Dmitry Volodin committed
82
83
84
85
   Open http://<IP>:8888/ in your browser. Login as admin/admin

 Do not forget to change tower's admin password
 (Upper right menu > Change Password)
86

Aleksey Shirokih's avatar
Aleksey Shirokih committed
87
## Advanced topics 
88

Aleksey Shirokih's avatar
Aleksey Shirokih committed
89
90
* [Quick docker-compose notes](docs/docker-compose.md)
* [Environment variables](docs/env.md)
Aleksey Shirokih's avatar
Aleksey Shirokih committed
91
92
* [Writing own roles](docs/roles.md)
* [Migrating tower to docker](docs/migrate_dc.md)
93
* [Release policy](docs/versioning.md)