Readme.md 2.48 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
```
curl https://get.docker.com | sudo sh 
EKbfh's avatar
EKbfh committed
38
39
systemctl start docker
systemctl enable docker
Aleksey Shirokih's avatar
Aleksey Shirokih committed
40
```
41

42
#### Install docker compose 
43
```
Aleksey Shirokih's avatar
Aleksey Shirokih committed
44
pip install docker-compose
EKbfh's avatar
EKbfh committed
45
# If u have an error about setuptools: pip install --upgrade setuptools
Aleksey Shirokih's avatar
Aleksey Shirokih committed
46
mkdir /etc/docker-compose/tower -p
Dmitry Volodin's avatar
Dmitry Volodin committed
47
48
```

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

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

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

Dmitry Volodin's avatar
Dmitry Volodin committed
70

Aleksey Shirokih's avatar
Aleksey Shirokih committed
71
72
73
74
75
## 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
76

77
```
Aleksey Shirokih's avatar
Aleksey Shirokih committed
78
/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
79
```
Dmitry Volodin's avatar
Dmitry Volodin committed
80

81
## Deploying
82

Aleksey Shirokih's avatar
Aleksey Shirokih committed
83
 - Enter noc control tower.
Dmitry Volodin's avatar
Dmitry Volodin committed
84
85
86
87
   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)
88

Aleksey Shirokih's avatar
Aleksey Shirokih committed
89
## Advanced topics 
90

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