**This is an old revision of the document!**
studio | |
---|---|
name | Digitallabor Dortmund |
location | Dortmund |
live | ✓ |
preproduction | ja, mit Absprache |
remote_speakers | yes |
contacts | Katti, Thoto |
katti@das-labor.org, mythozz@das-labor.org | |
full_remote_operation | nein |
plz | 44137 |
geo | |
engelsystem_usernames | Katti |
Ansible
c3voc - configuration management
git clone git@mng.ber.c3voc.de:cm vim README.md
Public version of this repository: https://github.com/voc/cm/
README.md
Installation
S
ee https://docs.ansible.com/ansible/intro_installation.html for instructions
Usage
Syntax validation.
ansible-playbook -i event -l mixers site.yml --syntax-check
Basic ansible
call to deploy new config to a specific host.
./ansible-playbook-keepass -u root -i event -l 192.168.122.1 site.yml
Basic ansible
call to deploy new config to a set of hosts on an event.
./ansible-playbook-keepass -u voc --sudo -i event -l saal1 site.yml
Also have a look at the 'Usefull combinations' section of this page.
Keepass Password
In case you need to do a lot of playbook runs you can also set the password using the following although it is not recommended.
export KEEPASS_PW='…' ./ansible-playbook-keepass … site.yml
Host notes
router.lan.c3voc.de
What you need:
- install plain debian
- setting hostname to
router.lan.c3voc.de
- make sure you have two network interfaces configured with names
pbl
(public) andint
(internal) - run ansible to deploy config
monitoring.lan.c3voc.de
You have to name the monitoring host monitoring.lan.c3voc.de
. After deployment, you have to run checkmk -I && checkmk -O
inventory each host.
TODO
Have a look into TODO
file.
Docs
ansible-doc -l
lists all available modulesansible-doc $module
opens a very helpful knowledge page for a given module
Tags
Overview
Tag | Result |
---|---|
config | Only run configuration tasks like changing config files and reload daemon. |
install | Run all needed tasks which needs to be run on a new and fresh installation. |
deploy_website | Deploy (git pull) streaming website and flush fcgi cache. |
nginx | Run all nginx tasks. |
icecast | Run all icecast tasks. |
haproxy | Run all haproxy tasks. |
ssh(d) | Run all sshd tasks. |
user | Manage user. |
encodermode | Change from sd-dvswitch to hd-direct or to hd-voctomix |
voctomix | Updates/regenerates all voctomix related files on the cube |
checkout or pull | Get update subversion or git repository versions. |
Useful combinations
- Change
nginx
config on all relays:--tags nginx,config
- Deploy only streaming website:
--tags deploy_website
- e.g. ./ansible-playbook-keepass –tags deploy_website -i event loadbalancers.yml
- Deploy encoder setting for a conference
- edit groupvars/all and groupvars/saal*
- <code>./ansible-playbook-keepass -i event -u voc –become –become-method=sudo –limit encoder1.lan.c3voc.de –tags encodermode site.yml</code>
- or <code>./ansible-playbook-keepass -i event -u voc –become –become-method=sudo –limit encoder1.lan.c3voc.de –tags voctomix site.yml</code>
- or <code>./ansible-playbook-keepass -i event -u voc –become –become-method=sudo -l saal5 –tags voctomix </code>
- Debug without reruning working tasks
- <code>KEEPASS=“${KEEPASS}” KEEPASSPW=“${KEEPASSPW}” python2
which ansible-playbook
-i event -u voc –become –become-method=sudo -l saal5 –tags voctomix –start-at-task=“encoder : create recording script”</code>
Variables in roles
Global usage
Variable | Options | Usage |
---|---|---|
Event | ||
event.acronym | String | |
event.name | String | |
event.slogen | String | |
event.formats.hd | yes or no | |
event.formats.sd | yes or no | |
users | Array<Hash> | Group of users described as Array with hashes. Each user hash has to be defined with name and state keys. state could be present or absent . Default definition is in groupvars/all option to define number of nginx worker. Default: 2
|
nginxworkerconnections | Fixnum |