Readme.md 2.39 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

Aleksey Shirokih's avatar
Aleksey Shirokih committed
7
## Install 
Aleksey Shirokih's avatar
Fix doc    
Aleksey Shirokih committed
8

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

Aleksey Shirokih's avatar
Aleksey Shirokih committed
11
### Docker install
12

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


16
17
18
#### Install python-pip 
<details>
<summary>CentOS/RHEL </summary>
19

20
<pre><code>
21
22
yum install python-setuptools
easy_install pip
23
24
</code></pre>
</details>
25

26
27
<details>
<summary>Debian/Ubuntu</summary>
28

29
30
31
32
33
34
35
<pre><code>
apt update
apt install --no-install-recommends python-pip curl
</code></pre>
</details>

#### Install docker daemon
Aleksey Shirokih's avatar
Aleksey Shirokih committed
36
37
38
39
```
curl https://get.docker.com | sudo sh 
systemctl start docker 
```
40

41
#### Install docker compose 
42
```
Aleksey Shirokih's avatar
Aleksey Shirokih committed
43
44
pip install docker-compose
mkdir /etc/docker-compose/tower -p
Dmitry Volodin's avatar
Dmitry Volodin committed
45
46
```

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

56
<details>
Aleksey Shirokih's avatar
Aleksey Shirokih committed
57
<summary>Also you can choose the long way of manual installation without docker.</summary>
58
59

<ul dir="auto">
Aleksey Shirokih's avatar
Aleksey Shirokih committed
60
61
62
63
64
<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>
65
66
</ul>
</details>
Dmitry Lukhtionov's avatar
Dmitry Lukhtionov committed
67

Dmitry Volodin's avatar
Dmitry Volodin committed
68

Aleksey Shirokih's avatar
Aleksey Shirokih committed
69
70
71
72
73
## Prepare nodes
On each node 
* double check that python2.7 is installed on nodes
* create ansible user (*ansible* by default),
* grant it passwordless `sudo` privileges 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
74

75
```
Aleksey Shirokih's avatar
Aleksey Shirokih committed
76
/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
77
```
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)