Commit 857d52ef authored by Aleksey Shirokih's avatar Aleksey Shirokih
Browse files

Update docs

parent 81ceeddc
......@@ -4,106 +4,47 @@ NOC (http://nocproject.org/) installations.
[![build status](https://code.getnoc.com/noc/tower/badges/master/build.svg)](https://code.getnoc.com/noc/tower/commits/master)
## Preparation
### Debian based Linux
```
# apt-get install python-virtualenv libffi6 libffi-dev python-dev gcc libssl-dev
# groupadd tower
# useradd -d /home/tower -g tower -s /bin/bash -m tower
```
## Debian only
```
/opt/tower# apt-get install dbus git
/opt/tower# apt install --no-install-recommends git
```
### Rhel based Linux
```
# yum install python-virtualenv libffi libffi-devel python-devel gcc openssl-devel git libselinux-python
# groupadd tower
# useradd -d /home/tower -g tower -s /bin/bash -m tower
You have to check if 'SELINUX=disabled' in /etc/sysconfig/selinux and reboot system after changes
# firewall-cmd --add-port 8888/tcp --permanent
# firewall-cmd --reload
```
## Install
The easiest method of installation and update is to use docker and docker-compose.yml
### FreeBSD
### Docker install
```
# pkg install -y python2 libffi py27-pip py27-virtualenv py27-sqlite3 ca_root_nss git
# pw groupadd -n tower
# pw useradd -g tower -s /bin/csh -d /home/tower -n tower -m
curl https://get.docker.com | sudo sh
pip install docker-compose
mkdir /etc/docker-compose/tower -p
```
## Installation
Tower is installed into /opt/tower directory by default, though you
can use arbitrary directory (i.e. /usr/local/tower) as well.
Replace /opt/tower/ to directory of your choice
- Create Tower directory
```
# mkdir /opt/tower
# cd /opt/tower
```
- Create virtualenv
### Setup tower
Place `docker-compose.yml` from project root to `/etc/docker-compose/tower`
```
/opt/tower# virtualenv .
cd /etc/docker-compose/tower
docker-compose up -d
```
That it.
- Install Tower
Also you can choose the loong way of manual installation
* [Debian](docs/Debian.md)
* [Centos](docs/CentOS.md)
* [Ubuntu](docs/Ubuntu.md)
* [Red Hat](docs/RHEL.md)
* [FreeBSD](docs/FreeBSD.md)
```
/opt/tower# ./bin/pip install --upgrade pip
/opt/tower# ./bin/pip install https://cdn.getnoc.com/tower/noc-tower-latest.zip
/opt/tower# chown -R tower var/
```
- Generate Tower ssh keys
```
/opt/tower# su - tower -c "ssh-keygen -t rsa -b 4096"
```
## For single node installation only
Add user tower to sudo group.
* For example: `adduser tower sudo`
* Select Local installation type with local ip on Nodes screen.
* Run Tower
## 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*
```
/opt/tower# su - tower -c "cd /opt/tower && ./bin/tower-web"
/opt/tower# docker-compose exec tower ssh-copy-id -i /opt/tower/var/tower/data/deploy_keys/id_rsa.pub ansible@192.168.1.88
```
## Deploying
- Enter the magical mistery tower.
- Enter noc control tower.
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)
## Prepare nodes
On each node
* create ansible user (*ansible* by default),
* grant it passwordless `sudo` privileges and copy Tower's public ssh key (*/home/tower/.ssh/id_rsa.pub*) to *ansible's*
```
/opt/tower# su - tower -c "ssh-copy-id node_ip"
```
## RHEL Only
* For RHEL based systems check if "Defaults requiretty" is commented.
* Ensure python2.7 package installed
* Create new file on tower in /opt/tower/var/tower/playbooks/ENV_NAME/ansible/vars/local.yml with such lines
```
rhel_subscription_username: ""
rhel_subscription_password: ""
```
\ No newline at end of file
# Centos
First of all set `SELINUX=disabled` in `/etc/sysconfig/selinux` and reboot system after changes
Packages
```
# yum install python-virtualenv libffi libffi-devel python-devel gcc openssl-devel git libselinux-python
# groupadd tower
# useradd -d /home/tower -g tower -s /bin/bash -m tower
# firewall-cmd --add-port 8888/tcp --permanent
# firewall-cmd --reload
```
## Installation
Tower is installed into /opt/tower directory by default, though you
can use arbitrary directory (i.e. /usr/local/tower) as well.
Replace /opt/tower/ to directory of your choice
- Create Tower directory
```
# mkdir /opt/tower
# cd /opt/tower
```
- Create virtualenv
```
/opt/tower# virtualenv .
```
- Install Tower
```
/opt/tower# ./bin/pip install --upgrade pip
/opt/tower# ./bin/pip install https://cdn.getnoc.com/tower/noc-tower-latest.zip
/opt/tower# chown -R tower var/
```
- Generate Tower ssh keys
```
/opt/tower# su - tower -c "ssh-keygen -t rsa -b 4096"
```
## Deploying
- Enter noc control tower.
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)
## 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 (*/home/tower/.ssh/id_rsa.pub*) to *ansible's*
* check if sudoers contains line `#Defaults requiretty` commented.
```
/opt/tower# su - tower -c "ssh-copy-id -i /home/tower/.ssh/id_rsa.pub ansible@192.168.1.88"
```
\ No newline at end of file
# Debian
```
# apt-get install python-virtualenv libffi6 libffi-dev python-dev gcc libssl-dev
# groupadd tower
# useradd -d /home/tower -g tower -s /bin/bash -m tower
# /opt/tower# apt-get install dbus git
# /opt/tower# apt install --no-install-recommends git
```
## Installation
Tower is installed into /opt/tower directory by default, though you
can use arbitrary directory (i.e. /usr/local/tower) as well.
Replace /opt/tower/ to directory of your choice
- Create Tower directory
```
# mkdir /opt/tower
# cd /opt/tower
```
- Create virtualenv
```
/opt/tower# virtualenv .
```
- Install Tower
```
/opt/tower# ./bin/pip install --upgrade pip
/opt/tower# ./bin/pip install https://cdn.getnoc.com/tower/noc-tower-latest.zip
/opt/tower# chown -R tower var/
```
- Generate Tower ssh keys
```
/opt/tower# su - tower -c "ssh-keygen -t rsa -b 4096"
```
## Deploying
- Enter noc control tower.
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)
## 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 (*/home/tower/.ssh/id_rsa.pub*) to *ansible's*
```
/opt/tower# su - tower -c "ssh-copy-id -i /home/tower/.ssh/id_rsa.pub ansible@192.168.1.88"
```
\ No newline at end of file
### FreeBSD
```
# pkg install -y python2 libffi py27-pip py27-virtualenv py27-sqlite3 ca_root_nss git
# pw groupadd -n tower
# pw useradd -g tower -s /bin/csh -d /home/tower -n tower -m
```
## Installation
Tower is installed into /opt/tower directory by default, though you
can use arbitrary directory (i.e. /usr/local/tower) as well.
Replace /opt/tower/ to directory of your choice
- Create Tower directory
```
# mkdir /opt/tower
# cd /opt/tower
```
- Create virtualenv
```
/opt/tower# virtualenv .
```
- Install Tower
```
/opt/tower# ./bin/pip install --upgrade pip
/opt/tower# ./bin/pip install https://cdn.getnoc.com/tower/noc-tower-latest.zip
/opt/tower# chown -R tower var/
```
- Generate Tower ssh keys
```
/opt/tower# su - tower -c "ssh-keygen -t rsa -b 4096"
```
## Deploying
- Enter noc control tower.
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)
## 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 (*/home/tower/.ssh/id_rsa.pub*) to *ansible's*
```
/opt/tower# su - tower -c "ssh-copy-id -i /home/tower/.ssh/id_rsa.pub ansible@192.168.1.88"
```
\ No newline at end of file
### Rhel based Linux
```
# yum install python-virtualenv libffi libffi-devel python-devel gcc openssl-devel git libselinux-python
# groupadd tower
# useradd -d /home/tower -g tower -s /bin/bash -m tower
You have to check if 'SELINUX=disabled' in /etc/sysconfig/selinux and reboot system after changes
# firewall-cmd --add-port 8888/tcp --permanent
# firewall-cmd --reload
```
## Installation
Tower is installed into /opt/tower directory by default, though you
can use arbitrary directory (i.e. /usr/local/tower) as well.
Replace /opt/tower/ to directory of your choice
- Create Tower directory
```
# mkdir /opt/tower
# cd /opt/tower
```
- Create virtualenv
```
/opt/tower# virtualenv .
```
- Install Tower
```
/opt/tower# ./bin/pip install --upgrade pip
/opt/tower# ./bin/pip install https://cdn.getnoc.com/tower/noc-tower-latest.zip
/opt/tower# chown -R tower var/
```
- Generate Tower ssh keys
```
/opt/tower# su - tower -c "ssh-keygen -t rsa -b 4096"
```
## Deploying
- Enter the magical mistery tower.
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)
## Prepare nodes
On each node
* double check that python2.7 is installed on nodes
* create ansible user (*ansible* by default),
* check if sudoers contains line `#Defaults requiretty` commented.
* check if system is already registered and has valid license
* grant it passwordless `sudo` privileges and copy Tower's public ssh key (*/home/tower/.ssh/id_rsa.pub*) to *ansible's*
```
/opt/tower# su - tower -c "ssh-copy-id -i /home/tower/.ssh/id_rsa.pub ansible@192.168.1.88"
```
## Preparation
### Debian based Linux
```
# apt-get install python-virtualenv libffi6 libffi-dev python-dev gcc libssl-dev
# groupadd tower
# useradd -d /home/tower -g tower -s /bin/bash -m tower
```
## Debian only
```
/opt/tower# apt-get install dbus git
/opt/tower# apt install --no-install-recommends git
```
## Installation
Tower is installed into /opt/tower directory by default, though you
can use arbitrary directory (i.e. /usr/local/tower) as well.
Replace /opt/tower/ to directory of your choice
- Create Tower directory
```
# mkdir /opt/tower
# cd /opt/tower
```
- Create virtualenv
```
/opt/tower# virtualenv .
```
- Install Tower
```
/opt/tower# ./bin/pip install --upgrade pip
/opt/tower# ./bin/pip install https://cdn.getnoc.com/tower/noc-tower-latest.zip
/opt/tower# chown -R tower var/
```
- Generate Tower ssh keys
```
/opt/tower# su - tower -c "ssh-keygen -t rsa -b 4096"
```
## Deploying
- Enter the magical mistery tower.
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)
## Prepare nodes
On each node
* create ansible user (*ansible* by default),
* grant it passwordless `sudo` privileges and copy Tower's public ssh key (*/home/tower/.ssh/id_rsa.pub*) to *ansible's*
```
/opt/tower# su - tower -c "ssh-copy-id node_ip"
```
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment