Adding a geard element
geard is a python implementation of the gearman broker. The intention is to use it to broker tripleo ci jobs. Change-Id: Iec1889edee7641449cda7e0a8770062c564c3d97
This commit is contained in:
parent
057e0622b1
commit
e5ce3bcedf
4
elements/geard/README.md
Normal file
4
elements/geard/README.md
Normal file
@ -0,0 +1,4 @@
|
||||
Element to install gear and run geard
|
||||
|
||||
geard is a python implementation of the gearman protocol server
|
||||
https://pypi.python.org/pypi/gear
|
2
elements/geard/element-deps
Normal file
2
elements/geard/element-deps
Normal file
@ -0,0 +1,2 @@
|
||||
os-svc-install
|
||||
os-refresh-config
|
12
elements/geard/install.d/44-geard
Executable file
12
elements/geard/install.d/44-geard
Executable file
@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
set -eux
|
||||
|
||||
install-packages python-virtualenv
|
||||
|
||||
mkdir -p /opt/stack/venvs
|
||||
virtualenv /opt/stack/venvs/gear
|
||||
|
||||
/opt/stack/venvs/gear/bin/pip install gear
|
||||
|
||||
useradd gear
|
||||
os-svc-daemon -n geard -u gear -c geard -- -d
|
30
elements/geard/os-refresh-config/pre-configure.d/97-gearman-iptables
Executable file
30
elements/geard/os-refresh-config/pre-configure.d/97-gearman-iptables
Executable file
@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
set -eu
|
||||
|
||||
OK=/opt/stack/gearman-iptables.ok
|
||||
|
||||
if [ -e $OK ] ; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
DISTRO=`lsb_release -si` || true
|
||||
|
||||
if [[ "Fedora" = $DISTRO ]]; then
|
||||
|
||||
# Check if the iptables service is active
|
||||
if systemctl is-active iptables.service ; then
|
||||
IPT_FILE=/etc/sysconfig/iptables
|
||||
if [ -f $IPT_FILE ]; then
|
||||
iptables-restore < $IPT_FILE
|
||||
fi
|
||||
|
||||
# Gearman server
|
||||
iptables -I INPUT -p tcp --dport 4730 -j ACCEPT
|
||||
|
||||
iptables-save > $IPT_FILE
|
||||
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
touch $OK
|
Loading…
Reference in New Issue
Block a user