Commit 3a627101 authored by e_zombie's avatar e_zombie
Browse files

* add doc for deploy from docker shell

parent 92b177c0
Pipeline #19986 passed with stages
in 10 minutes and 5 seconds
......@@ -7,11 +7,6 @@ $ docker-compose rm -v # remove stopped containers and volume
$ docker-compose ps # see list of running containers
```
# Enter tower shell
```
$ docker-compose exec tower sh
```
# Show current version
```
......@@ -30,3 +25,60 @@ $ docker-compose logs tower # all logs
$ docker-compose logs -f tower # see all and follow new logs
$ docker-compose logs -f --tail=10 tower # show last 10 and follow. most useful one
```
# Enter tower shell
```
$ docker-compose exec tower sh
```
# Start deploy from shell
```
ansible-playbook -i bin/tower-inv var/tower/playbooks/$NOC_ENV/deploy.yml -f 50
--diff -v
```
# Use --tags for control deploy
~~~
ansible-playbook -i bin/tower-inv var/tower/playbooks/$NOC_ENV/site.yml -f 50
--diff --tags=tag1,tag2,tag3 --skip-tags=skiptag1,skiptag2,skiptag3
~~~
If the system is installed and you only need to update the components then
use deploy.yml instead of site.yml
~~~
ansible-playbook -i bin/tower-inv var/tower/playbooks/$NOC_ENV/deploy.yml -f 50
--diff --tags=tag1,tag2,tag3 --skip-tags=skiptag1,skiptag2,skiptag3
~~~
Use *--list-tags* to get all tags
Tags (tags that are not executed):
* get_source - install the code;
if custom is installed, it will also be installed
* get_source (custom) - install the code,
if custom is installed it will NOT install
* config - update configuration files
* coll_sync - download and update collection
* migrate - run migrate django and CH
* requirements - update noc requirements components
* (restart,soft_restart) - services not rebooted after deploy
# Examples
~~~
ansible-playbook -i bin/tower-inv var/tower/playbooks/$NOC_ENV/deploy.yml -f 50
--diff --tags=get_source --skip-tags=restart,soft_restart,custom -v
~~~
# Run scripts on nodes
```
root@TOWER:/opt/tower# ansible-console -i /opt/tower/bin/tower-inv -s
Welcome to the ansible console.
Type help or ? to list commands.
root@all (49)[f:50]# shell uptime
node1 | CHANGED | rc=0 >>
21:47:37 up 580 days, 23:49, 0 users, load average: 0.75, 1.54, 1.95
.....
```
\ 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