Skip to content

Commit 8882567

Browse files
authored
Merge branch 'stackhpc/wallaby' into upstream/wallaby-2022-07-04
2 parents 0541e93 + 8388d80 commit 8882567

File tree

19 files changed

+225
-10
lines changed

19 files changed

+225
-10
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @stackhpc/kayobe
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
name: Tag & Release
3+
'on':
4+
push:
5+
branches:
6+
- stackhpc/wallaby
7+
permissions:
8+
contents: write
9+
jobs:
10+
tag-and-release:
11+
uses: stackhpc/.github/.github/workflows/tag-and-release.yml@main

.github/workflows/tox.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
name: Tox Continuous Integration
3+
'on':
4+
pull_request:
5+
jobs:
6+
tox:
7+
uses: stackhpc/.github/.github/workflows/tox.yml@main

doc/source/ceph_versions.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Distro,Ceph,
22
,Source, Release
3-
CentOS,CentOS Storage SIG,Nautilus
3+
CentOS,CentOS Storage SIG,Pacific
44
Ubuntu,Ubuntu Cloud Archive,Pacific
55
Debian,Debian,Nautilus

docker/base/Dockerfile.j2

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ RUN rm -f /etc/rpm/macros.image-language-conf \
192192

193193
{% set base_centos_yum_repo_packages = [
194194
'centos-release-openstack-wallaby',
195+
'centos-release-ceph-pacific',
195196
'centos-release-opstools',
196197
'epel-release',
197198
] %}
@@ -206,6 +207,7 @@ RUN rm -f /etc/rpm/macros.image-language-conf \
206207
{% set base_centos_yum_repos_to_disable = [
207208
'centos-advanced-virtualization',
208209
'centos-ceph-nautilus',
210+
'centos-ceph-pacific',
209211
'centos-nfv-openvswitch',
210212
'centos-opstools',
211213
'centos-rabbitmq-38',

docker/caso/Dockerfile.j2

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }}
2+
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
3+
4+
{% block caso_header %}{% endblock %}
5+
6+
{% import "macros.j2" as macros with context %}
7+
8+
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
9+
{% set caso_packages = [
10+
'cronie',
11+
] %}
12+
{% elif base_distro in ['debian', 'ubuntu'] %}
13+
{% set caso_packages = [
14+
'cron',
15+
] %}
16+
{% endif %}
17+
18+
{{ macros.install_packages(caso_packages | customizable("packages")) }}
19+
20+
{{ macros.configure_user(name='caso') }}
21+
22+
{% set caso_pip_packages = [
23+
'caso'
24+
] %}
25+
26+
# NOTE(wszumski:) Upgrade pip, otherwise we hit: ModuleNotFoundError: No module
27+
# named 'setuptools_rust' when install latest cryptography module. Doesn't
28+
# really make sense to use constraints as caso is not tied to an openstack
29+
# release.
30+
RUN mkdir -p /requirements \
31+
&& curl -sSL -o /requirements/upper-constraints.txt https://releases.openstack.org/constraints/upper/{{ openstack_release }}
32+
RUN {{ macros.install_pip(["pip"]) }}
33+
34+
RUN {{ macros.install_pip(caso_pip_packages | customizable("pip_packages"), constraints = false) }} \
35+
&& mkdir -p /etc/caso \
36+
&& chown -R caso: /etc/caso
37+
38+
COPY extend_start.sh /usr/local/bin/kolla_extend_start
39+
40+
RUN touch /usr/local/bin/kolla_caso_extend_start \
41+
&& chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_caso_extend_start
42+
43+
{% block caso_base_footer %}{% endblock %}

docker/caso/extend_start.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
3+
# Create log directory, with appropriate permissions
4+
CASO_LOG_DIR="/var/log/kolla/caso"
5+
if [[ ! -d "$CASO_LOG_DIR" ]]; then
6+
mkdir -p $CASO_LOG_DIR
7+
fi
8+
if [[ $(stat -c %U:%G ${CASO_LOG_DIR}) != "caso:kolla" ]]; then
9+
chown caso:kolla ${CASO_LOG_DIR}
10+
fi
11+
if [[ $(stat -c %a ${CASO_LOG_DIR}) != "755" ]]; then
12+
chmod 755 ${CASO_LOG_DIR}
13+
fi
14+
15+
. /usr/local/bin/kolla_caso_extend_start

docker/prometheus/prometheus-cadvisor/Dockerfile.j2

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,17 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
88
{% import "macros.j2" as macros with context %}
99

1010
{% block prometheus_cadvisor_repository_version %}
11-
ENV prometheus_cadvisor_version=0.35.0
11+
ENV prometheus_cadvisor_version=0.38.7
12+
ENV prometheus_cadvisor_sha256sum=fdb86c256df682cfec2abd57a4405c919ed26f1e27ebfabf487f6c516bc7f6c7
1213
{% endblock %}
1314

1415
{% if base_arch in ['x86_64'] %}
1516

