Browse Source

Add ceilometer images

Change-Id: I0910f44b074b8ea903b2e44d6edcefd080f85021
changes/85/720285/1
Mohammed Naser 1 year ago
parent
commit
8ae58c60c4
6 changed files with 98 additions and 0 deletions
  1. +1
    -0
      Makefile
  2. +23
    -0
      hack/update-zuul-jobs.py
  3. +28
    -0
      images/ceilometer/Dockerfile
  4. +7
    -0
      images/ceilometer/bindep.txt
  5. +35
    -0
      zuul.d/ceilometer-jobs.yaml
  6. +4
    -0
      zuul.d/functional-jobs.yaml

+ 1
- 0
Makefile View File

@ -86,6 +86,7 @@ endif
# run-time images
images:
docker build images/ceilometer --target ceilometer-agent-notification -t vexxhost/ceilometer-agent-notification:latest
docker build images/mcrouter -t vexxhost/mcrouter:latest
docker build images/mcrouter-exporter -t vexxhost/mcrouter-exporter:latest
docker build images/memcached -t vexxhost/memcached:latest


+ 23
- 0
hack/update-zuul-jobs.py View File

@ -18,6 +18,7 @@ import copy
import os
import sys
import dockerfile
from ruamel import yaml
@ -41,6 +42,28 @@ for image in images:
}
]
}
# Parse the Docker file to see if we have multiple targets
targets = []
for line in dockerfile.parse_file('images/%s/Dockerfile' % image):
if line.cmd != 'from':
continue
if len(line.value) >= 3 and line.value[1].lower() != 'as':
continue
if line.value[0] != image:
continue
targets.append(line.value[2])
# Update images if we have more than 1 target
if targets:
job_vars['docker_images'] = [
{
'context': 'images/%s' % image,
'repository': 'vexxhost/%s' % target,
'target': target,
} for target in targets
]
if image == 'openstack-operator':
job_vars['docker_images'][0]['context'] = '.'
job_vars['docker_images'][0]['dockerfile'] = 'images/openstack-operator/Dockerfile'


+ 28
- 0
images/ceilometer/Dockerfile View File

@ -0,0 +1,28 @@
# Copyright (c) 2020 VEXXHOST, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
FROM docker.io/opendevorg/python-builder as builder
RUN apt-get update && \
apt-get -y install git && \
git clone https://github.com/openstack/ceilometer /tmp/src
COPY bindep.txt /tmp/src/bindep.txt
RUN assemble
FROM docker.io/opendevorg/python-base AS ceilometer
COPY --from=builder /output/ /output
RUN /output/install-from-bindep
FROM ceilometer AS ceilometer-agent-notification
CMD ["/usr/local/bin/ceilometer-agent-notification"]

+ 7
- 0
images/ceilometer/bindep.txt View File

@ -0,0 +1,7 @@
libxml2-dev [platform:dpkg test]
libxslt-devel [platform:rpm test]
libxslt1-dev [platform:dpkg test]
build-essential [platform:dpkg compile]
libffi-dev [platform:dpkg compile]
libffi6 [platform:dpkg]
gettext [platform:dpkg test]

+ 35
- 0
zuul.d/ceilometer-jobs.yaml View File

@ -0,0 +1,35 @@
- job:
name: openstack-operator:images:build:ceilometer
parent: vexxhost-build-docker-image
provides: openstack-operator:image:ceilometer
dependencies: &id001
- opendev-buildset-registry
vars: &id002
docker_images:
- context: images/ceilometer
repository: vexxhost/ceilometer-agent-notification
target: ceilometer-agent-notification
files: &id003
- ^images/ceilometer/.*
- job:
name: openstack-operator:images:upload:ceilometer
parent: vexxhost-upload-docker-image
provides: openstack-operator:image:ceilometer
dependencies: *id001
vars: *id002
files: *id003
- job:
name: openstack-operator:images:promote:ceilometer
parent: vexxhost-promote-docker-image
vars: *id002
files: *id003
- project:
check:
jobs:
- openstack-operator:images:build:ceilometer
gate:
jobs:
- openstack-operator:images:upload:ceilometer
promote:
jobs:
- openstack-operator:images:promote:ceilometer

+ 4
- 0
zuul.d/functional-jobs.yaml View File

@ -19,6 +19,8 @@
- opendev-buildset-registry
- openstack-operator:functional:
dependencies:
- name: openstack-operator:images:build:ceilometer
soft: true
- name: openstack-operator:images:build:rabbitmq
soft: true
- name: openstack-operator:images:build:memcached
@ -35,6 +37,8 @@
- opendev-buildset-registry
- openstack-operator:functional:
dependencies:
- name: openstack-operator:images:upload:ceilometer
soft: true
- name: openstack-operator:images:upload:rabbitmq
soft: true
- name: openstack-operator:images:upload:memcached


Loading…
Cancel
Save