Add Ceilometer service support
Implements: blueprint kube-ceilometer-container Change-Id: Ic9be6f2fb57641aa77f7f3a31481b166adad3f36
This commit is contained in:
parent
277f2448e8
commit
aed78804ef
7
docker/ceilometer/ceilometer-alarm/Dockerfile
Normal file
7
docker/ceilometer/ceilometer-alarm/Dockerfile
Normal file
@ -0,0 +1,7 @@
|
||||
FROM kollaglue/fedora-rdo-ceilometer-base
|
||||
MAINTAINER Kolla Project (https://launchpad.net/kolla)
|
||||
|
||||
RUN yum install -y openstack-ceilometer-alarm && yum clean all
|
||||
|
||||
ADD ./start.sh /start.sh
|
||||
CMD ["/start.sh"]
|
1
docker/ceilometer/ceilometer-alarm/build
Symbolic link
1
docker/ceilometer/ceilometer-alarm/build
Symbolic link
@ -0,0 +1 @@
|
||||
../../../tools/build-docker-image
|
10
docker/ceilometer/ceilometer-alarm/start.sh
Normal file
10
docker/ceilometer/ceilometer-alarm/start.sh
Normal file
@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
. /opt/kolla/kolla-common.sh
|
||||
. /opt/kolla/config-ceilometer.sh
|
||||
|
||||
|
||||
exec /usr/bin/ceilometer-alarm-evaluator &
|
||||
exec /usr/bin/ceilometer-alarm-notifier
|
9
docker/ceilometer/ceilometer-api/Dockerfile
Normal file
9
docker/ceilometer/ceilometer-api/Dockerfile
Normal file
@ -0,0 +1,9 @@
|
||||
FROM kollaglue/fedora-rdo-ceilometer-base
|
||||
MAINTAINER Kolla Project (https://launchpad.net/kolla)
|
||||
|
||||
RUN yum install -y openstack-ceilometer-api && yum clean all
|
||||
|
||||
EXPOSE 8777
|
||||
|
||||
ADD ./start.sh /start.sh
|
||||
CMD ["/start.sh"]
|
1
docker/ceilometer/ceilometer-api/build
Symbolic link
1
docker/ceilometer/ceilometer-api/build
Symbolic link
@ -0,0 +1 @@
|
||||
../../../tools/build-docker-image
|
46
docker/ceilometer/ceilometer-api/start.sh
Normal file
46
docker/ceilometer/ceilometer-api/start.sh
Normal file
@ -0,0 +1,46 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
. /opt/kolla/kolla-common.sh
|
||||
. /opt/kolla/config-ceilometer.sh
|
||||
|
||||
check_required_vars CEILOMETER_DB_USER CEILOMETER_DB_NAME KEYSTONE_AUTH_PROTOCOL CEILOMETER_KEYSTONE_USER CEILOMETER_ADMIN_PASSWORD ADMIN_TENANT_NAME METERING_SECRET CEILOMETER_API_SERVICE_HOST PUBLIC_IP
|
||||
|
||||
check_for_keystone
|
||||
check_for_db
|
||||
|
||||
#TODO(pkilambi): Add mongodb support
|
||||
|
||||
mysql -h ${MARIADB_SERVICE_HOST} -u root -p${DB_ROOT_PASSWORD} mysql <<EOF
|
||||
CREATE DATABASE IF NOT EXISTS ${CEILOMETER_DB_NAME} DEFAULT CHARACTER SET utf8;
|
||||
GRANT ALL PRIVILEGES ON ${CEILOMETER_DB_NAME}.* TO
|
||||
'${CEILOMETER_DB_USER}'@'%' IDENTIFIED BY '${CEILOMETER_DB_PASSWORD}'
|
||||
|
||||
EOF
|
||||
|
||||
|
||||
export SERVICE_TOKEN="${KEYSTONE_ADMIN_TOKEN}"
|
||||
export SERVICE_ENDPOINT="${KEYSTONE_AUTH_PROTOCOL}://${KEYSTONE_ADMIN_SERVICE_HOST}:${KEYSTONE_ADMIN_SERVICE_PORT}/v2.0"
|
||||
|
||||
|
||||
crux user-create -n ${CEILOMETER_KEYSTONE_USER} \
|
||||
-p ${CEILOMETER_ADMIN_PASSWORD} \
|
||||
-t ${ADMIN_TENANT_NAME} \
|
||||
-r admin
|
||||
|
||||
crux service-create -n ${CEILOMETER_KEYSTONE_USER} -t metering \
|
||||
-d "Ceilometer Telemetry Service"
|
||||
|
||||
crux endpoint-create i--remove-all -n ${CEILOMETER_KEYSTONE_USER} -t metering \
|
||||
-I "${KEYSTONE_AUTH_PROTOCOL}://${CEILOMETER_API_SERVICE_HOST}:8777" \
|
||||
-P "${KEYSTONE_AUTH_PROTOCOL}://${PUBLIC_IP}:8777" \
|
||||
-A "${KEYSTONE_AUTH_PROTOCOL}://${CEILOMETER_API_SERVICE_HOST}:8777"
|
||||
|
||||
cfg=/etc/ceilometer/ceilometer.conf
|
||||
crudini --set $cfg \
|
||||
DEFAULT connection
|
||||
"mysql://${CEILOMETER_DB_USER}:${CEILOMETER_DB_PASSWORD}@${MARIADB_SERVICE_HOST}/${CEILOMETER_DB_NAME}"
|
||||
|
||||
|
||||
exec /usr/bin/ceilometer-api
|
5
docker/ceilometer/ceilometer-base/Dockerfile
Normal file
5
docker/ceilometer/ceilometer-base/Dockerfile
Normal file
@ -0,0 +1,5 @@
|
||||
FROM kollaglue/fedora-rdo-base
|
||||
MAINTAINER Kolla Project (https://launchpad.net/kolla)
|
||||
|
||||
RUN mkdir -p /opt/kolla
|
||||
COPY config-ceilometer.sh /opt/kolla/config-ceilometer.sh
|
1
docker/ceilometer/ceilometer-base/build
Symbolic link
1
docker/ceilometer/ceilometer-base/build
Symbolic link
@ -0,0 +1 @@
|
||||
../../../tools/build-docker-image
|
69
docker/ceilometer/ceilometer-base/config-ceilometer.sh
Normal file
69
docker/ceilometer/ceilometer-base/config-ceilometer.sh
Normal file
@ -0,0 +1,69 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
. /opt/kolla/kolla-common.sh
|
||||
|
||||
: ${CEILOMETER_DB_USER:=ceilometer}
|
||||
: ${CEILOMETER_DB_NAME:=ceilometer}
|
||||
: ${KEYSTONE_AUTH_PROTOCOL:=http}
|
||||
: ${CEILOMETER_KEYSTONE_USER:=admin}
|
||||
: ${CEILOMETER_ADMIN_PASSWORD:=kolla}
|
||||
: ${ADMIN_TENANT_NAME:=admin}
|
||||
: ${METERING_SECRET:=ceilometer}
|
||||
|
||||
check_required_vars CEILOMETER_DB_PASSWORD KEYSTONE_ADMIN_TOKEN DB_ROOT_PASSWORD
|
||||
dump_vars
|
||||
|
||||
cat > /openrc <<EOF
|
||||
export SERVICE_TOKEN="${KEYSTONE_ADMIN_TOKEN}"
|
||||
export SERVICE_ENDPOINT="${KEYSTONE_AUTH_PROTOCOL}://${KEYSTONE_ADMIN_SERVICE_HOST}:${KEYSTONE_ADMIN_SERVICE_PORT}/v2.0"
|
||||
EOF
|
||||
|
||||
|
||||
cfg=/etc/ceilometer/ceilometer.conf
|
||||
|
||||
crudini --set $cfg \
|
||||
DEFAULT rpc_backend rabbit
|
||||
crudini --set $cfg \
|
||||
DEFAULT rabbit_host ${KEYSTONE_SERVICE_HOST}
|
||||
crudini --set $cfg \
|
||||
DEFAULT rabbit_password ${RABBITMQ_PASS}
|
||||
|
||||
crudini --set $cfg \
|
||||
keystone_authtoken \
|
||||
auth_uri \
|
||||
"http://${KEYSTONE_SERVICE_HOST}:5000/"
|
||||
crudini --set $cfg \
|
||||
keystone_authtoken \
|
||||
admin_tenant_name \
|
||||
"${ADMIN_TENANT_NAME}"
|
||||
crudini --set $cfg \
|
||||
keystone_authtoken \
|
||||
admin_user \
|
||||
"${CEILOMETER_KEYSTONE_USER}"
|
||||
crudini --set $cfg \
|
||||
keystone_authtoken \
|
||||
admin_password \
|
||||
${CEILOMETER_ADMIN_PASSWORD}
|
||||
|
||||
crudini --set $cfg \
|
||||
service_credentials \
|
||||
os_auth_url \
|
||||
${KEYSTONE_AUTH_PROTOCOL}://${KEYSTONE_SERVICE_HOST}:5000/
|
||||
crudini --set $cfg \
|
||||
service_credentials \
|
||||
os_username \
|
||||
ceilometer
|
||||
crudini --set $cfg \
|
||||
service_credentials \
|
||||
os_tenant_name \
|
||||
service
|
||||
crudini --set $cfg \
|
||||
service_credentials \
|
||||
os_password \
|
||||
${CEILOMETER_ADMIN_PASSWORD}
|
||||
|
||||
crudini --set $cfg \
|
||||
publisher
|
||||
metering_secret
|
||||
${METERING_SECRET}
|
7
docker/ceilometer/ceilometer-central/Dockerfile
Normal file
7
docker/ceilometer/ceilometer-central/Dockerfile
Normal file
@ -0,0 +1,7 @@
|
||||
FROM kollaglue/fedora-rdo-ceilometer-base
|
||||
MAINTAINER Kolla Project (https://launchpad.net/kolla)
|
||||
|
||||
RUN yum install -y openstack-ceilometer-central && yum clean all
|
||||
|
||||
ADD ./start.sh /start.sh
|
||||
CMD ["/start.sh"]
|
1
docker/ceilometer/ceilometer-central/build
Symbolic link
1
docker/ceilometer/ceilometer-central/build
Symbolic link
@ -0,0 +1 @@
|
||||
../../../tools/build-docker-image
|
14
docker/ceilometer/ceilometer-central/start.sh
Normal file
14
docker/ceilometer/ceilometer-central/start.sh
Normal file
@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /opt/kolla/kolla-common.sh
|
||||
. /opt/kolla/config-ceilometer.sh
|
||||
|
||||
check_required_vars KEYSTONE_AUTH_PROTOCOL CEILOMETER_KEYSTONE_USER CEILOMETER_ADMIN_PASSWORD ADMIN_TENANT_NAME
|
||||
|
||||
check_for_keystone
|
||||
check_for_db
|
||||
|
||||
export SERVICE_TOKEN="${KEYSTONE_ADMIN_TOKEN}"
|
||||
export SERVICE_ENDPOINT="${KEYSTONE_AUTH_PROTOCOL}://${KEYSTONE_ADMIN_SERVICE_HOST}:${KEYSTONE_ADMIN_SERVICE_PORT}/v2.0"
|
||||
|
||||
exec /usr/bin/ceilometer-agent-central
|
7
docker/ceilometer/ceilometer-collector/Dockerfile
Normal file
7
docker/ceilometer/ceilometer-collector/Dockerfile
Normal file
@ -0,0 +1,7 @@
|
||||
FROM kollaglue/fedora-rdo-ceilometer-base
|
||||
MAINTAINER Pradeep Kilambi <pkilambi@cisco.com>
|
||||
|
||||
RUN yum install -y openstack-ceilometer-collector && yum clean all
|
||||
|
||||
ADD ./start.sh /start.sh
|
||||
CMD ["/start.sh"]
|
1
docker/ceilometer/ceilometer-collector/build
Symbolic link
1
docker/ceilometer/ceilometer-collector/build
Symbolic link
@ -0,0 +1 @@
|
||||
../../../tools/build-docker-image
|
9
docker/ceilometer/ceilometer-collector/start.sh
Normal file
9
docker/ceilometer/ceilometer-collector/start.sh
Normal file
@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
. /opt/kolla/kolla-common.sh
|
||||
. /opt/kolla/config-ceilometer.sh
|
||||
|
||||
|
||||
exec /usr/bin/ceilometer-collector
|
8
docker/ceilometer/ceilometer-compute/Dockerfile
Normal file
8
docker/ceilometer/ceilometer-compute/Dockerfile
Normal file
@ -0,0 +1,8 @@
|
||||
FROM kollaglue/fedora-rdo-ceilometer-base
|
||||
MAINTAINER Kolla Project (https://launchpad.net/kolla)
|
||||
|
||||
RUN yum install -y openstack-ceilometer-compute python-ceilometerclient python-pecan \
|
||||
&& yum clean all
|
||||
|
||||
ADD ./start.sh /start.sh
|
||||
CMD ["/start.sh"]
|
1
docker/ceilometer/ceilometer-compute/build
Symbolic link
1
docker/ceilometer/ceilometer-compute/build
Symbolic link
@ -0,0 +1 @@
|
||||
../../../tools/build-docker-image
|
25
docker/ceilometer/ceilometer-compute/start.sh
Normal file
25
docker/ceilometer/ceilometer-compute/start.sh
Normal file
@ -0,0 +1,25 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /opt/kolla/kolla-common.sh
|
||||
. /opt/kolla/config-ceilometer.sh
|
||||
|
||||
|
||||
check_required_vars KEYSTONE_ADMIN_TOKEN KEYSTONE_SERVICE_HOST KEYSTONE_AUTH_PROTOCOL CEILOMETER_KEYSTONE_USER ADMIN_TENANT_NAME
|
||||
|
||||
check_for_keystone
|
||||
|
||||
# Nova conf settings
|
||||
crudini --set /etc/nova/nova.conf DEFAULT instance_usage_audit True
|
||||
crudini --set /etc/nova/nova.conf DEFAULT instance_usage_audit_period hour
|
||||
crudini --set /etc/nova/nova.conf DEFAULT notify_on_state_change vm_and_task_state
|
||||
crudini --set /etc/nova/nova.conf DEFAULT notification_driver nova.openstack.common.notifier.rpc_notifier
|
||||
crudini --set /etc/nova/nova.conf DEFAULT notification_driver ceilometer.compute.nova_notifier
|
||||
|
||||
#ceilometer settings
|
||||
cfg=/etc/ceilometer/ceilometer.conf
|
||||
crudini --set $cfg publisher_rpc metering_secret ${KEYSTONE_ADMIN_TOKEN}
|
||||
crudini --set $cfg rabbit_host ${KEYSTONE_SERVICE_HOST}
|
||||
crudini --set $cfg rabbit_password ${RABBITMQ_PASS}
|
||||
|
||||
|
||||
exec /usr/bin/ceilometer-agent-compute
|
7
docker/ceilometer/ceilometer-notification/Dockerfile
Normal file
7
docker/ceilometer/ceilometer-notification/Dockerfile
Normal file
@ -0,0 +1,7 @@
|
||||
FROM kollaglue/fedora-rdo-ceilometer-base
|
||||
MAINTAINER Kolla Project (https://launchpad.net/kolla)
|
||||
|
||||
RUN yum install -y openstack-ceilometer-notification && yum clean all
|
||||
|
||||
ADD ./start.sh /start.sh
|
||||
CMD ["/start.sh"]
|
1
docker/ceilometer/ceilometer-notification/build
Symbolic link
1
docker/ceilometer/ceilometer-notification/build
Symbolic link
@ -0,0 +1 @@
|
||||
../../../tools/build-docker-image
|
9
docker/ceilometer/ceilometer-notification/start.sh
Normal file
9
docker/ceilometer/ceilometer-notification/start.sh
Normal file
@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
. /opt/kolla/kolla-common.sh
|
||||
. /opt/kolla/config-ceilometer.sh
|
||||
|
||||
|
||||
exec /usr/bin/ceilometer-agent-notification
|
55
k8s/pod/ceilometer-controller-pod.yaml
Normal file
55
k8s/pod/ceilometer-controller-pod.yaml
Normal file
@ -0,0 +1,55 @@
|
||||
desiredState:
|
||||
manifest:
|
||||
containers:
|
||||
- env:
|
||||
- name: DB_ROOT_PASSWORD
|
||||
value: password
|
||||
- name: CEILOMETER_DB_PASSWORD
|
||||
value: ceilometerdbpassword
|
||||
- name: KEYSTONE_ADMIN_TOKEN
|
||||
value: ADMINTOKEN
|
||||
image: kollaglue/fedora-rdo-ceilometer-api
|
||||
name: ceilometer-api
|
||||
ports:
|
||||
- containerPort: 8777
|
||||
- env:
|
||||
- name: DB_ROOT_PASSWORD
|
||||
value: password
|
||||
- name: CEILOMETER_DB_PASSWORD
|
||||
value: ceilometerdbpassword
|
||||
- name: KEYSTONE_ADMIN_TOKEN
|
||||
value: ADMINTOKEN
|
||||
image: kollaglue/fedora-rdo-ceilometer-notification
|
||||
name: ceilometer-notification
|
||||
- env:
|
||||
- name: DB_ROOT_PASSWORD
|
||||
value: password
|
||||
- name: CEILOMETER_DB_PASSWORD
|
||||
value: ceilometerdbpassword
|
||||
- name: KEYSTONE_ADMIN_TOKEN
|
||||
value: ADMINTOKEN
|
||||
image: kollaglue/fedora-rdo-ceilometer-central
|
||||
name: ceilometer-central
|
||||
- env:
|
||||
- name: DB_ROOT_PASSWORD
|
||||
value: password
|
||||
- name: CEILOMETER_DB_PASSWORD
|
||||
value: ceilometerdbpassword
|
||||
- name: KEYSTONE_ADMIN_TOKEN
|
||||
value: ADMINTOKEN
|
||||
image: kollaglue/fedora-rdo-ceilometer-collector
|
||||
name: ceilometer-collector
|
||||
- env:
|
||||
- name: DB_ROOT_PASSWORD
|
||||
value: password
|
||||
- name: CEILOMETER_DB_PASSWORD
|
||||
value: ceilometerdbpassword
|
||||
- name: KEYSTONE_ADMIN_TOKEN
|
||||
value: ADMINTOKEN
|
||||
image: kollaglue/fedora-rdo-ceilometer-alarm
|
||||
name: ceilometer-alarm
|
||||
id: ceilometer-1
|
||||
version: v1beta1
|
||||
id: ceilometer
|
||||
labels:
|
||||
name: ceilometer-controller
|
@ -21,6 +21,15 @@ desiredState:
|
||||
name: nova-libvirt
|
||||
ports:
|
||||
- containerPort: 16509
|
||||
- env:
|
||||
- name: DB_ROOT_PASSWORD
|
||||
value: password
|
||||
- name: CEILOMETER_DB_PASSWORD
|
||||
value: ceilometerdbpassword
|
||||
- name: KEYSTONE_ADMIN_TOKEN
|
||||
value: ADMINTOKEN
|
||||
image: kollaglue/fedora-rdo-ceilometer-compute
|
||||
name: ceilometer-compute
|
||||
id: nova-1
|
||||
version: v1beta1
|
||||
id: nova
|
||||
|
7
k8s/service/ceilometer-api-service.yaml
Normal file
7
k8s/service/ceilometer-api-service.yaml
Normal file
@ -0,0 +1,7 @@
|
||||
apiVersion: v1beta1
|
||||
containerPort: 8777
|
||||
id: ceilometer-api
|
||||
kind: Service
|
||||
port: 8777
|
||||
selector:
|
||||
name: ceilometer-controller
|
@ -10,6 +10,7 @@ glance
|
||||
nova-controller
|
||||
neutron-controller
|
||||
heat
|
||||
ceilometer-controller
|
||||
'
|
||||
|
||||
for pod in $pods; do
|
||||
|
@ -3,6 +3,7 @@
|
||||
cd $(git rev-parse --show-toplevel)
|
||||
|
||||
services='
|
||||
ceilometer-api
|
||||
glance-api
|
||||
glance-registry
|
||||
keystone-admin
|
||||
|
Loading…
Reference in New Issue
Block a user