1617
{% block prometheus_cadvisor_install %}
17-
RUN curl -o /opt/cadvisor https://github.com/google/cadvisor/releases/download/v${prometheus_cadvisor_version}/cadvisor && chmod 0755 /opt/cadvisor
18+
RUN curl -o /tmp/cadvisor https://github.com/google/cadvisor/releases/download/v${prometheus_cadvisor_version}/cadvisor \
19+
&& echo "${prometheus_cadvisor_sha256sum} /tmp/cadvisor" | sha256sum -c \
20+
&& mv /tmp/cadvisor /opt \
21+
&& chmod 0755 /opt/cadvisor
1822
{% endblock %}
1923

2024
{% else %}
@@ -24,7 +28,7 @@ RUN curl -o /opt/cadvisor https://github.com/google/cadvisor/releases/download/v
2428
{% set cadvisor_packages = [
2529
'libjs-bootstrap',
2630
'libjs-jquery',
27-
'https://snapshot.debian.org/archive/debian/20180503T060640Z/pool/main/c/cadvisor/cadvisor_0.27.1+dfsg2-1_arm64.deb'
31+
'cadvisor'
2832
] %}
2933

3034
{{ macros.install_packages(cadvisor_packages | customizable("packages")) }}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
FROM {{ namespace }}/{{ infra_image_prefix }}prometheus-base:{{ tag }}
2+
{% block labels %}
3+
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
4+
{% endblock %}
5+
6+
{% import "macros.j2" as macros with context %}
7+
8+
{% block prometheus_jiralert_header %}{% endblock %}
9+
10+
{% if base_package_type == 'rpm' %}
11+
{% set prometheus_jiralert_packages = [
12+
'git',
13+
'go',
14+
'make',
15+
] %}
16+
{% elif base_package_type == 'deb' %}
17+
{% set prometheus_jiralert_packages = [
18+
'golang-go',
19+
] %}
20+
{% endif %}
21+
22+
{{ macros.install_packages(prometheus_jiralert_packages | customizable("packages")) }}
23+
24+
{% block prometheus_jiralert_version %}
25+
ARG prometheus_jiralert_version=master
26+
ARG prometheus_jiralert_url=https://github.com/stackhpc/jiralert/archive/refs/heads/${prometheus_jiralert_version}.tar.gz
27+
{% endblock %}
28+
29+
{% block prometheus_jiralert_install %}
30+
ENV GOPATH=/build
31+
RUN mkdir /build \
32+
&& cd /build \
33+
&& curl -o jiralert.tar.gz ${prometheus_jiralert_url} \
34+
&& tar xvf jiralert.tar.gz \
35+
&& cd jiralert-${prometheus_jiralert_version} \
36+
&& make build \
37+
&& mkdir /opt/jiralert \
38+
&& install -m 0755 jiralert /opt/jiralert/ \
39+
&& install -m 0644 LICENSE /opt/jiralert/ \
40+
&& install -m 0644 README.md /opt/jiralert/ \
41+
&& rm -rf /build
42+
{% endblock %}
43+
44+
{% block prometheus_jiralert_footer %}{% endblock %}
45+
{% block footer %}{% endblock %}
46+
47+
USER prometheus
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
FROM {{ namespace }}/{{ infra_image_prefix }}prometheus-base:{{ tag }}
2+
{% block labels %}
3+
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
4+
{% endblock %}
5+
6+
{% import "macros.j2" as macros with context %}
7+
8+
{% block prometheus_libvirt_exporter_header %}{% endblock %}
9+
10+
{% if base_package_type == 'rpm' %}
11+
{% set prometheus_libvirt_exporter_packages = [
12+
'git',
13+
'go',
14+
'libvirt-devel',
15+
] %}
16+
{% elif base_package_type == 'deb' %}
17+
{% set prometheus_libvirt_exporter_packages = [
18+
'build-essential',
19+
'git',
20+
'golang-go',
21+
'libvirt-dev',
22+
'pkg-config',
23+
] %}
24+
{% endif %}
25+
26+
{{ macros.install_packages(prometheus_libvirt_exporter_packages | customizable("packages")) }}
27+
28+
{% block prometheus_libvirt_exporter_version %}
29+
ARG prometheus_libvirt_exporter_version=2.3.0
30+
ARG prometheus_libvirt_exporter_path=github.com/AlexZzz/libvirt-exporter
31+
{% endblock %}
32+
33+
{% block prometheus_libvirt_exporter_install %}
34+
ENV GOPATH=/build
35+
RUN go mod init libvirt-exporter \
36+
&& cd ${GOPATH} \
37+
&& go get -v ${prometheus_libvirt_exporter_path}@${prometheus_libvirt_exporter_version} \
38+
&& go build ${prometheus_libvirt_exporter_path} \
39+
&& mv /build/libvirt-exporter /opt \
40+
&& rm -rf /build
41+
42+
{% endblock %}
43+
44+
{% block prometheus_libvirt_exporter_footer %}{% endblock %}
45+
{% block footer %}{% endblock %}
46+
47+
USER root

0 commit comments

Comments
 (0)