Break up Turbo-Hipster configuration
Seeing as the power of Turbo-Hipster is in its pluggable design,
this change allows the configuration to be spit up allowing
each plug in to maintain it's own part of the configuration
including overwriting any default configuration.
There is a new configuration parameter 'conf_d', which is
mapped to a directory:
"conf_d": "/etc/turbo-hipster/conf.d"
worker_server.py grabs all files inside this directory and
attempts to load them. If it fails, the error is logged.
The motivating factor for this change for me, is that it allows
the deployment of turbo-hipster via puppet much simpler.
The base TH puppet class will create the config.json, whereas
there puppet TH plug in classes can pop extra configuration into
the conf_d directory.
Change-Id: Ied20b46d4caa642d130097f3fe019df9c0ec5851
8 files changed
tree: bb9cb0862b969ca944f17d8bdf02d6f26e5248f2
- .gitignore
- .gitreview
- .testr.conf
- LICENSE
- README.md
- datasets/
- doc/
- etc/
- requirements.txt
- setup.cfg
- setup.py
- test-requirements.txt
- tests/
- tools/
- tox.ini
- turbo_hipster/
README.md
turbo-hipster
A set of CI tools.
worker_server.py is a worker server that loads and runs task_plugins.
Each task_plugin is a zuul gearman worker that implements, handles, executes a job, uploads/post-processes the logs and sends back the results to zuul.
Plugins
gate_real_db_upgrade: Runs the db_sync migrations on each dataset available in the datasets subdir.
Installation
- boot a fresh Ubuntu image
- setup ssh authentication for your admin team
- apt-get update; apt-get dist-upgrade
- adduser th
- apt-get install vim git python-pip python-setuptools python-keystoneclient virtualenvwrapper python-eventlet python-numpy python-mysqldb python-git python-gitdb python-netaddr python-pkg-resources libxml2-dev libxml2-utils libxslt-dev git-review libxml2-dev libxml2-utils libxslt-dev libmysqlclient-dev pep8 postgresql-server-dev-9.1 python2.7-dev python-coverage python-netaddr
- pip install -U pip
- apt-get purge python-pip
- cd /home/th; git clone http://github.com/stackforge/turbo-hipster
- apply any patches you need
- python setup.py install
- cp turbo_hipster/task_plugins/gate_real_db_upgrade/*.sh /usr/local/lib/python2.7/dist-packages/turbo_hipster/task_plugins/gate_real_db_upgrade/
- cp -R etc/* /etc/
- mkdir /var/lib/turbo-hipster
- chown -R th.th /var/lib/turbo-hipster
- mkdir /var/log/turbo-hipster
- chown -R th.th /var/log/turbo-hipster
- install your chosen MySQL-like database engine (percona, maria, mysql)
- mysql -u root --password=$1 -e "create user 'nova'@'localhost' identified by 'tester';"
- mysql -u root --password=$1 -e "create user 'nova'@'172.16.0.2' identified by 'tester';"
- mysql -u root --password=$1 -e "grant all privileges on . to 'nova'@'localhost' with grant option;"
- mysql -u root --password=$1 -e "grant all privileges on . to 'nova'@'172.16.0.2' with grant option;"
- /etc/rc.local
- rsync the datasets from the master
- logrotate -f /etc/logrotate.conf
- chmod -R ugo+r /var/log/*
- chmod ugo+rx /var/log/mysql
- mkdir /var/cache/pip
- chmod -R ugo+rwx /var/cache/pip
- touch /var/log/mysql/slow-queries.log
- /etc/init.d/turbo-hipster start