diff --git a/docker/ceilometer/ceilometer-alarm/Dockerfile b/docker/ceilometer/ceilometer-alarm/Dockerfile new file mode 100644 index 0000000000..7bcbf30ae6 --- /dev/null +++ b/docker/ceilometer/ceilometer-alarm/Dockerfile @@ -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"] diff --git a/docker/ceilometer/ceilometer-alarm/build b/docker/ceilometer/ceilometer-alarm/build new file mode 120000 index 0000000000..43944faa00 --- /dev/null +++ b/docker/ceilometer/ceilometer-alarm/build @@ -0,0 +1 @@ +../../../tools/build-docker-image \ No newline at end of file diff --git a/docker/ceilometer/ceilometer-alarm/start.sh b/docker/ceilometer/ceilometer-alarm/start.sh new file mode 100644 index 0000000000..2096348c45 --- /dev/null +++ b/docker/ceilometer/ceilometer-alarm/start.sh @@ -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 diff --git a/docker/ceilometer/ceilometer-api/Dockerfile b/docker/ceilometer/ceilometer-api/Dockerfile new file mode 100644 index 0000000000..29a46b39ff --- /dev/null +++ b/docker/ceilometer/ceilometer-api/Dockerfile @@ -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"] diff --git a/docker/ceilometer/ceilometer-api/build b/docker/ceilometer/ceilometer-api/build new file mode 120000 index 0000000000..43944faa00 --- /dev/null +++ b/docker/ceilometer/ceilometer-api/build @@ -0,0 +1 @@ +../../../tools/build-docker-image \ No newline at end of file diff --git a/docker/ceilometer/ceilometer-api/start.sh b/docker/ceilometer/ceilometer-api/start.sh new file mode 100644 index 0000000000..8c9acef5fe --- /dev/null +++ b/docker/ceilometer/ceilometer-api/start.sh @@ -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 < /openrc < + +RUN yum install -y openstack-ceilometer-collector && yum clean all + +ADD ./start.sh /start.sh +CMD ["/start.sh"] diff --git a/docker/ceilometer/ceilometer-collector/build b/docker/ceilometer/ceilometer-collector/build new file mode 120000 index 0000000000..43944faa00 --- /dev/null +++ b/docker/ceilometer/ceilometer-collector/build @@ -0,0 +1 @@ +../../../tools/build-docker-image \ No newline at end of file diff --git a/docker/ceilometer/ceilometer-collector/start.sh b/docker/ceilometer/ceilometer-collector/start.sh new file mode 100644 index 0000000000..21de9d315e --- /dev/null +++ b/docker/ceilometer/ceilometer-collector/start.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +set -e + +. /opt/kolla/kolla-common.sh +. /opt/kolla/config-ceilometer.sh + + +exec /usr/bin/ceilometer-collector diff --git a/docker/ceilometer/ceilometer-compute/Dockerfile b/docker/ceilometer/ceilometer-compute/Dockerfile new file mode 100644 index 0000000000..07b38bcc51 --- /dev/null +++ b/docker/ceilometer/ceilometer-compute/Dockerfile @@ -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"] diff --git a/docker/ceilometer/ceilometer-compute/build b/docker/ceilometer/ceilometer-compute/build new file mode 120000 index 0000000000..43944faa00 --- /dev/null +++ b/docker/ceilometer/ceilometer-compute/build @@ -0,0 +1 @@ +../../../tools/build-docker-image \ No newline at end of file diff --git a/docker/ceilometer/ceilometer-compute/start.sh b/docker/ceilometer/ceilometer-compute/start.sh new file mode 100644 index 0000000000..3e3c6c82a9 --- /dev/null +++ b/docker/ceilometer/ceilometer-compute/start.sh @@ -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 diff --git a/docker/ceilometer/ceilometer-notification/Dockerfile b/docker/ceilometer/ceilometer-notification/Dockerfile new file mode 100644 index 0000000000..385a27248d --- /dev/null +++ b/docker/ceilometer/ceilometer-notification/Dockerfile @@ -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"] diff --git a/docker/ceilometer/ceilometer-notification/build b/docker/ceilometer/ceilometer-notification/build new file mode 120000 index 0000000000..43944faa00 --- /dev/null +++ b/docker/ceilometer/ceilometer-notification/build @@ -0,0 +1 @@ +../../../tools/build-docker-image \ No newline at end of file diff --git a/docker/ceilometer/ceilometer-notification/start.sh b/docker/ceilometer/ceilometer-notification/start.sh new file mode 100644 index 0000000000..f2f84789e5 --- /dev/null +++ b/docker/ceilometer/ceilometer-notification/start.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +set -e + +. /opt/kolla/kolla-common.sh +. /opt/kolla/config-ceilometer.sh + + +exec /usr/bin/ceilometer-agent-notification diff --git a/k8s/pod/ceilometer-controller-pod.yaml b/k8s/pod/ceilometer-controller-pod.yaml new file mode 100644 index 0000000000..ef94094f5b --- /dev/null +++ b/k8s/pod/ceilometer-controller-pod.yaml @@ -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 diff --git a/k8s/pod/nova-compute-pod.yaml b/k8s/pod/nova-compute-pod.yaml index 7cd4ac4448..4463240107 100644 --- a/k8s/pod/nova-compute-pod.yaml +++ b/k8s/pod/nova-compute-pod.yaml @@ -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 diff --git a/k8s/service/ceilometer-api-service.yaml b/k8s/service/ceilometer-api-service.yaml new file mode 100644 index 0000000000..e831cf4817 --- /dev/null +++ b/k8s/service/ceilometer-api-service.yaml @@ -0,0 +1,7 @@ +apiVersion: v1beta1 +containerPort: 8777 +id: ceilometer-api +kind: Service +port: 8777 +selector: + name: ceilometer-controller diff --git a/tools/start-all-pods b/tools/start-all-pods index c3860266bd..e2ee16c532 100755 --- a/tools/start-all-pods +++ b/tools/start-all-pods @@ -10,6 +10,7 @@ glance nova-controller neutron-controller heat +ceilometer-controller ' for pod in $pods; do diff --git a/tools/start-all-services b/tools/start-all-services index a8856e8b4b..51520ec66e 100755 --- a/tools/start-all-services +++ b/tools/start-all-services @@ -3,6 +3,7 @@ cd $(git rev-parse --show-toplevel) services=' +ceilometer-api glance-api glance-registry keystone-admin