Install mod-ceilometer in Alignak
Change-Id: I72b07016244827a0dee510740dd89ea130917c65
This commit is contained in:
parent
c6b4694ed8
commit
fa2b06e398
10
Dockerfile
10
Dockerfile
@ -37,13 +37,15 @@ ENV PBR_VERSION=PROD
|
|||||||
# We are using develop so that the code can be mounted when in DEV.
|
# We are using develop so that the code can be mounted when in DEV.
|
||||||
RUN cd /opt/surveil && python setup.py develop
|
RUN cd /opt/surveil && python setup.py develop
|
||||||
|
|
||||||
#Set to 'surveil' or 'keystone'
|
# Set to 'surveil' or 'keystone'
|
||||||
ENV SURVEIL_AUTH_BACKEND=surveil
|
ENV SURVEIL_AUTH_BACKEND=surveil
|
||||||
ENV SURVEIL_KEYSTONE_HOST=198.72.123.131
|
ENV SURVEIL_KEYSTONE_HOST=198.72.123.131
|
||||||
ENV SURVEIL_KEYSTONE_AUTH_PROTOCOL=http
|
ENV SURVEIL_KEYSTONE_AUTH_PROTOCOL=http
|
||||||
ENV SURVEIL_KEYSTONE_ADMIN_USER=admin
|
|
||||||
ENV SURVEIL_KEYSTONE_ADMIN_PASSWORD=password
|
# OpenStack Authentication credentials. Used for Keystone authentication
|
||||||
ENV SURVEIL_KEYSTONE_ADMIN_TENANT_NAME=admin
|
ENV SURVEIL_OS_USERNAME=admin
|
||||||
|
ENV SURVEIL_OS_PASSWORD=password
|
||||||
|
ENV SURVEIL_OS_TENANT_NAME=admin
|
||||||
|
|
||||||
CMD cd /opt/surveil && \
|
CMD cd /opt/surveil && \
|
||||||
./setup.sh && \
|
./setup.sh && \
|
||||||
|
@ -12,9 +12,9 @@ surveil:
|
|||||||
#SURVEIL_AUTH_BACKEND: "keystone"
|
#SURVEIL_AUTH_BACKEND: "keystone"
|
||||||
#SURVEIL_KEYSTONE_HOST: "198.72.123.131"
|
#SURVEIL_KEYSTONE_HOST: "198.72.123.131"
|
||||||
#SURVEIL_KEYSTONE_AUTH_PROTOCOL: "http"
|
#SURVEIL_KEYSTONE_AUTH_PROTOCOL: "http"
|
||||||
#SURVEIL_KEYSTONE_ADMIN_USER: "admin"
|
#SURVEIL_OS_USERNAME: "admin"
|
||||||
#SURVEIL_KEYSTONE_ADMIN_PASSWORD: "password"
|
#SURVEIL_OS_PASSWORD: "password"
|
||||||
#SURVEIL_KEYSTONE_ADMIN_TENANT_NAME: "admin"
|
#SURVEIL_OS_TENANT_NAME: "admin"
|
||||||
|
|
||||||
alignak:
|
alignak:
|
||||||
#build: tools/docker/alignak_container/
|
#build: tools/docker/alignak_container/
|
||||||
|
@ -20,6 +20,11 @@ alignak:
|
|||||||
- influxdb
|
- influxdb
|
||||||
ports:
|
ports:
|
||||||
- "7767:7767"
|
- "7767:7767"
|
||||||
|
environment:
|
||||||
|
SURVEIL_OS_AUTH_URL: "http://keystone:5000/v2.0"
|
||||||
|
SURVEIL_OS_USERNAME: "admin"
|
||||||
|
SURVEIL_OS_PASSWORD: "password"
|
||||||
|
SURVEIL_OS_TENANT_NAME: "admin"
|
||||||
|
|
||||||
mongo:
|
mongo:
|
||||||
image: mongo
|
image: mongo
|
||||||
|
@ -63,6 +63,13 @@ RUN cd /tmp && \
|
|||||||
mv /tmp/mod-mongo-live-config-*/mod_mongo_live_config /var/lib/alignak/modules/mod_mongo_live_config && \
|
mv /tmp/mod-mongo-live-config-*/mod_mongo_live_config /var/lib/alignak/modules/mod_mongo_live_config && \
|
||||||
rm -rfv /tmp/mod-mongo-live-config*
|
rm -rfv /tmp/mod-mongo-live-config*
|
||||||
|
|
||||||
|
# mod-ceilometer
|
||||||
|
RUN cd /tmp && \
|
||||||
|
wget -O mod-ceilometer.tar.gz https://github.com/savoirfairelinux/mod-ceilometer/archive/062c546b12f6a57b3f9810955e1aee6b5b92e38f.tar.gz && \
|
||||||
|
tar -zxvf mod-ceilometer.tar.gz && \
|
||||||
|
mv /tmp/mod-ceilometer-*/module /var/lib/alignak/modules/mod-ceilometer && \
|
||||||
|
rm -rfv /tmp/mod-ceilometer*
|
||||||
|
|
||||||
## plugins
|
## plugins
|
||||||
RUN apt-get update && apt-get install -y nagios-plugins nagios-nrpe-plugin
|
RUN apt-get update && apt-get install -y nagios-plugins nagios-nrpe-plugin
|
||||||
# run permissions for user `alignak`
|
# run permissions for user `alignak`
|
||||||
@ -97,6 +104,7 @@ RUN sh -c 'gpg --recv-keys --keyserver keyserver.ubuntu.com 2320E8F8 && gpg --e
|
|||||||
apt-get install -y --force-yes monitoring-packs-sfl-generic-host monitoring-packs-sfl-linux-system-nrpe
|
apt-get install -y --force-yes monitoring-packs-sfl-generic-host monitoring-packs-sfl-linux-system-nrpe
|
||||||
|
|
||||||
## configuration
|
## configuration
|
||||||
|
ADD setup.sh /setup.sh
|
||||||
RUN rm -rf /etc/alignak
|
RUN rm -rf /etc/alignak
|
||||||
ADD etc/alignak /etc/alignak
|
ADD etc/alignak /etc/alignak
|
||||||
RUN chown -R root:alignak /etc/alignak
|
RUN chown -R root:alignak /etc/alignak
|
||||||
@ -110,4 +118,10 @@ EXPOSE 7767
|
|||||||
# ws-arbiter
|
# ws-arbiter
|
||||||
EXPOSE 7760
|
EXPOSE 7760
|
||||||
|
|
||||||
CMD /usr/bin/supervisord
|
# OpenStack Authentication credentials. Used for sending data to Ceilometer
|
||||||
|
ENV SURVEIL_OS_AUTH_URL=http://keystone:5000/v2.0
|
||||||
|
ENV SURVEIL_OS_USERNAME=admin
|
||||||
|
ENV SURVEIL_OS_PASSWORD=password
|
||||||
|
ENV SURVEIL_OS_TENANT_NAME=admin
|
||||||
|
|
||||||
|
CMD ./setup.sh && /usr/bin/supervisord
|
||||||
|
@ -37,7 +37,7 @@ define broker {
|
|||||||
# - graphite = Use a Graphite time series DB for perfdata
|
# - graphite = Use a Graphite time series DB for perfdata
|
||||||
# - webui = Shinken Web interface
|
# - webui = Shinken Web interface
|
||||||
# - glpidb = Save data in GLPI MySQL database
|
# - glpidb = Save data in GLPI MySQL database
|
||||||
modules WebUI,mod-influxdb
|
modules WebUI,mod-influxdb,mod-ceilometer
|
||||||
|
|
||||||
# Enable https or not
|
# Enable https or not
|
||||||
use_ssl 0
|
use_ssl 0
|
||||||
|
@ -0,0 +1,11 @@
|
|||||||
|
## Module: mod-ceilometer
|
||||||
|
## Loaded by: Broker
|
||||||
|
define module {
|
||||||
|
module_name mod-ceilometer
|
||||||
|
module_type ceilometer_perfdata
|
||||||
|
auth_url <- SURVEIL_OS_AUTH_URL ->
|
||||||
|
username <- SURVEIL_OS_USERNAME ->
|
||||||
|
password <- SURVEIL_OS_PASSWORD ->
|
||||||
|
tenant_name <- SURVEIL_OS_TENANT_NAME ->
|
||||||
|
#tick_limit 300 ; Default value 300
|
||||||
|
}
|
16
tools/docker/alignak_container/setup.sh
Executable file
16
tools/docker/alignak_container/setup.sh
Executable file
@ -0,0 +1,16 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
function setup_alignak {
|
||||||
|
echo -e "Setting up mod-ceilometer"
|
||||||
|
sed -i "s|<- SURVEIL_OS_AUTH_URL ->|${SURVEIL_OS_AUTH_URL}|" /etc/alignak/modules/ceilometer.cfg
|
||||||
|
sed -i "s|<- SURVEIL_OS_USERNAME ->|${SURVEIL_OS_USERNAME}|" /etc/alignak/modules/ceilometer.cfg
|
||||||
|
sed -i "s|<- SURVEIL_OS_PASSWORD ->|${SURVEIL_OS_PASSWORD}|" /etc/alignak/modules/ceilometer.cfg
|
||||||
|
sed -i "s|<- SURVEIL_OS_TENANT_NAME ->|${SURVEIL_OS_TENANT_NAME}|" /etc/alignak/modules/ceilometer.cfg
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ -f "/.setup_alignak" ]; then
|
||||||
|
echo "=> Alignak was already configured, skipping..."
|
||||||
|
else
|
||||||
|
setup_alignak && touch "/.setup_alignak"
|
||||||
|
echo -e "=> Done with Alignak configuration."
|
||||||
|
fi
|
@ -9,9 +9,9 @@ function setup_surveil_api {
|
|||||||
sed -i "s|pipeline =.*|pipeline = authtoken api-server|" /etc/surveil/api_paste.ini
|
sed -i "s|pipeline =.*|pipeline = authtoken api-server|" /etc/surveil/api_paste.ini
|
||||||
sed -i "s|auth_protocol=.*|auth_protocol=${SURVEIL_KEYSTONE_AUTH_PROTOCOL}|" /etc/surveil/api_paste.ini
|
sed -i "s|auth_protocol=.*|auth_protocol=${SURVEIL_KEYSTONE_AUTH_PROTOCOL}|" /etc/surveil/api_paste.ini
|
||||||
sed -i "s|auth_host=.*|auth_host=${SURVEIL_KEYSTONE_HOST}|" /etc/surveil/api_paste.ini
|
sed -i "s|auth_host=.*|auth_host=${SURVEIL_KEYSTONE_HOST}|" /etc/surveil/api_paste.ini
|
||||||
sed -i "s|admin_user=.*|admin_user=${SURVEIL_KEYSTONE_ADMIN_USER}|" /etc/surveil/api_paste.ini
|
sed -i "s|admin_user=.*|admin_user=${SURVEIL_OS_USERNAME}|" /etc/surveil/api_paste.ini
|
||||||
sed -i "s|admin_password=.*|admin_password=${SURVEIL_KEYSTONE_ADMIN_PASSWORD}|" /etc/surveil/api_paste.ini
|
sed -i "s|admin_password=.*|admin_password=${SURVEIL_OS_PASSWORD}|" /etc/surveil/api_paste.ini
|
||||||
sed -i "s|admin_tenant_name=.*|admin_tenant_name=${SURVEIL_KEYSTONE_ADMIN_TENANT_NAME}|" /etc/surveil/api_paste.ini
|
sed -i "s|admin_tenant_name=.*|admin_tenant_name=${SURVEIL_OS_TENANT_NAME}|" /etc/surveil/api_paste.ini
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user