diff options
| -rw-r--r-- | .ansible-lint | 4 | ||||
| -rw-r--r-- | .yamllint | 27 | ||||
| -rw-r--r-- | .zuul.d/base.yaml | 163 | ||||
| -rw-r--r-- | .zuul.d/centos.yaml | 36 | ||||
| -rw-r--r-- | .zuul.d/debian.yaml | 82 | ||||
| -rw-r--r-- | .zuul.d/project.yaml | 16 | ||||
| -rw-r--r-- | .zuul.d/tox.yaml | 12 | ||||
| -rw-r--r-- | .zuul.d/ubuntu.yaml | 103 | ||||
| -rw-r--r-- | AGENTS.md | 48 | ||||
| -rw-r--r-- | CLAUDE.md | 80 | ||||
| -rw-r--r-- | GEMINI.md | 80 | ||||
| -rw-r--r-- | README.rst | 98 | ||||
| -rw-r--r-- | doc/source/admin/image-building.rst | 193 | ||||
| -rw-r--r-- | doc/source/admin/kolla_api.rst | 32 | ||||
| -rw-r--r-- | doc/source/admin/template-override/ovs-dpdk.rst | 4 | ||||
| -rw-r--r-- | doc/source/ceph_versions.csv | 8 | ||||
| -rw-r--r-- | doc/source/contributor/adding-a-new-image.rst | 4 | ||||
| -rw-r--r-- | doc/source/contributor/code-reviews.rst | 56 | ||||
| -rw-r--r-- | doc/source/contributor/contributing.rst | 45 | ||||
| -rw-r--r-- | doc/source/contributor/ptl-guide.rst | 34 | ||||
| -rw-r--r-- | doc/source/contributor/release-management.rst | 7 | ||||
| -rw-r--r-- | doc/source/contributor/running-tests.rst | 14 | ||||
| -rw-r--r-- | doc/source/contributor/versions.rst | 26 | ||||
| -rw-r--r-- | doc/source/index.rst | 4 | ||||
| -rw-r--r-- | doc/source/matrix_aarch64.csv | 6 | ||||
| -rw-r--r-- | doc/source/matrix_x86.csv | 6 | ||||
| -rw-r--r-- | doc/source/openvswitch_versions.csv | 5 | ||||
| -rw-r--r-- | doc/source/ovn_versions.csv | 5 | ||||
| -rw-r--r-- | doc/source/support_matrix.rst | 43 | ||||
| -rw-r--r-- | docker/aodh/aodh-api/extend_start.sh | 10 | ||||
| -rw-r--r-- | docker/base/ci-centos.repo | 75 | ||||
| -rw-r--r-- | docker/base/ci-rocky.repo | 35 | ||||
| -rw-r--r-- | docker/base/copr-rabbitmq-erlang.repo | 11 | ||||
| -rw-r--r-- | docker/base/docker-ce.repo | 6 | ||||
| -rw-r--r-- | docker/base/grafana.repo | 8 | ||||
| -rw-r--r-- | docker/base/influxdb.repo | 6 | ||||
| -rw-r--r-- | docker/base/kolla_el10.repo | 10 | ||||
| -rw-r--r-- | docker/base/mariadb.repo | 7 | ||||
| -rw-r--r-- | docker/base/opensearch.repo | 19 | ||||
| -rw-r--r-- | docker/base/proxysql.repo | 7 | ||||
| -rw-r--r-- | docker/base/rabbitmq_rabbitmq-erlang.repo | 9 | ||||
| -rw-r--r-- | docker/base/rabbitmq_rabbitmq-server.repo | 9 | ||||
| -rw-r--r-- | docker/base/sources.list.debian | 11 | ||||
| -rw-r--r-- | docker/base/sources.list.ubuntu | 15 | ||||
| -rw-r--r-- | docker/base/sources.list.ubuntu.aarch64 | 15 | ||||
| -rw-r--r-- | docker/base/td.repo | 7 | ||||
| -rw-r--r-- | docker/dnsmasq/extend_start.sh | 12 | ||||
| -rw-r--r-- | docker/influxdb/Dockerfile.j2 | 29 | ||||
| -rw-r--r-- | docker/influxdb/extend_start.sh | 11 | ||||
| -rw-r--r-- | docker/influxdb/influxdb_sudoers | 1 | ||||
| -rw-r--r-- | docker/ironic/ironic-prometheus-exporter/Dockerfile.j2 | 43 | ||||
| -rw-r--r-- | docker/ironic/ironic-prometheus-exporter/extend_start.sh | 3 | ||||
| -rw-r--r-- | docker/keystone/keystone-base/wsgi | 2 | ||||
| -rw-r--r-- | docker/kuryr/kuryr-base/Dockerfile.j2 | 30 | ||||
| -rw-r--r-- | docker/kuryr/kuryr-base/extend_start.sh | 15 | ||||
| -rw-r--r-- | docker/kuryr/kuryr-libnetwork/Dockerfile.j2 | 40 | ||||
| -rw-r--r-- | docker/letsencrypt/letsencrypt-webserver/Dockerfile.j2 | 34 | ||||
| -rw-r--r-- | docker/letsencrypt/letsencrypt-webserver/extend_start.sh | 3 | ||||
| -rw-r--r-- | docker/mariadb/mariadb-base/Dockerfile.j2 | 38 | ||||
| -rw-r--r-- | docker/mariadb/mariadb-clustercheck/Dockerfile.j2 | 19 | ||||
| -rw-r--r-- | docker/mariadb/mariadb-clustercheck/extend_start.sh | 11 | ||||
| -rw-r--r-- | docker/mariadb/mariadb-clustercheck/socat_wrapper.sh | 19 | ||||
| -rw-r--r-- | docker/mariadb/mariadb-server/backup_replica.sh | 148 | ||||
| -rw-r--r-- | docker/neutron/neutron-infoblox-ipam-agent/Dockerfile.j2 | 20 | ||||
| -rw-r--r-- | docker/neutron/neutron-linuxbridge-agent/Dockerfile.j2 | 21 | ||||
| -rw-r--r-- | docker/ovn/ovn-sb-db-relay/Dockerfile.j2 | 18 | ||||
| -rw-r--r-- | docker/redis/redis-base/extend_start.sh | 9 | ||||
| -rw-r--r-- | docker/redis/redis-sentinel/Dockerfile.j2 | 25 | ||||
| -rw-r--r-- | docker/redis/redis/Dockerfile.j2 | 22 | ||||
| -rw-r--r-- | docker/telegraf/Dockerfile.j2 | 44 | ||||
| -rw-r--r-- | docker/telegraf/extend_start.sh | 10 | ||||
| -rw-r--r-- | docker/telegraf/telegraf_sudoers | 1 | ||||
| -rw-r--r-- | docker/venus/venus-api/Dockerfile.j2 | 18 | ||||
| -rw-r--r-- | docker/venus/venus-base/Dockerfile.j2 | 29 | ||||
| -rw-r--r-- | docker/venus/venus-base/extend_start.sh | 10 | ||||
| -rw-r--r-- | docker/venus/venus-manager/Dockerfile.j2 | 15 | ||||
| -rw-r--r-- | docker/zun/zun-api/Dockerfile.j2 | 16 | ||||
| -rw-r--r-- | docker/zun/zun-api/extend_start.sh | 10 | ||||
| -rw-r--r-- | docker/zun/zun-base/Dockerfile.j2 | 55 | ||||
| -rw-r--r-- | docker/zun/zun-base/app.wsgi | 2 | ||||
| -rw-r--r-- | docker/zun/zun-base/extend_start.sh | 13 | ||||
| -rw-r--r-- | docker/zun/zun-base/zun_sudoers | 1 | ||||
| -rw-r--r-- | docker/zun/zun-cni-daemon/Dockerfile.j2 | 42 | ||||
| -rw-r--r-- | docker/zun/zun-cni-daemon/zun_sudoers | 1 | ||||
| -rw-r--r-- | docker/zun/zun-compute/Dockerfile.j2 | 33 | ||||
| -rw-r--r-- | docker/zun/zun-compute/extend_start.sh | 5 | ||||
| -rw-r--r-- | docker/zun/zun-compute/zun_sudoers | 3 | ||||
| -rw-r--r-- | docker/zun/zun-wsproxy/Dockerfile.j2 | 15 | ||||
| -rw-r--r-- | kolla/common/config.py | 58 | ||||
| -rw-r--r-- | kolla/common/sources.py | 421 | ||||
| -rw-r--r-- | kolla/common/sources.yaml | 318 | ||||
| -rw-r--r-- | kolla/common/users.py | 22 | ||||
| -rw-r--r-- | kolla/common/utils.py | 15 | ||||
| -rw-r--r-- | kolla/docker/aodh/aodh-api/Dockerfile.j2 (renamed from docker/aodh/aodh-api/Dockerfile.j2) | 2 | ||||
| -rw-r--r-- | kolla/docker/aodh/aodh-api/extend_start.sh (renamed from docker/venus/venus-api/extend_start.sh) | 2 | ||||
| -rw-r--r-- | kolla/docker/aodh/aodh-base/Dockerfile.j2 (renamed from docker/aodh/aodh-base/Dockerfile.j2) | 10 | ||||
| -rw-r--r-- | kolla/docker/aodh/aodh-base/aodh_sudoers (renamed from docker/aodh/aodh-base/aodh_sudoers) | 0 | ||||
| -rwxr-xr-x | kolla/docker/aodh/aodh-base/extend_start.sh (renamed from docker/aodh/aodh-base/extend_start.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/aodh/aodh-evaluator/Dockerfile.j2 (renamed from docker/aodh/aodh-evaluator/Dockerfile.j2) | 2 | ||||
| -rw-r--r-- | kolla/docker/aodh/aodh-expirer/Dockerfile.j2 (renamed from docker/aodh/aodh-expirer/Dockerfile.j2) | 2 | ||||
| -rw-r--r-- | kolla/docker/aodh/aodh-listener/Dockerfile.j2 (renamed from docker/aodh/aodh-listener/Dockerfile.j2) | 2 | ||||
| -rw-r--r-- | kolla/docker/aodh/aodh-notifier/Dockerfile.j2 (renamed from docker/aodh/aodh-notifier/Dockerfile.j2) | 2 | ||||
| -rw-r--r-- | kolla/docker/barbican/barbican-api/Dockerfile.j2 (renamed from docker/barbican/barbican-api/Dockerfile.j2) | 2 | ||||
| -rwxr-xr-x | kolla/docker/barbican/barbican-api/extend_start.sh (renamed from docker/barbican/barbican-api/extend_start.sh) | 2 | ||||
| -rw-r--r-- | kolla/docker/barbican/barbican-base/Dockerfile.j2 (renamed from docker/barbican/barbican-base/Dockerfile.j2) | 5 | ||||
| -rw-r--r-- | kolla/docker/barbican/barbican-base/barbican_sudoers (renamed from docker/barbican/barbican-base/barbican_sudoers) | 0 | ||||
| -rwxr-xr-x | kolla/docker/barbican/barbican-base/extend_start.sh (renamed from docker/barbican/barbican-base/extend_start.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/barbican/barbican-keystone-listener/Dockerfile.j2 (renamed from docker/barbican/barbican-keystone-listener/Dockerfile.j2) | 2 | ||||
| -rw-r--r-- | kolla/docker/barbican/barbican-worker/Dockerfile.j2 (renamed from docker/barbican/barbican-worker/Dockerfile.j2) | 2 | ||||
| -rw-r--r-- | kolla/docker/base/Dockerfile.j2 (renamed from docker/base/Dockerfile.j2) | 130 | ||||
| -rw-r--r-- | kolla/docker/base/apt_preferences (renamed from docker/base/apt_preferences) | 0 | ||||
| -rw-r--r-- | kolla/docker/base/apt_preferences.debian (renamed from docker/base/apt_preferences.debian) | 2 | ||||
| -rw-r--r-- | kolla/docker/base/apt_preferences.ubuntu (renamed from docker/base/apt_preferences.ubuntu) | 0 | ||||
| -rw-r--r-- | kolla/docker/base/copy_cacerts.sh (renamed from docker/base/copy_cacerts.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/base/curlrc (renamed from docker/base/curlrc) | 0 | ||||
| -rw-r--r-- | kolla/docker/base/debian.sources | 13 | ||||
| -rw-r--r-- | kolla/docker/base/dnf.conf (renamed from docker/base/dnf.conf) | 0 | ||||
| -rw-r--r-- | kolla/docker/base/dpkg_reducing_disk_footprint (renamed from docker/base/dpkg_reducing_disk_footprint) | 0 | ||||
| -rwxr-xr-x | kolla/docker/base/healthcheck_curl (renamed from docker/base/healthcheck_curl) | 0 | ||||
| -rwxr-xr-x | kolla/docker/base/healthcheck_filemod (renamed from docker/base/healthcheck_filemod) | 0 | ||||
| -rwxr-xr-x | kolla/docker/base/healthcheck_listen (renamed from docker/base/healthcheck_listen) | 0 | ||||
| -rwxr-xr-x | kolla/docker/base/healthcheck_port (renamed from docker/base/healthcheck_port) | 0 | ||||
| -rwxr-xr-x | kolla/docker/base/healthcheck_socket (renamed from docker/base/healthcheck_socket) | 0 | ||||
| -rw-r--r-- | kolla/docker/base/install_projects.sh (renamed from docker/base/install_projects.sh) | 4 | ||||
| -rw-r--r-- | kolla/docker/base/kolla_bashrc (renamed from docker/base/kolla_bashrc) | 0 | ||||
| -rwxr-xr-x | kolla/docker/base/kolla_patch.sh (renamed from docker/base/kolla_patch.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/base/set_configs.py (renamed from docker/base/set_configs.py) | 115 | ||||
| -rw-r--r-- | kolla/docker/base/sources.list (renamed from docker/base/sources.list) | 0 | ||||
| -rw-r--r-- | kolla/docker/base/start.sh (renamed from docker/base/start.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/base/sudoers (renamed from docker/base/sudoers) | 0 | ||||
| -rw-r--r-- | kolla/docker/base/ubuntu.sources | 17 | ||||
| -rw-r--r-- | kolla/docker/base/ubuntu.sources.arm64 | 24 | ||||
| -rw-r--r-- | kolla/docker/bifrost/bifrost-base/Dockerfile.j2 (renamed from docker/bifrost/bifrost-base/Dockerfile.j2) | 31 | ||||
| -rw-r--r-- | kolla/docker/bifrost/bifrost-base/bifrost_sudoers (renamed from docker/bifrost/bifrost-base/bifrost_sudoers) | 0 | ||||
| -rw-r--r-- | kolla/docker/bifrost/bifrost-base/build_arg.yml (renamed from docker/bifrost/bifrost-base/build_arg.yml) | 0 | ||||
| -rw-r--r-- | kolla/docker/bifrost/bifrost-deploy/Dockerfile.j2 (renamed from docker/bifrost/bifrost-deploy/Dockerfile.j2) | 5 | ||||
| -rw-r--r-- | kolla/docker/blazar/blazar-api/Dockerfile.j2 (renamed from docker/blazar/blazar-api/Dockerfile.j2) | 2 | ||||
| -rw-r--r-- | kolla/docker/blazar/blazar-api/extend_start.sh (renamed from docker/blazar/blazar-api/extend_start.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/blazar/blazar-base/Dockerfile.j2 (renamed from docker/blazar/blazar-base/Dockerfile.j2) | 5 | ||||
| -rw-r--r-- | kolla/docker/blazar/blazar-base/extend_start.sh (renamed from docker/blazar/blazar-base/extend_start.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/blazar/blazar-manager/Dockerfile.j2 (renamed from docker/blazar/blazar-manager/Dockerfile.j2) | 2 | ||||
| -rw-r--r-- | kolla/docker/ceilometer/ceilometer-base/Dockerfile.j2 (renamed from docker/ceilometer/ceilometer-base/Dockerfile.j2) | 5 | ||||
| -rw-r--r-- | kolla/docker/ceilometer/ceilometer-base/ceilometer_sudoers (renamed from docker/ceilometer/ceilometer-base/ceilometer_sudoers) | 0 | ||||
| -rw-r--r-- | kolla/docker/ceilometer/ceilometer-base/extend_start.sh (renamed from docker/ceilometer/ceilometer-base/extend_start.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/ceilometer/ceilometer-central/Dockerfile.j2 (renamed from docker/ceilometer/ceilometer-central/Dockerfile.j2) | 2 | ||||
| -rw-r--r-- | kolla/docker/ceilometer/ceilometer-compute/Dockerfile.j2 (renamed from docker/ceilometer/ceilometer-compute/Dockerfile.j2) | 5 | ||||
| -rw-r--r-- | kolla/docker/ceilometer/ceilometer-ipmi/Dockerfile.j2 (renamed from docker/ceilometer/ceilometer-ipmi/Dockerfile.j2) | 5 | ||||
| -rw-r--r-- | kolla/docker/ceilometer/ceilometer-notification/Dockerfile.j2 (renamed from docker/ceilometer/ceilometer-notification/Dockerfile.j2) | 2 | ||||
| -rw-r--r-- | kolla/docker/ceilometer/ceilometer-notification/extend_start.sh (renamed from docker/ceilometer/ceilometer-notification/extend_start.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/cinder/cinder-api/Dockerfile.j2 (renamed from docker/cinder/cinder-api/Dockerfile.j2) | 5 | ||||
| -rw-r--r-- | kolla/docker/cinder/cinder-api/extend_start.sh (renamed from docker/cinder/cinder-api/extend_start.sh) | 2 | ||||
| -rw-r--r-- | kolla/docker/cinder/cinder-backup/Dockerfile.j2 (renamed from docker/cinder/cinder-backup/Dockerfile.j2) | 5 | ||||
| -rw-r--r-- | kolla/docker/cinder/cinder-base/Dockerfile.j2 (renamed from docker/cinder/cinder-base/Dockerfile.j2) | 13 | ||||
| -rw-r--r-- | kolla/docker/cinder/cinder-base/cinder_sudoers (renamed from docker/cinder/cinder-base/cinder_sudoers) | 0 | ||||
| -rw-r--r-- | kolla/docker/cinder/cinder-base/extend_start.sh (renamed from docker/cinder/cinder-base/extend_start.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/cinder/cinder-scheduler/Dockerfile.j2 (renamed from docker/cinder/cinder-scheduler/Dockerfile.j2) | 2 | ||||
| -rw-r--r-- | kolla/docker/cinder/cinder-volume/Dockerfile.j2 (renamed from docker/cinder/cinder-volume/Dockerfile.j2) | 5 | ||||
| -rw-r--r-- | kolla/docker/cinder/cinder-volume/cinder_sudoers (renamed from docker/cinder/cinder-volume/cinder_sudoers) | 0 | ||||
| -rw-r--r-- | kolla/docker/cinder/cinder-volume/extend_start.sh (renamed from docker/cinder/cinder-volume/extend_start.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/cloudkitty/cloudkitty-api/Dockerfile.j2 (renamed from docker/cloudkitty/cloudkitty-api/Dockerfile.j2) | 5 | ||||
| -rw-r--r-- | kolla/docker/cloudkitty/cloudkitty-api/extend_start.sh (renamed from docker/cloudkitty/cloudkitty-api/extend_start.sh) | 2 | ||||
| -rw-r--r-- | kolla/docker/cloudkitty/cloudkitty-base/Dockerfile.j2 (renamed from docker/cloudkitty/cloudkitty-base/Dockerfile.j2) | 5 | ||||
| -rw-r--r-- | kolla/docker/cloudkitty/cloudkitty-base/extend_start.sh (renamed from docker/cloudkitty/cloudkitty-base/extend_start.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/cloudkitty/cloudkitty-processor/Dockerfile.j2 (renamed from docker/cloudkitty/cloudkitty-processor/Dockerfile.j2) | 5 | ||||
| -rw-r--r-- | kolla/docker/collectd/Dockerfile.j2 (renamed from docker/collectd/Dockerfile.j2) | 10 | ||||
| -rw-r--r-- | kolla/docker/collectd/extend_start.sh (renamed from docker/collectd/extend_start.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/cron/Dockerfile.j2 (renamed from docker/cron/Dockerfile.j2) | 5 | ||||
| -rw-r--r-- | kolla/docker/cron/extend_start.sh (renamed from docker/cron/extend_start.sh) | 0 | ||||
| -rwxr-xr-x | kolla/docker/cron/logrotate (renamed from docker/cron/logrotate) | 0 | ||||
| -rw-r--r-- | kolla/docker/cyborg/cyborg-agent/Dockerfile.j2 (renamed from docker/cyborg/cyborg-agent/Dockerfile.j2) | 5 | ||||
| -rw-r--r-- | kolla/docker/cyborg/cyborg-api/Dockerfile.j2 (renamed from docker/cyborg/cyborg-api/Dockerfile.j2) | 5 | ||||
| -rw-r--r-- | kolla/docker/cyborg/cyborg-api/extend_start.sh (renamed from docker/cyborg/cyborg-api/extend_start.sh) | 2 | ||||
| -rw-r--r-- | kolla/docker/cyborg/cyborg-base/Dockerfile.j2 (renamed from docker/cyborg/cyborg-base/Dockerfile.j2) | 5 | ||||
| -rw-r--r-- | kolla/docker/cyborg/cyborg-base/cyborg_sudoers (renamed from docker/cyborg/cyborg-base/cyborg_sudoers) | 0 | ||||
| -rwxr-xr-x | kolla/docker/cyborg/cyborg-base/extend_start.sh (renamed from docker/cyborg/cyborg-base/extend_start.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/cyborg/cyborg-conductor/Dockerfile.j2 (renamed from docker/cyborg/cyborg-conductor/Dockerfile.j2) | 2 | ||||
| -rw-r--r-- | kolla/docker/designate/designate-api/Dockerfile.j2 (renamed from docker/designate/designate-api/Dockerfile.j2) | 2 | ||||
| -rw-r--r-- | kolla/docker/designate/designate-backend-bind9/Dockerfile.j2 (renamed from docker/designate/designate-backend-bind9/Dockerfile.j2) | 5 | ||||
| -rw-r--r-- | kolla/docker/designate/designate-base/Dockerfile.j2 (renamed from docker/designate/designate-base/Dockerfile.j2) | 5 | ||||
| -rw-r--r-- | kolla/docker/designate/designate-base/designate_sudoers (renamed from docker/designate/designate-base/designate_sudoers) | 0 | ||||
| -rw-r--r-- | kolla/docker/designate/designate-base/extend_start.sh (renamed from docker/designate/designate-base/extend_start.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/designate/designate-central/Dockerfile.j2 (renamed from docker/designate/designate-central/Dockerfile.j2) | 2 | ||||
| -rw-r--r-- | kolla/docker/designate/designate-central/extend_start.sh (renamed from docker/designate/designate-central/extend_start.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/designate/designate-mdns/Dockerfile.j2 (renamed from docker/designate/designate-mdns/Dockerfile.j2) | 2 | ||||
| -rw-r--r-- | kolla/docker/designate/designate-producer/Dockerfile.j2 (renamed from docker/designate/designate-producer/Dockerfile.j2) | 2 | ||||
| -rw-r--r-- | kolla/docker/designate/designate-sink/Dockerfile.j2 (renamed from docker/designate/designate-sink/Dockerfile.j2) | 2 | ||||
| -rw-r--r-- | kolla/docker/designate/designate-worker/Dockerfile.j2 (renamed from docker/designate/designate-worker/Dockerfile.j2) | 5 | ||||
| -rw-r--r-- | kolla/docker/dnsmasq/Dockerfile.j2 (renamed from docker/dnsmasq/Dockerfile.j2) | 5 | ||||
| -rw-r--r-- | kolla/docker/dnsmasq/extend_start.sh | 31 | ||||
| -rw-r--r-- | kolla/docker/etcd/Dockerfile.j2 (renamed from docker/etcd/Dockerfile.j2) | 2 | ||||
| -rw-r--r-- | kolla/docker/etcd/etcd_sudoers (renamed from docker/etcd/etcd_sudoers) | 0 | ||||
| -rw-r--r-- | kolla/docker/etcd/extend_start.sh (renamed from docker/etcd/extend_start.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/fluentd/Dockerfile.j2 (renamed from docker/fluentd/Dockerfile.j2) | 5 | ||||
| -rw-r--r-- | kolla/docker/fluentd/extend_start.sh (renamed from docker/fluentd/extend_start.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/fluentd/fluentd_sudoers (renamed from docker/fluentd/fluentd_sudoers) | 0 | ||||
| -rw-r--r-- | kolla/docker/glance/glance-api/Dockerfile.j2 (renamed from docker/glance/glance-api/Dockerfile.j2) | 10 | ||||
| -rw-r--r-- | kolla/docker/glance/glance-api/extend_start.sh (renamed from docker/glance/glance-api/extend_start.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/glance/glance-base/Dockerfile.j2 (renamed from docker/glance/glance-base/Dockerfile.j2) | 10 | ||||
| -rw-r--r-- | kolla/docker/glance/glance-base/etc/glance/rootwrap.conf (renamed from docker/glance/glance-base/etc/glance/rootwrap.conf) | 0 | ||||
| -rw-r--r-- | kolla/docker/glance/glance-base/etc/glance/rootwrap.d/glance_cinder_store.filters (renamed from docker/glance/glance-base/etc/glance/rootwrap.d/glance_cinder_store.filters) | 0 | ||||
| -rw-r--r-- | kolla/docker/glance/glance-base/extend_start.sh (renamed from docker/glance/glance-base/extend_start.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/glance/glance-base/glance_sudoers (renamed from docker/glance/glance-base/glance_sudoers) | 0 | ||||
| -rw-r--r-- | kolla/docker/gnocchi/gnocchi-api/Dockerfile.j2 (renamed from docker/gnocchi/gnocchi-api/Dockerfile.j2) | 2 | ||||
| -rw-r--r-- | kolla/docker/gnocchi/gnocchi-api/extend_start.sh (renamed from docker/gnocchi/gnocchi-api/extend_start.sh) | 2 | ||||
| -rw-r--r-- | kolla/docker/gnocchi/gnocchi-base/Dockerfile.j2 (renamed from docker/gnocchi/gnocchi-base/Dockerfile.j2) | 10 | ||||
| -rw-r--r-- | kolla/docker/gnocchi/gnocchi-base/extend_start.sh (renamed from docker/gnocchi/gnocchi-base/extend_start.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/gnocchi/gnocchi-base/gnocchi_sudoers (renamed from docker/gnocchi/gnocchi-base/gnocchi_sudoers) | 0 | ||||
| -rw-r--r-- | kolla/docker/gnocchi/gnocchi-metricd/Dockerfile.j2 (renamed from docker/gnocchi/gnocchi-metricd/Dockerfile.j2) | 2 | ||||
| -rw-r--r-- | kolla/docker/gnocchi/gnocchi-statsd/Dockerfile.j2 (renamed from docker/gnocchi/gnocchi-statsd/Dockerfile.j2) | 2 | ||||
| -rw-r--r-- | kolla/docker/grafana/Dockerfile.j2 (renamed from docker/grafana/Dockerfile.j2) | 12 | ||||
| -rw-r--r-- | kolla/docker/grafana/extend_start.sh (renamed from docker/grafana/extend_start.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/grafana/grafana_sudoers (renamed from docker/grafana/grafana_sudoers) | 0 | ||||
| -rw-r--r-- | kolla/docker/hacluster/hacluster-base/Dockerfile.j2 (renamed from docker/hacluster/hacluster-base/Dockerfile.j2) | 9 | ||||
| -rw-r--r-- | kolla/docker/hacluster/hacluster-base/extend_start.sh (renamed from docker/hacluster/hacluster-base/extend_start.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/hacluster/hacluster-corosync/Dockerfile.j2 (renamed from docker/hacluster/hacluster-corosync/Dockerfile.j2) | 5 | ||||
| -rw-r--r-- | kolla/docker/hacluster/hacluster-pacemaker-remote/Dockerfile.j2 (renamed from docker/hacluster/hacluster-pacemaker-remote/Dockerfile.j2) | 5 | ||||
| -rw-r--r-- | kolla/docker/hacluster/hacluster-pacemaker/Dockerfile.j2 (renamed from docker/hacluster/hacluster-pacemaker/Dockerfile.j2) | 5 | ||||
| -rw-r--r-- | kolla/docker/hacluster/hacluster-pcs/Dockerfile.j2 (renamed from docker/hacluster/hacluster-pcs/Dockerfile.j2) | 5 | ||||
| -rw-r--r-- | kolla/docker/haproxy/haproxy-ssh/Dockerfile.j2 (renamed from docker/haproxy/haproxy-ssh/Dockerfile.j2) | 5 | ||||
| -rw-r--r-- | kolla/docker/haproxy/haproxy-ssh/extend_start.sh (renamed from docker/haproxy/haproxy-ssh/extend_start.sh) | 2 | ||||
| -rwxr-xr-x | kolla/docker/haproxy/haproxy-ssh/update-loadbalancer-cert.sh (renamed from docker/haproxy/haproxy-ssh/update-loadbalancer-cert.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/haproxy/haproxy/Dockerfile.j2 (renamed from docker/haproxy/haproxy/Dockerfile.j2) | 5 | ||||
| -rw-r--r-- | kolla/docker/haproxy/haproxy/ensure_latest_config.sh (renamed from docker/haproxy/haproxy/ensure_latest_config.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/heat/heat-api-cfn/Dockerfile.j2 (renamed from docker/heat/heat-api-cfn/Dockerfile.j2) | 5 | ||||
| -rw-r--r-- | kolla/docker/heat/heat-api/Dockerfile.j2 (renamed from docker/heat/heat-api/Dockerfile.j2) | 2 | ||||
| -rw-r--r-- | kolla/docker/heat/heat-api/extend_start.sh (renamed from docker/heat/heat-api/extend_start.sh) | 2 | ||||
| -rw-r--r-- | kolla/docker/heat/heat-base/Dockerfile.j2 (renamed from docker/heat/heat-base/Dockerfile.j2) | 12 | ||||
| -rw-r--r-- | kolla/docker/heat/heat-base/extend_start.sh (renamed from docker/heat/heat-base/extend_start.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/heat/heat-engine/Dockerfile.j2 (renamed from docker/heat/heat-engine/Dockerfile.j2) | 2 | ||||
| -rw-r--r-- | kolla/docker/horizon/Dockerfile.j2 (renamed from docker/horizon/Dockerfile.j2) | 14 | ||||
| -rw-r--r-- | kolla/docker/horizon/extend_start.sh (renamed from docker/horizon/extend_start.sh) | 23 | ||||
| -rw-r--r-- | kolla/docker/httpd/Dockerfile.j2 | 46 | ||||
| -rw-r--r-- | kolla/docker/httpd/extend_start.sh (renamed from docker/heat/heat-api-cfn/extend_start.sh) | 2 | ||||
| -rw-r--r-- | kolla/docker/httpd/httpd_setup.sh (renamed from docker/base/httpd_setup.sh) | 6 | ||||
| -rw-r--r-- | kolla/docker/ironic/ironic-api/Dockerfile.j2 (renamed from docker/ironic/ironic-api/Dockerfile.j2) | 5 | ||||
| -rw-r--r-- | kolla/docker/ironic/ironic-api/extend_start.sh (renamed from docker/ironic/ironic-api/extend_start.sh) | 2 | ||||
| -rw-r--r-- | kolla/docker/ironic/ironic-base/Dockerfile.j2 (renamed from docker/ironic/ironic-base/Dockerfile.j2) | 7 | ||||
| -rw-r--r-- | kolla/docker/ironic/ironic-base/extend_start.sh (renamed from docker/ironic/ironic-base/extend_start.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/ironic/ironic-base/ironic_sudoers (renamed from docker/ironic/ironic-base/ironic_sudoers) | 0 | ||||
| -rw-r--r-- | kolla/docker/ironic/ironic-conductor/Dockerfile.j2 (renamed from docker/ironic/ironic-conductor/Dockerfile.j2) | 10 | ||||
| -rw-r--r-- | kolla/docker/ironic/ironic-prometheus-exporter/Dockerfile.j2 | 17 | ||||
| -rw-r--r-- | kolla/docker/ironic/ironic-pxe-filter/Dockerfile.j2 | 27 | ||||
| -rw-r--r-- | kolla/docker/ironic/ironic-pxe-filter/extend_start.sh | 6 | ||||
| -rw-r--r-- | kolla/docker/ironic/ironic-pxe/Dockerfile.j2 (renamed from docker/ironic/ironic-pxe/Dockerfile.j2) | 12 | ||||
| -rw-r--r-- | kolla/docker/ironic/ironic-pxe/extend_start.sh (renamed from docker/ironic/ironic-pxe/extend_start.sh) | 23 | ||||
| -rw-r--r-- | kolla/docker/ironic/ironic-pxe/tftp-map-file-template (renamed from docker/ironic/ironic-pxe/tftp-map-file-template) | 0 | ||||
| -rw-r--r-- | kolla/docker/iscsid/Dockerfile.j2 (renamed from docker/iscsid/Dockerfile.j2) | 7 | ||||
| -rw-r--r-- | kolla/docker/iscsid/extend_start.sh (renamed from docker/iscsid/extend_start.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/keepalived/Dockerfile.j2 (renamed from docker/keepalived/Dockerfile.j2) | 13 | ||||
| -rw-r--r-- | kolla/docker/keepalived/check_alive.sh (renamed from docker/keepalived/check_alive.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/keepalived/extend_start.sh (renamed from docker/keepalived/extend_start.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/kerbside/kerbside-api/Dockerfile.j2 | 11 | ||||
| -rw-r--r-- | kolla/docker/kerbside/kerbside-api/extend_start.sh | 4 | ||||
| -rw-r--r-- | kolla/docker/kerbside/kerbside-base/Dockerfile.j2 | 42 | ||||
| -rw-r--r-- | kolla/docker/kerbside/kerbside-proxy/Dockerfile.j2 | 11 | ||||
| -rw-r--r-- | kolla/docker/kerbside/kerbside-proxy/extend_start.sh | 4 | ||||
| -rw-r--r-- | kolla/docker/keystone/keystone-base/Dockerfile.j2 (renamed from docker/keystone/keystone-base/Dockerfile.j2) | 14 | ||||
| -rw-r--r-- | kolla/docker/keystone/keystone-fernet/Dockerfile.j2 (renamed from docker/keystone/keystone-fernet/Dockerfile.j2) | 5 | ||||
| -rw-r--r-- | kolla/docker/keystone/keystone-fernet/extend_start.sh (renamed from docker/keystone/keystone-fernet/extend_start.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/keystone/keystone-fernet/fetch_fernet_tokens.py (renamed from docker/keystone/keystone-fernet/fetch_fernet_tokens.py) | 0 | ||||
| -rw-r--r-- | kolla/docker/keystone/keystone-fernet/keystone_bootstrap.sh (renamed from docker/keystone/keystone-fernet/keystone_bootstrap.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/keystone/keystone-ssh/Dockerfile.j2 (renamed from docker/keystone/keystone-ssh/Dockerfile.j2) | 5 | ||||
| -rw-r--r-- | kolla/docker/keystone/keystone-ssh/extend_start.sh (renamed from docker/keystone/keystone-ssh/extend_start.sh) | 2 | ||||
| -rw-r--r-- | kolla/docker/keystone/keystone/Dockerfile.j2 (renamed from docker/keystone/keystone/Dockerfile.j2) | 7 | ||||
| -rw-r--r-- | kolla/docker/keystone/keystone/extend_start.sh (renamed from docker/keystone/keystone/extend_start.sh) | 3 | ||||
| -rw-r--r-- | kolla/docker/keystone/keystone/keystone_bootstrap.sh (renamed from docker/keystone/keystone/keystone_bootstrap.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/kolla-toolbox/Dockerfile.j2 (renamed from docker/kolla-toolbox/Dockerfile.j2) | 44 | ||||
| -rw-r--r-- | kolla/docker/kolla-toolbox/ansible.cfg (renamed from docker/kolla-toolbox/ansible.cfg) | 3 | ||||
| -rw-r--r-- | kolla/docker/kolla-toolbox/ansible_sudoers (renamed from docker/kolla-toolbox/ansible_sudoers) | 0 | ||||
| l--------- | kolla/docker/kolla-toolbox/apt_preferences_rabbitmq.debian (renamed from docker/kolla-toolbox/apt_preferences_rabbitmq.debian) | 0 | ||||
| l--------- | kolla/docker/kolla-toolbox/apt_preferences_rabbitmq.ubuntu (renamed from docker/kolla-toolbox/apt_preferences_rabbitmq.ubuntu) | 0 | ||||
| -rw-r--r-- | kolla/docker/kolla-toolbox/extend_start.sh (renamed from docker/kolla-toolbox/extend_start.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/kolla-toolbox/kolla_toolbox.sh (renamed from docker/kolla-toolbox/kolla_toolbox.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/kolla-toolbox/requirements.yml (renamed from docker/kolla-toolbox/requirements.yml) | 6 | ||||
| -rw-r--r-- | kolla/docker/letsencrypt/letsencrypt-base/Dockerfile.j2 (renamed from docker/letsencrypt/letsencrypt-base/Dockerfile.j2) | 2 | ||||
| -rw-r--r-- | kolla/docker/letsencrypt/letsencrypt-base/extend_start.sh (renamed from docker/letsencrypt/letsencrypt-base/extend_start.sh) | 0 | ||||
| -rwxr-xr-x | kolla/docker/letsencrypt/letsencrypt-lego/Dockerfile.j2 (renamed from docker/letsencrypt/letsencrypt-lego/Dockerfile.j2) | 5 | ||||
| -rwxr-xr-x | kolla/docker/letsencrypt/letsencrypt-lego/letsencrypt-certificates.sh (renamed from docker/letsencrypt/letsencrypt-lego/letsencrypt-certificates.sh) | 69 | ||||
| -rw-r--r-- | kolla/docker/letsencrypt/letsencrypt-lego/sync-and-update-certificate.sh (renamed from docker/letsencrypt/letsencrypt-lego/sync-and-update-certificate.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/macros.j2 (renamed from docker/macros.j2) | 16 | ||||
| -rw-r--r-- | kolla/docker/magnum/magnum-api/Dockerfile.j2 (renamed from docker/magnum/magnum-api/Dockerfile.j2) | 2 | ||||
| -rw-r--r-- | kolla/docker/magnum/magnum-api/extend_start.sh (renamed from docker/magnum/magnum-api/extend_start.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/magnum/magnum-base/Dockerfile.j2 (renamed from docker/magnum/magnum-base/Dockerfile.j2) | 5 | ||||
| -rw-r--r-- | kolla/docker/magnum/magnum-base/extend_start.sh (renamed from docker/magnum/magnum-base/extend_start.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/magnum/magnum-conductor/Dockerfile.j2 (renamed from docker/magnum/magnum-conductor/Dockerfile.j2) | 2 | ||||
| -rw-r--r-- | kolla/docker/manila/manila-api/Dockerfile.j2 (renamed from docker/manila/manila-api/Dockerfile.j2) | 5 | ||||
| -rw-r--r-- | kolla/docker/manila/manila-api/extend_start.sh (renamed from docker/manila/manila-api/extend_start.sh) | 2 | ||||
| -rw-r--r-- | kolla/docker/manila/manila-base/Dockerfile.j2 (renamed from docker/manila/manila-base/Dockerfile.j2) | 8 | ||||
| -rw-r--r-- | kolla/docker/manila/manila-base/extend_start.sh (renamed from docker/manila/manila-base/extend_start.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/manila/manila-base/manila_sudoers (renamed from docker/manila/manila-base/manila_sudoers) | 0 | ||||
| -rw-r--r-- | kolla/docker/manila/manila-data/Dockerfile.j2 (renamed from docker/manila/manila-data/Dockerfile.j2) | 5 | ||||
| -rw-r--r-- | kolla/docker/manila/manila-scheduler/Dockerfile.j2 (renamed from docker/manila/manila-scheduler/Dockerfile.j2) | 2 | ||||
| -rw-r--r-- | kolla/docker/manila/manila-share/Dockerfile.j2 (renamed from docker/manila/manila-share/Dockerfile.j2) | 9 | ||||
| -rw-r--r-- | kolla/docker/mariadb-server/Dockerfile.j2 (renamed from docker/mariadb/mariadb-server/Dockerfile.j2) | 29 | ||||
| -rw-r--r-- | kolla/docker/mariadb-server/backup.sh (renamed from docker/mariadb/mariadb-server/backup.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/mariadb-server/extend_start.sh (renamed from docker/mariadb/mariadb-server/extend_start.sh) | 14 | ||||
| -rwxr-xr-x | kolla/docker/mariadb-server/healthcheck_mariadb (renamed from docker/mariadb/mariadb-server/healthcheck_mariadb) | 0 | ||||
| -rw-r--r-- | kolla/docker/mariadb-server/mariadb_sudoers (renamed from docker/mariadb/mariadb-server/mariadb_sudoers) | 0 | ||||
| -rw-r--r-- | kolla/docker/mariadb-server/security_reset.expect (renamed from docker/mariadb/mariadb-server/security_reset.expect) | 0 | ||||
| -rw-r--r-- | kolla/docker/masakari/masakari-api/Dockerfile.j2 (renamed from docker/masakari/masakari-api/Dockerfile.j2) | 2 | ||||
| -rwxr-xr-x | kolla/docker/masakari/masakari-api/extend_start.sh (renamed from docker/masakari/masakari-api/extend_start.sh) | 2 | ||||
| -rw-r--r-- | kolla/docker/masakari/masakari-base/Dockerfile.j2 (renamed from docker/masakari/masakari-base/Dockerfile.j2) | 8 | ||||
| -rwxr-xr-x | kolla/docker/masakari/masakari-base/extend_start.sh (renamed from docker/masakari/masakari-base/extend_start.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/masakari/masakari-engine/Dockerfile.j2 (renamed from docker/masakari/masakari-engine/Dockerfile.j2) | 2 | ||||
| -rw-r--r-- | kolla/docker/masakari/masakari-monitors/Dockerfile.j2 (renamed from docker/masakari/masakari-monitors/Dockerfile.j2) | 7 | ||||
| -rw-r--r-- | kolla/docker/masakari/masakari-monitors/masakari_monitors_sudoers (renamed from docker/masakari/masakari-monitors/masakari_monitors_sudoers) | 2 | ||||
| -rw-r--r-- | kolla/docker/memcached/Dockerfile.j2 (renamed from docker/memcached/Dockerfile.j2) | 5 | ||||
| -rw-r--r-- | kolla/docker/mistral/mistral-api/Dockerfile.j2 (renamed from docker/mistral/mistral-api/Dockerfile.j2) | 5 | ||||
| -rw-r--r-- | kolla/docker/mistral/mistral-api/extend_start.sh (renamed from docker/mistral/mistral-api/extend_start.sh) | 2 | ||||
| -rw-r--r-- | kolla/docker/mistral/mistral-base/Dockerfile.j2 (renamed from docker/mistral/mistral-base/Dockerfile.j2) | 5 | ||||
| -rw-r--r-- | kolla/docker/mistral/mistral-base/extend_start.sh (renamed from docker/mistral/mistral-base/extend_start.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/mistral/mistral-engine/Dockerfile.j2 (renamed from docker/mistral/mistral-engine/Dockerfile.j2) | 2 | ||||
| -rw-r--r-- | kolla/docker/mistral/mistral-event-engine/Dockerfile.j2 (renamed from docker/mistral/mistral-event-engine/Dockerfile.j2) | 2 | ||||
| -rw-r--r-- | kolla/docker/mistral/mistral-executor/Dockerfile.j2 (renamed from docker/mistral/mistral-executor/Dockerfile.j2) | 2 | ||||
| -rw-r--r-- | kolla/docker/multipathd/Dockerfile.j2 (renamed from docker/multipathd/Dockerfile.j2) | 5 | ||||
| -rw-r--r-- | kolla/docker/networking-baremetal/ironic-neutron-agent/Dockerfile.j2 (renamed from docker/networking-baremetal/ironic-neutron-agent/Dockerfile.j2) | 2 | ||||
| -rw-r--r-- | kolla/docker/neutron/neutron-base/Dockerfile.j2 (renamed from docker/neutron/neutron-base/Dockerfile.j2) | 11 | ||||
| -rw-r--r-- | kolla/docker/neutron/neutron-base/copy-wrappers (renamed from docker/neutron/neutron-base/copy-wrappers) | 0 | ||||
| -rw-r--r-- | kolla/docker/neutron/neutron-base/delete-wrappers (renamed from docker/neutron/neutron-base/delete-wrappers) | 0 | ||||
| -rw-r--r-- | kolla/docker/neutron/neutron-base/dnsmasq (renamed from docker/neutron/neutron-base/dnsmasq) | 0 | ||||
| -rw-r--r-- | kolla/docker/neutron/neutron-base/extend_start.sh (renamed from docker/neutron/neutron-base/extend_start.sh) | 2 | ||||
| -rw-r--r-- | kolla/docker/neutron/neutron-base/haproxy (renamed from docker/neutron/neutron-base/haproxy) | 0 | ||||
| -rw-r--r-- | kolla/docker/neutron/neutron-base/keepalived (renamed from docker/neutron/neutron-base/keepalived) | 2 | ||||
| -rw-r--r-- | kolla/docker/neutron/neutron-base/neutron-keepalived-state-change (renamed from docker/neutron/neutron-base/neutron-keepalived-state-change) | 0 | ||||
| -rw-r--r-- | kolla/docker/neutron/neutron-base/neutron_sudoers (renamed from docker/neutron/neutron-base/neutron_sudoers) | 0 | ||||
| -rw-r--r-- | kolla/docker/neutron/neutron-base/radvd (renamed from docker/neutron/neutron-base/radvd) | 0 | ||||
| -rw-r--r-- | kolla/docker/neutron/neutron-bgp-dragent/Dockerfile.j2 (renamed from docker/neutron/neutron-bgp-dragent/Dockerfile.j2) | 5 | ||||
| -rw-r--r-- | kolla/docker/neutron/neutron-dhcp-agent/Dockerfile.j2 (renamed from docker/neutron/neutron-dhcp-agent/Dockerfile.j2) | 5 | ||||
| -rw-r--r-- | kolla/docker/neutron/neutron-dhcp-agent/extend_start.sh (renamed from docker/neutron/neutron-dhcp-agent/extend_start.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/neutron/neutron-l3-agent/Dockerfile.j2 (renamed from docker/neutron/neutron-l3-agent/Dockerfile.j2) | 5 | ||||
| -rw-r--r-- | kolla/docker/neutron/neutron-l3-agent/extend_start.sh (renamed from docker/neutron/neutron-l3-agent/extend_start.sh) | 2 | ||||
| -rw-r--r-- | kolla/docker/neutron/neutron-metadata-agent/Dockerfile.j2 (renamed from docker/neutron/neutron-metadata-agent/Dockerfile.j2) | 7 | ||||
| -rw-r--r-- | kolla/docker/neutron/neutron-metadata-agent/extend_start.sh | 18 | ||||
| -rw-r--r-- | kolla/docker/neutron/neutron-metering-agent/Dockerfile.j2 (renamed from docker/neutron/neutron-metering-agent/Dockerfile.j2) | 2 | ||||
| -rw-r--r-- | kolla/docker/neutron/neutron-mlnx-agent/Dockerfile.j2 (renamed from docker/neutron/neutron-mlnx-agent/Dockerfile.j2) | 5 | ||||
| -rw-r--r-- | kolla/docker/neutron/neutron-openvswitch-agent/Dockerfile.j2 (renamed from docker/neutron/neutron-openvswitch-agent/Dockerfile.j2) | 5 | ||||
| -rw-r--r-- | kolla/docker/neutron/neutron-ovn-agent/Dockerfile.j2 (renamed from docker/neutron/neutron-ovn-agent/Dockerfile.j2) | 5 | ||||
| -rw-r--r-- | kolla/docker/neutron/neutron-ovn-vpn-agent/Dockerfile.j2 | 34 | ||||
| -rw-r--r-- | kolla/docker/neutron/neutron-server/Dockerfile.j2 (renamed from docker/neutron/neutron-server/Dockerfile.j2) | 5 | ||||
| -rw-r--r-- | kolla/docker/neutron/neutron-server/extend_start.sh (renamed from docker/neutron/neutron-server/extend_start.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/neutron/neutron-sriov-agent/Dockerfile.j2 (renamed from docker/neutron/neutron-sriov-agent/Dockerfile.j2) | 5 | ||||
| -rw-r--r-- | kolla/docker/nova/nova-api/Dockerfile.j2 (renamed from docker/nova/nova-api/Dockerfile.j2) | 5 | ||||
| -rw-r--r-- | kolla/docker/nova/nova-api/extend_start.sh (renamed from docker/nova/nova-api/extend_start.sh) | 2 | ||||
| -rw-r--r-- | kolla/docker/nova/nova-base/Dockerfile.j2 (renamed from docker/nova/nova-base/Dockerfile.j2) | 8 | ||||
| -rw-r--r-- | kolla/docker/nova/nova-base/extend_start.sh (renamed from docker/nova/nova-base/extend_start.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/nova/nova-base/nova_sudoers (renamed from docker/nova/nova-base/nova_sudoers) | 0 | ||||
| -rw-r--r-- | kolla/docker/nova/nova-compute-ironic/Dockerfile.j2 (renamed from docker/nova/nova-compute-ironic/Dockerfile.j2) | 11 | ||||
| -rw-r--r-- | kolla/docker/nova/nova-compute/Dockerfile.j2 (renamed from docker/nova/nova-compute/Dockerfile.j2) | 9 | ||||
| -rw-r--r-- | kolla/docker/nova/nova-compute/extend_start.sh (renamed from docker/nova/nova-compute/extend_start.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/nova/nova-conductor/Dockerfile.j2 (renamed from docker/nova/nova-conductor/Dockerfile.j2) | 2 | ||||
| -rw-r--r-- | kolla/docker/nova/nova-conductor/extend_start.sh (renamed from docker/nova/nova-conductor/extend_start.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/nova/nova-libvirt-spice/Dockerfile.j2 | 123 | ||||
| -rw-r--r-- | kolla/docker/nova/nova-libvirt-spice/extend_start.sh (renamed from docker/nova/nova-libvirt/extend_start.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/nova/nova-libvirt-spice/kolla_nova_libvirt_start.sh | 12 | ||||
| -rw-r--r-- | kolla/docker/nova/nova-libvirt/Dockerfile.j2 (renamed from docker/nova/nova-libvirt/Dockerfile.j2) | 15 | ||||
| -rw-r--r-- | kolla/docker/nova/nova-libvirt/extend_start.sh | 11 | ||||
| -rw-r--r-- | kolla/docker/nova/nova-libvirt/kolla_nova_libvirt_start.sh | 12 | ||||
| -rw-r--r-- | kolla/docker/nova/nova-novncproxy/Dockerfile.j2 (renamed from docker/nova/nova-novncproxy/Dockerfile.j2) | 5 | ||||
| -rw-r--r-- | kolla/docker/nova/nova-scheduler/Dockerfile.j2 (renamed from docker/nova/nova-scheduler/Dockerfile.j2) | 2 | ||||
| -rw-r--r-- | kolla/docker/nova/nova-serialproxy/Dockerfile.j2 (renamed from docker/nova/nova-serialproxy/Dockerfile.j2) | 2 | ||||
| -rw-r--r-- | kolla/docker/nova/nova-spicehtml5proxy/Dockerfile.j2 (renamed from docker/nova/nova-spicehtml5proxy/Dockerfile.j2) | 5 | ||||
| -rw-r--r-- | kolla/docker/nova/nova-ssh/Dockerfile.j2 (renamed from docker/nova/nova-ssh/Dockerfile.j2) | 5 | ||||
| -rw-r--r-- | kolla/docker/nova/nova-ssh/extend_start.sh (renamed from docker/nova/nova-ssh/extend_start.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/octavia/octavia-api/Dockerfile.j2 (renamed from docker/octavia/octavia-api/Dockerfile.j2) | 5 | ||||
| -rw-r--r-- | kolla/docker/octavia/octavia-api/extend_start.sh (renamed from docker/octavia/octavia-api/extend_start.sh) | 2 | ||||
| -rw-r--r-- | kolla/docker/octavia/octavia-base/Dockerfile.j2 (renamed from docker/octavia/octavia-base/Dockerfile.j2) | 8 | ||||
| -rw-r--r-- | kolla/docker/octavia/octavia-base/extend_start.sh (renamed from docker/octavia/octavia-base/extend_start.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/octavia/octavia-driver-agent/Dockerfile.j2 (renamed from docker/octavia/octavia-driver-agent/Dockerfile.j2) | 5 | ||||
| -rw-r--r-- | kolla/docker/octavia/octavia-health-manager/Dockerfile.j2 (renamed from docker/octavia/octavia-health-manager/Dockerfile.j2) | 2 | ||||
| -rw-r--r-- | kolla/docker/octavia/octavia-housekeeping/Dockerfile.j2 (renamed from docker/octavia/octavia-housekeeping/Dockerfile.j2) | 2 | ||||
| -rw-r--r-- | kolla/docker/octavia/octavia-worker/Dockerfile.j2 (renamed from docker/octavia/octavia-worker/Dockerfile.j2) | 2 | ||||
| -rw-r--r-- | kolla/docker/opensearch/opensearch-dashboards/Dockerfile.j2 (renamed from docker/opensearch/opensearch-dashboards/Dockerfile.j2) | 5 | ||||
| -rw-r--r-- | kolla/docker/opensearch/opensearch-dashboards/extend_start.sh (renamed from docker/opensearch/opensearch-dashboards/extend_start.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/opensearch/opensearch/Dockerfile.j2 (renamed from docker/opensearch/opensearch/Dockerfile.j2) | 5 | ||||
| -rw-r--r-- | kolla/docker/opensearch/opensearch/extend_start.sh (renamed from docker/opensearch/opensearch/extend_start.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/openstack-base/Dockerfile.j2 (renamed from docker/openstack-base/Dockerfile.j2) | 24 | ||||
| -rw-r--r-- | kolla/docker/openvswitch/openvswitch-base/Dockerfile.j2 (renamed from docker/openvswitch/openvswitch-base/Dockerfile.j2) | 8 | ||||
| -rw-r--r-- | kolla/docker/openvswitch/openvswitch-base/extend_start.sh (renamed from docker/openvswitch/openvswitch-base/extend_start.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/openvswitch/openvswitch-base/ovs_wrapper.sh (renamed from docker/openvswitch/openvswitch-base/ovs_wrapper.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/openvswitch/openvswitch-db-server/Dockerfile.j2 (renamed from docker/openvswitch/openvswitch-db-server/Dockerfile.j2) | 2 | ||||
| -rw-r--r-- | kolla/docker/openvswitch/openvswitch-db-server/extend_start.sh (renamed from docker/openvswitch/openvswitch-db-server/extend_start.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/openvswitch/openvswitch-db-server/releasenotes/notes/drop-ovs-ensure-configured-7973d36969e157fa.yaml (renamed from docker/openvswitch/openvswitch-db-server/releasenotes/notes/drop-ovs-ensure-configured-7973d36969e157fa.yaml) | 0 | ||||
| -rw-r--r-- | kolla/docker/openvswitch/openvswitch-vswitchd/Dockerfile.j2 (renamed from docker/openvswitch/openvswitch-vswitchd/Dockerfile.j2) | 2 | ||||
| -rw-r--r-- | kolla/docker/openvswitch/openvswitch-vswitchd/extend_start.sh (renamed from docker/openvswitch/openvswitch-vswitchd/extend_start.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/ovn/ovn-base/Dockerfile.j2 (renamed from docker/ovn/ovn-base/Dockerfile.j2) | 8 | ||||
| -rw-r--r-- | kolla/docker/ovn/ovn-base/extend_start.sh (renamed from docker/ovn/ovn-base/extend_start.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/ovn/ovn-controller/Dockerfile.j2 (renamed from docker/ovn/ovn-controller/Dockerfile.j2) | 8 | ||||
| -rw-r--r-- | kolla/docker/ovn/ovn-controller/extend_start.sh (renamed from docker/ovn/ovn-controller/extend_start.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/ovn/ovn-nb-db-server/Dockerfile.j2 (renamed from docker/ovn/ovn-nb-db-server/Dockerfile.j2) | 8 | ||||
| -rw-r--r-- | kolla/docker/ovn/ovn-nb-db-server/extend_start.sh (renamed from docker/ovn/ovn-nb-db-server/extend_start.sh) | 0 | ||||
| -rwxr-xr-x | kolla/docker/ovn/ovn-nb-db-server/start_nb_db_server.sh (renamed from docker/ovn/ovn-nb-db-server/start_nb_db_server.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/ovn/ovn-northd/Dockerfile.j2 (renamed from docker/ovn/ovn-northd/Dockerfile.j2) | 8 | ||||
| -rw-r--r-- | kolla/docker/ovn/ovn-northd/extend_start.sh (renamed from docker/ovn/ovn-northd/extend_start.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/ovn/ovn-sb-db-relay/Dockerfile.j2 | 15 | ||||
| -rw-r--r-- | kolla/docker/ovn/ovn-sb-db-relay/extend_start.sh (renamed from docker/ovn/ovn-sb-db-relay/extend_start.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/ovn/ovn-sb-db-server/Dockerfile.j2 (renamed from docker/ovn/ovn-sb-db-server/Dockerfile.j2) | 8 | ||||
| -rw-r--r-- | kolla/docker/ovn/ovn-sb-db-server/extend_start.sh (renamed from docker/ovn/ovn-sb-db-server/extend_start.sh) | 0 | ||||
| -rwxr-xr-x | kolla/docker/ovn/ovn-sb-db-server/start_sb_db_server.sh (renamed from docker/ovn/ovn-sb-db-server/start_sb_db_server.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/ovsdpdk/ovsdpdk-db/Dockerfile.j2 (renamed from docker/ovsdpdk/ovsdpdk-db/Dockerfile.j2) | 2 | ||||
| -rw-r--r-- | kolla/docker/ovsdpdk/ovsdpdk-db/extend_start.sh (renamed from docker/ovsdpdk/ovsdpdk-db/extend_start.sh) | 0 | ||||
| -rwxr-xr-x | kolla/docker/ovsdpdk/ovsdpdk-db/start_ovsdb_server.sh (renamed from docker/ovsdpdk/ovsdpdk-db/start_ovsdb_server.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/ovsdpdk/ovsdpdk-vswitchd/Dockerfile.j2 (renamed from docker/ovsdpdk/ovsdpdk-vswitchd/Dockerfile.j2) | 2 | ||||
| -rw-r--r-- | kolla/docker/ovsdpdk/ovsdpdk-vswitchd/extend_start.sh (renamed from docker/ovsdpdk/ovsdpdk-vswitchd/extend_start.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/ovsdpdk/ovsdpdk/Dockerfile.j2 (renamed from docker/ovsdpdk/ovsdpdk/Dockerfile.j2) | 7 | ||||
| -rw-r--r-- | kolla/docker/ovsdpdk/ovsdpdk/extend_start.sh (renamed from docker/ovsdpdk/ovsdpdk/extend_start.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/placement/placement-api/Dockerfile.j2 (renamed from docker/placement/placement-api/Dockerfile.j2) | 5 | ||||
| -rw-r--r-- | kolla/docker/placement/placement-api/extend_start.sh (renamed from docker/placement/placement-api/extend_start.sh) | 2 | ||||
| -rw-r--r-- | kolla/docker/placement/placement-base/Dockerfile.j2 (renamed from docker/placement/placement-base/Dockerfile.j2) | 5 | ||||
| -rw-r--r-- | kolla/docker/placement/placement-base/extend_start.sh (renamed from docker/placement/placement-base/extend_start.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/prometheus/prometheus-alertmanager/Dockerfile.j2 (renamed from docker/prometheus/prometheus-alertmanager/Dockerfile.j2) | 2 | ||||
| -rw-r--r-- | kolla/docker/prometheus/prometheus-base/Dockerfile.j2 (renamed from docker/prometheus/prometheus-base/Dockerfile.j2) | 2 | ||||
| -rw-r--r-- | kolla/docker/prometheus/prometheus-base/extend_start.sh (renamed from docker/prometheus/prometheus-base/extend_start.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/prometheus/prometheus-blackbox-exporter/Dockerfile.j2 (renamed from docker/prometheus/prometheus-blackbox-exporter/Dockerfile.j2) | 5 | ||||
| -rw-r--r-- | kolla/docker/prometheus/prometheus-cadvisor/Dockerfile.j2 (renamed from docker/prometheus/prometheus-cadvisor/Dockerfile.j2) | 2 | ||||
| -rw-r--r-- | kolla/docker/prometheus/prometheus-elasticsearch-exporter/Dockerfile.j2 (renamed from docker/prometheus/prometheus-elasticsearch-exporter/Dockerfile.j2) | 2 | ||||
| -rw-r--r-- | kolla/docker/prometheus/prometheus-libvirt-exporter/Dockerfile.j2 (renamed from docker/prometheus/prometheus-libvirt-exporter/Dockerfile.j2) | 5 | ||||
| -rw-r--r-- | kolla/docker/prometheus/prometheus-memcached-exporter/Dockerfile.j2 (renamed from docker/prometheus/prometheus-memcached-exporter/Dockerfile.j2) | 2 | ||||
| -rw-r--r-- | kolla/docker/prometheus/prometheus-mtail/Dockerfile.j2 (renamed from docker/prometheus/prometheus-mtail/Dockerfile.j2) | 2 | ||||
| -rw-r--r-- | kolla/docker/prometheus/prometheus-mysqld-exporter/Dockerfile.j2 (renamed from docker/prometheus/prometheus-mysqld-exporter/Dockerfile.j2) | 2 | ||||
| -rw-r--r-- | kolla/docker/prometheus/prometheus-node-exporter/Dockerfile.j2 (renamed from docker/prometheus/prometheus-node-exporter/Dockerfile.j2) | 2 | ||||
| -rw-r--r-- | kolla/docker/prometheus/prometheus-openstack-exporter/Dockerfile.j2 (renamed from docker/prometheus/prometheus-openstack-exporter/Dockerfile.j2) | 2 | ||||
| -rw-r--r-- | kolla/docker/prometheus/prometheus-openstack-network-exporter/Dockerfile.j2 | 24 | ||||
| -rw-r--r-- | kolla/docker/prometheus/prometheus-server/Dockerfile.j2 (renamed from docker/prometheus/prometheus-server/Dockerfile.j2) | 2 | ||||
| -rw-r--r-- | kolla/docker/prometheus/prometheus-valkey-exporter/Dockerfile.j2 | 28 | ||||
| -rw-r--r-- | kolla/docker/proxysql/Dockerfile.j2 (renamed from docker/proxysql/Dockerfile.j2) | 5 | ||||
| -rw-r--r-- | kolla/docker/proxysql/kolla_extend_start (renamed from docker/proxysql/kolla_extend_start) | 0 | ||||
| -rw-r--r-- | kolla/docker/proxysql/kolla_proxysql_config_sync (renamed from docker/proxysql/kolla_proxysql_config_sync) | 0 | ||||
| -rw-r--r-- | kolla/docker/rabbitmq/Dockerfile.j2 (renamed from docker/rabbitmq/Dockerfile.j2) | 11 | ||||
| -rw-r--r-- | kolla/docker/rabbitmq/apt_preferences_rabbitmq.debian (renamed from docker/rabbitmq/apt_preferences_rabbitmq.debian) | 2 | ||||
| -rw-r--r-- | kolla/docker/rabbitmq/apt_preferences_rabbitmq.ubuntu (renamed from docker/rabbitmq/apt_preferences_rabbitmq.ubuntu) | 2 | ||||
| -rw-r--r-- | kolla/docker/rabbitmq/extend_start.sh (renamed from docker/rabbitmq/extend_start.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/rabbitmq/healthcheck_rabbitmq (renamed from docker/rabbitmq/healthcheck_rabbitmq) | 0 | ||||
| -rw-r--r-- | kolla/docker/skyline/skyline-apiserver/Dockerfile.j2 (renamed from docker/skyline/skyline-apiserver/Dockerfile.j2) | 5 | ||||
| -rw-r--r-- | kolla/docker/skyline/skyline-apiserver/extend_start.sh (renamed from docker/skyline/skyline-apiserver/extend_start.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/skyline/skyline-base/Dockerfile.j2 (renamed from docker/skyline/skyline-base/Dockerfile.j2) | 2 | ||||
| -rw-r--r-- | kolla/docker/skyline/skyline-base/extend_start.sh (renamed from docker/skyline/skyline-base/extend_start.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/skyline/skyline-console/Dockerfile.j2 (renamed from docker/skyline/skyline-console/Dockerfile.j2) | 5 | ||||
| -rw-r--r-- | kolla/docker/tacker/tacker-base/Dockerfile.j2 (renamed from docker/tacker/tacker-base/Dockerfile.j2) | 12 | ||||
| -rw-r--r-- | kolla/docker/tacker/tacker-base/extend_start.sh (renamed from docker/tacker/tacker-base/extend_start.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/tacker/tacker-conductor/Dockerfile.j2 (renamed from docker/tacker/tacker-conductor/Dockerfile.j2) | 2 | ||||
| -rw-r--r-- | kolla/docker/tacker/tacker-server/Dockerfile.j2 (renamed from docker/tacker/tacker-server/Dockerfile.j2) | 2 | ||||
| -rw-r--r-- | kolla/docker/tacker/tacker-server/extend_start.sh (renamed from docker/tacker/tacker-server/extend_start.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/tgtd/Dockerfile.j2 (renamed from docker/tgtd/Dockerfile.j2) | 5 | ||||
| -rw-r--r-- | kolla/docker/trove/trove-api/Dockerfile.j2 (renamed from docker/trove/trove-api/Dockerfile.j2) | 2 | ||||
| -rw-r--r-- | kolla/docker/trove/trove-api/extend_start.sh (renamed from docker/trove/trove-api/extend_start.sh) | 2 | ||||
| -rw-r--r-- | kolla/docker/trove/trove-base/Dockerfile.j2 (renamed from docker/trove/trove-base/Dockerfile.j2) | 5 | ||||
| -rw-r--r-- | kolla/docker/trove/trove-base/extend_start.sh (renamed from docker/trove/trove-base/extend_start.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/trove/trove-conductor/Dockerfile.j2 (renamed from docker/trove/trove-conductor/Dockerfile.j2) | 2 | ||||
| -rw-r--r-- | kolla/docker/trove/trove-guestagent/Dockerfile.j2 (renamed from docker/trove/trove-guestagent/Dockerfile.j2) | 2 | ||||
| -rw-r--r-- | kolla/docker/trove/trove-taskmanager/Dockerfile.j2 (renamed from docker/trove/trove-taskmanager/Dockerfile.j2) | 2 | ||||
| -rw-r--r-- | kolla/docker/valkey/valkey-base/Dockerfile.j2 (renamed from docker/redis/redis-base/Dockerfile.j2) | 8 | ||||
| -rw-r--r-- | kolla/docker/valkey/valkey-base/extend_start.sh | 9 | ||||
| -rw-r--r-- | kolla/docker/valkey/valkey-sentinel/Dockerfile.j2 | 29 | ||||
| -rw-r--r-- | kolla/docker/valkey/valkey-sentinel/extend_start.sh (renamed from docker/redis/redis-sentinel/extend_start.sh) | 18 | ||||
| -rw-r--r-- | kolla/docker/valkey/valkey-server/Dockerfile.j2 | 26 | ||||
| -rw-r--r-- | kolla/docker/watcher/watcher-api/Dockerfile.j2 (renamed from docker/watcher/watcher-api/Dockerfile.j2) | 2 | ||||
| -rw-r--r-- | kolla/docker/watcher/watcher-api/extend_start.sh (renamed from docker/watcher/watcher-api/extend_start.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/watcher/watcher-applier/Dockerfile.j2 (renamed from docker/watcher/watcher-applier/Dockerfile.j2) | 2 | ||||
| -rw-r--r-- | kolla/docker/watcher/watcher-base/Dockerfile.j2 (renamed from docker/watcher/watcher-base/Dockerfile.j2) | 5 | ||||
| -rw-r--r-- | kolla/docker/watcher/watcher-base/extend_start.sh (renamed from docker/watcher/watcher-base/extend_start.sh) | 0 | ||||
| -rw-r--r-- | kolla/docker/watcher/watcher-engine/Dockerfile.j2 (renamed from docker/watcher/watcher-engine/Dockerfile.j2) | 2 | ||||
| -rw-r--r-- | kolla/image/build.py | 10 | ||||
| -rw-r--r-- | kolla/image/kolla_worker.py | 110 | ||||
| -rw-r--r-- | kolla/image/tasks.py | 154 | ||||
| -rw-r--r-- | kolla/image/unbuildable.py | 21 | ||||
| -rw-r--r-- | kolla/template/methods.py | 365 | ||||
| -rw-r--r-- | kolla/template/repos.yaml | 361 | ||||
| -rw-r--r-- | kolla/tests/test_build.py | 477 | ||||
| -rw-r--r-- | kolla/tests/test_methods.py | 769 | ||||
| -rw-r--r-- | kolla/tests/test_validate_all_file.py | 43 | ||||
| -rw-r--r-- | lint-requirements.txt | 1 | ||||
| -rw-r--r-- | pyproject.toml | 43 | ||||
| -rw-r--r-- | releasenotes/notes/add-buildkit-support-via-buildx-c4fda2286c2d7d1e.yaml | 22 | ||||
| -rw-r--r-- | releasenotes/notes/add-kerbside-images-04d28d7e76e5bc1f.yaml | 9 | ||||
| -rw-r--r-- | releasenotes/notes/add-mariadb-healthcheck-script-916e5ad7a216e05e.yaml | 8 | ||||
| -rw-r--r-- | releasenotes/notes/add-oci-standard-labels-f68cc6eb3a4db7c7.yaml | 10 | ||||
| -rw-r--r-- | releasenotes/notes/add-openstack-network-exporter-fd37c9bbe2fe387d.yaml | 5 | ||||
| -rw-r--r-- | releasenotes/notes/add-valkey-exporter-e21762a106307538.yaml | 5 | ||||
| -rw-r--r-- | releasenotes/notes/align-default-tag-with-kolla-ansible-7b2224d881848864.yaml | 9 | ||||
| -rw-r--r-- | releasenotes/notes/ansible-core-2-20-bd912e1767d5f197.yaml | 5 | ||||
| -rw-r--r-- | releasenotes/notes/ansible-core-2-21-f4ce0f38d15c7606.yaml | 5 | ||||
| -rw-r--r-- | releasenotes/notes/base-repos-in-yaml-f6a4a871da92c823.yaml | 23 | ||||
| -rw-r--r-- | releasenotes/notes/bug-2035975-94c5670049a7e1a6.yaml | 5 | ||||
| -rw-r--r-- | releasenotes/notes/bug-2093414-12e2d0f21e34bc59.yaml | 7 | ||||
| -rw-r--r-- | releasenotes/notes/bug-2132960-genisoimage_package_nova-compute-ironic-28f4c262ec201f99.yaml | 6 | ||||
| -rw-r--r-- | releasenotes/notes/bug-2154269-0b79adc81dab29a8.yaml | 6 | ||||
| -rw-r--r-- | releasenotes/notes/bug-2163314-d99dd8d0f7a76a95.yaml | 6 | ||||
| -rw-r--r-- | releasenotes/notes/bug-2165921-a70d2839ab32f423.yaml | 7 | ||||
| -rw-r--r-- | releasenotes/notes/bug-2166075-ea3b86dd40834b08.yaml | 5 | ||||
| -rw-r--r-- | releasenotes/notes/bug-2167459-3dbfafe10ea28fdc.yaml | 5 | ||||
| -rw-r--r-- | releasenotes/notes/cleanup-repos-85faf33025fd7e5c.yaml | 16 | ||||
| -rw-r--r-- | releasenotes/notes/deb822-3f0435dfce6da841.yaml | 6 | ||||
| -rw-r--r-- | releasenotes/notes/debian-trixie-23987480043dc662.yaml | 5 | ||||
| -rw-r--r-- | releasenotes/notes/debian-trixie-spice-814929ed1efbcad1.yaml | 8 | ||||
| -rw-r--r-- | releasenotes/notes/deprecate-collectd-8ba94052bdc9424b.yaml | 4 | ||||
| -rw-r--r-- | releasenotes/notes/deprecate-telegraf-db2b0b9f30591552.yaml | 2 | ||||
| -rw-r--r-- | releasenotes/notes/drop-apache-installation-outside-of-http-container-46ee0394e484c1f5.yaml | 8 | ||||
| -rw-r--r-- | releasenotes/notes/drop-centos10-c53c4eee6f8253d0.yaml | 6 | ||||
| -rw-r--r-- | releasenotes/notes/drop-influxdb-cb3161a1e04fa38e.yaml | 4 | ||||
| -rw-r--r-- | releasenotes/notes/drop-kuryr-and-zun-e48eb3d9d6a61758.yaml | 6 | ||||
| -rw-r--r-- | releasenotes/notes/drop-neutron-linuxbridge-agent-5c4596f148c143ed.yaml | 5 | ||||
| -rw-r--r-- | releasenotes/notes/drop-redis-d286ca1237747c48.yaml | 4 | ||||
| -rw-r--r-- | releasenotes/notes/drop-telegraf-28dd961f18ed7825.yaml | 4 | ||||
| -rw-r--r-- | releasenotes/notes/drop-venus-435234b3bff7f209.yaml | 5 | ||||
| -rw-r--r-- | releasenotes/notes/flamingo-prelude-b72f2599ed9d25d5.yaml | 24 | ||||
| -rw-r--r-- | releasenotes/notes/fluentd-update-8db10e760b2dc4d5.yaml | 4 | ||||
| -rw-r--r-- | releasenotes/notes/handle-deprecated-rabbitmq-package-archive-47548e7a41baa68b.yaml | 7 | ||||
| -rw-r--r-- | releasenotes/notes/horizon-theme-rebuilds-65e5f50c1d0cc8dd.yaml | 7 | ||||
| -rw-r--r-- | releasenotes/notes/image-purpose-1884e00f993e09d0.yaml | 7 | ||||
| -rw-r--r-- | releasenotes/notes/influxdb-repo-gpg-key-04eb924f249e54a5.yaml | 6 | ||||
| -rw-r--r-- | releasenotes/notes/ironic-pxe-filter-b3b29090b0661ca2.yaml | 4 | ||||
| -rw-r--r-- | releasenotes/notes/ironic-pxe-symlinks-18d09b19373f16c4.yaml | 6 | ||||
| -rw-r--r-- | releasenotes/notes/ironic-pxe-syslinux-tftpboot-3dc6415ed140dc50.yaml | 6 | ||||
| -rw-r--r-- | releasenotes/notes/letsencrypt-dns01-challenge-432b5122dc832f4a.yaml | 14 | ||||
| -rw-r--r-- | releasenotes/notes/mariadb-11.4-b66b5baf9f5e6cd0.yaml | 5 | ||||
| -rw-r--r-- | releasenotes/notes/neutron-metadata-agent-wrapper-scripts-d6163080d169ea14.yaml | 7 | ||||
| -rw-r--r-- | releasenotes/notes/opensearch-upgrade-9e263a65f015a376.yaml | 2 | ||||
| -rw-r--r-- | releasenotes/notes/pip-build-args-3e222f6a67c57407.yaml | 19 | ||||
| -rw-r--r-- | releasenotes/notes/prometheus-server-3.13LTS-b33f7bc56ed9cd44.yaml | 4 | ||||
| -rw-r--r-- | releasenotes/notes/rabbitmq-41-d881d0b6bbf46446.yaml | 2 | ||||
| -rw-r--r-- | releasenotes/notes/rabbitmq-42-84cf0d09c9f33ef4.yaml | 4 | ||||
| -rw-r--r-- | releasenotes/notes/rabbitmq-43-c85e64fbee6e0d99.yaml | 4 | ||||
| -rw-r--r-- | releasenotes/notes/releasenotes/notes/neutron-ovn-vpn-agent-kolla-image-979df04014ed9440.yaml | 4 | ||||
| -rw-r--r-- | releasenotes/notes/remove-mariadb-clustercheck-427a6cfb3f39c508.yaml | 5 | ||||
| -rw-r--r-- | releasenotes/notes/remove-networking-infoblox-d2819f908d7d2b54.yaml | 4 | ||||
| -rw-r--r-- | releasenotes/notes/remove-prometheus-ovn-exporter-c5f5005b4d1a4b12.yaml | 6 | ||||
| -rw-r--r-- | releasenotes/notes/removing-build-date-d01ddd01b9182a7f.yaml | 6 | ||||
| -rw-r--r-- | releasenotes/notes/repos-yaml-rpm-support-01ff7f5fc3b9ecf2.yaml | 5 | ||||
| -rw-r--r-- | releasenotes/notes/rocky-10-4111fa0160be14ab.yaml | 12 | ||||
| -rw-r--r-- | releasenotes/notes/rocky-kerbside-spice-copr-9a3f4d7c2b1e8a50.yaml | 24 | ||||
| -rw-r--r-- | releasenotes/notes/rocky-ovn-26.03-006064cd2ea0a432.yaml | 4 | ||||
| -rw-r--r-- | releasenotes/notes/set-configs-create-directories-a1b2c3d4e5f6a7b8.yaml | 5 | ||||
| -rw-r--r-- | releasenotes/notes/switch-mtail-repo-e2fce586bf7b02a8.yaml | 5 | ||||
| -rw-r--r-- | releasenotes/notes/switch-proxysql3-base-to-almalinux10-d64c97ba1a894a34.yaml | 5 | ||||
| -rw-r--r-- | releasenotes/notes/switch-to-yaml-configs-32802ccb894c0295.yaml | 7 | ||||
| -rw-r--r-- | releasenotes/notes/update-external-components-419631c0a728a61e.yaml | 7 | ||||
| -rw-r--r-- | releasenotes/notes/update-external-components-55c57492253a6d19.yaml | 16 | ||||
| -rw-r--r-- | releasenotes/notes/update-external-components-625902310f4f5536.yaml | 9 | ||||
| -rw-r--r-- | releasenotes/notes/update-external-components-7ad94672447b4901.yaml | 35 | ||||
| -rw-r--r-- | releasenotes/notes/update-external-components-94f3c485be382c8e.yaml | 7 | ||||
| -rw-r--r-- | releasenotes/notes/update-external-components-97b947c8fdb88ac9.yaml | 7 | ||||
| -rw-r--r-- | releasenotes/notes/update-magnum-conductor-plugin-helm-6afa6c8dc5a98d5a.yaml | 5 | ||||
| -rw-r--r-- | releasenotes/notes/update-packages-071d1863639fe3e3.yaml | 14 | ||||
| -rw-r--r-- | releasenotes/notes/update-prometheus-mtail-4d73dd09f088a408.yaml | 4 | ||||
| -rw-r--r-- | releasenotes/notes/update-prometheus-server-3.5.3-89627b5d4e0ad4fb.yaml | 4 | ||||
| -rw-r--r-- | releasenotes/notes/update-prometheus-server-3.5.4-70f6b76854015b51.yaml | 4 | ||||
| -rw-r--r-- | releasenotes/notes/update-prometheus-services-98085e2ccf13d1fb.yaml | 16 | ||||
| -rw-r--r-- | releasenotes/source/2024.1.rst | 2 | ||||
| -rw-r--r-- | releasenotes/source/2025.2.rst | 6 | ||||
| -rw-r--r-- | releasenotes/source/2026.1.rst | 6 | ||||
| -rw-r--r-- | releasenotes/source/index.rst | 2 | ||||
| -rw-r--r-- | roles/kolla-build-config/defaults/main.yml | 72 | ||||
| -rw-r--r-- | roles/kolla-build-config/templates/kolla-build.conf.j2 | 13 | ||||
| -rw-r--r-- | roles/kolla-build-deps/tasks/main.yml | 6 | ||||
| -rw-r--r-- | roles/kolla-build/defaults/main.yml | 1 | ||||
| -rw-r--r-- | roles/kolla-build/tasks/main.yml | 9 | ||||
| -rw-r--r-- | setup.cfg | 42 | ||||
| -rw-r--r-- | test-requirements.txt | 3 | ||||
| -rwxr-xr-x | tests/files/process_build_logs.py | 2 | ||||
| -rw-r--r-- | tests/playbooks/copr-erlang-update.yml | 17 | ||||
| -rw-r--r-- | tests/playbooks/publish.yml | 10 | ||||
| -rw-r--r-- | tests/playbooks/run.yml | 19 | ||||
| -rw-r--r-- | tests/templates/repos.yaml.j2 | 78 | ||||
| -rw-r--r-- | tests/templates/template_overrides.j2 | 103 | ||||
| -rw-r--r-- | tests/test_set_config.py | 411 | ||||
| -rw-r--r-- | tests/vars/zuul.yml | 1 | ||||
| -rw-r--r-- | tools/check_sources.py | 371 | ||||
| -rwxr-xr-x | tools/validate-all-file.py | 3 | ||||
| -rw-r--r-- | tools/validate-build-sources-overrides.py | 175 | ||||
| -rwxr-xr-x | tools/version-check.py | 2 | ||||
| -rw-r--r-- | tox.ini | 18 | ||||
| -rw-r--r-- | zuul.d/base.yaml | 110 | ||||
| -rw-r--r-- | zuul.d/debian.yaml | 70 | ||||
| -rw-r--r-- | zuul.d/nodesets.yaml | 47 | ||||
| -rw-r--r-- | zuul.d/periodics/copr.yaml | 21 | ||||
| -rw-r--r-- | zuul.d/project.yaml | 30 | ||||
| -rw-r--r-- | zuul.d/rocky.yaml | 70 | ||||
| -rw-r--r-- | zuul.d/scenarios/aio.yaml | 27 | ||||
| -rw-r--r-- | zuul.d/scenarios/bifrost.yaml | 11 | ||||
| -rw-r--r-- | zuul.d/scenarios/cells.yaml | 11 | ||||
| -rw-r--r-- | zuul.d/scenarios/cephadm.yaml | 14 | ||||
| -rw-r--r-- | zuul.d/scenarios/ironic.yaml | 11 | ||||
| -rw-r--r-- | zuul.d/scenarios/lets-encrypt.yaml | 12 | ||||
| -rw-r--r-- | zuul.d/scenarios/mariadb.yaml | 13 | ||||
| -rw-r--r-- | zuul.d/scenarios/masakari.yaml | 11 | ||||
| -rw-r--r-- | zuul.d/scenarios/octavia.yaml | 10 | ||||
| -rw-r--r-- | zuul.d/scenarios/ovn.yaml | 11 | ||||
| -rw-r--r-- | zuul.d/scenarios/prometheus-opensearch.yaml | 14 | ||||
| -rw-r--r-- | zuul.d/scenarios/telemetry.yaml | 11 | ||||
| -rw-r--r-- | zuul.d/secrets.yaml | 58 | ||||
| -rw-r--r-- | zuul.d/tox.yaml | 23 | ||||
| -rw-r--r-- | zuul.d/ubuntu.yaml | 70 |
592 files changed, 6898 insertions, 3323 deletions
diff --git a/.ansible-lint b/.ansible-lint index a335f1800..6b5f1f15c 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -1,9 +1,9 @@ --- exclude_paths: - .cache/ # implicit unless exclude_paths is defined in config - - .zuul.d/ + - zuul.d/ + - kolla/template/repos.yaml offline: true -parseable: true profile: basic skip_list: - package-latest diff --git a/.yamllint b/.yamllint new file mode 100644 index 000000000..016ae71e8 --- /dev/null +++ b/.yamllint @@ -0,0 +1,27 @@ +extends: default + +rules: + comments: + # https://github.com/prettier/prettier/issues/6780 + min-spaces-from-content: 1 + # https://github.com/adrienverge/yamllint/issues/384 + comments-indentation: false + document-start: disable + # 160 chars was the default used by old E204 rule, but + # you can easily change it or disable in your .yamllint file. + line-length: + ignore: | + kolla/common/sources.yaml + max: 160 + # We are adding an extra space inside braces as that's how prettier does it + # and we are trying not to fight other linters. + braces: + min-spaces-inside: 0 # yamllint defaults to 0 + max-spaces-inside: 1 # yamllint defaults to 0 + # key-duplicates: + # forbid-duplicated-merge-keys: true # not enabled by default + octal-values: + forbid-implicit-octal: true # yamllint defaults to false + forbid-explicit-octal: true # yamllint defaults to false + # quoted-strings: + # quote-type: double diff --git a/.zuul.d/base.yaml b/.zuul.d/base.yaml deleted file mode 100644 index 734776f90..000000000 --- a/.zuul.d/base.yaml +++ /dev/null @@ -1,163 +0,0 @@ ---- -- project: - queue: kolla - -- secret: - name: kolla_quay_io_creds - data: - username: !encrypted/pkcs1-oaep - - VsvMvV5wOUfl5B2HJboWfN8mta/Tuk7PXcJf5RfKk4uXP6qYGM4dcMB9EdoJNhMCi7FeA - NrTZaxf/AjLAkgKlRhz7sPKhmR95+jrFRgEzedpcCamdPkCa+wNQEMNMd0rTwioYUEWm4 - Y+Oa2mIswy5LcUViz38MPQhf0725U5sYtH2qkuhMbU8u8vzYhSk749xtAN6I1T8ziTKKB - 3FBowFc2rSRJUQPsLLZjTxBHbrk+00p/DPoHLOz9/9Jf5U//jkqx4ziE2w1a4+x/kWlYT - BPXuRL9wWN9ci2uKuoDRRd6QHJzPIJerKG07YU4PAcS3M245rbjjUQC3n3SQJs3u4kKI8 - rZrxfbmtbfjkzRQXnhnhPk47PebpjnpEUNw6+scnQ+ELdQ0QYGsVRM4x4/ywe5CeFYVDR - whQQ1iG21FOs3iv592I7P7l4cEKqKFyx9qiV4t2fyLrHgtU+L/05iENH9igGJ0tDCQ5zT - 2F2laUWGtzUh76txuFDjpBxR3qS62g825dZXaTegkA+v6c1az23lrYTqbTRf63cuAQyYX - APPRC5QU0URXBoIbWb0ry3O5lr/uudI1ZCLN8SSJhpmZAIlviOfaxrKu9fg2YY9e0xpz9 - CMEWQ/n1EsUyL34Wv189Rvpq4M4GTvozEKsRsjY3u0ygwEUXcH2lEXGOrs+hms= - password: !encrypted/pkcs1-oaep - - dR2beX9Bn7O8iCqNHtWo1FWX71vy+CwffDk5rafUh5yew2OVNcVtVjVOPvHwb5zZv1LCd - MVcgIJe513dM5tQkn2H/HvN/seVu/CfHA6lg6Tj+ueW9VdUH6KiBPr+NCgQWX+Xt3sXbt - sPzfNGpvTw1ZCUp0nnudZEKPZ2jn83baNMumW8E8xPb4s2kePzINsb8sGvqy6BOk5rUIo - 7DaEwWrNnq9TTnMcWGIF+fLP5Pin7+fmvnLkT6qRN4v5FszpHYm8YCpv02nzqI1/F9HeM - P3GtkUdIPxa1+3VwZ/DSA9BWi4VG15jDtaxeZFVGQuMqQAiCx8Jqvd+xX2qugAq1m+U7W - JobDbaeTYrUmJ1zUaspPZ16RTSf9UGCTaejoSVKM9lJHv6ixtsX7UWkgFvceVrlkt7TtH - 2mqhBnXvwB6VD5d311WRUfNXz7gb60otisB5G2k/UnRnv1Mu33TPVT7XOFDpVnAvRS3lt - haJ34N7AWnDIsllvzcmVWTw3wf/6LLfOQrW2Z+vNambyR4Oc+LVUTbEvZVIU65LpOTIn3 - LfDhCLDD3VtnVOrj4UxZsjzmPbday1fziua/7f+CXsShC5erz0ZM65rMCwkjWeI6Kc63A - 0M27tl+OWHO3KkfFR4tWc3dws3r1kYjQeds0adBHyYD0eL8SJfwZkbtojAQ1JM= - -- secret: - name: kolla_quay_io_api - data: - token: !encrypted/pkcs1-oaep - - uGqaFVfPP2HdAELtq12FTGstT7Y7/TCz4IwAgrGtB+2ZUXgCTYrkzhImRLFG3OQMqzx4d - oO6ChFxPGI9hX06mg4MbPBVYXCyh+opxxeaVrgtu03IOB1V8bMlGfVgPSJO8mEp/00poY - hMtut/12FWMhjNO+Um2XaKtRmDZKYYoPmuO4BDauJTaTAl1+Elhm5qjrkFOuklb4jP07c - 9OIex5KiSIqMCmSzduGzVK60BoByzl4u2KPDheEAcohIpjrkm9c6VBe13hZw5llXiDRf2 - LqHPu/IXIFlT9bnPp49rP8+Gm3z1/sdNsN+TKk1VSWGlUudvaBO9Cdejwo+NMWKMAqwGi - drzt/YcCDCQ1SFzkhWk5EdEN5qyrH3jF3I5YzcQ1dKXgr9NOoQSwNLxL5oNL88sH7tqPT - xN+EKz+AGG+ib3S9efhYFkFkqs9z4ia8mIM+2/lH5V5gy7iVVMHmxPr+JJ+5sq5lsHrS5 - No+QrCyeZWWH2qnToQo8S73i9yISzDAML6u5NlKfIJ/nAqsxBOqpCq8xqgI3PLD86lmfL - 7xlK/HOqvgMubcqzR33mRoSnkcnFpD50O9k41ZsF9SPKHMGmk9LyI05vkL6bcc3ypLBQY - BTdg70hF/5m6rHFbVCsNDPlVykcEzsW6D4qqxh/5b3LHbPYbe7ciXcc+PTnYb8= - -- secret: - name: kolla_copr_webhooks - data: - urls: !encrypted/pkcs1-oaep - - HVzZktKoHuCElzSojsc4u+Edrz8pKKngHVuiRKO0STX5pGbQ40QkfLJbOykMjfpE5d9q+ - wH57Vh/zFG6lYxRfHTdCYoPayaREyx9Y9isBNZTg5kKmUdpwavU1WmlaR7lAaGoy3VjgZ - UA5m0fp7nwuESex7Wi0oj3HPgYGfoMd9OIBgdXPKwo/StNVm903lOwieiTj+vx5rVf0It - ZYYT6q0+L7U5v7kE2TSrl71RDPyMEo7KpQdEgvR4inF7DVRVLUK7Usb7X/eKCqPnNTqfg - sSmQ4KWaqUIIpp1xo/Zbwm1nwweRGPadU+mIFgnmT9HMKfRy5GsNOXPn8KGc/NvgJhPlU - o5zNhfDlK7SHEja/XLjzAptnFmFJa8cYBXXL3wwRNOd+Pg8zi4WpB4pj3nEXJ7eAJP/AZ - 7IItGuUJUYm367Lt84txgc15lOSAHD0yp/wY1BH9ww01K8Ir7RldV2TnIoSpReLy6oZK6 - 9LlisAwgMr6V+Z3b+xJI/ekSyl9SKaomrQhcV3oJLsUbgexmuDVPpbhXLjnK950pQRbo1 - DxDg5cOn3oP3NUUyGanlWj4S/8UosILueXcqKqqVr9nv74phVYCSfvl6VS6ASBdp8I6Yi - q69eYtc68f5d4GQuz3BVaUWFni/ehlz98wuyyMoi0MiDK1DTIC4POqBUFJ05zw= - - H4gyRfIDNeZUaP9VDw9Ho0SA/nuoay5jY7lBZou+yVFD1UAPI7+rfz8WI04T+9zz2Wy2+ - 9CTSxTxdrBOI4ydaB41FMw48DnPYtbgtqnWKPB6da3+N4mWiAu6OoZHYxQTbc+T5z/wFG - 7wLr/701fYsiJwHFKGDcoDrigpayTyi/2mrgwKyKxZrmRFk9Bm/3I8yAjcT4VSIHR7AT+ - LqV6m/zP3nJCbIZcYhBf+COEXLuZUNaFXrixCUcCkKmGBK0pmdgUlfwq9wh9c18M/kOzr - HWrzAe33e0FDQM7o44uAzJOYmt+4UVMmgHxjJJMuq6MFX4jGgCWT1cBVoNCEcfETYl6LL - 05GVVkPGxpNraBXAgQxsYkQ0VwJWB51/NR0JkOA7Q15wp5yMWiqPxIYqnw8Pyc6eQlXAL - TP9oeNMZV6U7PhhT0BqBADindcESpvDLyov/3ssR5/KsjyLe0siSm6txOspkgMNdJIM5t - vOcjgITfjJwmkzhmBC+jkPBlIKK/T2RHnDoxnnE85tde/6s4s3bm+UAJadyFU0uf4vOad - MgN23hyNjtcBY0lbw4vx9VjngQxs99HBw7MleypvU6xIpzGhHi7N/wLhFVnMrzDSPH9hn - AmIY5AigVeUjCGK0SQ5zph0bWIqcek0te8vO13hG37rvAAD+s+qUMwLEOaHTCk= - -- nodeset: - name: kolla-centos-9-stream - nodes: - - name: primary - label: centos-9-stream - -- nodeset: - name: kolla-centos-10-stream - nodes: - - name: primary - label: centos-10-stream-8GB - -- nodeset: - name: kolla-centos-10-stream-aarch64 - nodes: - - name: primary - label: centos-10-stream-arm64-8GB - -- nodeset: - name: kolla-rockylinux-9 - nodes: - - name: primary - label: rockylinux-9 - -- nodeset: - name: kolla-ubuntu-noble - nodes: - - name: primary - label: ubuntu-noble - -- nodeset: - name: kolla-debian-bookworm - nodes: - - name: primary - label: debian-bookworm - -- nodeset: - name: kolla-debian-bookworm-aarch64 - nodes: - - name: primary - label: debian-bookworm-arm64 - -- nodeset: - name: kolla-ubuntu-noble-aarch64 - nodes: - - name: primary - label: ubuntu-noble-arm64 - -- job: - name: kolla-base - parent: base - timeout: 10800 - post-timeout: 10800 - pre-run: tests/playbooks/pre.yml - run: tests/playbooks/run.yml - post-run: tests/playbooks/post.yml - attempts: 5 - roles: - - zuul: openstack/ansible-collection-kolla - irrelevant-files: - - ^.*\.rst$ - - ^doc/.* - - ^etc/.* - - ^releasenotes/.*$ - - ^specs/.*$ - - ^test-requirements.txt$ - - ^\.zuul\.d/ - - ^\..+ - - ^contrib/ - - ^LICENSE$ - - ^tox\.ini$ - vars: - base_arch: "x86_64" - publisher: false - container_engine: "docker" - extra-vars: - kolla_logs_dir: "{{ zuul_output_dir }}/logs/kolla" - kolla_build_logs_dir: "{{ kolla_logs_dir }}/build" - virtualenv_path: "/tmp/kolla-virtualenv" - kolla_build_template_overrides_path: "{{ zuul.executor.work_root }}/{{ zuul.projects['opendev.org/openstack/kolla'].src_dir }}/tests/templates/template_overrides.j2" - -- job: - name: kolla-base-podman - parent: kolla-base - vars: - container_engine: "podman" - configure_ephemeral_mountpoint: "/var/lib/containers" - -- job: - name: kolla-build-no-infra-wheels-base - parent: kolla-base - vars: - use_infra_wheels_mirror: false diff --git a/.zuul.d/centos.yaml b/.zuul.d/centos.yaml deleted file mode 100644 index 180688f2d..000000000 --- a/.zuul.d/centos.yaml +++ /dev/null @@ -1,36 +0,0 @@ ---- -- project: - check: - jobs: - - kolla-build-centos10s - - kolla-ansible-centos10s - check-arm64: - jobs: - - kolla-build-centos10s-aarch64 - - kolla-ansible-centos10s-aarch64 - experimental: - jobs: - - kolla-build-no-infra-wheels-centos10s - -- job: - name: kolla-build-centos10s - parent: kolla-base - nodeset: kolla-centos-10-stream - vars: - base_distro: centos - voting: false - -- job: - name: kolla-build-centos10s-aarch64 - parent: kolla-build-centos10s - nodeset: kolla-centos-10-stream-aarch64 - vars: - base_arch: aarch64 - voting: false - -- job: - name: kolla-build-no-infra-wheels-centos10s - parent: kolla-build-no-infra-wheels-base - nodeset: kolla-centos-10-stream - vars: - base_distro: centos
\ No newline at end of file diff --git a/.zuul.d/debian.yaml b/.zuul.d/debian.yaml deleted file mode 100644 index adfb3811e..000000000 --- a/.zuul.d/debian.yaml +++ /dev/null @@ -1,82 +0,0 @@ ---- -- project: - check: - jobs: - - kolla-build-debian - - kolla-build-debian-podman - - kolla-ansible-debian - - kolla-ansible-debian-upgrade - check-arm64: - jobs: - - kolla-build-debian-aarch64 - - kolla-ansible-debian-aarch64 - gate: - jobs: - - kolla-build-debian - - kolla-build-debian-podman - - kolla-ansible-debian - - kolla-ansible-debian-upgrade - periodic: - jobs: - - kolla-publish-debian-quay - - kolla-publish-debian-aarch64-quay - experimental: - jobs: - - kolla-build-no-infra-wheels-debian - - kolla-ansible-debian-ironic: - files: ^docker\/(base|dnsmasq|ironic|ironic-inspector|iscsid|openstack-base)\/.* - -- job: - name: kolla-build-debian - parent: kolla-base - nodeset: kolla-debian-bookworm - vars: - base_distro: debian - base_distro_version: bookworm - -- job: - name: kolla-build-debian-podman - parent: kolla-base-podman - nodeset: kolla-debian-bookworm - vars: - base_distro: debian - base_distro_version: bookworm - -- job: - name: kolla-build-debian-aarch64 - parent: kolla-build-debian - nodeset: kolla-debian-bookworm-aarch64 - voting: false - vars: - base_arch: aarch64 - -- job: - name: kolla-publish-debian-quay - parent: kolla-build-debian - post-run: tests/playbooks/publish.yml - vars: - publisher: true - kolla_registry: quay.io - kolla_namespace: openstack.kolla - secrets: - - kolla_quay_io_creds - - kolla_quay_io_api - -- job: - name: kolla-publish-debian-aarch64-quay - parent: kolla-build-debian-aarch64 - post-run: tests/playbooks/publish.yml - vars: - publisher: true - kolla_registry: quay.io - kolla_namespace: openstack.kolla - secrets: - - kolla_quay_io_creds - - kolla_quay_io_api - -- job: - name: kolla-build-no-infra-wheels-debian - parent: kolla-build-no-infra-wheels-base - nodeset: kolla-debian-bookworm - vars: - base_distro: debian diff --git a/.zuul.d/project.yaml b/.zuul.d/project.yaml deleted file mode 100644 index a93a1ef01..000000000 --- a/.zuul.d/project.yaml +++ /dev/null @@ -1,16 +0,0 @@ ---- -- project: - templates: - - check-requirements - - openstack-python3-jobs - - openstack-python3-jobs-arm64 - - openstack-cover-jobs - - periodic-stable-jobs - - publish-openstack-docs-pti - - release-notes-jobs-python3 - check: - jobs: - - kolla-tox-genconfig - gate: - jobs: - - kolla-tox-genconfig diff --git a/.zuul.d/tox.yaml b/.zuul.d/tox.yaml deleted file mode 100644 index fb52e06d4..000000000 --- a/.zuul.d/tox.yaml +++ /dev/null @@ -1,12 +0,0 @@ ---- -- job: - name: kolla-tox-genconfig - parent: openstack-tox - timeout: 2400 - description: | - - Run genconfig - - Uses tox with the ``genconfig`` environment. - vars: - tox_envlist: genconfig diff --git a/.zuul.d/ubuntu.yaml b/.zuul.d/ubuntu.yaml deleted file mode 100644 index e3fb84584..000000000 --- a/.zuul.d/ubuntu.yaml +++ /dev/null @@ -1,103 +0,0 @@ ---- -- project: - check: - jobs: - - kolla-build-ubuntu - - kolla-build-ubuntu-podman - - kolla-ansible-ubuntu - - kolla-ansible-ubuntu-upgrade - # Test rabbitmq and mariadb in multinode ceph jobs. - - kolla-ansible-ubuntu-cephadm: - files: ^docker\/(base|cinder|glance|mariadb|openstack-base|rabbitmq)\/.* - - kolla-ansible-ubuntu-upgrade-cephadm: - files: ^docker\/(base|cinder|glance|mariadb|openstack-base|rabbitmq)\/.* - - kolla-ansible-ubuntu-ironic: - files: ^docker\/(base|dnsmasq|ironic|ironic-inspector|iscsid|openstack-base)\/.* - - kolla-ansible-ubuntu-swift: - files: ^docker/(base|openstack-base|glance|swift)/ - - kolla-ansible-ubuntu-mariadb: - files: ^docker/(base|mariadb)/ - - kolla-ansible-ubuntu-masakari: - files: ^docker/(base|masakari|openstack-base)/ - - kolla-ansible-ubuntu-octavia: - files: ^docker/(base|neutron|octavia|openstack-base|openvswitch|ovn)/ - - kolla-ansible-ubuntu-ovn: - files: ^docker/(base|neutron|openstack-base|openvswitch|ovn)/ - - kolla-ansible-ubuntu-prometheus-opensearch: - files: ^docker/(base|opensearch|fluentd|grafana|prometheus)/ - - kolla-ansible-ubuntu-kvm: - files: ^docker/nova/ - - kolla-ansible-ubuntu-cells: - files: ^docker/proxysql/ - - kolla-ansible-ubuntu-bifrost: - files: ^docker/bifrost/ - check-arm64: - jobs: - - kolla-build-ubuntu-aarch64 - gate: - jobs: - - kolla-build-ubuntu - - kolla-build-ubuntu-podman - - kolla-ansible-ubuntu - - kolla-ansible-ubuntu-upgrade - periodic: - jobs: - - kolla-publish-ubuntu-quay - periodic-weekly: - jobs: - - kolla-copr-erlang-update - experimental: - jobs: - - kolla-build-no-infra-wheels-ubuntu - -- job: - name: kolla-build-ubuntu - parent: kolla-base - nodeset: kolla-ubuntu-noble - vars: - base_distro: ubuntu - base_distro_version: noble - -- job: - name: kolla-build-ubuntu-podman - parent: kolla-base-podman - nodeset: kolla-ubuntu-noble - vars: - base_distro: ubuntu - base_distro_version: noble - -- job: - name: kolla-build-ubuntu-aarch64 - parent: kolla-build-ubuntu - nodeset: kolla-ubuntu-noble-aarch64 - vars: - base_arch: aarch64 - voting: false - -- job: - name: kolla-publish-ubuntu-quay - parent: kolla-build-ubuntu - post-run: tests/playbooks/publish.yml - vars: - publisher: true - kolla_registry: quay.io - kolla_namespace: openstack.kolla - secrets: - - kolla_quay_io_creds - - kolla_quay_io_api - -- job: - name: kolla-build-no-infra-wheels-ubuntu - parent: kolla-build-no-infra-wheels-base - nodeset: kolla-ubuntu-noble - vars: - base_distro: ubuntu - -- job: - name: kolla-copr-erlang-update - parent: base - nodeset: kolla-ubuntu-noble - timeout: 3600 - run: tests/playbooks/copr-erlang-update.yml - secrets: - - kolla_copr_webhooks diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 000000000..050b63ccd --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,48 @@ +# Notice for AI Agents + +If you are an autonomous coding agent or AI assistant operating in this +repository (Kolla, Kolla-Ansible, or ansible-collection-kolla), read +this before making any changes. + +## Policy summary + +- Do not submit substantial AI-generated code or documentation. +- Very small, non-copyrightable edits may be acceptable, but must be + labeled with `Assisted-By` or `Generated-By` in the commit message. +- Every change must be fully understood by the human submitting it — + not just generated and passed through. +- Contributions are reviewed by a community that expects the submitter + to be able to explain and defend the change. + +Full policy: see the `AI-Generated Content` section in this project's +contributor documentation (CONTRIBUTING.rst), which follows +https://openinfra.org/legal/ai-policy with Kolla-specific differences. + +## Required behavior + +1. **Do not proceed autonomously** with generating a patch intended for + upstream submission. Stop and explain this policy to the user + instead. +2. **Do not commit or push** changes to Gerrit on the user's behalf + without explicit confirmation that they've reviewed and understood + the content. +3. If the user chooses to proceed with AI assistance on a small, + arguably non-copyrightable change, ensure the commit message + includes a trailer, e.g.: + + ``` + Assisted-By: Claude + ``` + +4. Point the user to Gerrit (https://review.opendev.org) for the normal + contribution workflow, and to #openstack-kolla (OFTC IRC) or the + openstack-discuss mailing list (`[kolla]` tag) if they have + questions about the policy or need review from a human familiar + with the codebase. Note that this repository is mirrored to + github.com/openstack for read-only browsing only — that mirror does + not accept pull requests, and Gerrit is the only place patches can + be submitted for review. + +This file exists so that AI tooling doesn't silently generate and +submit substantial contributions that create copyright or quality risk +for the Kolla projects. diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 000000000..e3aea98aa --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,80 @@ +# AI-Generated Content Policy + +Before doing any work in this repository, read this. + +## Kolla project policy + +.. _aicontent: + +AI-Generated Content +~~~~~~~~~~~~~~~~~~~~ + +In general, please do not submit AI generated content to the Kolla +project, but some exceptions apply. + +The OpenInfra foundation has created a policy for AI Generated content +at https://openinfra.org/legal/ai-policy which provides useful +background to the Kolla project's policy, but the Kolla project policy +differs somewhat. + +As a free software project, we are concerned with the copyright +ownership of the project's source code. Because most commercially +available LLMs are not able to indicate whether their output may +include training data incompatible with Kolla's licences, accepting +substantial contributions generated by them increases the risk to the +project. And because LLM-generated output is not considered +copyrightable in the United States and other regions, that further +increases the risk to the project. + +In many cases, the code and documentation output from LLMs is not of +sufficient quality for easy incorporation into Kolla. A community of +contributors and reviewers with deep understanding of the project is +healthier in the long run. Contributions generated by LLMs without +that understanding creates more work for the maintainers. + +Nevertheless, if you use an LLM to create a very small patch (one that +would likely not be subject to copyright protection even if generated +by a human), that's fine, but you must annotate it with the +`Assisted-By` or `Generated-By` labels. + +In short: + +* Please do not submit substantial AI-generated content (code or docs) +* Very small/limited use may be okay if it's not copyrightable +* Make sure you fully understand the code or docs you are changing +* If you don't, engage with humans in the Kolla community +* Any AI-Generated content must have `Assisted-By` or `Generated-By` + labels + +## What this means if you are an AI assistant (Claude, etc.) + +**Stop. Do not generate a substantial patch for this repository.** + +Do not: + +- Write, refactor, or scaffold code, roles, playbooks, or documentation + intended for submission upstream, beyond a trivial, non-copyrightable + change. +- Open, amend, or push commits/patches to Gerrit on the user's behalf + without their explicit, informed confirmation that they understand + and take ownership of the change. +- Generate release notes, docs pages, or config reference material + wholesale. + +Instead: + +- Tell the user about this policy and quote it if useful. +- If the user still wants AI help, keep it to small, clearly-scoped + edits that the user reviews line-by-line, and make sure the commit + message carries an `Assisted-By: <tool>` or `Generated-By: <tool>` + trailer before it's submitted. +- Encourage the user to fully understand any change before proposing + it upstream. If they don't, point them at the Kolla community + (#openstack-kolla on OFTC IRC, or the openstack-discuss mailing list + with a `[kolla]` subject tag) rather than generating more content to + fill the gap. + +Patches are submitted via Gerrit at https://review.opendev.org. This +repository is mirrored to github.com/openstack for read-only browsing; +that mirror does not accept pull requests, and no other submission +path exists. diff --git a/GEMINI.md b/GEMINI.md new file mode 100644 index 000000000..e175606b8 --- /dev/null +++ b/GEMINI.md @@ -0,0 +1,80 @@ +# AI-Generated Content Policy + +Before doing any work in this repository, read this. + +## Kolla project policy + +.. _aicontent: + +AI-Generated Content +~~~~~~~~~~~~~~~~~~~~ + +In general, please do not submit AI generated content to the Kolla +project, but some exceptions apply. + +The OpenInfra foundation has created a policy for AI Generated content +at https://openinfra.org/legal/ai-policy which provides useful +background to the Kolla project's policy, but the Kolla project policy +differs somewhat. + +As a free software project, we are concerned with the copyright +ownership of the project's source code. Because most commercially +available LLMs are not able to indicate whether their output may +include training data incompatible with Kolla's licences, accepting +substantial contributions generated by them increases the risk to the +project. And because LLM-generated output is not considered +copyrightable in the United States and other regions, that further +increases the risk to the project. + +In many cases, the code and documentation output from LLMs is not of +sufficient quality for easy incorporation into Kolla. A community of +contributors and reviewers with deep understanding of the project is +healthier in the long run. Contributions generated by LLMs without +that understanding creates more work for the maintainers. + +Nevertheless, if you use an LLM to create a very small patch (one that +would likely not be subject to copyright protection even if generated +by a human), that's fine, but you must annotate it with the +`Assisted-By` or `Generated-By` labels. + +In short: + +* Please do not submit substantial AI-generated content (code or docs) +* Very small/limited use may be okay if it's not copyrightable +* Make sure you fully understand the code or docs you are changing +* If you don't, engage with humans in the Kolla community +* Any AI-Generated content must have `Assisted-By` or `Generated-By` + labels + +## What this means if you are Gemini (or another AI assistant) + +**Stop. Do not generate a substantial patch for this repository.** + +Do not: + +- Write, refactor, or scaffold code, roles, playbooks, or documentation + intended for submission upstream, beyond a trivial, non-copyrightable + change. +- Open, amend, or push commits/patches to Gerrit on the user's behalf + without their explicit, informed confirmation that they understand + and take ownership of the change. +- Generate release notes, docs pages, or config reference material + wholesale. + +Instead: + +- Tell the user about this policy and quote it if useful. +- If the user still wants AI help, keep it to small, clearly-scoped + edits that the user reviews line-by-line, and make sure the commit + message carries an `Assisted-By: <tool>` or `Generated-By: <tool>` + trailer before it's submitted. +- Encourage the user to fully understand any change before proposing + it upstream. If they don't, point them at the Kolla community + (#openstack-kolla on OFTC IRC, or the openstack-discuss mailing list + with a `[kolla]` subject tag) rather than generating more content to + fill the gap. + +Patches are submitted via Gerrit at https://review.opendev.org. This +repository is mirrored to github.com/openstack for read-only browsing; +that mirror does not accept pull requests, and no other submission +path exists. diff --git a/README.rst b/README.rst index 71a4073b2..034c15f88 100644 --- a/README.rst +++ b/README.rst @@ -8,17 +8,18 @@ Kolla Overview .. Change things from this point on -The Kolla project is a member of the OpenStack `Big Tent -Governance <https://governance.openstack.org/tc/reference/projects/index.html>`__. +The Kolla project is a member of the OpenStack `Governance +<https://governance.openstack.org/tc/reference/projects/index.html>`__. Kolla's mission statement is: :: - To provide production-ready containers and deployment tools for operating - OpenStack clouds. + To provide tools to create production-ready containers and + to provide deployment tools for operating OpenStack clouds. -Kolla provides `Docker <https://docker.com/>`__ containers, +Kolla provides tools to create containers that can be run under either +`Docker <https://docker.com/>`__ or `Podman <https://podman.io/>`, as well as `Ansible <https://ansible.com/>`__ playbooks to deploy OpenStack on baremetal or virtual machine to meet Kolla's mission. @@ -39,29 +40,28 @@ Quickstart <https://docs.openstack.org/kolla-ansible/latest/user/quickstart.html The Kolla Repository ==================== -The Kolla repository is one of three deliverables of the OpenStack Kolla -project. The three deliverables that make up the Kolla project are: - -================ ========================================================= -Deliverable Repository -================ ========================================================= -kolla https://opendev.org/openstack/kolla -kolla-ansible https://opendev.org/openstack/kolla-ansible -kayobe https://opendev.org/openstack/kayobe -================ ========================================================= - -The `Docker images <https://docs.docker.com/storage/storagedriver/>`__ -are built by the Kolla project maintainers. A detailed process for -contributing to the images can be found in the `image building -guide <https://docs.openstack.org/kolla/latest/admin/image-building.html>`__. - -The Kolla developers build images in the `kolla` namespace for every tagged -release. - -You can view the available images on `Docker Hub -<https://hub.docker.com/u/kolla/>`__ or with the Docker CLI:: - - $ sudo docker search kolla +The Kolla repository is one of four deliverables of the OpenStack Kolla +project. The four deliverables that make up the Kolla project are: + +======================== ====================================================== +Deliverable Repository +======================== ====================================================== +kolla https://opendev.org/openstack/kolla +kolla-ansible https://opendev.org/openstack/kolla-ansible +ansible-collection-kolla https://opendev.org/openstack/ansible-collection-kolla +kayobe https://opendev.org/openstack/kayobe +======================== ====================================================== + +The Kolla developers publish images in the Quay.io `openstack.kolla` namespace +for every tagged release. You can view the available images on `Quay.io +<https://quay.io/organization/openstack.kolla>`__. + +.. warning:: + Kolla(-ansible) defaults to using these images in order to ease testing and + demonstration setups, but they are not intended to be used beyond this. + In particular, they do not undergo any security scrutiny. If you intend to + deploy Kolla for production purposes, you are advised to create and curate your + own set of images using the ``kolla`` tool. OpenStack services ------------------ @@ -82,21 +82,18 @@ Kolla provides images to deploy the following OpenStack projects: - `Horizon <https://docs.openstack.org/horizon/latest/>`__ - `Ironic <https://docs.openstack.org/ironic/latest/>`__ - `Keystone <https://docs.openstack.org/keystone/latest/>`__ -- `Kuryr <https://docs.openstack.org/kuryr/latest/>`__ - `Magnum <https://docs.openstack.org/magnum/latest/>`__ - `Manila <https://docs.openstack.org/manila/latest/>`__ - `Masakari <https://docs.openstack.org/masakari/latest/>`__ - `Mistral <https://docs.openstack.org/mistral/latest/>`__ -- `Monasca <https://docs.openstack.org/monasca-api/latest/>`__ - `Neutron <https://docs.openstack.org/neutron/latest/>`__ - `Nova <https://docs.openstack.org/nova/latest/>`__ - `Octavia <https://docs.openstack.org/octavia/latest/>`__ +- `Placement <https://docs.openstack.org/placement/latest/>`__ - Skyline (`APIServer <https://docs.openstack.org/skyline-apiserver/latest/>`__ and `Console <https://docs.openstack.org/skyline-console/latest/>`__) - `Tacker <https://docs.openstack.org/tacker/latest/>`__ - `Trove <https://docs.openstack.org/trove/latest/>`__ -- `Venus <https://docs.openstack.org/venus/latest/>`__ - `Watcher <https://docs.openstack.org/watcher/latest/>`__ -- `Zun <https://docs.openstack.org/zun/latest/>`__ Infrastructure components ------------------------- @@ -104,44 +101,33 @@ Infrastructure components Kolla provides images to deploy the following infrastructure components: - `Collectd <https://collectd.org>`__, - `InfluxDB <https://influxdata.com/time-series-platform/influxdb/>`__, and `Grafana <https://grafana.com>`__ for performance monitoring. -- `Corosync <https://clusterlabs.org/corosync.html>`__ and - `Pacemaker <https://clusterlabs.org/pacemaker>`__ for HAcluster. -- `Elasticsearch <https://www.elastic.co/de/products/elasticsearch>`__ and - `Kibana <https://www.elastic.co/products/kibana>`__ to search, analyze, - and visualize log messages. - `Cron <https://cron-job.org>`__ for log rotation. - `Etcd <https://etcd.io/>`__ a distributed key value store that provides a reliable way to store data across a cluster of machines. - `Fluentd <https://www.fluentd.org/>`__ as an open source data collector for unified logging layer. - `Gnocchi <https://gnocchi.xyz/>`__ a time-series storage database. +- `Corosync <https://clusterlabs.org/corosync.html>`__ and + `Pacemaker <https://clusterlabs.org/pacemaker>`__ for HAcluster. - `HAProxy <https://www.haproxy.org/>`__ and `Keepalived <https://www.keepalived.org/>`__ for high availability of services and their endpoints. -- `Kafka <https://kafka.apache.org/documentation/>`__ a distributed streaming - platform. - `MariaDB and Galera Cluster <https://mariadb.com/kb/en/library/galera-cluster/>`__ for highly available MySQL databases. - `Memcached <https://www.memcached.org/>`__ a distributed memory object caching system. -- `Open vSwitch <https://www.openvswitch.org/>`__ for use with Neutron. - MariaDB Backup A tool which provides a method of performing a hot backup of your MySQL data while the system is running. +- `Open vSwitch <https://www.openvswitch.org/>`__ for use with Neutron. +- `Opensearch <https://opensearch.org/>`__ to search, analyze, + and visualize log messages. - `Prometheus <https://prometheus.io/>`__ an open-source systems monitoring and alerting toolkit originally built at SoundCloud. -- `Qdrouterd <https://qpid.apache.org/components/dispatch-router/index.html>`__ as a - direct messaging back end for communication between services. - `RabbitMQ <https://www.rabbitmq.com/>`__ as a broker messaging back end for communication between services. -- `Redis Sentinel <https://redis.io/topics/sentinel>`__ provides high availability for redis +- `Valkey Sentinel <https://valkey.io/topics/sentinel>`__ provides high availability for valkey along with collateral tasks such as monitoring, notification and acts as configuration provider for clients. -- `Telegraf <https://www.docs.influxdata.com/telegraf/>`__ as a plugin-driven server - agent for collecting & reporting metrics. -- `ZooKeeper <https://zookeeper.apache.org/>`__ as a centralized service for maintaining - configuration information, naming, providing distributed synchronization, and providing - group services. Directories =========== @@ -166,23 +152,17 @@ Getting Involved Need a feature? Find a bug? Let us know! Contributions are much appreciated and should follow the standard `Gerrit -workflow <https://docs.openstack.org/infra/manual/developers.html>`__. +workflow <https://docs.openstack.org/contributors/common/setup-gerrit.html>`__. -- We communicate using the #openstack-kolla irc channel. +- We communicate using the #openstack-kolla IRC channel on OFTC. - File bugs, blueprints, track releases, etc on `Launchpad <https://launchpad.net/kolla>`__. - Attend weekly `meetings <https://docs.openstack.org/kolla/latest/contributor/meeting.html>`__. - Contribute `code <https://opendev.org/openstack/kolla>`__. - -Contributors -============ - -Check out who is `contributing -code <https://stackalytics.io/?module=kolla-group&metric=commits>`__ and -`contributing -reviews <https://stackalytics.io/?module=kolla-group&metric=marks>`__. +- Please respect our `AI policy + <https://docs.openstack.org/kolla/latest/contributor/contributing.html#aipolicy>`__. Notices ======= diff --git a/doc/source/admin/image-building.rst b/doc/source/admin/image-building.rst index 793367a92..a3d9207d3 100644 --- a/doc/source/admin/image-building.rst +++ b/doc/source/admin/image-building.rst @@ -25,7 +25,7 @@ In general, images are built like this: kolla-build -By default, the above command would build all images based on a CentOS Stream +By default, the above command would build all images based on a Rocky Linux image. The operator can change the base distro with the ``-b`` option: @@ -36,8 +36,8 @@ The operator can change the base distro with the ``-b`` option: There are following distros (bases) available for building images: -- centos - debian +- rocky - ubuntu See the :ref:`support matrix <support-matrix-base-images>` for information on @@ -138,7 +138,7 @@ The ``kolla-build.conf`` file could look like this: [keystone-base] type = git location = https://opendev.org/openstack/keystone - reference = stable/mitaka + reference = stable/2025.2 [heat-base] type = local @@ -371,9 +371,22 @@ verification purposes. Python packages build options ----------------------------- -The block ``base_pip_conf`` in the ``base`` Dockerfile can be used to provide -the PyPI build customisation options via the standard environment variables -like ``PIP_INDEX_URL``, ``PIP_TRUSTED_HOST``, etc. +The PyPI mirror used during image builds can be configured directly in +``kolla-build.conf``: + +.. path /etc/kolla/kolla-build.conf +.. code-block:: ini + + [DEFAULT] + pip_index_url = https://pypi.example.com/simple + pip_trusted_host = pypi.example.com + pip_extra_index_url = https://wheels.example.com/simple + +These options set the ``PIP_INDEX_URL``, ``PIP_TRUSTED_HOST``, and +``PIP_EXTRA_INDEX_URL`` ARG variables in the base image via the +``base_pip_conf`` Dockerfile block. The ``pip_extra_index_url`` option is +optional. For further customisation, the block ``base_pip_conf`` can be +overridden via the template_override mechanism. To override PYPI upper-constraints of all OpenStack images, you can define the source location of openstack-base. in ``kolla-build.conf``. @@ -614,7 +627,7 @@ First, create a ``Dockerfile.j2`` template for the project. FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} {% block labels %} - LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" + LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block releaser_header %}{% endblock %} @@ -678,6 +691,143 @@ Can I use the ``--template-override`` option for custom templates? Yes! Custom repos ------------ +repos.yaml +^^^^^^^^^^ + +Kolla uses ``kolla/template/repos.yaml`` to define repositories used during +image builds. Each entry is keyed by a logical name and contains the +information needed to configure the repository. + +Repositories marked with ``distro: True`` are default repos that require no +additional configuration. For RPM-based distros they are enabled via +``dnf config-manager --enable``; for Debian-based distros they are a no-op +as the sources are already provided by the base image. Examples include +``crb``, ``extras``, and the base repos ``baseos`` and ``appstream`` for +Rocky Linux, as well as ``debian``, ``debian-security``, ``ubuntu``, +``ubuntu-security``. + +Repositories without ``distro: True`` are fully templated into a new +repository file and must provide at least one of ``baseurl``, ``metalink``, +or ``mirrorlist`` (RPM), or ``url`` (Debian/Ubuntu). + +To override repositories (e.g. to point base repos at a local mirror), +provide a custom ``repos.yaml`` via the ``--repos-yaml`` option and supply +entries without ``distro: True`` and with the desired URL. + +Example for Rocky Linux: + +.. code-block:: yaml + + rocky: + baseos: + name: "baseos" + baseurl: "https://my-mirror.example.com/rocky/10/BaseOS/$basearch/os/" + gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-10" + appstream: + name: "appstream" + baseurl: "https://my-mirror.example.com/rocky/10/AppStream/$basearch/os/" + gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-10" + crb: + name: "crb" + baseurl: "https://my-mirror.example.com/rocky/10/CRB/$basearch/os/" + gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-10" + +Example for Debian: + +.. code-block:: yaml + + debian: + debian: + component: "main" + gpg_key: "/usr/share/keyrings/debian-archive-keyring.gpg" + suite: "trixie trixie-updates trixie-backports" + url: "https://my-mirror.example.com/debian" + debian-security: + component: "main" + gpg_key: "/usr/share/keyrings/debian-archive-keyring.gpg" + suite: "trixie-security" + url: "https://my-mirror.example.com/debian-security" + +Example for Ubuntu: + +.. code-block:: yaml + + ubuntu: + ubuntu: + component: "main universe" + gpg_key: "/usr/share/keyrings/ubuntu-archive-keyring.gpg" + suite: "noble noble-updates noble-backports" + url: "https://my-mirror.example.com/ubuntu/" + ubuntu-security: + component: "main universe" + gpg_key: "/usr/share/keyrings/ubuntu-archive-keyring.gpg" + suite: "noble-security" + url: "https://my-mirror.example.com/ubuntu/" + +.. code-block:: ini + + repos_yaml = /path/to/custom-repos.yaml + +When overriding a base repo, any existing ``.repo`` file on the image +containing that repository ID is automatically removed before the new one +is created. + +Some distro repos share a single ``.repo`` file on disk (for example, +``baseos``, ``appstream``, and ``crb`` all live in ``rocky.repo`` on Rocky +Linux). These repos are annotated with a ``file_group`` field in +``repos.yaml`` that names the shared file. If any repo in a ``file_group`` +is overridden, all other repos sharing that ``file_group`` must also be +overridden — otherwise removing the shared file would silently disable them. +Kolla validates this at build time and raises an error listing the missing +overrides. For Rocky Linux this means overriding ``baseos`` or ``appstream`` +requires also overriding ``crb``. + +Build-time-only repositories +"""""""""""""""""""""""""""" + +Repositories that point to CI mirrors or other infrastructure-internal URLs +should not be baked into the final image — they may be unreachable at runtime +and would expose internal infrastructure details. Mark such repositories with +``build_only: true`` to have kolla automatically restore or remove the +repository file at the end of each image build. + +When ``build_only: true`` is set on a repository: + +* **Before** writing the mirror configuration, kolla backs up the existing + repository file (if any) to ``/tmp/kolla-repos-backup/``. +* The repository file is written normally so all package installations in that + image can use the mirror. +* **After** all package installations, kolla injects a cleanup step into every + rendered Dockerfile that restores the original file from the backup, or + removes the file entirely if no original existed. + +This means the repository files in the final image contain the upstream URLs +(or are absent, leaving the distro defaults in place) rather than mirror URLs. + +Example — Debian with a CI mirror marked build-time-only: + +.. code-block:: yaml + + debian: + debian: + build_only: true + component: "main" + gpg_key: "/usr/share/keyrings/debian-archive-keyring.gpg" + suite: "trixie trixie-updates trixie-backports" + url: "http://ci-mirror.internal/debian" + debian-security: + build_only: true + component: "main" + gpg_key: "/usr/share/keyrings/debian-archive-keyring.gpg" + suite: "trixie-security" + url: "http://ci-mirror.internal/debian-security" + +.. note:: + + ``build_only: true`` is only effective for non-distro repository entries + (those that write a ``.repo`` or ``.sources`` file). Repositories with + ``distro: True`` are a no-op in ``handle_repos()`` and require no cleanup. + Red Hat ^^^^^^^ @@ -740,6 +890,29 @@ variables that will be picked up from the user env: Also these variables could be overwritten using ``--build-args``, which have precedence. +Docker BuildKit +--------------- + +When using ``--engine docker``, ``kolla-build`` builds images via +``docker buildx build`` (Docker BuildKit) by default. This requires the +``docker-buildx-plugin`` package to be installed. + +To disable BuildKit and fall back to the legacy docker-py SDK, set +``buildkit = False`` in ``kolla-build.conf`` or pass ``--nobuildkit`` on the +command line. + +To use a specific buildx builder instance (e.g. a ``docker-container`` or +remote driver), pass ``--buildkit-builder``: + +.. code-block:: console + + kolla-build --buildkit-builder mybuilder + +.. note:: + + ``--buildkit`` and ``--squash`` are mutually exclusive. Use one or the + other. + Cross-compiling --------------- @@ -755,7 +928,11 @@ To build ``ARM`` images on ``x86_64`` platform, pass the ``--base-arch`` and .. note:: - To make this work on x86_64 platform you can use tools like: `qemu-user-static + Cross-compilation is natively handled by Docker BuildKit; using BuildKit + (the default) is recommended for multi-platform builds. + + To make this work on x86_64 platform with the docker-py based builder + (``--nobuildkit``) you can use tools like: `qemu-user-static <https://github.com/multiarch/qemu-user-static>`_ or `binfmt <https://github.com/tonistiigi/binfmt>`_. diff --git a/doc/source/admin/kolla_api.rst b/doc/source/admin/kolla_api.rst index aea5b81b0..b4266aea0 100644 --- a/doc/source/admin/kolla_api.rst +++ b/doc/source/admin/kolla_api.rst @@ -54,6 +54,27 @@ The `kolla_set_configs`_ script understands the following attributes: * **merge**: merges the source directory into the target directory instead of replacing it. Boolean, defaults to ``false``. +* **directories**: create directories inside the container if they do not + exist, and set their ownership and permissions. A list of dicts, each + containing the following attributes: + + * **path** (required): the path to the directory to create. + * **owner** (required): the ``user:group`` to change ownership to. ``user`` + is synonymous to ``user:user``. Must be user and group names, not uid/gid. + * **perm** (required): the unix permissions to set to the directory. + Must be passed in the numeric octal form. + +* **files**: create empty files inside the container if they do not + exist, and set their ownership and permissions. A list of dicts, each + containing the following attributes: + + * **path** (required): the path to the file to create. Parent directories + must already exist. Glob patterns are not supported. + * **owner** (required): the ``user:group`` to change ownership to. ``user`` + is synonymous to ``user:user``. Must be user and group names, not uid/gid. + * **perm** (required): the unix permissions to set to the file. + Must be passed in the numeric octal form. + * **permissions**: change the permissions and/or ownership of files or directories inside the container. A list of dicts, each containing the following attributes: @@ -84,6 +105,13 @@ Here is an example configuration file: "optional": false } ], + "directories": [ + { + "path": "/var/lib/trove", + "owner": "trove", + "perm": "0755" + } + ], "permissions": [ { "path": "/var/log/kolla/trove", @@ -152,7 +180,7 @@ or off, such as the horizon container that looks for ``ENABLE_XXX`` variables where ``XXX`` is a horizon plugin name. These are generally defined in the container-specific ``extend_start.sh`` script, example for `horizon`_. -.. _horizon: https://github.com/openstack/kolla/blob/master/docker/horizon/extend_start.sh +.. _horizon: https://opendev.org/openstack/kolla/src/branch/master/docker/horizon/extend_start.sh Variables available in the containers ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -160,5 +188,5 @@ Variables available in the containers The following variables available in all images and can be evaluated in scripts: -* **KOLLA_BASE_DISTRO**: ``base_distro`` used to build the image (e.g. centos, +* **KOLLA_BASE_DISTRO**: ``base_distro`` used to build the image (e.g. rocky, ubuntu) diff --git a/doc/source/admin/template-override/ovs-dpdk.rst b/doc/source/admin/template-override/ovs-dpdk.rst index cdd7d847c..766caf9bc 100644 --- a/doc/source/admin/template-override/ovs-dpdk.rst +++ b/doc/source/admin/template-override/ovs-dpdk.rst @@ -1,7 +1,7 @@ OVS-DPDK Source build ===================== -CentOS currently does not provide packages for ovs with dpdk. +Rocky currently does not provide packages for ovs with dpdk. The Ubuntu packages do not support UIO based drivers. To use the uio_pci_generic driver on Ubuntu a source build is required. @@ -29,5 +29,5 @@ repository: .. code-block:: console - tools/build.py -t source --template-override contrib/template-override/ovs-dpdk.j2 ovsdpdk + kolla-build --template-override contrib/template-override/ovs-dpdk.j2 ovsdpdk diff --git a/doc/source/ceph_versions.csv b/doc/source/ceph_versions.csv index acfe9a999..7511810a9 100644 --- a/doc/source/ceph_versions.csv +++ b/doc/source/ceph_versions.csv @@ -1,5 +1,5 @@ Distro,Ceph, -,Source, Release -Rocky Linux,CentOS Storage SIG,Reef -Ubuntu,Ubuntu,Reef -Debian,Debian,Pacific +,Source,Release +Rocky Linux,CentOS Storage SIG,Squid +Ubuntu,Ubuntu,Squid +Debian,Debian,Squid diff --git a/doc/source/contributor/adding-a-new-image.rst b/doc/source/contributor/adding-a-new-image.rst index 147d77ad9..072d3f294 100644 --- a/doc/source/contributor/adding-a-new-image.rst +++ b/doc/source/contributor/adding-a-new-image.rst @@ -33,7 +33,7 @@ OpenStack project base image is as follows: FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} {% block labels %} - LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" + LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block << service >>_header %}{% endblock %} @@ -75,7 +75,7 @@ cannot be built for some distribution/architecture/build-type combinations. "bifrost-base", # someone need to get upstream working first }, - 'centos': { + 'rocky': { "hacluster-pcs", # Missing crmsh package }, diff --git a/doc/source/contributor/code-reviews.rst b/doc/source/contributor/code-reviews.rst index 5fee74a1d..30a42c05e 100644 --- a/doc/source/contributor/code-reviews.rst +++ b/doc/source/contributor/code-reviews.rst @@ -18,26 +18,55 @@ The volume of emails is not too large if you subscribe to *New Changes* only. If you do not have much time available for reviewing, consider reviewing patches in an area that is important to you or that you understand well. -Core reviewers -============== +Core reviewer groups +==================== -Core reviewers have additional labels available to them. +There are two core reviewer groups in the Kolla project, each with different +levels of access. + +kolla-core +---------- + +Members of ``kolla-core`` have the following additional labels available: * +2: Approve * -2: Do not merge * Workflow +1: Approve and ready for merge Zuul requires one +2 and one workflow +1, as well as a passing check, in order -for a patch to proceed to the gate. The Kolla team generally requires two +2s -before a workflow +1 may be added. We also have some non-voting Zuul jobs which -will not block a check, but should be investigated if they are failing. +for a patch to proceed to the gate. + +We also have some non-voting Zuul jobs which will not block a check, but should +be investigated if they are failing. + +The Kolla project generally requires two +2s before a workflow +1 may be added. +Exceptions where a single +2 is sufficient before adding workflow +1 are: -Core reviewers may still use +1 to indicate approval if they are not confident -enough about a particular patch to use +2. +* CI-only patches +* Documentation patches +* Trivial patches -The Kolla core reviewers have the same rights of access to stable branches, so +``kolla-core`` members may still use +1 to indicate approval if they are not +confident enough about a particular patch to use +2. + +``kolla-core`` members have the same rights of access to stable branches, so always check the branch for a review, and use extra care with stable branches. +kolla-reviewers +--------------- + +Members of ``kolla-reviewers`` have the following additional labels available: + +* +2: Approve +* -2: Do not merge + +``kolla-reviewers`` members do not have workflow rights and cannot approve a +patch for merging. Their +2 counts toward the two +2s required before a +``kolla-core`` member may add a workflow +1. + +``kolla-reviewers`` members may still use +1 to indicate approval if they are +not confident enough about a particular patch to use +2. + Becoming a core reviewer ------------------------ @@ -45,3 +74,12 @@ There are no strict rules for becoming a core reviewer. Join the community, review some patches, and demonstrate responsibility, understanding & care. If you are interested in joining the core team, ask the PTL or another core reviewer how to get there. + +Stale patches +============= + +If a reviewed patch has received no response from its owner for two weeks, it +is at the discretion and motivation of the core reviewers to update and carry +that patch forward if they deem it valuable for the upcoming release. In that +case, the core reviewer taking ownership of the patch should add their own +DCO signoff (``Signed-off-by:``) to the commit message. diff --git a/doc/source/contributor/contributing.rst b/doc/source/contributor/contributing.rst index 9d32291e0..d24c3b71f 100644 --- a/doc/source/contributor/contributing.rst +++ b/doc/source/contributor/contributing.rst @@ -18,6 +18,47 @@ The source repository for this project can be found at: https://opendev.org/openstack/kolla +.. _aicontent: + +AI-Generated Content +~~~~~~~~~~~~~~~~~~~~ + +In general, please do not submit AI generated content to the Kolla +project, but some exceptions apply. + +The OpenInfra foundation has created a policy for AI Generated content +at https://openinfra.org/legal/ai-policy which provides useful +background to the Kolla project's policy, but the Kolla project policy +differs somewhat. + +As a free software project, we are concerned with the copyright +ownership of the project's source code. Because most commercially +available LLMs are not able to indicate whether their output may +include training data incompatible with Kolla's licences, accepting +substantial contributions generated by them increases the risk to the +project. And because LLM-generated output is not considered +copyrightable in the United States and other regions, that further +increases the risk to the project. + +In many cases, the code and documentation output from LLMs is not of +sufficient quality for easy incorporation into Kolla. A community of +contributors and reviewers with deep understanding of the project is +healthier in the long run. Contributions generated by LLMs without +that understanding creates more work for the maintainers. + +Nevertheless, if you use an LLM to create a very small patch (one that +would likely not be subject to copyright protection even if generated +by a human), that's fine, but you must annotate it with the +`Assisted-By` or `Generated-By` labels. + +In short: + +* Please do not submit substantial AI-generated content (code or docs) +* Very small/limited use may be okay if it's not copyrightable +* Make sure you fully understand the code or docs you are changing +* If you don't, engage with humans in the Kolla community +* Any AI-Generated content must have `Assisted-By` or `Generated-By` labels + .. _communication: Communication @@ -38,7 +79,7 @@ Meeting Agenda Whiteboard (etherpad) Keeping track of CI gate status, release status, stable backports, planning and feature development status. - https://etherpad.openstack.org/p/KollaWhiteBoard + https://etherpad.opendev.org/p/KollaWhiteBoard .. _channel logs: https://meetings.opendev.org/irclogs/%23openstack-kolla/ .. _meeting information: https://meetings.opendev.org/#Kolla_Team_Meeting @@ -72,7 +113,7 @@ Kolla family projects track tasks and bugs in Launchpad: If you're looking for some smaller, easier work item to pick up and get started on, search for the 'low-hanging-fruit' tag in the relevant project. -A more lightweight task tracking is done via etherpad - `Whiteboard <https://etherpad.openstack.org/p/KollaWhiteBoard>`__. +A more lightweight task tracking is done via etherpad - `Whiteboard <https://etherpad.opendev.org/p/KollaWhiteBoard>`__. Reporting a Bug ~~~~~~~~~~~~~~~ diff --git a/doc/source/contributor/ptl-guide.rst b/doc/source/contributor/ptl-guide.rst index 673314c95..6b445fcd5 100644 --- a/doc/source/contributor/ptl-guide.rst +++ b/doc/source/contributor/ptl-guide.rst @@ -23,31 +23,7 @@ New PTL * Get acquainted with the release schedule, bearing in mind that Kolla is a cycle-trailing project - * Example: https://releases.openstack.org/train/schedule.html - -Open Infrastructure Summit -========================== - -Ideally the Kolla PTL will be able to attend the summit. If not, try to arrange -for another member of the core team to represent the team. Good interaction -with the community at these events is crucial to encourage upstream -involvement, onboard new users, collect feedback and for the perceived health -of the project. - -* Create a summit planning etherpad and alert about it in the kolla IRC meeting - and openstack-discuss mailing list - - * Example: https://etherpad.openstack.org/p/kolla-train-summit - -* Gather ideas for forum sessions - - * Example: user feedback & roadmap, design sessions - -* Prepare the project update presentation. Enlist help of others - -* Prepare the on-boarding session materials. Enlist help of others - -* Represent and promote the project while at the summit + * Example: https://releases.openstack.org/gazpacho/schedule.html Project Team Gathering (PTG) ============================ @@ -57,10 +33,14 @@ Gathering (PTG). Alternatively, they may decide to host a virtual PTG at a different time if there is not a critical mass of contributors attending the PTG. +* Register the team for the PTG + +* Reserve slots via the ptgbot + * Create PTG planning etherpad and alert about it in the kolla IRC meeting and openstack-discuss mailing list - * Example: https://etherpad.openstack.org/p/kolla-train-ptg + * Example: https://etherpad.opendev.org/p/kolla-gazpacho-ptg * Run sessions at the PTG @@ -81,7 +61,7 @@ After Summit & PTG * Send session summaries to the openstack-discuss mailing list * Update the `Kolla whiteboard - <https://etherpad.openstack.org/p/KollaWhiteBoard>`__ with decided priorities + <https://etherpad.opendev.org/p/KollaWhiteBoard>`__ with decided priorities for the upcoming release cycle Day to Day diff --git a/doc/source/contributor/release-management.rst b/doc/source/contributor/release-management.rst index 441bf3907..b00f8dd22 100644 --- a/doc/source/contributor/release-management.rst +++ b/doc/source/contributor/release-management.rst @@ -115,10 +115,7 @@ build and deploy the previous release of OpenStack projects, as described in * [kayobe] Switch ``openstack_release`` and ``override_checkout`` in Kayobe master branch to use the master branch of dependencies. - .. note:: The IPA image still needs to use the previous release in order to - be compatible with Ironic. - - * example: https://review.opendev.org/c/openstack/kayobe/+/791764 + * example: https://review.opendev.org/c/openstack/kayobe/+/950512 * [all] Search for TODOs/FIXMEs/NOTEs in the codebases describing tasks to be performed during the new release cycle @@ -473,7 +470,7 @@ After a branch enters EM, we typically do the following: * stop backporting fixes to the branch by default. Important fixes or those requested by community members may be merged if deemed appropriate -* stop publishing images to Dockerhub +* stop publishing images to Quay.io * stop actively maintaining CI End of Life (EOL) diff --git a/doc/source/contributor/running-tests.rst b/doc/source/contributor/running-tests.rst index 88b13feac..87c62d393 100644 --- a/doc/source/contributor/running-tests.rst +++ b/doc/source/contributor/running-tests.rst @@ -31,11 +31,11 @@ See the `unit testing <https://wiki.openstack.org/wiki/Testing#Unit_Tests>`__ section of the Testing wiki page for more information. Following are some simple examples. -To run the Python 3.8 tests: +To run the Python 3.13 tests: .. code-block:: console - tox -e py38 + tox -e py313 To run the style tests: @@ -47,7 +47,7 @@ To run multiple tests separate items by commas: .. code-block:: console - tox -e py38,pep8 + tox -e py313,pep8 Running a subset of tests ------------------------- @@ -60,27 +60,27 @@ To run the tests located only in the ``kolla/tests`` directory: .. code-block:: console - tox -e py38 kolla.tests + tox -e py313 kolla.tests To run the tests of a specific file say ``kolla/tests/test_set_config.py``: .. code-block:: console - tox -e py38 test_set_config + tox -e py313 test_set_config To run the tests in the ``ConfigFileTest`` class in the ``kolla/tests/test_set_config.py`` file: .. code-block:: console - tox -e py38 test_set_config.ConfigFileTest + tox -e py313 test_set_config.ConfigFileTest To run the ``ConfigFileTest.test_delete_path_not_exists`` test method in the ``kolla/tests/test_set_config.py`` file: .. code-block:: console - tox -e py38 test_set_config.ConfigFileTest.test_delete_path_not_exists + tox -e py313 test_set_config.ConfigFileTest.test_delete_path_not_exists Coverage Report Generation -------------------------- diff --git a/doc/source/contributor/versions.rst b/doc/source/contributor/versions.rst index 8463b84ef..f553e18ed 100644 --- a/doc/source/contributor/versions.rst +++ b/doc/source/contributor/versions.rst @@ -9,39 +9,29 @@ information about those which come from 3rdparty sources. For each component used we list version used at branch release and provide information about package sources. -.. note:: - When table mentions 'CentOS' it means both CentOS Stream 9 and Rocky Linux 9. - ============== ================ ============================================= Name Version Package source information ============== ================ ============================================= - Grafana 9.x `Grafana install guide`_ - InfluxDB 1.8.x `InfluxDB upstream repo`_ - Kibana 7.x `Kibana install guide`_ - Logstash 7.x `Logstash install guide`_ - MariaDB 10.11 (LTS) `MariaDB Community downloads`_ + Grafana 12.x `Grafana install guide`_ + MariaDB 11.4 (LTS) `MariaDB Community downloads`_ Galera 26.4 (LTS) `MariaDB Community downloads`_ OpenSearch 3.x `OpenSearch install guide`_ - ProxySQL 2.7.x `ProxySQL repository`_ - Rabbitmq 4.1.x - CentOS/Rocky: + ProxySQL 3.0.x `ProxySQL repository`_ + RabbitMQ 4.3.x - Rocky: `Team RabbitMQ 'Cloudsmith' repo (RPM)`_ - Debian/Ubuntu: `Team RabbitMQ 'Cloudsmith' repo (Deb)`_ - Erlang 27.X - CentOS/Rocky aarch64: + Erlang 27.x - Rocky aarch64: `openstack-kolla COPR`_ - - CentOS/Rocky x86-64: + - Rocky x86-64: `Team RabbitMQ 'Cloudsmith' repo (RPM)`_ - Debian/Ubuntu: `Team RabbitMQ 'Modern Erlang' PPA`_ - TD Agent 4.4.x `TreasureData install guide`_ - Telegraf 1.24.x `InfluxDB upstream repo`_ + Fluentd 6.x (LTS) `Fluentd install guide`_ ============== ================ ============================================= -.. _`InfluxDB upstream repo`: https://repos.influxdata.com/ .. _`OpenSearch install guide`: https://opensearch.org/downloads.html -.. _`Kibana install guide`: https://www.elastic.co/guide/en/kibana/7.10/install.html -.. _`Logstash install guide`: https://www.elastic.co/guide/en/logstash/7.9/installing-logstash.html -.. _`TreasureData install guide`: https://www.fluentd.org/download +.. _`Fluentd install guide`: https://www.fluentd.org/download .. _`ProxySQL repository`: https://repo.proxysql.com/ProxySQL/proxysql-3.0.x/ .. _`Team RabbitMQ 'Cloudsmith' repo (Deb)`: https://www.rabbitmq.com/install-debian.html#apt-cloudsmith diff --git a/doc/source/index.rst b/doc/source/index.rst index db2e7862f..919b3fe48 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -18,8 +18,8 @@ Welcome to Kolla's documentation! ================================= -Kolla's mission is to provide production-ready containers and deployment tools -for operating OpenStack clouds. +Kolla's mission is to provide tools to create production-ready containers and +to provide deployment tools for operating OpenStack clouds. Related Projects ================ diff --git a/doc/source/matrix_aarch64.csv b/doc/source/matrix_aarch64.csv index 028bba2c2..272d168a1 100644 --- a/doc/source/matrix_aarch64.csv +++ b/doc/source/matrix_aarch64.csv @@ -20,13 +20,11 @@ hacluster,N,U,U haproxy,U,U,U heat,U,U,U horizon,U,U,U -influxdb,N,U,U ironic,U,U,U iscsid,U,U,U keepalived,U,U,U keystone,U,U,U kolla-toolbox,U,U,U -kuryr,U,U,U magnum,U,U,U manila,U,U,U mariadb,U,U,U @@ -46,11 +44,9 @@ ovsdpdk,N,U,U placement,U,U,U prometheus,U,U,U rabbitmq,U,U,U -redis,U,U,U skyline,U,U,U tacker,U,U,U -telegraf,N,N,N tgtd,U,U,U trove,U,U,U +valkey,U,U,U watcher,U,U,U -zun,U,U,U diff --git a/doc/source/matrix_x86.csv b/doc/source/matrix_x86.csv index 14c37597d..00216592b 100644 --- a/doc/source/matrix_x86.csv +++ b/doc/source/matrix_x86.csv @@ -21,13 +21,11 @@ hacluster-pcs,N,U,U haproxy,T,T,U heat,T,T,T horizon,T,T,T -influxdb,U,U,U ironic,T,T,U iscsid,T,T,U keepalived,T,T,U keystone,T,T,T kolla-toolbox,T,T,T -kuryr,T,T,U magnum,U,U,U manila,U,U,U mariadb,T,T,T @@ -47,12 +45,10 @@ ovsdpdk,N,U,U placement,T,T,T prometheus,U,U,U rabbitmq,T,T,T -redis,T,U,U skyline,U,U,U swift,T,T,U tacker,T,U,U -telegraf,U,U,U tgtd,N,T,U trove,U,U,U +valkey,T,U,U watcher,U,U,U -zun,T,T,U diff --git a/doc/source/openvswitch_versions.csv b/doc/source/openvswitch_versions.csv new file mode 100644 index 000000000..55813a60b --- /dev/null +++ b/doc/source/openvswitch_versions.csv @@ -0,0 +1,5 @@ +Distro,Open vSwitch, +,Source,Release +Rocky Linux,CentOS NFV SIG,3.5 +Ubuntu,UCA,3.6 +Debian,DEB,3.5 diff --git a/doc/source/ovn_versions.csv b/doc/source/ovn_versions.csv new file mode 100644 index 000000000..cc5b54fc4 --- /dev/null +++ b/doc/source/ovn_versions.csv @@ -0,0 +1,5 @@ +Distro,OVN, +,Source,Release +Rocky Linux,CentOS NFV SIG,26.03 +Ubuntu,UCA,25.09 +Debian,DEB,25.03 diff --git a/doc/source/support_matrix.rst b/doc/source/support_matrix.rst index 05f2d5693..5e3b06b76 100644 --- a/doc/source/support_matrix.rst +++ b/doc/source/support_matrix.rst @@ -17,8 +17,8 @@ The following base container images are supported: ================== =============================== ================ Distribution Default base Default base tag ================== =============================== ================ -Rocky Linux quay.io/rockylinux/rockylinux 9 -Debian Bookworm debian bookworm +Debian Trixie debian trixie +Rocky Linux quay.io/rockylinux/rockylinux 10 Ubuntu Noble ubuntu 24.04 ================== =============================== ================ @@ -33,6 +33,22 @@ Ceph versions in Kolla images :stub-columns: 1 :file: ./ceph_versions.csv +Open vSwitch versions in Kolla images +===================================== + +.. csv-table:: Open vSwitch versions + :header-rows: 2 + :stub-columns: 1 + :file: ./openvswitch_versions.csv + +OVN versions in Kolla images +============================ + +.. csv-table:: OVN versions + :header-rows: 2 + :stub-columns: 1 + :file: ./ovn_versions.csv + Support clause definitions ========================== @@ -89,3 +105,26 @@ Currently unbuildable images For a list of currently unbuildable images please look into ``kolla/image/unbuildable.py`` file - ``UNBUILDABLE_IMAGES`` dictionary. + +SPICE limitations +================= + +The OpenStack Compute console type ``spice-direct`` requires that +SPICE support be compiled into the qemu running the instance. Red Hat +removed SPICE support from qemu in RHEL9 onwards, and Rocky Linux has +followed suit, so the stock Rocky Linux container images do not support +``spice-direct`` out of the box. + +As a solution, Kolla builds two copies of the ``nova-libvirt`` container +regardless of container distribution. These containers are identical on +other distributions, but for Rocky Linux the community-maintained +`ligenix/enterprise-qemu-spice +<https://copr.fedorainfracloud.org/coprs/ligenix/enterprise-qemu-spice/>`__ +COPR repository is installed as it provides a rebuilt ``qemu-kvm`` +with SPICE re-enabled for EPEL 9 and EPEL 10. Because this COPR is a +third-party rebuild without a vendor support contract, it is recommended +only for proof-of-concept deployments. + +Which container to use for ``nova-libvirt`` is then determined at +``kolla-ansible deploy`` time based on the value of the ``enable_kerbside`` +flag. diff --git a/docker/aodh/aodh-api/extend_start.sh b/docker/aodh/aodh-api/extend_start.sh deleted file mode 100644 index 07d4ce760..000000000 --- a/docker/aodh/aodh-api/extend_start.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases -# of the KOLLA_BOOTSTRAP variable being set, including empty. -if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then - aodh-dbsync - exit 0 -fi - -. /usr/local/bin/kolla_httpd_setup diff --git a/docker/base/ci-centos.repo b/docker/base/ci-centos.repo deleted file mode 100644 index 4c08f1fea..000000000 --- a/docker/base/ci-centos.repo +++ /dev/null @@ -1,75 +0,0 @@ -[baseos] -name=(OpenDev mirror) CentOS Stream $releasever - BaseOS -baseurl=http://MIRROR/centos-stream/$stream/BaseOS/$basearch/os/ -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial -gpgcheck=1 -repo_gpgcheck=0 -enabled=1 - -[appstream] -name=(OpenDev mirror) CentOS Stream $releasever - AppStream -baseurl=http://MIRROR/centos-stream/$stream/AppStream/$basearch/os/ -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial -gpgcheck=1 -repo_gpgcheck=0 -enabled=1 - -[extras-common] -name=(OpenDev mirror) CentOS Stream $releasever - Extras packages -baseurl=http://MIRROR/centos-stream/SIGs/$stream/extras/$basearch/extras-common/ -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Extras-SHA512 -gpgcheck=1 -repo_gpgcheck=0 -enabled=1 - -[crb] -name=(OpenDev mirror) CentOS Stream $releasever - CRB -baseurl=http://MIRROR/centos-stream/$stream/CRB/$basearch/os/ -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial -gpgcheck=1 -repo_gpgcheck=0 -enabled=0 - -[highavailability] -name=(OpenDev mirror) CentOS Stream $releasever - HighAvailability -baseurl=http://MIRROR/centos-stream/$stream/HighAvailability/$basearch/os/ -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial -gpgcheck=1 -repo_gpgcheck=0 -enabled=0 - -[centos-ceph-reef] -name=(OpenDev mirror) CentOS-$stream - Ceph Reef -baseurl=http://MIRROR/centos-stream/SIGs/$stream/storage/$basearch/ceph-reef/ -gpgcheck=1 -enabled=0 -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Storage - -[centos-nfv-openvswitch] -name=(OpenDev mirror) CentOS Stream $releasever - NFV OpenvSwitch -baseurl=http://MIRROR/centos-stream/SIGs/$stream/nfv/$basearch/openvswitch-2/ -gpgcheck=1 -enabled=0 -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-NFV -module_hotfixes=1 - -[centos-opstools] -name=(OpenDev mirror) CentOS Stream $releasever - OpsTools - collectd -baseurl=http://MIRROR/centos-stream/SIGs/$stream/opstools/$basearch/collectd-5/ -gpgcheck=1 -enabled=0 -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-OpsTools - -[centos-rabbitmq-38] -name=(OpenDev mirror) CentOS-9 - RabbitMQ 38 -baseurl=http://MIRROR/centos-stream/SIGs/$stream/messaging/$basearch/rabbitmq-38 -gpgcheck=1 -enabled=0 -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Messaging - -[epel] -name=(OpenDev mirror) Extra Packages for Enterprise Linux $releasever - $basearch -baseurl=http://MIRROR/epel/$releasever/Everything/$basearch/ -enabled=0 -gpgcheck=1 -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-$releasever diff --git a/docker/base/ci-rocky.repo b/docker/base/ci-rocky.repo deleted file mode 100644 index 3daf5c5ba..000000000 --- a/docker/base/ci-rocky.repo +++ /dev/null @@ -1,35 +0,0 @@ -[centos-ceph-reef] -name=(OpenDev mirror) CentOS-$stream - Ceph Reef -baseurl=http://MIRROR/centos-stream/SIGs/$stream/storage/$basearch/ceph-reef/ -gpgcheck=1 -enabled=0 -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Storage - -[centos-nfv-openvswitch] -name=(OpenDev mirror) CentOS Stream $releasever - NFV OpenvSwitch -baseurl=http://MIRROR/centos-stream/SIGs/$stream/nfv/$basearch/openvswitch-2/ -gpgcheck=1 -enabled=0 -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-NFV -module_hotfixes=1 - -[centos-opstools] -name=(OpenDev mirror) CentOS Stream $releasever - OpsTools - collectd -baseurl=http://MIRROR/centos-stream/SIGs/$stream/opstools/$basearch/collectd-5/ -gpgcheck=1 -enabled=0 -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-OpsTools - -[centos-rabbitmq-38] -name=(OpenDev mirror) CentOS-9 - RabbitMQ 38 -baseurl=http://MIRROR/centos-stream/SIGs/$stream/messaging/$basearch/rabbitmq-38 -gpgcheck=1 -enabled=0 -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Messaging - -[epel] -name=(OpenDev mirror) Extra Packages for Enterprise Linux $releasever - $basearch -baseurl=http://MIRROR/epel/$releasever/Everything/$basearch/ -enabled=0 -gpgcheck=1 -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-$releasever diff --git a/docker/base/copr-rabbitmq-erlang.repo b/docker/base/copr-rabbitmq-erlang.repo deleted file mode 100644 index fdfbf269a..000000000 --- a/docker/base/copr-rabbitmq-erlang.repo +++ /dev/null @@ -1,11 +0,0 @@ -# NOTE(hrw): this repository contains rebuild of Erlang package from RabbitMQ team -# from https://github.com/rabbitmq/erlang-rpm/ -# Thanks to COPR we have aarch64 packages for Rocky Linux - -[copr-rabbitmq-erlang] -name=openstack-kolla COPR with Erlang build for RabbitMQ -baseurl=https://download.copr.fedorainfracloud.org/results/@openstack-kolla/rabbitmq-erlang-27/rhel-$releasever-aarch64/ -gpgcheck=1 -enabled=0 -gpgkey=https://download.copr.fedorainfracloud.org/results/@openstack-kolla/rabbitmq-erlang-27/pubkey.gpg -repo_gpgcheck=0 diff --git a/docker/base/docker-ce.repo b/docker/base/docker-ce.repo deleted file mode 100644 index 9698823b9..000000000 --- a/docker/base/docker-ce.repo +++ /dev/null @@ -1,6 +0,0 @@ -[docker-ce] -name=Docker CE Stable - $basearch -baseurl=https://download.docker.com/linux/centos/$releasever/$basearch/stable -enabled=0 -gpgcheck=1 -gpgkey=https://download.docker.com/linux/centos/gpg diff --git a/docker/base/grafana.repo b/docker/base/grafana.repo deleted file mode 100644 index 002ac8929..000000000 --- a/docker/base/grafana.repo +++ /dev/null @@ -1,8 +0,0 @@ -[grafana] -name=grafana -baseurl=https://rpm.grafana.com -enabled=0 -gpgcheck=1 -gpgkey=https://rpm.grafana.com/gpg.key -sslverify=1 -sslcacert=/etc/pki/tls/certs/ca-bundle.crt diff --git a/docker/base/influxdb.repo b/docker/base/influxdb.repo deleted file mode 100644 index ae63c20be..000000000 --- a/docker/base/influxdb.repo +++ /dev/null @@ -1,6 +0,0 @@ -[influxdb] -name = InfluxDB Repository - RHEL $releasever -baseurl = https://repos.influxdata.com/stable/$basearch/main -enabled = 0 -gpgcheck = 1 -gpgkey = https://repos.influxdata.com/influxdata-archive.key diff --git a/docker/base/kolla_el10.repo b/docker/base/kolla_el10.repo deleted file mode 100644 index b1ffee675..000000000 --- a/docker/base/kolla_el10.repo +++ /dev/null @@ -1,10 +0,0 @@ -[kolla_el10] -name=Copr repo for el10-missing owned by @openstack-kolla -baseurl=https://download.copr.fedorainfracloud.org/results/@openstack-kolla/el10-missing/epel-10-$basearch/ -type=rpm-md -skip_if_unavailable=True -gpgcheck=1 -gpgkey=https://download.copr.fedorainfracloud.org/results/@openstack-kolla/el10-missing/pubkey.gpg -repo_gpgcheck=0 -enabled=0 -enabled_metadata=1 diff --git a/docker/base/mariadb.repo b/docker/base/mariadb.repo deleted file mode 100644 index 07d97ef20..000000000 --- a/docker/base/mariadb.repo +++ /dev/null @@ -1,7 +0,0 @@ -[mariadb] -name = MariaDB Server -baseurl = https://dlm.mariadb.com/repo/mariadb-server/10.11/yum/rhel/$releasever/$basearch -gpgcheck = 1 -enabled = 0 -module_hotfixes = 1 -gpgkey = https://downloads.mariadb.com/MariaDB/RPM-GPG-KEY-MariaDB diff --git a/docker/base/opensearch.repo b/docker/base/opensearch.repo deleted file mode 100644 index 63caa75f8..000000000 --- a/docker/base/opensearch.repo +++ /dev/null @@ -1,19 +0,0 @@ -[opensearch-3.x] -name=OpenSearch 3.x -baseurl=https://artifacts.opensearch.org/releases/bundle/opensearch/3.x/yum -enabled=0 -repo_gpgcheck=1 -gpgcheck=1 -gpgkey=https://artifacts.opensearch.org/publickeys/opensearch-release.pgp -autorefresh=1 -type=rpm-md - -[opensearch-dashboards-3.x] -name=OpenSearch Dashboards 3.x -baseurl=https://artifacts.opensearch.org/releases/bundle/opensearch-dashboards/3.x/yum -enabled=0 -repo_gpgcheck=1 -gpgcheck=1 -gpgkey=https://artifacts.opensearch.org/publickeys/opensearch-release.pgp -autorefresh=1 -type=rpm-md diff --git a/docker/base/proxysql.repo b/docker/base/proxysql.repo deleted file mode 100644 index 1bd2c55c3..000000000 --- a/docker/base/proxysql.repo +++ /dev/null @@ -1,7 +0,0 @@ -[proxysql] -name = ProxySQL -# NOTE(mnasiadka): No EL10 packages yet -baseurl = https://repo.proxysql.com/ProxySQL/proxysql-3.0.x/almalinux/9 -gpgkey = https://repo.proxysql.com/ProxySQL/proxysql-3.0.x/repo_pub_key -gpgcheck = 1 -enabled = 0 diff --git a/docker/base/rabbitmq_rabbitmq-erlang.repo b/docker/base/rabbitmq_rabbitmq-erlang.repo deleted file mode 100644 index 82b0441e0..000000000 --- a/docker/base/rabbitmq_rabbitmq-erlang.repo +++ /dev/null @@ -1,9 +0,0 @@ -[rabbitmq_rabbitmq-erlang] -name=rabbitmq_rabbitmq-erlang -# Use a set of mirrors maintained by the RabbitMQ core team. -# The mirrors have significantly higher bandwidth quotas. -baseurl=https://yum1.rabbitmq.com/erlang/el/9/$basearch - https://yum2.rabbitmq.com/erlang/el/9/$basearch -gpgcheck=1 -enabled=0 -gpgkey=https://github.com/rabbitmq/signing-keys/releases/download/3.0/cloudsmith.rabbitmq-erlang.E495BB49CC4BBE5B.key diff --git a/docker/base/rabbitmq_rabbitmq-server.repo b/docker/base/rabbitmq_rabbitmq-server.repo deleted file mode 100644 index 0680c11e1..000000000 --- a/docker/base/rabbitmq_rabbitmq-server.repo +++ /dev/null @@ -1,9 +0,0 @@ -[rabbitmq_rabbitmq-server] -name=rabbitmq_rabbitmq-server -baseurl=https://yum2.rabbitmq.com/rabbitmq/el/9/noarch - https://yum1.rabbitmq.com/rabbitmq/el/9/noarch -gpgcheck=1 -enabled=0 -# Cloudsmith's repository key and RabbitMQ package signing key -gpgkey=https://github.com/rabbitmq/signing-keys/releases/download/3.0/cloudsmith.rabbitmq-server.9F4587F226208342.key - https://github.com/rabbitmq/signing-keys/releases/download/3.0/rabbitmq-release-signing-key.asc diff --git a/docker/base/sources.list.debian b/docker/base/sources.list.debian deleted file mode 100644 index 89f7a1160..000000000 --- a/docker/base/sources.list.debian +++ /dev/null @@ -1,11 +0,0 @@ -# Default repos -deb http://deb.debian.org/debian bookworm main - -# debian security updates -deb http://deb.debian.org/debian-security bookworm-security main - -# debian updates -deb http://deb.debian.org/debian bookworm-updates main - -# debian backports -deb http://deb.debian.org/debian bookworm-backports main diff --git a/docker/base/sources.list.ubuntu b/docker/base/sources.list.ubuntu deleted file mode 100644 index 6542433e3..000000000 --- a/docker/base/sources.list.ubuntu +++ /dev/null @@ -1,15 +0,0 @@ -# For non-x86 architectures we use sources.list.ubuntu.<arch> - -# Default repos -deb mirror://mirrors.ubuntu.com/mirrors.txt noble main universe -deb mirror://mirrors.ubuntu.com/mirrors.txt noble-updates main universe -deb mirror://mirrors.ubuntu.com/mirrors.txt noble-backports main universe -deb mirror://mirrors.ubuntu.com/mirrors.txt noble-security main universe - -# We need to add the repo for the updated packages they provide. The main ones -# are qemu, libvirt, and openvswitch. -deb http://ubuntu-cloud.archive.canonical.com/ubuntu noble-updates/flamingo main - -# NOTE(hrw): extra repositories are added into image when they are needed as -# separate files in /etc/apt/sources.list.d/ directory. For that purpose they -# are defined in kolla/template/repos.yaml file. diff --git a/docker/base/sources.list.ubuntu.aarch64 b/docker/base/sources.list.ubuntu.aarch64 deleted file mode 100644 index d4cfbe20f..000000000 --- a/docker/base/sources.list.ubuntu.aarch64 +++ /dev/null @@ -1,15 +0,0 @@ -# Default repos -deb http://ports.ubuntu.com/ noble main universe -deb http://ports.ubuntu.com/ noble-updates main universe -deb http://ports.ubuntu.com/ noble-security main universe - -# Backports have a lower priority and must be explicitly installed to be used -deb http://ports.ubuntu.com/ noble-backports main universe - -# We need to add the repo for the updated packages they provide. The main ones -# are qemu, libvirt, and openvswitch. -deb http://ubuntu-cloud.archive.canonical.com/ubuntu noble-updates/flamingo main - -# NOTE(hrw): extra repositories are added into image when they are needed as -# separate files in /etc/apt/sources.list.d/ directory. For that purpose they -# are defined in kolla/template/repos.yaml file. diff --git a/docker/base/td.repo b/docker/base/td.repo deleted file mode 100644 index 8212817fa..000000000 --- a/docker/base/td.repo +++ /dev/null @@ -1,7 +0,0 @@ -[fluent-package-lts] -name=Fluentd Project -# NOTE(mnasiadka): Use EL9 packages for now - 10 are not available yet -baseurl=https://packages.treasuredata.com/lts/5/redhat/9/$basearch -gpgcheck=1 -gpgkey=https://packages.treasuredata.com/GPG-KEY-td-agent -enabled=0 diff --git a/docker/dnsmasq/extend_start.sh b/docker/dnsmasq/extend_start.sh deleted file mode 100644 index c09ce0327..000000000 --- a/docker/dnsmasq/extend_start.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -if [[ ! -d "/var/log/kolla/ironic" ]]; then - mkdir -p /var/log/kolla/ironic -fi -if [[ $(stat -c %a /var/log/kolla/ironic) != "755" ]]; then - chmod 755 /var/log/kolla/ironic -fi -if [[ ! -r "/var/log/kolla/ironic/dnsmasq.log" ]]; then - touch /var/log/kolla/ironic/dnsmasq.log - chown ironic:ironic /var/log/kolla/ironic/dnsmasq.log -fi diff --git a/docker/influxdb/Dockerfile.j2 b/docker/influxdb/Dockerfile.j2 deleted file mode 100644 index 060973dd6..000000000 --- a/docker/influxdb/Dockerfile.j2 +++ /dev/null @@ -1,29 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }} -{% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" -{% endblock %} - -{% block influxdb_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{{ macros.configure_user(name='influxdb') }} - -{{ macros.enable_extra_repos(['influxdb']) }} - -{% set influxdb_packages = ['influxdb'] %} -{{ macros.install_packages(influxdb_packages | customizable("packages")) }} - -COPY influxdb_sudoers /etc/sudoers.d/kolla_influxdb_sudoers -COPY extend_start.sh /usr/local/bin/kolla_extend_start - -RUN chmod 750 /etc/sudoers.d \ - && chmod 440 /etc/sudoers.d/kolla_influxdb_sudoers \ - && chmod 644 /usr/local/bin/kolla_extend_start - -{{ macros.kolla_patch_sources() }} - -{% block influxdb_footer %}{% endblock %} -{% block footer %}{% endblock %} - -USER influxdb diff --git a/docker/influxdb/extend_start.sh b/docker/influxdb/extend_start.sh deleted file mode 100644 index 42a3c4607..000000000 --- a/docker/influxdb/extend_start.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -# Create log directory, with appropriate permissions -INFLUXDB_LOG_DIR=/var/log/kolla/influxdb - -if [[ ! -d "${INFLUXDB_LOG_DIR}" ]]; then - mkdir -p ${INFLUXDB_LOG_DIR} -fi -if [[ $(stat -c %a ${INFLUXDB_LOG_DIR}) != "755" ]]; then - chmod 755 ${INFLUXDB_LOG_DIR} -fi diff --git a/docker/influxdb/influxdb_sudoers b/docker/influxdb/influxdb_sudoers deleted file mode 100644 index a9757b264..000000000 --- a/docker/influxdb/influxdb_sudoers +++ /dev/null @@ -1 +0,0 @@ -%kolla ALL=(root) NOPASSWD: /usr/bin/chown -R influxdb\: /var/lib/influxdb, /bin/chown -R influxdb\: /var/lib/influxdb diff --git a/docker/ironic/ironic-prometheus-exporter/Dockerfile.j2 b/docker/ironic/ironic-prometheus-exporter/Dockerfile.j2 deleted file mode 100644 index 7f3a1cd9d..000000000 --- a/docker/ironic/ironic-prometheus-exporter/Dockerfile.j2 +++ /dev/null @@ -1,43 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}ironic-conductor:{{ tag }} -{% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" -{% endblock %} - -USER root - -{% block ironic_prometheus_exporter_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if base_package_type == 'rpm' %} - - {% set ironic_prometheus_exporter_packages = [ - 'httpd', - 'mod_ssl', - 'python3-mod_wsgi' - ] %} - -{{ macros.install_packages(ironic_prometheus_exporter_packages | customizable("packages")) }} -RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ - && sed -i -r 's,^(Listen 443),#\1,' /etc/httpd/conf.d/ssl.conf - -{% elif base_package_type == 'deb' %} - {% set ironic_prometheus_exporter_packages = [ - 'apache2', - 'libapache2-mod-wsgi-py3' - ] %} - -{{ macros.install_packages(ironic_prometheus_exporter_packages | customizable("packages")) }} -RUN echo > /etc/apache2/ports.conf - -{% endif %} - -ENV IRONIC_CONFIG /etc/ironic/ironic.conf - -COPY extend_start.sh /usr/local/bin/kolla_extend_start -RUN chmod 755 /usr/local/bin/kolla_extend_start - -{{ macros.kolla_patch_sources() }} - -{% block ironic_prometheus_exporter_footer %}{% endblock %} -{% block footer %}{% endblock %} diff --git a/docker/ironic/ironic-prometheus-exporter/extend_start.sh b/docker/ironic/ironic-prometheus-exporter/extend_start.sh deleted file mode 100644 index c55f0b199..000000000 --- a/docker/ironic/ironic-prometheus-exporter/extend_start.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -. /usr/local/bin/kolla_httpd_setup diff --git a/docker/keystone/keystone-base/wsgi b/docker/keystone/keystone-base/wsgi deleted file mode 100644 index 852ee95eb..000000000 --- a/docker/keystone/keystone-base/wsgi +++ /dev/null @@ -1,2 +0,0 @@ -#!/var/lib/kolla/venv/bin/python -from keystone.wsgi.api import application diff --git a/docker/kuryr/kuryr-base/Dockerfile.j2 b/docker/kuryr/kuryr-base/Dockerfile.j2 deleted file mode 100644 index 025e0cdf6..000000000 --- a/docker/kuryr/kuryr-base/Dockerfile.j2 +++ /dev/null @@ -1,30 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} -{% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" -{% endblock %} - -{% block kuryr_base_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{{ macros.configure_user(name='kuryr') }} - -ADD kuryr-base-archive /kuryr-base-source - -{% set kuryr_base_pip_packages = [ - '/kuryr-base' -] %} - -COPY extend_start.sh /usr/local/bin/kolla_extend_start - -# NOTE(Jeffrey4l): remove kuryr-lib constraint in upper-constraints.txt file. -# Otherwise, it will be failed. -RUN ln -s kuryr-base-source/* kuryr-base \ - && {{ macros.upper_constraints_remove("kuryr-lib") }} \ - && {{ macros.install_pip(kuryr_base_pip_packages | customizable("pip_packages")) }} \ - && mkdir -p /etc/kuryr \ - && chmod 644 /usr/local/bin/kolla_extend_start - -{{ macros.kolla_patch_sources() }} - -{% block kuryr_base_footer %}{% endblock %} diff --git a/docker/kuryr/kuryr-base/extend_start.sh b/docker/kuryr/kuryr-base/extend_start.sh deleted file mode 100644 index b109ce4f6..000000000 --- a/docker/kuryr/kuryr-base/extend_start.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -KURYR_LOG_DIR=/var/log/kolla/kuryr -KURYR_DOCKER_PLUGINS_DIR=/usr/lib/docker/plugins/kuryr - -if [[ ! -d "${KURYR_LOG_DIR}" ]]; then - mkdir -p ${KURYR_LOG_DIR} -fi -if [[ $(stat -c %a ${KURYR_LOG_DIR}) != "755" ]]; then - chmod 755 ${KURYR_LOG_DIR} -fi - -if [[ ! -d "${KURYR_DOCKER_PLUGINS_DIR}" ]]; then - mkdir -p ${KURYR_DOCKER_PLUGINS_DIR} -fi diff --git a/docker/kuryr/kuryr-libnetwork/Dockerfile.j2 b/docker/kuryr/kuryr-libnetwork/Dockerfile.j2 deleted file mode 100644 index bbc1d0801..000000000 --- a/docker/kuryr/kuryr-libnetwork/Dockerfile.j2 +++ /dev/null @@ -1,40 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}kuryr-base:{{ tag }} -{% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" -{% endblock %} - -{% block kuryr_libnetwork_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{{ macros.enable_extra_repos(['openvswitch']) }} - -{% if base_package_type == 'rpm' %} - - {% set kuryr_libnetwork_packages = [ - 'openvswitch${KOLLA_RPM_OVS_VERSION}' - ] %} - -{% elif base_package_type == 'deb' %} - - {% set kuryr_libnetwork_packages = [ - 'bridge-utils', - 'openvswitch-switch' - ] %} - -{% endif %} -{{ macros.install_packages(kuryr_libnetwork_packages | customizable("packages")) }} - -ADD kuryr-libnetwork-archive /kuryr-libnetwork-source - -{% set kuryr_libnetwork_pip_packages = [ - '/kuryr-libnetwork' -] %} - -RUN ln -s kuryr-libnetwork-source/* kuryr-libnetwork \ - && {{ macros.install_pip(kuryr_libnetwork_pip_packages | customizable("pip_packages")) }} - -{{ macros.kolla_patch_sources() }} - -{% block kuryr_libnetwork_footer %}{% endblock %} -{% block footer %}{% endblock %} diff --git a/docker/letsencrypt/letsencrypt-webserver/Dockerfile.j2 b/docker/letsencrypt/letsencrypt-webserver/Dockerfile.j2 deleted file mode 100644 index d4be0153f..000000000 --- a/docker/letsencrypt/letsencrypt-webserver/Dockerfile.j2 +++ /dev/null @@ -1,34 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}letsencrypt-base:{{ tag }} -{% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" -{% endblock %} - -{% block letsencrypt_webserver_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if base_package_type == 'rpm' %} - {% set letsencrypt_webserver_packages = [ - 'httpd', - 'mod_ssl' - ] %} -{% elif base_package_type == 'deb' %} - {% set letsencrypt_webserver_packages = [ - 'apache2' - ] %} -{% endif %} -{{ macros.install_packages(letsencrypt_webserver_packages | customizable("packages")) }} - -{% if base_package_type == 'rpm' %} -RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ - && sed -i -r 's,^(Listen 443),#\1,' /etc/httpd/conf.d/ssl.conf -{% elif base_package_type == 'deb' %} -RUN echo > /etc/apache2/ports.conf -{% endif %} - -COPY extend_start.sh /usr/local/bin/kolla_letsencrypt_extend_start - -{{ macros.kolla_patch_sources() }} - -{% block letsencrypt_webserver_footer %}{% endblock %} -{% block footer %}{% endblock %} diff --git a/docker/letsencrypt/letsencrypt-webserver/extend_start.sh b/docker/letsencrypt/letsencrypt-webserver/extend_start.sh deleted file mode 100644 index c55f0b199..000000000 --- a/docker/letsencrypt/letsencrypt-webserver/extend_start.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -. /usr/local/bin/kolla_httpd_setup diff --git a/docker/mariadb/mariadb-base/Dockerfile.j2 b/docker/mariadb/mariadb-base/Dockerfile.j2 deleted file mode 100644 index ddf6d50d9..000000000 --- a/docker/mariadb/mariadb-base/Dockerfile.j2 +++ /dev/null @@ -1,38 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }} -{% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" -{% endblock %} - -{% block mariadb_base_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{{ macros.configure_user(name='mysql') }} - -{# NOTE(mnasiadka): Using AppStream packages on CS10 for now #} -{% if base_package_type == 'rpm' %} - {% set mariadb_base_packages = [ - 'mariadb', - ] %} - -{% elif base_package_type == 'deb' %} -{{ macros.enable_extra_repos(['mariadb']) }} - {% set mariadb_base_packages = [ - 'mariadb-client', - ] %} -{% endif %} - -{{ macros.install_packages(mariadb_base_packages | customizable("packages")) }} - -{# NOTE(mnasiadka): Latest clustercheck version as of May 2023 is 10.9 #} -{% block mariadb_clustercheck_version %} -ARG mariadb_clustercheck_version=10.9 -ARG mariadb_clustercheck_url=https://src.fedoraproject.org/rpms/mariadb/raw/${mariadb_clustercheck_version}/f/clustercheck.sh -{% endblock %} - -RUN curl -o /usr/bin/clustercheck ${mariadb_clustercheck_url} \ - && chmod 755 /usr/bin/clustercheck - -{{ macros.kolla_patch_sources() }} - -{% block mariadb_base_footer %}{% endblock %} diff --git a/docker/mariadb/mariadb-clustercheck/Dockerfile.j2 b/docker/mariadb/mariadb-clustercheck/Dockerfile.j2 deleted file mode 100644 index 7aee4ef05..000000000 --- a/docker/mariadb/mariadb-clustercheck/Dockerfile.j2 +++ /dev/null @@ -1,19 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}mariadb-base:{{ tag }} -{% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" -{% endblock %} - -{% block mariadb_clustercheck_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -COPY extend_start.sh /usr/local/bin/kolla_extend_start -COPY socat_wrapper.sh /usr/local/bin/socat_wrapper - -RUN chmod 644 /usr/local/bin/kolla_extend_start && \ - chmod 755 /usr/local/bin/socat_wrapper - -{{ macros.kolla_patch_sources() }} - -{% block mariadb_clustercheck_footer %}{% endblock %} -{% block footer %}{% endblock %} diff --git a/docker/mariadb/mariadb-clustercheck/extend_start.sh b/docker/mariadb/mariadb-clustercheck/extend_start.sh deleted file mode 100644 index 7379abddc..000000000 --- a/docker/mariadb/mariadb-clustercheck/extend_start.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -: ${MARIADB_LOG_DIR:=/var/log/kolla/mariadb} - -# Create log directory, with appropriate permissions -if [[ ! -d "${MARIADB_LOG_DIR}" ]]; then - mkdir -p ${MARIADB_LOG_DIR} -fi -if [[ $(stat -c %a ${MARIADB_LOG_DIR}) != "755" ]]; then - chmod 755 ${MARIADB_LOG_DIR} -fi diff --git a/docker/mariadb/mariadb-clustercheck/socat_wrapper.sh b/docker/mariadb/mariadb-clustercheck/socat_wrapper.sh deleted file mode 100644 index bf562e3d5..000000000 --- a/docker/mariadb/mariadb-clustercheck/socat_wrapper.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env bash - -catch_term() { - kill -TERM "$child" 2>/dev/null - exit 0 -} - -catch_quit() { - kill -QUIT "$child" 2>/dev/null - exit 0 -} - -trap catch_term SIGTERM -trap catch_quit SIGQUIT - -socat "$@" & - -child=$! -wait "$child" diff --git a/docker/mariadb/mariadb-server/backup_replica.sh b/docker/mariadb/mariadb-server/backup_replica.sh deleted file mode 100644 index ebdcbf6b0..000000000 --- a/docker/mariadb/mariadb-server/backup_replica.sh +++ /dev/null @@ -1,148 +0,0 @@ -#!/usr/bin/env bash - -set -eu -set -o pipefail - -BACKUP_DIR=/backup/ -DEFAULT_MY_CNF="/etc/mysql/my.cnf" -REPLICA_MY_CNF="$(mktemp)" -RETRY_INTERVAL=5 # Interval between retries (in seconds) -MAX_RETRIES=12 # Max retries (12 retries * 5 seconds = 60 seconds) - -# Cleanup function to remove the REPLICA_MY_CNF file -cleanup() { - rm -f "${REPLICA_MY_CNF}" -} - -# Set trap to ensure cleanup occurs on exit or error -trap cleanup EXIT - -cd "${BACKUP_DIR}" - -# Execute a full backup -backup_full() { - echo "Taking a full backup" - LAST_FULL_DATE=$(date +%d-%m-%Y-%s) - BACKUP_FILE="backup-full-${LAST_FULL_DATE}.mbs.gz" - BACKUP_PATH="${BACKUP_DIR}/full-${LAST_FULL_DATE}" - mkdir -p "${BACKUP_PATH}" - - mariabackup \ - --defaults-file="${REPLICA_MY_CNF}" \ - --backup \ - --stream=mbstream \ - --history="${LAST_FULL_DATE}" \ - | gzip > "${BACKUP_PATH}/${BACKUP_FILE}" - - echo "${BACKUP_PATH}/${BACKUP_FILE}" > "${BACKUP_DIR}/last_full_file" -} - -# Execute an incremental backup -backup_incremental() { - if [ ! -r "${BACKUP_DIR}/last_full_file" ]; then - echo "Error: No full backup file found." - exit 1 - fi - - FULL_BACKUP_FILE=$(cat "${BACKUP_DIR}/last_full_file") - LAST_FULL_DATE=$(basename "$(dirname "${FULL_BACKUP_FILE}")" | sed 's/^full-//') - NOW=$(date +%H-%M-%S-%d-%m-%Y) - INCR_DIR="${BACKUP_DIR}/incr-${NOW}-since-${LAST_FULL_DATE}" - mkdir -p "${INCR_DIR}" - - # Temp dir for full base restore - TMP_BASEDIR=$(mktemp -d) - - echo "Decompressing full backup to temp dir: ${TMP_BASEDIR}" - gunzip -c "${FULL_BACKUP_FILE}" | mbstream -x -C "${TMP_BASEDIR}" - - mariabackup \ - --defaults-file="${REPLICA_MY_CNF}" \ - --backup \ - --stream=mbstream \ - --incremental-basedir="${TMP_BASEDIR}" \ - --history="incr-${NOW}" \ - | gzip > "${INCR_DIR}/backup-incremental-${NOW}.mbs.gz" - - rm -rf "${TMP_BASEDIR}" -} - -# Retry logic for database queries -retry_mysql_query() { - local query="$1" - local result="" - local attempt=1 - - while [ ${attempt} -le ${MAX_RETRIES} ]; do - result=$(mysql -h "${HOST}" -u "${USER}" -p"${PASS}" -s -N -e "${query}" 2>/dev/null || true) - if [ -n "${result}" ]; then - echo "${result}" - return 0 - fi - echo "Attempt ${attempt}/${MAX_RETRIES} failed. Retrying in ${RETRY_INTERVAL} seconds..." - sleep "${RETRY_INTERVAL}" - attempt=$((attempt + 1)) - done - - echo "Error: Failed to execute the query after ${MAX_RETRIES} attempts." - return 1 -} - -get_and_set_replica_server() { - HOST="$(grep '^host' "${DEFAULT_MY_CNF}" | awk -F '=' '{print $2}' | xargs)" - USER="$(grep '^user' "${DEFAULT_MY_CNF}" | awk -F '=' '{print $2}' | xargs)" - PASS="$(grep '^password' "${DEFAULT_MY_CNF}" | awk -F '=' '{print $2}' | xargs)" - - ALL_HOSTS_SELECT="SELECT REGEXP_REPLACE(VARIABLE_VALUE, ':[0-9]*','') FROM information_schema.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_incoming_addresses';" - ALL_HOSTS=$(retry_mysql_query "${ALL_HOSTS_SELECT}") - if [ -z "${ALL_HOSTS}" ]; then - echo "Backup failed due to inability to fetch a list of servers." - exit 1 - fi - - ACTIVE_HOST_SELECT='SELECT @@hostname;' - ACTIVE_HOST=$(retry_mysql_query "${ACTIVE_HOST_SELECT}" | xargs getent hosts | awk '{print $1}') - if [ -z "${ACTIVE_HOST}" ]; then - echo "Backup failed due to inability to fetch active host." - exit 1 - fi - - # Multinode - if echo "${ALL_HOSTS}" | grep -q ','; then - for server in $(echo "${ALL_HOSTS}" | tr ',' '\n'); do - if [[ "${server}" != "${ACTIVE_HOST}" ]]; then - REPLICA_HOST="${server}" - break - fi - done - # Single node - else - REPLICA_HOST="${ALL_HOSTS}" - fi - if [ -z "${REPLICA_HOST}" ]; then - echo "Backup failed due to inability to determine replica host." - exit 1 - fi - - cp "${DEFAULT_MY_CNF}" "${REPLICA_MY_CNF}" - sed -i "s/${HOST}/${REPLICA_HOST}/g" "${REPLICA_MY_CNF}" -} - -if [ -n "${BACKUP_TYPE}" ]; then - get_and_set_replica_server - case "${BACKUP_TYPE}" in - "full") - backup_full - ;; - "incremental") - backup_incremental - ;; - *) - echo "Only full or incremental options are supported." - exit 1 - ;; - esac -else - echo "You need to specify either full or incremental backup options." - exit 1 -fi diff --git a/docker/neutron/neutron-infoblox-ipam-agent/Dockerfile.j2 b/docker/neutron/neutron-infoblox-ipam-agent/Dockerfile.j2 deleted file mode 100644 index a27b7cdd0..000000000 --- a/docker/neutron/neutron-infoblox-ipam-agent/Dockerfile.j2 +++ /dev/null @@ -1,20 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}neutron-server:{{ tag }} -{% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" -{% endblock %} - -# This image inherits from neutron-server image, which is also a leaf image, -# and therefore sets the user to neutron. Set the user to root, so that any -# headers or footers used have the right context. -USER root - -{% block neutron_infoblox_ipam_agent_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{{ macros.kolla_patch_sources() }} - -{% block neutron_infoblox_ipam_agent_footer %}{% endblock %} -{% block footer %}{% endblock %} - -USER neutron diff --git a/docker/neutron/neutron-linuxbridge-agent/Dockerfile.j2 b/docker/neutron/neutron-linuxbridge-agent/Dockerfile.j2 deleted file mode 100644 index 471325548..000000000 --- a/docker/neutron/neutron-linuxbridge-agent/Dockerfile.j2 +++ /dev/null @@ -1,21 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}neutron-base:{{ tag }} -{% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" -{% endblock %} - -{% block neutron_linuxbridge_agent_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% set neutron_linuxbridge_agent_packages = [ - 'ebtables' -] %} - -{{ macros.install_packages(neutron_linuxbridge_agent_packages | customizable("packages")) }} - -{{ macros.kolla_patch_sources() }} - -{% block neutron_linuxbridge_agent_footer %}{% endblock %} -{% block footer %}{% endblock %} - -USER neutron diff --git a/docker/ovn/ovn-sb-db-relay/Dockerfile.j2 b/docker/ovn/ovn-sb-db-relay/Dockerfile.j2 deleted file mode 100644 index d95c7e34c..000000000 --- a/docker/ovn/ovn-sb-db-relay/Dockerfile.j2 +++ /dev/null @@ -1,18 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}ovn-sb-db-server:{{ tag }} -{% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" -{% endblock %} - -{% block ovn_sb_db_server_header %}{% endblock %} - -{% block ovn_sb_db_relay_ovn_ctl %} -{# TODO(mnasiadka): Switch to 25.03 branch when available, ideally rpm/deb packages will be - available. #} -RUN curl -o /usr/share/ovn/scripts/ovn-ctl https://raw.githubusercontent.com/ovn-org/ovn/refs/heads/main/utilities/ovn-ctl -{% endblock %} - -COPY extend_start.sh /usr/local/bin/kolla_ovn_extend_start -RUN chmod 644 /usr/local/bin/kolla_ovn_extend_start - -{% block ovn_sb_db_relay_footer %}{% endblock %} -{% block footer %}{% endblock %} diff --git a/docker/redis/redis-base/extend_start.sh b/docker/redis/redis-base/extend_start.sh deleted file mode 100644 index f5f12ac70..000000000 --- a/docker/redis/redis-base/extend_start.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -if [[ ! -d "/var/log/kolla/redis" ]]; then - mkdir -p /var/log/kolla/redis -fi - -if [[ $(stat -c %a /var/log/kolla/redis) != "755" ]]; then - chmod 755 /var/log/kolla/redis -fi diff --git a/docker/redis/redis-sentinel/Dockerfile.j2 b/docker/redis/redis-sentinel/Dockerfile.j2 deleted file mode 100644 index 83fc60df0..000000000 --- a/docker/redis/redis-sentinel/Dockerfile.j2 +++ /dev/null @@ -1,25 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}redis-base:{{ tag }} -{% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" -{% endblock %} - -{% block redis_sentinel_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if base_package_type == 'rpm' %} - {% set redis_sentinel_packages = ['redis'] %} -{% elif base_package_type == 'deb' %} - {% set redis_sentinel_packages = ['redis-sentinel'] %} -{% endif %} -{{ macros.install_packages(redis_sentinel_packages | customizable("packages")) }} - -COPY extend_start.sh /usr/local/bin/kolla_extend_start -RUN chmod 644 /usr/local/bin/kolla_extend_start - -{{ macros.kolla_patch_sources() }} - -{% block redis_sentinel_footer %}{% endblock %} -{% block footer %}{% endblock %} - -USER redis diff --git a/docker/redis/redis/Dockerfile.j2 b/docker/redis/redis/Dockerfile.j2 deleted file mode 100644 index 7e5ce923b..000000000 --- a/docker/redis/redis/Dockerfile.j2 +++ /dev/null @@ -1,22 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}redis-base:{{ tag }} -{% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" -{% endblock %} - -{% block redis_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if base_package_type == 'rpm' %} - {% set redis_packages = ['redis'] %} -{% elif base_package_type == 'deb' %} - {% set redis_packages = ['redis-server'] %} -{% endif %} -{{ macros.install_packages(redis_packages | customizable("packages")) }} - -{{ macros.kolla_patch_sources() }} - -{% block redis_footer %}{% endblock %} -{% block footer %}{% endblock %} - -USER redis diff --git a/docker/telegraf/Dockerfile.j2 b/docker/telegraf/Dockerfile.j2 deleted file mode 100644 index 20764b127..000000000 --- a/docker/telegraf/Dockerfile.j2 +++ /dev/null @@ -1,44 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }} -{% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" -{% endblock %} - -{% block telegraf_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{{ macros.configure_user(name='telegraf', homedir='/etc/telegraf') }} - -{{ macros.enable_extra_repos(['influxdb', 'opstools']) }} - -{% set telegraf_packages = [ - 'chrony', - 'net-tools', - 'telegraf' -] %} - -{% if base_package_type == 'rpm' %} - {% set telegraf_packages = telegraf_packages + [ - 'collectd', - ] %} -{% elif base_package_type == 'deb' %} - {% set telegraf_packages = telegraf_packages + [ - 'collectd-core', - ] %} -{% endif %} - -{{ macros.install_packages(telegraf_packages | customizable("packages")) }} - -COPY telegraf_sudoers /etc/sudoers.d/kolla_telegraf_sudoers -COPY extend_start.sh /usr/local/bin/kolla_extend_start - -RUN chmod 750 /etc/sudoers.d \ - && chmod 440 /etc/sudoers.d/kolla_telegraf_sudoers \ - && chmod 644 /usr/local/bin/kolla_extend_start - -{{ macros.kolla_patch_sources() }} - -{% block telegraf_footer %}{% endblock %} -{% block footer %}{% endblock %} - -USER telegraf diff --git a/docker/telegraf/extend_start.sh b/docker/telegraf/extend_start.sh deleted file mode 100644 index 2830da1cb..000000000 --- a/docker/telegraf/extend_start.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -TELEGRAF_LOG_DIR="/var/log/kolla/telegraf" - -if [[ ! -d "${TELEGRAF_LOG_DIR}" ]]; then - mkdir -p ${TELEGRAF_LOG_DIR} -fi -if [[ $(stat -c %a ${TELEGRAF_LOG_DIR}) != "755" ]]; then - chmod 755 ${TELEGRAF_LOG_DIR} -fi diff --git a/docker/telegraf/telegraf_sudoers b/docker/telegraf/telegraf_sudoers deleted file mode 100644 index d6e1e092f..000000000 --- a/docker/telegraf/telegraf_sudoers +++ /dev/null @@ -1 +0,0 @@ -%kolla ALL=(root) NOPASSWD: /usr/bin/chown -R telegraf\: /var/lib/telegraf, /bin/chown -R telegraf\: /var/lib/telegraf diff --git a/docker/venus/venus-api/Dockerfile.j2 b/docker/venus/venus-api/Dockerfile.j2 deleted file mode 100644 index 35ac69dca..000000000 --- a/docker/venus/venus-api/Dockerfile.j2 +++ /dev/null @@ -1,18 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}venus-base:{{ tag }} -{% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" -{% endblock %} - -{% block venus_api_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -COPY extend_start.sh /usr/local/bin/kolla_venus_extend_start -RUN chmod 644 /usr/local/bin/kolla_venus_extend_start - -{{ macros.kolla_patch_sources() }} - -{% block venus_api_footer %}{% endblock %} -{% block footer %}{% endblock %} - -USER venus diff --git a/docker/venus/venus-base/Dockerfile.j2 b/docker/venus/venus-base/Dockerfile.j2 deleted file mode 100644 index 729ae6bd4..000000000 --- a/docker/venus/venus-base/Dockerfile.j2 +++ /dev/null @@ -1,29 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} -{% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" -{% endblock %} - -{% block venus_base_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{{ macros.configure_user(name='venus') }} - -ADD venus-base-archive /venus-base-source - -{% set venus_base_pip_packages = [ - '/venus' -] %} - -COPY extend_start.sh /usr/local/bin/kolla_extend_start - -RUN ln -s venus-base-source/* venus \ - && {{ macros.install_pip(venus_base_pip_packages | customizable("pip_packages")) }} \ - && mkdir -p /etc/venus \ - && cp -r /venus/etc/venus/* /etc/venus/ \ - && touch /usr/local/bin/kolla_venus_extend_start \ - && chmod 644 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_venus_extend_start - -{{ macros.kolla_patch_sources() }} - -{% block venus_base_footer %}{% endblock %} diff --git a/docker/venus/venus-base/extend_start.sh b/docker/venus/venus-base/extend_start.sh deleted file mode 100644 index fa7bbe54b..000000000 --- a/docker/venus/venus-base/extend_start.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -if [[ ! -d "/var/log/kolla/venus" ]]; then - mkdir -p /var/log/kolla/venus -fi -if [[ $(stat -c %a /var/log/kolla/venus) != "755" ]]; then - chmod 755 /var/log/kolla/venus -fi - -. /usr/local/bin/kolla_venus_extend_start diff --git a/docker/venus/venus-manager/Dockerfile.j2 b/docker/venus/venus-manager/Dockerfile.j2 deleted file mode 100644 index 35575adb6..000000000 --- a/docker/venus/venus-manager/Dockerfile.j2 +++ /dev/null @@ -1,15 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}venus-base:{{ tag }} -{% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" -{% endblock %} - -{% block venus_manager_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{{ macros.kolla_patch_sources() }} - -{% block venus_manager_footer %}{% endblock %} -{% block footer %}{% endblock %} - -USER venus diff --git a/docker/zun/zun-api/Dockerfile.j2 b/docker/zun/zun-api/Dockerfile.j2 deleted file mode 100644 index ded752ae6..000000000 --- a/docker/zun/zun-api/Dockerfile.j2 +++ /dev/null @@ -1,16 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}zun-base:{{ tag }} -{% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" -{% endblock %} - -{% block zun_api_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -COPY extend_start.sh /usr/local/bin/kolla_zun_extend_start -RUN chmod 644 /usr/local/bin/kolla_zun_extend_start - -{{ macros.kolla_patch_sources() }} - -{% block zun_api_footer %}{% endblock %} -{% block footer %}{% endblock %} diff --git a/docker/zun/zun-api/extend_start.sh b/docker/zun/zun-api/extend_start.sh deleted file mode 100644 index f21cc1bd3..000000000 --- a/docker/zun/zun-api/extend_start.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases -# of the KOLLA_BOOTSTRAP variable being set, including empty. -if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then - zun-db-manage upgrade - exit 0 -fi - -. /usr/local/bin/kolla_httpd_setup diff --git a/docker/zun/zun-base/Dockerfile.j2 b/docker/zun/zun-base/Dockerfile.j2 deleted file mode 100644 index 2d3cac741..000000000 --- a/docker/zun/zun-base/Dockerfile.j2 +++ /dev/null @@ -1,55 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} -{% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" -{% endblock %} - -{% block zun_base_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{{ macros.enable_extra_repos(['openvswitch']) }} -{{ macros.configure_user(name='zun') }} - -{% if base_package_type == 'rpm' %} - - {% set zun_base_packages = [ - 'numactl', - ] %} - -{{ macros.install_packages(zun_base_packages | customizable("packages")) }} -RUN mkdir -p /var/www/cgi-bin/zun - -{% elif base_package_type == 'deb' %} - - {% set zun_base_packages = [ - 'numactl', - ] %} - -{{ macros.install_packages(zun_base_packages | customizable("packages")) }} -RUN mkdir -p /var/www/cgi-bin/zun -{% endif %} - -ADD zun-base-archive /zun-base-source - -{% set zun_base_pip_packages = [ - '/zun' -] %} - -COPY zun_sudoers /etc/sudoers.d/kolla_zun_sudoers -COPY extend_start.sh /usr/local/bin/kolla_extend_start -COPY app.wsgi /var/www/cgi-bin/zun - -RUN ln -s zun-base-source/* zun \ - && {{ macros.install_pip(zun_base_pip_packages | customizable("pip_packages")) }} \ - && mkdir -p /etc/zun /var/www/cgi-bin/zun \ - && cp -r /zun/etc/zun/* /etc/zun/ \ - && sed -i 's|^exec_dirs.*|exec_dirs=/var/lib/kolla/venv/bin,/sbin,/usr/sbin,/bin,/usr/bin,/usr/local/bin,/usr/local/sbin|g' /etc/zun/rootwrap.conf \ - && chmod 750 /etc/sudoers.d \ - && chmod 640 /etc/sudoers.d/kolla_zun_sudoers \ - && touch /usr/local/bin/kolla_zun_extend_start \ - && chmod 755 /var/www/cgi-bin/zun \ - && chmod 644 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_zun_extend_start - -{{ macros.kolla_patch_sources() }} - -{% block zun_base_footer %}{% endblock %} diff --git a/docker/zun/zun-base/app.wsgi b/docker/zun/zun-base/app.wsgi deleted file mode 100644 index bd64371de..000000000 --- a/docker/zun/zun-base/app.wsgi +++ /dev/null @@ -1,2 +0,0 @@ -#!/var/lib/kolla/venv/bin/python -from zun.wsgi.api import application diff --git a/docker/zun/zun-base/extend_start.sh b/docker/zun/zun-base/extend_start.sh deleted file mode 100644 index 0a8cf1331..000000000 --- a/docker/zun/zun-base/extend_start.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -if [[ ! -d "/var/log/kolla/zun" ]]; then - mkdir -p /var/log/kolla/zun -fi -if [[ $(stat -c %U:%G /var/log/kolla/zun) != "zun:kolla" ]]; then - chown zun:kolla /var/log/kolla/zun -fi -if [[ $(stat -c %a /var/log/kolla/zun) != "755" ]]; then - chmod 755 /var/log/kolla/zun -fi - -. /usr/local/bin/kolla_zun_extend_start diff --git a/docker/zun/zun-base/zun_sudoers b/docker/zun/zun-base/zun_sudoers deleted file mode 100644 index fd35f4cb5..000000000 --- a/docker/zun/zun-base/zun_sudoers +++ /dev/null @@ -1 +0,0 @@ -zun ALL=(root) NOPASSWD: /var/lib/kolla/venv/bin/zun-rootwrap /etc/zun/rootwrap.conf * diff --git a/docker/zun/zun-cni-daemon/Dockerfile.j2 b/docker/zun/zun-cni-daemon/Dockerfile.j2 deleted file mode 100644 index 3534f8f3e..000000000 --- a/docker/zun/zun-cni-daemon/Dockerfile.j2 +++ /dev/null @@ -1,42 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}zun-base:{{ tag }} -{% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" -{% endblock %} - -{% block zun_cni_daemon_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{% if base_package_type == 'rpm' %} - - {% set zun_cni_daemon_packages = [ - 'openvswitch${KOLLA_RPM_OVS_VERSION}' - ] %} - -{% elif base_package_type == 'deb' %} - - {% set zun_cni_daemon_packages = [ - 'bridge-utils', - 'openvswitch-switch' - ] %} - -{% endif %} -{{ macros.install_packages(zun_cni_daemon_packages | customizable("packages")) }} - -{% block zun_cni_daemon_version %} -ARG zun_cni_daemon_version=0.7.1 -ARG zun_cni_daemon_url=https://github.com/containernetworking/plugins/releases/download/v${zun_cni_daemon_version}/cni-plugins-{{debian_arch}}-v${zun_cni_daemon_version}.tgz -{% endblock %} - -COPY zun_sudoers /etc/sudoers.d/kolla_zun_sudoers - -RUN chmod 750 /etc/sudoers.d \ - && chmod 640 /etc/sudoers.d/kolla_zun_sudoers \ - && curl -o /tmp/cni-plugins.tgz ${zun_cni_daemon_url} \ - && tar -C /opt -xzvf /tmp/cni-plugins.tgz ./loopback \ - && rm -f /tmp/cni-plugins.tgz - -{{ macros.kolla_patch_sources() }} - -{% block zun_cni_daemon_footer %}{% endblock %} -{% block footer %}{% endblock %} diff --git a/docker/zun/zun-cni-daemon/zun_sudoers b/docker/zun/zun-cni-daemon/zun_sudoers deleted file mode 100644 index fd35f4cb5..000000000 --- a/docker/zun/zun-cni-daemon/zun_sudoers +++ /dev/null @@ -1 +0,0 @@ -zun ALL=(root) NOPASSWD: /var/lib/kolla/venv/bin/zun-rootwrap /etc/zun/rootwrap.conf * diff --git a/docker/zun/zun-compute/Dockerfile.j2 b/docker/zun/zun-compute/Dockerfile.j2 deleted file mode 100644 index 17f34e0be..000000000 --- a/docker/zun/zun-compute/Dockerfile.j2 +++ /dev/null @@ -1,33 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}zun-base:{{ tag }} -{% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" -{% endblock %} - -{% block zun_compute_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{{ macros.enable_extra_repos(['ceph', 'epel']) }} - -{% set zun_compute_packages = [ - 'ceph-common', - 'e2fsprogs', - 'pciutils', - 'xfsprogs', -] %} - -{{ macros.install_packages(zun_compute_packages | customizable("packages")) }} - -COPY zun_sudoers /etc/sudoers.d/kolla_zun_sudoers -COPY extend_start.sh /usr/local/bin/kolla_zun_extend_start - -RUN chmod 644 /usr/local/bin/kolla_zun_extend_start \ - && chmod 750 /etc/sudoers.d \ - && chmod 640 /etc/sudoers.d/kolla_zun_sudoers - -{{ macros.kolla_patch_sources() }} - -{% block zun_compute_footer %}{% endblock %} -{% block footer %}{% endblock %} - -USER zun diff --git a/docker/zun/zun-compute/extend_start.sh b/docker/zun/zun-compute/extend_start.sh deleted file mode 100644 index f3b6fc48b..000000000 --- a/docker/zun/zun-compute/extend_start.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -gid=$(stat -c "%g" /var/run/docker.sock) -sudo groupadd --force --gid $gid docker -sudo usermod -aG docker zun diff --git a/docker/zun/zun-compute/zun_sudoers b/docker/zun/zun-compute/zun_sudoers deleted file mode 100644 index b3a39af7d..000000000 --- a/docker/zun/zun-compute/zun_sudoers +++ /dev/null @@ -1,3 +0,0 @@ -zun ALL=(root) NOPASSWD: /var/lib/kolla/venv/bin/zun-rootwrap /etc/zun/rootwrap.conf * -zun ALL=(root) NOPASSWD: /usr/sbin/groupadd --force --gid * -zun ALL=(root) NOPASSWD: /usr/sbin/usermod -aG docker zun diff --git a/docker/zun/zun-wsproxy/Dockerfile.j2 b/docker/zun/zun-wsproxy/Dockerfile.j2 deleted file mode 100644 index 09350ad40..000000000 --- a/docker/zun/zun-wsproxy/Dockerfile.j2 +++ /dev/null @@ -1,15 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}zun-base:{{ tag }} -{% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" -{% endblock %} - -{% block zun_wsproxy_header %}{% endblock %} - -{% import "macros.j2" as macros with context %} - -{{ macros.kolla_patch_sources() }} - -{% block zun_wsproxy_footer %}{% endblock %} -{% block footer %}{% endblock %} - -USER zun diff --git a/kolla/common/config.py b/kolla/common/config.py index d2984d7ec..e1c0cb456 100644 --- a/kolla/common/config.py +++ b/kolla/common/config.py @@ -21,23 +21,23 @@ from kolla.common.users import USERS from kolla.version import version_info as version -BASE_OS_DISTRO = ['centos', 'debian', 'rocky', 'ubuntu'] +BASE_OS_DISTRO = ['debian', 'rocky', 'ubuntu'] BASE_ARCH = ['x86_64', 'aarch64'] DEBIAN_ARCH = ['amd64', 'arm64'] DEFAULT_BASE_TAGS = { - 'centos': {'name': 'quay.io/centos/centos', 'tag': 'stream10'}, - 'debian': {'name': 'debian', 'tag': 'bookworm'}, - 'rocky': {'name': 'quay.io/rockylinux/rockylinux', 'tag': '9'}, + 'debian': {'name': 'debian', 'tag': 'trixie'}, + 'rocky': {'name': 'quay.io/rockylinux/rockylinux', 'tag': '10'}, 'ubuntu': {'name': 'ubuntu', 'tag': '24.04'}, } # NOTE(hrw): has to match PRETTY_NAME in /etc/os-release DISTRO_PRETTY_NAME = { - 'centos': 'CentOS Stream 10', - 'debian': 'Debian GNU/Linux 12 (bookworm)', - 'rocky': 'Rocky Linux 9.* (Blue Onyx)', + 'debian': 'Debian GNU/Linux 13 (trixie)', + 'rocky': 'Rocky Linux 10.* (Red Quartz)', 'ubuntu': 'Ubuntu 24.04.* LTS', } -OPENSTACK_RELEASE = '2025.2' + +OPENSTACK_RELEASE = 'master' +OPENSTACK_RELEASE_CODENAME = 'Gazpacho' # TODO(mandre) check for file integrity instead of downloading from an HTTPS # source @@ -60,9 +60,8 @@ _PROFILE_OPTS = [ 'openvswitch', 'proxysql', 'rabbitmq', - 'redis', - 'storm', 'tgtd', + 'valkey', ], help='Infra images'), cfg.ListOpt('main', @@ -86,21 +85,16 @@ _PROFILE_OPTS = [ 'cloudkitty', 'designate', 'gnocchi', - 'influxdb', 'ironic', - 'kafka', - 'kuryr', + 'kerbside', 'magnum', 'manila', 'masakari', 'mistral', 'octavia', - 'redis', 'tacker', - 'telegraf', 'trove', - 'zookeeper', - 'zun', + 'valkey', ], help='Aux Images'), cfg.ListOpt('default', @@ -175,6 +169,14 @@ _CLI_OPTS = [ help='The Docker namespace name'), cfg.StrOpt('network_mode', default='host', help='The network mode for Docker build. Example: host'), + cfg.BoolOpt('buildkit', default=True, + help='Use Docker BuildKit (docker buildx build) when building ' + 'images. Requires the docker-buildx-plugin to be ' + 'installed. Only valid with --engine docker.'), + cfg.StrOpt('buildkit-builder', default=None, + help='Name of the docker buildx builder instance to use. ' + 'If unset the currently active builder is used. ' + 'Only valid with --buildkit.'), cfg.BoolOpt('cache', default=True, help='Use the container engine cache when building'), cfg.StrOpt('patches-path', default=None, @@ -199,9 +201,7 @@ _CLI_OPTS = [ cfg.MultiOpt('regex', types.String(), positional=True, required=False, help=('Build only images matching regex and its' ' dependencies')), - cfg.StrOpt('registry', - help=('The container image registry host. The default registry' - ' host is Docker Hub')), + cfg.StrOpt('registry', help='The container image registry host'), cfg.StrOpt('save-dependency', help=('Path to the file to store the docker image' ' dependency in Graphviz dot format')), @@ -218,7 +218,7 @@ _CLI_OPTS = [ help=('The number of threads to use while building.' ' (Note: setting to one will allow real time' ' logging)')), - cfg.StrOpt('tag', default=version.cached_version_string(), + cfg.StrOpt('tag', help='The container image tag'), cfg.BoolOpt('template-only', default=False, help="Don't build images. Generate Dockerfile only"), @@ -242,6 +242,10 @@ _CLI_OPTS = [ cfg.StrOpt('openstack-release', default=OPENSTACK_RELEASE, help='OpenStack release for building kolla source images and ' 'kolla-toolbox image'), + cfg.StrOpt('openstack-release-codename', + default=OPENSTACK_RELEASE_CODENAME, + help='OpenStack release codename for Debian OpenStack extrepo ' + 'and Ubuntu Cloud Archive'), cfg.StrOpt('openstack-branch', help='Branch for source images (internal; with a dash; ' 'please set openstack-release instead)'), @@ -259,7 +263,7 @@ _CLI_OPTS = [ cfg.StrOpt('image-name-prefix', default='', help='Prefix prepended to image names'), cfg.StrOpt('repos-yaml', default='', - help='Path to alternative repos.yaml file'), + help='Path to repos.yaml override file'), cfg.StrOpt('engine', default='docker', choices=['docker', 'podman'], help='Container engine to build images on.'), cfg.StrOpt('podman_base_url', default='unix:///run/podman/podman.sock', @@ -292,6 +296,14 @@ _BASE_OPTS = [ help='Clean all package cache.'), cfg.ListOpt('allowed-to-fail', default=[], help='Images which are allowed to fail'), + cfg.StrOpt('pip_index_url', + help='URL of the primary pip index (sets ARG PIP_INDEX_URL)'), + cfg.StrOpt('pip_trusted_host', + help='Hostname to mark as trusted for pip ' + '(sets ARG PIP_TRUSTED_HOST)'), + cfg.StrOpt('pip_extra_index_url', + help='URL of an extra pip index ' + '(sets ARG PIP_EXTRA_INDEX_URL)'), ] @@ -382,6 +394,8 @@ def parse(conf, args, usage=None, prog=None, # NOTE(jeffrey4l): set the default base tag based on the # base option conf.set_default('base_tag', DEFAULT_BASE_TAGS[conf.base]['tag']) + conf.set_default('tag', + f"{conf.openstack_release}-{conf.base}-{conf.base_tag}") prefix = '' if conf.openstack_release == 'master' else 'stable-' openstack_branch = '{}{}'.format(prefix, conf.openstack_release) openstack_branch_slashed = openstack_branch.replace('-', '/') diff --git a/kolla/common/sources.py b/kolla/common/sources.py index 3c9ceb0fc..61dd10263 100644 --- a/kolla/common/sources.py +++ b/kolla/common/sources.py @@ -10,416 +10,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -SOURCES = { - 'openstack-base': { - 'type': 'url', - 'location': ('$tarballs_base/openstack/requirements/' - 'requirements-${openstack_branch}.tar.gz')}, - 'aodh-base': { - 'type': 'url', - 'location': ('$tarballs_base/openstack/aodh/' - 'aodh-${openstack_branch}.tar.gz')}, - 'barbican-base': { - 'type': 'url', - 'location': ('$tarballs_base/openstack/barbican/' - 'barbican-${openstack_branch}.tar.gz')}, - 'bifrost-base': { - 'type': 'url', - 'location': ('$tarballs_base/openstack/bifrost/' - 'bifrost-${openstack_branch}.tar.gz')}, - 'blazar-base': { - 'type': 'url', - 'location': ('$tarballs_base/openstack/blazar/' - 'blazar-${openstack_branch}.tar.gz')}, - 'ceilometer-base': { - 'type': 'url', - 'location': ('$tarballs_base/openstack/ceilometer/' - 'ceilometer-${openstack_branch}.tar.gz')}, - 'cinder-base': { - 'type': 'url', - 'location': ('$tarballs_base/openstack/cinder/' - 'cinder-${openstack_branch}.tar.gz')}, - 'cloudkitty-base': { - 'type': 'url', - 'location': ('$tarballs_base/openstack/cloudkitty/' - 'cloudkitty-${openstack_branch}.tar.gz')}, - 'cyborg-base': { - 'type': 'url', - 'location': ('$tarballs_base/openstack/cyborg/' - 'cyborg-${openstack_branch}.tar.gz')}, - 'designate-base': { - 'type': 'url', - 'location': ('$tarballs_base/openstack/designate/' - 'designate-${openstack_branch}.tar.gz')}, - 'etcd': { - # NOTE(wszumski): Upgrade one minor version at a time: - # https://etcd.io/docs/v3.6/upgrades/upgrade_3_6/ - 'version': '3.6.4', - 'type': 'url', - 'sha256': { - 'amd64': '4d5f3101daa534e45ccaf3eec8d21c19b7222db377bcfd5e5a9144155238c105', # noqa: E501 - 'arm64': '323421fa279f4f3d7da4c7f2dfa17d9e49529cb2b4cdf40899a7416bccdde42d'}, # noqa: E501 - 'location': ('https://github.com/etcd-io/etcd/' - 'releases/download/v${version}' - '/etcd-v${version}-linux-${debian_arch}.tar.gz')}, - 'glance-base': { - 'type': 'url', - 'location': ('$tarballs_base/openstack/glance/' - 'glance-${openstack_branch}.tar.gz')}, - 'gnocchi-base': { - 'type': 'git', - 'reference': '4.7.0', - 'location': ('https://github.com/gnocchixyz/' - 'gnocchi.git')}, - 'heat-base': { - 'type': 'url', - 'location': ('$tarballs_base/openstack/heat/' - 'heat-${openstack_branch}.tar.gz')}, - 'horizon': { - 'type': 'url', - 'location': ('$tarballs_base/openstack/horizon/' - 'horizon-${openstack_branch}.tar.gz')}, - 'horizon-plugin-blazar-dashboard': { - 'type': 'url', - 'location': ('$tarballs_base/openstack/blazar-dashboard/' - 'blazar-dashboard-${openstack_branch}.tar.gz')}, - 'horizon-plugin-cloudkitty-dashboard': { - 'type': 'url', - 'location': ('$tarballs_base/openstack/cloudkitty-dashboard/' - 'cloudkitty-dashboard-${openstack_branch}.tar.gz')}, - 'horizon-plugin-designate-dashboard': { - 'type': 'url', - 'location': ('$tarballs_base/openstack/designate-dashboard/' - 'designate-dashboard-${openstack_branch}.tar.gz')}, - 'horizon-plugin-fwaas-dashboard': { - 'type': 'url', - 'location': ('$tarballs_base/openstack/neutron-fwaas-dashboard/' - 'neutron-fwaas-dashboard-${openstack_branch}.tar.gz')}, - 'horizon-plugin-heat-dashboard': { - 'type': 'url', - 'location': ('$tarballs_base/openstack/heat-dashboard/' - 'heat-dashboard-${openstack_branch}.tar.gz')}, - 'horizon-plugin-ironic-ui': { - 'type': 'url', - 'location': ('$tarballs_base/openstack/ironic-ui/' - 'ironic-ui-${openstack_branch}.tar.gz')}, - 'horizon-plugin-magnum-ui': { - 'type': 'url', - 'location': ('$tarballs_base/openstack/magnum-ui/' - 'magnum-ui-${openstack_branch}.tar.gz')}, - 'horizon-plugin-manila-ui': { - 'type': 'url', - 'location': ('$tarballs_base/openstack/manila-ui/' - 'manila-ui-${openstack_branch}.tar.gz')}, - 'horizon-plugin-masakari-dashboard': { - 'type': 'url', - 'location': ('$tarballs_base/openstack/masakari-dashboard/' - 'masakari-dashboard-${openstack_branch}.tar.gz')}, - 'horizon-plugin-mistral-dashboard': { - 'type': 'url', - 'location': ('$tarballs_base/openstack/mistral-dashboard/' - 'mistral-dashboard-${openstack_branch}.tar.gz')}, - 'horizon-plugin-neutron-vpnaas-dashboard': { - 'type': 'url', - 'location': ('$tarballs_base/openstack/neutron-vpnaas-dashboard/' - 'neutron-vpnaas-dashboard-${openstack_branch}.tar.gz')}, - 'horizon-plugin-octavia-dashboard': { - 'type': 'url', - 'location': ('$tarballs_base/openstack/octavia-dashboard/' - 'octavia-dashboard-${openstack_branch}.tar.gz')}, - 'horizon-plugin-tacker-dashboard': { - 'type': 'url', - 'location': ('$tarballs_base/openstack/tacker-horizon/' - 'tacker-horizon-${openstack_branch}.tar.gz')}, - 'horizon-plugin-trove-dashboard': { - 'type': 'url', - 'location': ('$tarballs_base/openstack/trove-dashboard/' - 'trove-dashboard-${openstack_branch}.tar.gz')}, - 'horizon-plugin-venus-dashboard': { - 'type': 'url', - 'location': ('$tarballs_base/openstack/venus-dashboard/' - 'venus-dashboard-${openstack_branch}.tar.gz')}, - 'horizon-plugin-watcher-dashboard': { - 'type': 'url', - 'location': ('$tarballs_base/openstack/watcher-dashboard/' - 'watcher-dashboard-${openstack_branch}.tar.gz')}, - 'horizon-plugin-zun-ui': { - 'type': 'url', - 'location': ('$tarballs_base/openstack/zun-ui/' - 'zun-ui-${openstack_branch}.tar.gz')}, - 'ironic-base': { - 'type': 'url', - 'location': ('$tarballs_base/openstack/ironic/' - 'ironic-${openstack_branch}.tar.gz')}, - 'ironic-conductor-plugin-prometheus-exporter': { - 'type': 'url', - 'location': ( - '$tarballs_base/openstack/ironic-prometheus-exporter/' - 'ironic-prometheus-exporter-${openstack_branch}.tar.gz')}, - 'keystone-base': { - 'type': 'url', - 'location': ('$tarballs_base/openstack/keystone/' - 'keystone-${openstack_branch}.tar.gz')}, - 'kuryr-base': { - 'type': 'url', - 'location': ('$tarballs_base/openstack/kuryr/' - 'kuryr-${openstack_branch}.tar.gz')}, - 'kuryr-libnetwork': { - 'type': 'url', - 'location': ('$tarballs_base/openstack/kuryr-libnetwork/' - 'kuryr-libnetwork-${openstack_branch}.tar.gz')}, - 'letsencrypt-lego': { - 'version': 'v4.25.2', - 'type': 'url', - 'sha256': { - 'amd64': '6022cf99bdc310ebba21c059fcbf1cb5939e17b2f95dade6bb6f878f9590a961', # noqa: E501 - 'arm64': '3dc4bc343b265a66bb174d3dd03b769bc40c326d680b240b948d12e97ddd4bf8'}, # noqa: E501 - 'location': ('https://github.com/go-acme/lego/' - 'releases/download/${version}/' - 'lego_${version}_linux_${debian_arch}.tar.gz')}, - 'magnum-base': { - 'type': 'url', - 'location': ('$tarballs_base/openstack/magnum/' - 'magnum-${openstack_branch}.tar.gz')}, - 'magnum-conductor-plugin-helm': { - 'version': 'v3.16.3', - 'type': 'url', - 'sha256': { - 'amd64': 'f5355c79190951eed23c5432a3b920e071f4c00a64f75e077de0dd4cb7b294ea', # noqa: E501 - 'arm64': '5bd34ed774df6914b323ff84a0a156ea6ff2ba1eaf0113962fa773f3f9def798'}, # noqa: E501 - 'location': ('https://get.helm.sh/helm' - '-${version}-linux-${debian_arch}.tar.gz')}, - 'manila-base': { - 'type': 'url', - 'location': ('$tarballs_base/openstack/manila/' - 'manila-${openstack_branch}.tar.gz')}, - 'masakari-base': { - 'type': 'url', - 'location': ('$tarballs_base/openstack/masakari/' - 'masakari-${openstack_branch}.tar.gz')}, - 'masakari-monitors': { - 'type': 'url', - 'location': ('$tarballs_base/openstack/masakari-monitors/' - 'masakari-monitors-${openstack_branch}.tar.gz')}, - 'mistral-base': { - 'type': 'url', - 'location': ('$tarballs_base/openstack/mistral/' - 'mistral-${openstack_branch}.tar.gz')}, - 'mistral-base-plugin-tacker': { - 'type': 'url', - 'location': ('$tarballs_base/openstack/tacker/' - 'tacker-${openstack_branch}.tar.gz')}, - 'neutron-base': { - 'type': 'url', - 'location': ('$tarballs_base/openstack/neutron/' - 'neutron-${openstack_branch}.tar.gz')}, - 'neutron-base-plugin-neutron-fwaas': { - 'type': 'url', - 'location': ('$tarballs_base/openstack/neutron-fwaas/' - 'neutron-fwaas-${openstack_branch}.tar.gz')}, - 'neutron-base-plugin-networking-baremetal': { - 'type': 'url', - 'location': ('$tarballs_base/openstack/networking-baremetal/' - 'networking-baremetal-${openstack_branch}.tar.gz')}, - 'neutron-base-plugin-networking-generic-switch': { - 'type': 'url', - 'location': ('$tarballs_base/openstack/networking-generic-switch/' - 'networking-generic-switch-${openstack_branch}.tar.gz')}, - 'neutron-base-plugin-networking-sfc': { - 'type': 'url', - 'location': ('$tarballs_base/openstack/networking-sfc/' - 'networking-sfc-${openstack_branch}.tar.gz')}, - 'neutron-base-plugin-vpnaas-agent': { - 'type': 'url', - 'location': ('$tarballs_base/openstack/neutron-vpnaas/' - 'neutron-vpnaas-${openstack_branch}.tar.gz')}, - 'neutron-bgp-dragent': { - 'type': 'url', - 'location': ('$tarballs_base/openstack/neutron-dynamic-routing/' - 'neutron-dynamic-routing-${openstack_branch}.tar.gz')}, - 'neutron-server-plugin-neutron-dynamic-routing': { - 'type': 'url', - 'location': ('$tarballs_base/openstack/neutron-dynamic-routing/' - 'neutron-dynamic-routing-${openstack_branch}.tar.gz')}, - 'neutron-vpnaas-agent': { - 'type': 'url', - 'location': ('$tarballs_base/openstack/neutron-vpnaas/' - 'neutron-vpnaas-${openstack_branch}.tar.gz')}, - 'nova-base': { - 'type': 'url', - 'location': ('$tarballs_base/openstack/nova/' - 'nova-${openstack_branch}.tar.gz')}, - 'nova-base-plugin-blazar': { - 'type': 'url', - 'location': ('$tarballs_base/openstack/blazar-nova/' - 'blazar-nova-${openstack_branch}.tar.gz')}, - 'octavia-base': { - 'type': 'url', - 'location': ('$tarballs_base/openstack/octavia/' - 'octavia-${openstack_branch}.tar.gz')}, - 'octavia-api-plugin-ovn-octavia-provider': { - 'type': 'url', - 'location': ('$tarballs_base/openstack/ovn-octavia-provider/' - 'ovn-octavia-provider-${openstack_branch}.tar.gz')}, - 'octavia-driver-agent-plugin-ovn-octavia-provider': { - 'type': 'url', - 'location': ('$tarballs_base/openstack/ovn-octavia-provider/' - 'ovn-octavia-provider-${openstack_branch}.tar.gz')}, - 'placement-base': { - 'type': 'url', - 'location': ('$tarballs_base/openstack/placement/' - 'placement-${openstack_branch}.tar.gz')}, - 'prometheus-alertmanager': { - 'version': '0.28.1', - 'type': 'url', - 'sha256': { - 'amd64': '5ac7ab5e4b8ee5ce4d8fb0988f9cb275efcc3f181b4b408179fafee121693311', # noqa: E501 - 'arm64': 'd8832540e5b9f613d2fd759e31d603173b9c61cc7bb5e3bc7ae2f12038b1ce4f'}, # noqa: E501 - 'location': ('https://github.com/' - 'prometheus/alertmanager/' - 'releases/download/v${version}/' - 'alertmanager' - '-${version}.linux-${debian_arch}.tar.gz')}, - 'prometheus-blackbox-exporter': { - 'version': '0.27.0', - 'type': 'url', - 'sha256': { - 'amd64': '507a77ff411822fd6b543e8b8d9e00e1cc49408df465588cd746753bf05046e2', # noqa: E501 - 'arm64': '618f0ce44ecec617d5aab28f7e4cb930b41b45fcd3d899536d2b9653fc176e5a'}, # noqa: E501 - 'location': ('https://github.com/' - 'prometheus/blackbox_exporter/' - 'releases/download/v${version}/' - 'blackbox_exporter' - '-${version}.linux-${debian_arch}.tar.gz')}, - 'prometheus-cadvisor': { - 'version': '0.53.0', - 'type': 'url', - 'sha256': { - 'amd64': '999c2c77b3ae80ea00b63a876a1ed92cc68e0a307fb3c51057107101e417bd0a', # noqa: E501 - 'arm64': '8c898e2d9a9d8e3b3b8b22a1a29b4489b2a7c962d0b8bca204c4f777d3961feb'}, # noqa: E501 - 'location': ('https://github.com/' - 'google/cadvisor/' - 'releases/download/v${version}/' - 'cadvisor' - '-v${version}-linux-${debian_arch}')}, - 'prometheus-elasticsearch-exporter': { - 'version': '1.9.0', - 'type': 'url', - 'sha256': { - 'amd64': '472fcafab63c5a3a2dd17d9a5e9919de4741a72e4f286c1e6252f3d99cebe425', # noqa: E501 - 'arm64': 'd1ba36fe0a6b7ce84d995e728044b53cc869f6033ce0ead4601232205d850947'}, # noqa: E501 - 'location': ('https://github.com/' - 'prometheus-community/elasticsearch_exporter/' - 'releases/download/v${version}/' - 'elasticsearch_exporter' - '-${version}.linux-${debian_arch}.tar.gz')}, - 'prometheus-libvirt-exporter': { - 'version': '2.2.0', - 'type': 'url', - 'sha256': { - 'amd64': '37e26779be1ebaef2e76d7304a3d3ecfbdc232a5c57645ee0f97b13f014bd842', # noqa: E501 - 'arm64': '94ac011349d60d70c14985df2942d02ecac87c0b7c7a468133394eb1800a22b0'}, # noqa: E501 - 'location': ('https://github.com/' - 'inovex/prometheus-libvirt-exporter/' - 'releases/download/v${version}/' - 'prometheus-libvirt-exporter' - '-${version}.linux-${debian_arch}.tar.gz')}, - 'prometheus-memcached-exporter': { - 'version': '0.15.3', - 'type': 'url', - 'sha256': { - 'amd64': '7e4eb9f4af3971918fbfd35fa31b74dc08b2a728f488f934d8c7c7ecced2c85f', # noqa: E501 - 'arm64': '8565c24a80e30e189479b1092d23a7cc9173fc3f3591881b34ed99c62c3ead6f'}, # noqa: E501 - 'location': ('https://github.com/' - 'prometheus/memcached_exporter/' - 'releases/download/v${version}/' - 'memcached_exporter' - '-${version}.linux-${debian_arch}.tar.gz')}, - 'prometheus-mtail': { - 'version': '3.0.8', - 'type': 'url', - 'sha256': { - 'amd64': '123c2ee5f48c3eff12ebccee38befd2233d715da736000ccde49e3d5607724e4', # noqa: E501 - 'arm64': 'aa04811c0929b6754408676de520e050c45dddeb3401881888a092c9aea89cae'}, # noqa: E501 - 'location': ('https://github.com/' - 'google/mtail/' - 'releases/download/v${version}/' - 'mtail' - '_${version}_linux_${debian_arch}.tar.gz')}, - 'prometheus-mysqld-exporter': { - 'version': '0.17.2', - 'type': 'url', - 'sha256': { - 'amd64': 'ef6a2322b869d7d3c1ee3493e28a939ff80b367373142b9b2f3f70a6709d00d7', # noqa: E501 - 'arm64': '7d7ba18830ca374812a75cca1519b7c2fdea6d14183787bcd1b36900cdf588ee'}, # noqa: E501 - 'location': ('https://github.com/' - 'prometheus/mysqld_exporter/' - 'releases/download/v${version}/' - 'mysqld_exporter' - '-${version}.linux-${debian_arch}.tar.gz')}, - 'prometheus-node-exporter': { - 'version': '1.9.1', - 'type': 'url', - 'sha256': { - 'amd64': 'becb950ee80daa8ae7331d77966d94a611af79ad0d3307380907e0ec08f5b4e8', # noqa: E501 - 'arm64': '848f139986f63232ced83babe3cad1679efdbb26c694737edc1f4fbd27b96203'}, # noqa: E501 - 'location': ('https://github.com/' - 'prometheus/node_exporter/' - 'releases/download/v${version}/' - 'node_exporter' - '-${version}.linux-${debian_arch}.tar.gz')}, - 'prometheus-openstack-exporter': { - 'version': '1.7.0', - 'type': 'url', - 'sha256': { - 'amd64': 'dfaa0d3dcff22e882d3f61c56bb9ac6f70790df9d67361464159bbb4c7223192', # noqa: E501 - 'arm64': 'd6e0b23fe755732a93796255e3a2be8ec5a699b0a64c21afd377c60ccf60cd55'}, # noqa: E501 - 'location': ('https://github.com/' - 'openstack-exporter/openstack-exporter/' - 'releases/download/v${version}/' - 'openstack-exporter' - '_${version}_linux_${debian_arch}.tar.gz')}, - 'prometheus-server': { - 'version': '3.5.0', - 'type': 'url', - 'sha256': { - 'amd64': 'e811827af26d822afb09a4f28314f61b618b12cff5369835a67f674d8b46f39a', # noqa: E501 - 'arm64': '173389cc42bf09c4e6e54cb53fa07a5a835d7c261e14775d2183181d6e385d1c'}, # noqa: E501 - 'location': ('https://github.com/' - 'prometheus/prometheus/' - 'releases/download/v${version}/' - 'prometheus' - '-${version}.linux-${debian_arch}.tar.gz')}, - 'skyline-apiserver': { - 'type': 'url', - 'location': ('$tarballs_base/openstack/skyline-apiserver/' - 'skyline-apiserver-${openstack_branch}.tar.gz')}, - 'skyline-console': { - 'type': 'url', - 'location': ('$tarballs_base/openstack/skyline-console/' - 'skyline-console-${openstack_branch}.tar.gz')}, - 'tacker-base': { - 'type': 'url', - 'location': ('$tarballs_base/openstack/tacker/' - 'tacker-${openstack_branch}.tar.gz')}, - 'tacker-base-plugin-networking-sfc': { - 'type': 'url', - 'location': ('$tarballs_base/openstack/networking-sfc/' - 'networking-sfc-${openstack_branch}.tar.gz')}, - 'trove-base': { - 'type': 'url', - 'location': ('$tarballs_base/openstack/trove/' - 'trove-${openstack_branch}.tar.gz')}, - 'venus-base': { - 'type': 'url', - 'location': ('$tarballs_base/openstack/venus/' - 'venus-${openstack_branch}.tar.gz')}, - 'watcher-base': { - 'type': 'url', - 'location': ('$tarballs_base/openstack/watcher/' - 'watcher-${openstack_branch}.tar.gz')}, - 'zun-base': { - 'type': 'url', - 'location': ('$tarballs_base/openstack/zun/' - 'zun-${openstack_branch}.tar.gz')} -} +import os + +import yaml + +SOURCES_YAML = os.path.dirname(os.path.realpath(__file__)) + '/sources.yaml' + +with open(SOURCES_YAML, 'r') as f: + SOURCES = yaml.safe_load(f) diff --git a/kolla/common/sources.yaml b/kolla/common/sources.yaml new file mode 100644 index 000000000..db892daa8 --- /dev/null +++ b/kolla/common/sources.yaml @@ -0,0 +1,318 @@ +--- +openstack-base: + type: "url" + location: "$tarballs_base/openstack/requirements/requirements-${openstack_branch}.tar.gz" +aodh-base: + type: "url" + location: "$tarballs_base/openstack/aodh/aodh-${openstack_branch}.tar.gz" +barbican-base: + type: "url" + location: "$tarballs_base/openstack/barbican/barbican-${openstack_branch}.tar.gz" +bifrost-base: + type: "url" + location: "$tarballs_base/openstack/bifrost/bifrost-${openstack_branch}.tar.gz" +blazar-base: + type: "url" + location: "$tarballs_base/openstack/blazar/blazar-${openstack_branch}.tar.gz" +ceilometer-base: + type: "url" + location: "$tarballs_base/openstack/ceilometer/ceilometer-${openstack_branch}.tar.gz" +cinder-base: + type: "url" + location: "$tarballs_base/openstack/cinder/cinder-${openstack_branch}.tar.gz" +cloudkitty-base: + type: "url" + location: "$tarballs_base/openstack/cloudkitty/cloudkitty-${openstack_branch}.tar.gz" +cyborg-base: + type: "url" + location: "$tarballs_base/openstack/cyborg/cyborg-${openstack_branch}.tar.gz" +designate-base: + type: "url" + location: "$tarballs_base/openstack/designate/designate-${openstack_branch}.tar.gz" +etcd: + # NOTE(wszumski): Upgrade one minor version at a time: + # https://etcd.io/docs/v3.6/upgrades/upgrade_3_6/ + # NOTE(mnasiadka): lts_branch pins check_sources.py to the 3.6.x + # release series instead of jumping to the latest major.minor. + lts_branch: "3.6" + version: "3.6.15" + type: "url" + sha256: + amd64: "b51d86e6bff2168de5ba8cd631c0fe6c785c7a1b32b083079f5677d6b7e2772c" + arm64: "567d9b8fa9e75b349600d2b64ef9bf6bc6d512cea75a2ce1c39b1b3046131244" + location: "https://github.com/etcd-io/etcd/releases/download/v${version}/etcd-v${version}-linux-${debian_arch}.tar.gz" +glance-base: + type: "url" + location: "$tarballs_base/openstack/glance/glance-${openstack_branch}.tar.gz" +gnocchi-base: + type: "git" + reference: "4.7.0" + location: "https://github.com/gnocchixyz/gnocchi.git" +heat-base: + type: "url" + location: "$tarballs_base/openstack/heat/heat-${openstack_branch}.tar.gz" +horizon: + type: "url" + location: "$tarballs_base/openstack/horizon/horizon-${openstack_branch}.tar.gz" +horizon-plugin-blazar-dashboard: + type: "url" + location: "$tarballs_base/openstack/blazar-dashboard/blazar-dashboard-${openstack_branch}.tar.gz" +horizon-plugin-cloudkitty-dashboard: + type: "url" + location: "$tarballs_base/openstack/cloudkitty-dashboard/cloudkitty-dashboard-${openstack_branch}.tar.gz" +horizon-plugin-designate-dashboard: + type: "url" + location: "$tarballs_base/openstack/designate-dashboard/designate-dashboard-${openstack_branch}.tar.gz" +horizon-plugin-fwaas-dashboard: + type: "url" + location: "$tarballs_base/openstack/neutron-fwaas-dashboard/neutron-fwaas-dashboard-${openstack_branch}.tar.gz" +horizon-plugin-heat-dashboard: + type: "url" + location: "$tarballs_base/openstack/heat-dashboard/heat-dashboard-${openstack_branch}.tar.gz" +horizon-plugin-ironic-ui: + type: "url" + location: "$tarballs_base/openstack/ironic-ui/ironic-ui-${openstack_branch}.tar.gz" +horizon-plugin-magnum-ui: + type: "url" + location: "$tarballs_base/openstack/magnum-ui/magnum-ui-${openstack_branch}.tar.gz" +horizon-plugin-manila-ui: + type: "url" + location: "$tarballs_base/openstack/manila-ui/manila-ui-${openstack_branch}.tar.gz" +horizon-plugin-masakari-dashboard: + type: "url" + location: "$tarballs_base/openstack/masakari-dashboard/masakari-dashboard-${openstack_branch}.tar.gz" +horizon-plugin-mistral-dashboard: + type: "url" + location: "$tarballs_base/openstack/mistral-dashboard/mistral-dashboard-${openstack_branch}.tar.gz" +horizon-plugin-neutron-vpnaas-dashboard: + type: "url" + location: "$tarballs_base/openstack/neutron-vpnaas-dashboard/neutron-vpnaas-dashboard-${openstack_branch}.tar.gz" +horizon-plugin-octavia-dashboard: + type: "url" + location: "$tarballs_base/openstack/octavia-dashboard/octavia-dashboard-${openstack_branch}.tar.gz" +horizon-plugin-tacker-dashboard: + type: "url" + location: "$tarballs_base/openstack/tacker-horizon/tacker-horizon-${openstack_branch}.tar.gz" +horizon-plugin-trove-dashboard: + type: "url" + location: "$tarballs_base/openstack/trove-dashboard/trove-dashboard-${openstack_branch}.tar.gz" +horizon-plugin-watcher-dashboard: + type: "url" + location: "$tarballs_base/openstack/watcher-dashboard/watcher-dashboard-${openstack_branch}.tar.gz" +ironic-base: + type: "url" + location: "$tarballs_base/openstack/ironic/ironic-${openstack_branch}.tar.gz" +ironic-conductor-plugin-prometheus-exporter: + type: "url" + location: "$tarballs_base/openstack/ironic-prometheus-exporter/ironic-prometheus-exporter-${openstack_branch}.tar.gz" +keystone-base: + type: "url" + location: "$tarballs_base/openstack/keystone/keystone-${openstack_branch}.tar.gz" +kerbside-base: + type: "git" + reference: "develop" + location: "https://github.com/shakenfist/kerbside" +kolla-toolbox: + type: "url" + location: "$tarballs_base/openstack/requirements/requirements-${openstack_branch}.tar.gz" +letsencrypt-lego: + lts_branch: "4" + version: "v4.35.2" + type: "url" + sha256: + amd64: "ee5be4bf457de8e3efa86a51651c75c87f0ee0e4e9f3ae14f6034d68365770f3" + arm64: "e1f153179098d27ce044aaaa168c0e323d50ae71b0f1a147aa8ae49ac6b14d89" + location: "https://github.com/go-acme/lego/releases/download/${version}/lego_${version}_linux_${debian_arch}.tar.gz" +magnum-base: + type: "url" + location: "$tarballs_base/openstack/magnum/magnum-${openstack_branch}.tar.gz" +magnum-conductor-plugin-helm: + version: "v4.3.0" + type: "url" + # NOTE(mnasiadka): location points to get.helm.sh, but + # check_sources needs github releases access + github: "helm/helm" + sha256: + amd64: "86584a54def73570558f66f5111cc53dfed56689637ae32c1201205d494f54fb" + arm64: "31c5794dd55c66a51e6b7d2e2ac7a114ae8b1de41ff1d9ba51748ac973b06a08" + location: "https://get.helm.sh/helm-${version}-linux-${debian_arch}.tar.gz" +manila-base: + type: "url" + location: "$tarballs_base/openstack/manila/manila-${openstack_branch}.tar.gz" +mariadb-server-plugin-mariadb-docker: + # NOTE(seunghun1ee): This repo is needed to get MariaDB healthcheck.sh + type: "git" + reference: "master" + location: "https://github.com/MariaDB/mariadb-docker" +masakari-base: + type: "url" + location: "$tarballs_base/openstack/masakari/masakari-${openstack_branch}.tar.gz" +masakari-monitors: + type: "url" + location: "$tarballs_base/openstack/masakari-monitors/masakari-monitors-${openstack_branch}.tar.gz" +mistral-base: + type: "url" + location: "$tarballs_base/openstack/mistral/mistral-${openstack_branch}.tar.gz" +mistral-base-plugin-tacker: + type: "url" + location: "$tarballs_base/openstack/tacker/tacker-${openstack_branch}.tar.gz" +neutron-base: + type: "url" + location: "$tarballs_base/openstack/neutron/neutron-${openstack_branch}.tar.gz" +neutron-base-plugin-neutron-fwaas: + type: "url" + location: "$tarballs_base/openstack/neutron-fwaas/neutron-fwaas-${openstack_branch}.tar.gz" +neutron-base-plugin-networking-baremetal: + type: "url" + location: "$tarballs_base/openstack/networking-baremetal/networking-baremetal-${openstack_branch}.tar.gz" +neutron-base-plugin-networking-generic-switch: + type: "url" + location: "$tarballs_base/openstack/networking-generic-switch/networking-generic-switch-${openstack_branch}.tar.gz" +neutron-base-plugin-networking-sfc: + type: "url" + location: "$tarballs_base/openstack/networking-sfc/networking-sfc-${openstack_branch}.tar.gz" +neutron-base-plugin-tap-as-a-service: + type: "url" + location: "$tarballs_base/openstack/tap-as-a-service/tap-as-a-service-${openstack_branch}.tar.gz" +neutron-base-plugin-vpnaas-agent: + type: "url" + location: "$tarballs_base/openstack/neutron-vpnaas/neutron-vpnaas-${openstack_branch}.tar.gz" +neutron-bgp-dragent: + type: "url" + location: "$tarballs_base/openstack/neutron-dynamic-routing/neutron-dynamic-routing-${openstack_branch}.tar.gz" +neutron-server-plugin-neutron-dynamic-routing: + type: "url" + location: "$tarballs_base/openstack/neutron-dynamic-routing/neutron-dynamic-routing-${openstack_branch}.tar.gz" +neutron-vpnaas-agent: + type: "url" + location: "$tarballs_base/openstack/neutron-vpnaas/neutron-vpnaas-${openstack_branch}.tar.gz" +nova-base: + type: "url" + location: "$tarballs_base/openstack/nova/nova-${openstack_branch}.tar.gz" +nova-base-plugin-blazar: + type: "url" + location: "$tarballs_base/openstack/blazar-nova/blazar-nova-${openstack_branch}.tar.gz" +octavia-base: + type: "url" + location: "$tarballs_base/openstack/octavia/octavia-${openstack_branch}.tar.gz" +octavia-api-plugin-ovn-octavia-provider: + type: "url" + location: "$tarballs_base/openstack/ovn-octavia-provider/ovn-octavia-provider-${openstack_branch}.tar.gz" +octavia-driver-agent-plugin-ovn-octavia-provider: + type: "url" + location: "$tarballs_base/openstack/ovn-octavia-provider/ovn-octavia-provider-${openstack_branch}.tar.gz" +placement-base: + type: "url" + location: "$tarballs_base/openstack/placement/placement-${openstack_branch}.tar.gz" +prometheus-alertmanager: + version: "0.34.1" + type: "url" + sha256: + amd64: "265b9d1e55ef0d5306a436018af6d2b686c2ce051f03d968f7464ecb1372a7e8" + arm64: "d98d6cbaf52151c7e76e24355fec88b11cebcb9875d4cdd8b76ddce7a7e5535c" + location: "https://github.com/prometheus/alertmanager/releases/download/v${version}/alertmanager-${version}.linux-${debian_arch}.tar.gz" +prometheus-blackbox-exporter: + version: "0.28.0" + type: "url" + sha256: + amd64: "caf5d242fb1cf6d5cb678f3f799f22703d4fafea26b03dcbbd7e1f1825e06329" + arm64: "63312be0983d85e5109710a7dc93df3051157ae581853fa3655d171cc1b2806e" + location: "https://github.com/prometheus/blackbox_exporter/releases/download/v${version}/blackbox_exporter-${version}.linux-${debian_arch}.tar.gz" +prometheus-cadvisor: + version: "0.60.6" + type: "url" + sha256: + amd64: "c381c2c911bc43d465d1e0eaff60f96d58c031c409bddf06da0316fdde8a9296" + arm64: "d788162d9deea8aa024fd79a0a685df90a987362d8f0e580f822474c1fbef7f9" + location: "https://github.com/google/cadvisor/releases/download/v${version}/cadvisor-v${version}-linux-${debian_arch}" +prometheus-elasticsearch-exporter: + version: "1.11.0" + type: "url" + sha256: + amd64: "2bebc50d6980578ad37a376000bc039485ceea129ae229f78baed3379db4f61c" + arm64: "7020d10e29896d329cecc7bfe2e90dcc376d68fc0c75ac27014af3747870ce1f" + location: "https://github.com/prometheus-community/elasticsearch_exporter/releases/download/v${version}/elasticsearch_exporter-${version}.linux-${debian_arch}.tar.gz" +prometheus-libvirt-exporter: + version: "2.6.0" + type: "url" + sha256: + amd64: "1820ace3d38feebaf35ef2823ada1e95b538a080074c3f362caf39a7d3e39e91" + arm64: "b8d3bfbe590d1f2db4faac48984d5b2bcf2cfa525c39f9a8d307912220307550" + location: "https://github.com/inovex/prometheus-libvirt-exporter/releases/download/v${version}/prometheus-libvirt-exporter-${version}.linux-${debian_arch}.tar.gz" +prometheus-memcached-exporter: + version: "0.17.0" + type: "url" + sha256: + amd64: "40e85262e4340a56fa7cc96722cd596d25ed76ab501459b0b42f1f8e0562d0d1" + arm64: "d1abf0ef1196ff5de5cf3462eb962b4a3d6733327951ae6d81c062902b5f2a60" + location: "https://github.com/prometheus/memcached_exporter/releases/download/v${version}/memcached_exporter-${version}.linux-${debian_arch}.tar.gz" +prometheus-mtail: + version: "3.4.14" + type: "url" + sha256: + amd64: "a01c7713d97c8725067e3f6cf2a5dccccb7aee62c8af57ffcff3a658f48b1b29" + arm64: "05c484b6a03510f8e6dfffccfe43453e71d357168c157342448e174f3263ca22" + location: "https://github.com/jaqx0r/mtail/releases/download/v${version}/mtail_${version}_linux_${debian_arch}.tar.gz" +prometheus-mysqld-exporter: + version: "0.20.0" + type: "url" + sha256: + amd64: "5773496e9962ca3817b3599fe4d74f218c95c1295eb2a742462df8e035fe51bd" + arm64: "837804c0a59cbe1f3ab46670dec1b4c37940c8d48062374691b27f1f37abf8dd" + location: "https://github.com/prometheus/mysqld_exporter/releases/download/v${version}/mysqld_exporter-${version}.linux-${debian_arch}.tar.gz" +prometheus-node-exporter: + version: "1.12.1" + type: "url" + sha256: + amd64: "b51d8a76aa2a9156a55d501aca6276fae09e262259a5e4e831d2c2222f084e63" + arm64: "ad35b605f9954b9f1ffddf5ba054bdc5a98d790b9eae5291e1eeb83f1ecbd0e7" + location: "https://github.com/prometheus/node_exporter/releases/download/v${version}/node_exporter-${version}.linux-${debian_arch}.tar.gz" +prometheus-openstack-exporter: + version: "1.7.0" + type: "url" + sha256: + amd64: "dfaa0d3dcff22e882d3f61c56bb9ac6f70790df9d67361464159bbb4c7223192" + arm64: "d6e0b23fe755732a93796255e3a2be8ec5a699b0a64c21afd377c60ccf60cd55" + location: "https://github.com/openstack-exporter/openstack-exporter/releases/download/v${version}/openstack-exporter_${version}_linux_${debian_arch}.tar.gz" +prometheus-openstack-network-exporter: + version: "0.3.0" + type: "url" + sha256: + amd64: "bca401a6854bdc350578ff9e3477b4c54527c3f677d7549191e2523f1d03605d" + arm64: "06640f01fd088068f2552e702b624d4b9f2441d532409f8be7d94206fc18b9c0" + location: "https://github.com/openstack-k8s-operators/openstack-network-exporter/releases/download/v${version}/openstack-network-exporter-linux-${debian_arch}" +prometheus-server: + # NOTE(mnasiadka): lts_branch pins check_sources.py to the 3.13.x + # release series instead of jumping to the latest major.minor. + lts_branch: "3.13" + version: "3.13.3" + type: "url" + sha256: + amd64: "b349c732d8a853e657d0e7ae1bbad4d11b586615fb65fdc59d896b9f869c001e" + arm64: "aa9be9c36608e7ab7cc089726195d0e4fa74f87b330538df9d30d3da1f2b0e18" + location: "https://github.com/prometheus/prometheus/releases/download/v${version}/prometheus-${version}.linux-${debian_arch}.tar.gz" +prometheus-valkey-exporter: + version: "1.92.1" + type: "url" + sha256: + amd64: "60e9819172ec1c954bad9b44ba0b15ef064e8551bd74461d0ed1a7585bb2c6ad" + arm64: "9aecfb030b173516266773e7d88256bedf414e6a552afc385cbb1ecd49f26832" + location: "https://github.com/oliver006/redis_exporter/releases/download/v${version}/redis_exporter-v${version}.linux-${debian_arch}.tar.gz" +skyline-apiserver: + type: "url" + location: "$tarballs_base/openstack/skyline-apiserver/skyline-apiserver-${openstack_branch}.tar.gz" +skyline-console: + type: "url" + location: "$tarballs_base/openstack/skyline-console/skyline-console-${openstack_branch}.tar.gz" +tacker-base: + type: "url" + location: "$tarballs_base/openstack/tacker/tacker-${openstack_branch}.tar.gz" +tacker-base-plugin-networking-sfc: + type: "url" + location: "$tarballs_base/openstack/networking-sfc/networking-sfc-${openstack_branch}.tar.gz" +trove-base: + type: "url" + location: "$tarballs_base/openstack/trove/trove-${openstack_branch}.tar.gz" +watcher-base: + type: "url" + location: "$tarballs_base/openstack/watcher/watcher-${openstack_branch}.tar.gz" diff --git a/kolla/common/users.py b/kolla/common/users.py index 95aefa4b6..19ebde20f 100644 --- a/kolla/common/users.py +++ b/kolla/common/users.py @@ -89,7 +89,7 @@ USERS = { 'uid': 42420, 'gid': 42420, }, - 'influxdb-user': { + 'influxdb-user': { # unused user (influxdb dropped) 'uid': 42421, 'gid': 42421, }, @@ -185,7 +185,7 @@ USERS = { 'uid': 42447, 'gid': 42447, }, - 'telegraf-user': { + 'telegraf-user': { # unused user (telegraf dropped) 'uid': 42448, 'gid': 42448, }, @@ -217,7 +217,7 @@ USERS = { 'uid': 42459, 'gid': 42459, }, - 'redis-user': { + 'redis-user': { # unused user (redis dropped) 'uid': 42460, 'gid': 42460, }, @@ -229,7 +229,7 @@ USERS = { 'uid': 42462, 'gid': 42462, }, - 'zun-user': { + 'zun-user': { # unused user (zun dropped) 'uid': 42463, 'gid': 42463, }, @@ -253,7 +253,7 @@ USERS = { 'uid': 42468, 'gid': 42468, }, - 'kuryr-user': { + 'kuryr-user': { # unused user (kuryr dropped) 'uid': 42469, 'gid': 42469, }, @@ -326,7 +326,7 @@ USERS = { 'uid': 42488, 'gid': 42488, }, - 'venus-user': { + 'venus-user': { # unused user (venus dropped) 'uid': 42489, 'gid': 42489, }, @@ -345,5 +345,13 @@ USERS = { 'hsmusers-user': { 'uid': 42493, # This is not used, but the group ID is required. 'gid': 42493, - } + }, + 'valkey-user': { + 'uid': 42494, + 'gid': 42494, + }, + 'kerbside-user': { + 'uid': 42495, + 'gid': 42495, + } } diff --git a/kolla/common/utils.py b/kolla/common/utils.py index 4ee80768f..485848ba2 100644 --- a/kolla/common/utils.py +++ b/kolla/common/utils.py @@ -54,6 +54,21 @@ def make_a_logger(conf=None, image_name=None): LOG = make_a_logger() +def check_docker_buildx(): + try: + subprocess.check_output( # nosec + ['docker', 'buildx', 'version'], stderr=subprocess.STDOUT) + except OSError as ex: + if ex.errno == 2: + LOG.error('"docker" command is not found.') + raise + except subprocess.CalledProcessError: + LOG.error('"docker buildx" is not available. ' + 'Install the docker-buildx-plugin or disable BuildKit ' + 'with "--nobuildkit".') + raise + + def get_docker_squash_version(): try: diff --git a/docker/aodh/aodh-api/Dockerfile.j2 b/kolla/docker/aodh/aodh-api/Dockerfile.j2 index 7332862ca..b420df814 100644 --- a/docker/aodh/aodh-api/Dockerfile.j2 +++ b/kolla/docker/aodh/aodh-api/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}aodh-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block aodh_api_header %}{% endblock %} diff --git a/docker/venus/venus-api/extend_start.sh b/kolla/docker/aodh/aodh-api/extend_start.sh index bbe03bbbc..575b0e584 100644 --- a/docker/venus/venus-api/extend_start.sh +++ b/kolla/docker/aodh/aodh-api/extend_start.sh @@ -3,6 +3,6 @@ # Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases # of the KOLLA_BOOTSTRAP variable being set, including empty. if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then - venus_manager db sync + aodh-dbsync exit 0 fi diff --git a/docker/aodh/aodh-base/Dockerfile.j2 b/kolla/docker/aodh/aodh-base/Dockerfile.j2 index 39e785dc8..b2d863bb9 100644 --- a/docker/aodh/aodh-base/Dockerfile.j2 +++ b/kolla/docker/aodh/aodh-base/Dockerfile.j2 @@ -1,19 +1,20 @@ FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block aodh_base_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {{ macros.configure_user(name='aodh') }} {% set aodh_base_packages = [ ] %} {{ macros.install_packages(aodh_base_packages | customizable("packages")) }} -RUN mkdir -p /var/www/cgi-bin/aodh ADD aodh-base-archive /aodh-base-source @@ -26,16 +27,15 @@ COPY aodh_sudoers /etc/sudoers.d/kolla_aodh_sudoers RUN ln -s aodh-base-source/* aodh \ && {{ macros.install_pip(aodh_base_pip_packages | customizable("pip_packages")) }} \ - && mkdir -p /etc/aodh /var/www/cgi-bin/aodh \ - && cp /aodh/aodh/api/app.wsgi /var/www/cgi-bin/aodh \ + && mkdir -p /etc/aodh \ && cp /aodh/aodh/api/api-paste.ini /etc/aodh/ \ && chmod 644 /etc/aodh/api-paste.ini \ && chmod 750 /etc/sudoers.d \ && chmod 640 /etc/sudoers.d/kolla_aodh_sudoers \ - && chmod 755 /var/www/cgi-bin/aodh \ && touch /usr/local/bin/kolla_aodh_extend_start \ && chmod 644 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_aodh_extend_start {{ macros.kolla_patch_sources() }} {% block aodh_base_footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/aodh/aodh-base/aodh_sudoers b/kolla/docker/aodh/aodh-base/aodh_sudoers index 2ec268c9d..2ec268c9d 100644 --- a/docker/aodh/aodh-base/aodh_sudoers +++ b/kolla/docker/aodh/aodh-base/aodh_sudoers diff --git a/docker/aodh/aodh-base/extend_start.sh b/kolla/docker/aodh/aodh-base/extend_start.sh index f3b1d2d49..f3b1d2d49 100755 --- a/docker/aodh/aodh-base/extend_start.sh +++ b/kolla/docker/aodh/aodh-base/extend_start.sh diff --git a/docker/aodh/aodh-evaluator/Dockerfile.j2 b/kolla/docker/aodh/aodh-evaluator/Dockerfile.j2 index f5e9bc7ba..3d1f6a8b4 100644 --- a/docker/aodh/aodh-evaluator/Dockerfile.j2 +++ b/kolla/docker/aodh/aodh-evaluator/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}aodh-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block aodh_evaluator_header %}{% endblock %} diff --git a/docker/aodh/aodh-expirer/Dockerfile.j2 b/kolla/docker/aodh/aodh-expirer/Dockerfile.j2 index 47b1169da..9c426f82c 100644 --- a/docker/aodh/aodh-expirer/Dockerfile.j2 +++ b/kolla/docker/aodh/aodh-expirer/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}aodh-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block aodh_expirer_header %}{% endblock %} diff --git a/docker/aodh/aodh-listener/Dockerfile.j2 b/kolla/docker/aodh/aodh-listener/Dockerfile.j2 index 83e010e99..a6f4f3c0e 100644 --- a/docker/aodh/aodh-listener/Dockerfile.j2 +++ b/kolla/docker/aodh/aodh-listener/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}aodh-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block aodh_listener_header %}{% endblock %} diff --git a/docker/aodh/aodh-notifier/Dockerfile.j2 b/kolla/docker/aodh/aodh-notifier/Dockerfile.j2 index 176c09cee..c49f37441 100644 --- a/docker/aodh/aodh-notifier/Dockerfile.j2 +++ b/kolla/docker/aodh/aodh-notifier/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}aodh-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block aodh_notifier_header %}{% endblock %} diff --git a/docker/barbican/barbican-api/Dockerfile.j2 b/kolla/docker/barbican/barbican-api/Dockerfile.j2 index 2871b994c..e78f3ea63 100644 --- a/docker/barbican/barbican-api/Dockerfile.j2 +++ b/kolla/docker/barbican/barbican-api/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}barbican-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block barbican_api_header %}{% endblock %} diff --git a/docker/barbican/barbican-api/extend_start.sh b/kolla/docker/barbican/barbican-api/extend_start.sh index 317f7d7d6..c541d0343 100755 --- a/docker/barbican/barbican-api/extend_start.sh +++ b/kolla/docker/barbican/barbican-api/extend_start.sh @@ -6,5 +6,3 @@ if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then barbican-db-manage upgrade exit 0 fi - -. /usr/local/bin/kolla_httpd_setup diff --git a/docker/barbican/barbican-base/Dockerfile.j2 b/kolla/docker/barbican/barbican-base/Dockerfile.j2 index b872a37d9..e5edbb8a9 100644 --- a/docker/barbican/barbican-base/Dockerfile.j2 +++ b/kolla/docker/barbican/barbican-base/Dockerfile.j2 @@ -1,12 +1,14 @@ FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block barbican_base_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {{ macros.configure_user(name='barbican', groups='nfast,hsmusers') }} {{ macros.install_packages(barbican_base_packages | customizable("packages")) }} @@ -34,3 +36,4 @@ RUN ln -s barbican-base-source/* barbican \ {{ macros.kolla_patch_sources() }} {% block barbican_base_footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/barbican/barbican-base/barbican_sudoers b/kolla/docker/barbican/barbican-base/barbican_sudoers index 26ae4710e..26ae4710e 100644 --- a/docker/barbican/barbican-base/barbican_sudoers +++ b/kolla/docker/barbican/barbican-base/barbican_sudoers diff --git a/docker/barbican/barbican-base/extend_start.sh b/kolla/docker/barbican/barbican-base/extend_start.sh index 16b41ad09..16b41ad09 100755 --- a/docker/barbican/barbican-base/extend_start.sh +++ b/kolla/docker/barbican/barbican-base/extend_start.sh diff --git a/docker/barbican/barbican-keystone-listener/Dockerfile.j2 b/kolla/docker/barbican/barbican-keystone-listener/Dockerfile.j2 index 018b6d18d..3329aed1b 100644 --- a/docker/barbican/barbican-keystone-listener/Dockerfile.j2 +++ b/kolla/docker/barbican/barbican-keystone-listener/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}barbican-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block barbican_keystone_listener_header %}{% endblock %} diff --git a/docker/barbican/barbican-worker/Dockerfile.j2 b/kolla/docker/barbican/barbican-worker/Dockerfile.j2 index 63503f05d..9cba55b6b 100644 --- a/docker/barbican/barbican-worker/Dockerfile.j2 +++ b/kolla/docker/barbican/barbican-worker/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}barbican-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block barbican_worker_header %}{% endblock %} diff --git a/docker/base/Dockerfile.j2 b/kolla/docker/base/Dockerfile.j2 index 0191de53a..c1f07ade6 100644 --- a/docker/base/Dockerfile.j2 +++ b/kolla/docker/base/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ base_image }}:{{ base_distro_tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} RUN . /etc/os-release;\ @@ -34,13 +34,11 @@ RUN cat /tmp/kolla_bashrc >> /etc/skel/.bashrc \ ENV PS1="$(tput bold)($(printenv KOLLA_SERVICE_NAME))$(tput sgr0)[$(id -un)@$(hostname -s) $(pwd)]$ " {% if base_package_type == 'rpm' %} -# For RPM Variants, enable the correct repositories - this should all be done -# in the base image so repos are consistent throughout the system. This also -# enables to provide repo overrides at a later date in a simple fashion if we -# desire such functionality. I think we will :) + +{{ macros.enable_extra_repos(['baseos', 'appstream']) }} ENV KOLLA_RPM_OVS_VERSION=3.5 \ - KOLLA_RPM_OVN_VERSION=25.03 + KOLLA_RPM_OVN_VERSION=26.03 RUN cat /tmp/kolla_bashrc >> /etc/bashrc \ && sed -i 's|^\(override_install_langs=.*\)|# \1|' /etc/dnf/dnf.conf @@ -54,52 +52,18 @@ COPY dnf.conf /etc/dnf/dnf.conf {% endblock %} #### BEGIN REPO ENABLEMENT -{% set base_yum_repo_files = [ - 'docker-ce.repo', - 'grafana.repo', - 'influxdb.repo', - 'kolla_el10.repo', - 'mariadb.repo', - 'opensearch.repo', - 'proxysql.repo', - 'rabbitmq_rabbitmq-server.repo', - 'td.repo', -] %} - {% set base_yum_url_packages = [ ] %} {% set base_yum_repo_keys = [ ] %} -{% if base_arch == 'x86_64' %} - {% set base_yum_repo_files = base_yum_repo_files + [ - 'rabbitmq_rabbitmq-erlang.repo', - ] %} - -{% elif base_arch == 'aarch64' %} - {% set base_yum_repo_files = base_yum_repo_files + [ - 'copr-rabbitmq-erlang.repo', - ] %} - -{# -SHA1 keys are not supported in RHEL9: https://github.com/rpm-software-management/rpm/issues/1977 - 'https://packages.erlang-solutions.com/rpm/erlang_solutions.asc', - #} - {% set base_yum_repo_keys = base_yum_repo_keys + [ - ] %} -{% endif %} - -{%- for repo_file in base_yum_repo_files | customizable('yum_repo_files') %} -COPY {{ repo_file }} /etc/yum.repos.d/{{ repo_file }} -{%- endfor %} - -{% block base_centos_repo_overrides_post_copy %}{% endblock %} +{% block base_rocky_repo_overrides_post_copy %}{% endblock %} # Install what is needed for en_US.UTF-8 -{% block base_centos_distro_sync_and_languages %} +{% block base_rocky_distro_sync_and_languages %} -{% set base_centos_language_packages = [ +{% set base_rocky_language_packages = [ 'langpacks-en', 'glibc-all-langpacks' ] %} @@ -107,7 +71,7 @@ COPY {{ repo_file }} /etc/yum.repos.d/{{ repo_file }} # NOTE(hrw): this macro file drops all languages other than C.UTF-8 so horizon fails # https://bugzilla.redhat.com/show_bug.cgi?id=1729770 RUN rm -f /etc/rpm/macros.image-language-conf \ - && {{ macros.install_packages(base_centos_language_packages | customizable("centos_language_packages"), chain=True, clean=False) }} \ + && {{ macros.install_packages(base_rocky_language_packages | customizable("rocky_language_packages"), chain=True, clean=False) }} \ && {{ macros.rpm_security_update(clean_package_cache) }} {% endblock %} @@ -124,44 +88,29 @@ RUN rm -f /etc/rpm/macros.image-language-conf \ {{ cmd }} {% endfor %} -{% block base_centos_repo_overrides_post_rpm %}{% endblock %} +{% block base_rocky_repo_overrides_post_rpm %}{% endblock %} -{% block base_centos_gpg_key_import %} +{% block base_rocky_gpg_key_import %} {% endblock %} -{% set base_centos_yum_repo_keys = [ +{% set base_rocky_yum_repo_keys = [ ] %} -{% set base_centos_yum_repo_packages = [ +{% set base_rocky_yum_repo_packages = [ 'centos-release-ceph-squid', 'centos-release-nfv-openvswitch', 'epel-release', ] %} # We need 'dnf-plugins-core' for 'dnf config-manager' -{% set base_centos_yum_repo_packages = base_centos_yum_repo_packages + [ +{% set base_rocky_yum_repo_packages = base_rocky_yum_repo_packages + [ 'dnf-plugins-core' ] %} -{% set base_centos_yum_repos_to_enable = [ -] %} - -{% set base_centos_yum_repos_to_disable = [ - 'centos-ceph-squid', - 'centos-nfv-openvswitch', - 'epel', - 'influxdb', - 'opensearch-3.x', - 'opensearch-dashboards-3.x', -] %} -RUN {{ macros.install_packages(base_centos_yum_repo_packages | customizable("centos_yum_repo_packages"), chain=True, clean=False) }} +RUN {{ macros.install_packages(base_rocky_yum_repo_packages | customizable("rocky_yum_repo_packages"), chain=True, clean=False) }} -{%- for repo in base_centos_yum_repos_to_enable | customizable('centos_yum_repos_to_enable') %} && dnf config-manager --enable {{ repo }} {% endfor -%} - -{%- for repo in base_centos_yum_repos_to_disable | customizable('centos_yum_repos_to_disable') %} && dnf config-manager --disable {{ repo }} {% endfor -%} - -{%- for key in base_centos_yum_repo_keys | customizable('centos_yum_repo_keys') %} && rpm --import {{ key }} {% endfor %} \ -{% block base_centos_repo_overrides_post_yum %}{% endblock -%} +{%- for key in base_rocky_yum_repo_keys | customizable('rocky_yum_repo_keys') %} && rpm --import {{ key }} {% endfor %} \ +{% block base_rocky_repo_overrides_post_yum %}{% endblock -%} && {{ macros.rpm_security_update(clean_package_cache) }} #### END REPO ENABLEMENT @@ -171,8 +120,7 @@ RUN {{ macros.install_packages(base_centos_yum_repo_packages | customizable("cen {% block base_redhat_binary_versionlock %}{% endblock %} -{# NOTE(hrw): CentOS Stream 9 has curl-minimal, Rocky Linux 9 has curl so we do not install any #} -{% set base_centos_packages = [ +{% set base_rocky_packages = [ 'ca-certificates', 'crypto-policies-scripts', 'dumb-init', @@ -183,9 +131,11 @@ RUN {{ macros.install_packages(base_centos_yum_repo_packages | customizable("cen 'lsof', 'lvm2', 'ncurses', + 'openssl', 'procps-ng', 'python3', 'python3-pip', + 'python3-pyyaml', 'socat', 'sudo', 'tar', @@ -197,11 +147,11 @@ RUN {{ macros.install_packages(base_centos_yum_repo_packages | customizable("cen # Install base packages {{ macros.enable_extra_repos(['epel']) }} -{{ macros.install_packages( base_centos_packages | customizable("centos_packages") | customizable("centos_binary_packages") | customizable("centos_source_packages") ) }} -{{ macros.disable_extra_repos(['epel']) }} +{{ macros.install_packages(base_rocky_packages | customizable("rocky_packages")) }} {# endif for base_package_type rpm #} {% elif base_package_type == 'deb' %} + # This will prevent questions from being asked during the install ENV DEBIAN_FRONTEND noninteractive @@ -236,16 +186,23 @@ RUN cat /tmp/kolla_bashrc >> /etc/bash.bashrc \ && sed -i -e s/#*LAST_SYSTEM_UID=999/LAST_SYSTEM_UID=59999/g \ -e s/#*LAST_SYSTEM_GID=999/LAST_SYSTEM_GID=59999/g /etc/adduser.conf +{# NOTE(mnasiadka): Ubuntu arm64 uses ports.ubuntu.com #} {% block base_ubuntu_package_sources_list %} -{% if base_distro == 'debian' or ( base_distro == 'ubuntu' and base_arch == 'x86_64' ) %} -RUN rm -f /etc/apt/sources.list.d/{{ base_distro }}.sources -COPY sources.list.{{ base_distro }} /etc/apt/sources.list +{% if base_distro == "ubuntu" and base_arch == 'aarch64' %} +COPY {{ base_distro }}.sources.arm64 /etc/apt/sources.list.d/{{ base_distro }}.sources {% else %} -COPY sources.list.{{ base_distro }}.{{ base_arch }} /etc/apt/sources.list +COPY {{ base_distro }}.sources /etc/apt/sources.list.d/ {% endif %} + COPY sources.list /etc/apt/sources.list.d/kolla-custom.list {% endblock %} +{% if base_distro == 'debian' %} +{{ macros.enable_extra_repos(['debian', 'debian-security']) }} +{% elif base_distro == 'ubuntu' %} +{{ macros.enable_extra_repos(['ubuntu', 'ubuntu-security', 'ubuntu-cloud-archive']) }} +{% endif %} + {% block base_debian_after_sources_list %}{% endblock %} {# install Debian Openstack repos - they are not mirrored on CI #} @@ -253,7 +210,7 @@ COPY sources.list /etc/apt/sources.list.d/kolla-custom.list RUN apt update \ && apt install -y --no-install-recommends extrepo \ - && extrepo enable openstack_epoxy \ + && extrepo enable openstack_{{ openstack_release_codename | lower }} \ && apt purge -y extrepo \ && apt --purge autoremove -y \ && apt clean @@ -279,6 +236,7 @@ COPY apt_preferences /etc/apt/preferences.d/kolla-custom 'procps', 'python3', 'python3-pip', + 'python3-yaml', 'socat', 'sudo', 'tgt', @@ -287,19 +245,18 @@ COPY apt_preferences /etc/apt/preferences.d/kolla-custom {% set base_apt_keys = [ {'name': 'erlang-ppa', 'keyid': 'F77F1EDA57EBB1CC'}, - {'name': 'rabbitmq', 'keyid': '9F4587F226208342'}, + {'name': 'rabbitmq', 'keyid': '6B73A36E6026DFCA'}, {'name': 'haproxy', 'keyid': 'CFFB779AADC995E4F350A060505D97A41C61B9CD'}, ] %} {# NOTE(hrw): type field defaults to 'asc' which is used for single keys #} {% set base_remote_apt_keys = [ {'name': 'docker-ce', 'url': 'https://download.docker.com/linux/debian/gpg'}, + {'name': 'fluentd', 'url': 'https://fluentd.cdn.cncf.io/GPG-KEY-fluent-package'}, {'name': 'grafana', 'url': 'https://rpm.grafana.com/gpg.key'}, - {'name': 'influxdb', 'url': 'https://repos.influxdata.com/influxdata-archive_compat.key'}, {'name': 'mariadb', 'url': 'https://downloads.mariadb.com/MariaDB/mariadb-keyring-2019.gpg', 'type': 'gpg'}, {'name': 'opensearch', 'url': 'https://artifacts.opensearch.org/publickeys/opensearch-release.pgp'}, {'name': 'proxysql', 'url': 'https://repo.proxysql.com/ProxySQL/proxysql-3.0.x/repo_pub_key'}, - {'name': 'treasuredata', 'url': 'https://packages.treasuredata.com/GPG-KEY-td-agent'}, ] %} {% block base_ubuntu_package_installation %} @@ -344,16 +301,10 @@ RUN apt-get --error-on=any update \ {%- if not loop.last %} \{% endif -%} {%- endfor %} -{% if base_distro == 'centos' %} -RUN sed -ri '/-session(\s+)optional(\s+)pam_systemd.so/d' /etc/pam.d/system-auth \ - && sed -ri '/^[^#]/ s/systemd//g' /etc/nsswitch.conf -{% endif %} - COPY set_configs.py /usr/local/bin/kolla_set_configs COPY start.sh /usr/local/bin/kolla_start COPY copy_cacerts.sh /usr/local/bin/kolla_copy_cacerts COPY install_projects.sh /usr/local/bin/kolla_install_projects -COPY httpd_setup.sh /usr/local/bin/kolla_httpd_setup COPY kolla_patch.sh /usr/local/bin/kolla_patch COPY sudoers /etc/sudoers @@ -376,7 +327,7 @@ RUN touch /usr/local/bin/kolla_extend_start \ /usr/local/bin/kolla_copy_cacerts \ /usr/local/bin/kolla_install_projects \ /usr/local/bin/kolla_patch \ - && chmod 644 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_httpd_setup \ + && chmod 644 /usr/local/bin/kolla_extend_start \ && chmod 440 /etc/sudoers \ && mkdir -p /var/log/kolla \ && chown :kolla /var/log/kolla \ @@ -384,12 +335,13 @@ RUN touch /usr/local/bin/kolla_extend_start \ && rm -f /tmp/kolla_bashrc {% block base_pip_conf %} -# the variables like PIP_INDEX_URL, PIP_EXTRA_INDEX_URL, PIP_TRUSTED_HOST etc. should be defined here. -# ENV PIP_INDEX_URL=https://pypi.python.org/simple -# ENV PIP_TRUSTED_HOST=pypi.python.org +# pip build-time settings (PIP_INDEX_URL, PIP_TRUSTED_HOST, PIP_EXTRA_INDEX_URL) are +# injected as ARG instructions by kolla-build and passed via --build-arg, so they do +# not persist in the final image. Override this block to add further pip configuration. {% endblock %} {{ macros.kolla_patch_sources() }} {% block base_footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} CMD ["kolla_start"] diff --git a/docker/base/apt_preferences b/kolla/docker/base/apt_preferences index dc5b993f1..dc5b993f1 100644 --- a/docker/base/apt_preferences +++ b/kolla/docker/base/apt_preferences diff --git a/docker/base/apt_preferences.debian b/kolla/docker/base/apt_preferences.debian index 5edb8814a..08e21ff22 100644 --- a/docker/base/apt_preferences.debian +++ b/kolla/docker/base/apt_preferences.debian @@ -1,4 +1,4 @@ # NOTE(hrw): we do not want backports unless requested Package: * -Pin: release n=bookworm-backports +Pin: release n=trixie-backports Pin-Priority: -1000 diff --git a/docker/base/apt_preferences.ubuntu b/kolla/docker/base/apt_preferences.ubuntu index 7cc49b4ad..7cc49b4ad 100644 --- a/docker/base/apt_preferences.ubuntu +++ b/kolla/docker/base/apt_preferences.ubuntu diff --git a/docker/base/copy_cacerts.sh b/kolla/docker/base/copy_cacerts.sh index 213033c0c..213033c0c 100644 --- a/docker/base/copy_cacerts.sh +++ b/kolla/docker/base/copy_cacerts.sh diff --git a/docker/base/curlrc b/kolla/docker/base/curlrc index 3b1ecea06..3b1ecea06 100644 --- a/docker/base/curlrc +++ b/kolla/docker/base/curlrc diff --git a/kolla/docker/base/debian.sources b/kolla/docker/base/debian.sources new file mode 100644 index 000000000..28c61c81d --- /dev/null +++ b/kolla/docker/base/debian.sources @@ -0,0 +1,13 @@ +Types: deb +# http://snapshot.debian.org/archive/debian/20251020T000000Z +URIs: http://deb.debian.org/debian +Suites: trixie trixie-updates trixie-backports +Components: main +Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg + +Types: deb +# http://snapshot.debian.org/archive/debian-security/20251020T000000Z +URIs: http://deb.debian.org/debian-security +Suites: trixie-security +Components: main +Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg diff --git a/docker/base/dnf.conf b/kolla/docker/base/dnf.conf index 6ca687545..6ca687545 100644 --- a/docker/base/dnf.conf +++ b/kolla/docker/base/dnf.conf diff --git a/docker/base/dpkg_reducing_disk_footprint b/kolla/docker/base/dpkg_reducing_disk_footprint index 87b8255f9..87b8255f9 100644 --- a/docker/base/dpkg_reducing_disk_footprint +++ b/kolla/docker/base/dpkg_reducing_disk_footprint diff --git a/docker/base/healthcheck_curl b/kolla/docker/base/healthcheck_curl index 6df232fe8..6df232fe8 100755 --- a/docker/base/healthcheck_curl +++ b/kolla/docker/base/healthcheck_curl diff --git a/docker/base/healthcheck_filemod b/kolla/docker/base/healthcheck_filemod index 007643d9b..007643d9b 100755 --- a/docker/base/healthcheck_filemod +++ b/kolla/docker/base/healthcheck_filemod diff --git a/docker/base/healthcheck_listen b/kolla/docker/base/healthcheck_listen index 70273339c..70273339c 100755 --- a/docker/base/healthcheck_listen +++ b/kolla/docker/base/healthcheck_listen diff --git a/docker/base/healthcheck_port b/kolla/docker/base/healthcheck_port index 9531bd77a..9531bd77a 100755 --- a/docker/base/healthcheck_port +++ b/kolla/docker/base/healthcheck_port diff --git a/docker/base/healthcheck_socket b/kolla/docker/base/healthcheck_socket index cd65bae69..cd65bae69 100755 --- a/docker/base/healthcheck_socket +++ b/kolla/docker/base/healthcheck_socket diff --git a/docker/base/install_projects.sh b/kolla/docker/base/install_projects.sh index a9a7948d0..c3f7182b5 100644 --- a/docker/base/install_projects.sh +++ b/kolla/docker/base/install_projects.sh @@ -5,7 +5,9 @@ # The projects are mounted there when dev mode is enabled for them # in kolla-ansible -if [ -d "/dev-mode" ]; then +VENV_PATH="/var/lib/kolla/venv" + +if [ -d "/dev-mode" ] && [ -d "$VENV_PATH" ]; then for project in /dev-mode/*; do pip install -U "$project" done diff --git a/docker/base/kolla_bashrc b/kolla/docker/base/kolla_bashrc index 09b19cc06..09b19cc06 100644 --- a/docker/base/kolla_bashrc +++ b/kolla/docker/base/kolla_bashrc diff --git a/docker/base/kolla_patch.sh b/kolla/docker/base/kolla_patch.sh index b17a5b61d..b17a5b61d 100755 --- a/docker/base/kolla_patch.sh +++ b/kolla/docker/base/kolla_patch.sh diff --git a/docker/base/set_configs.py b/kolla/docker/base/set_configs.py index 80c32e507..4b025d55a 100644 --- a/docker/base/set_configs.py +++ b/kolla/docker/base/set_configs.py @@ -23,6 +23,7 @@ import re import shutil import stat import sys +import yaml # TODO(rhallisey): add docstring. @@ -257,6 +258,7 @@ class ConfigFile(object): def validate_config(config): required_keys = {'source', 'dest'} + required_path_keys = {'path', 'owner', 'perm'} if 'command' not in config: raise InvalidConfig('Config is missing required "command" key') @@ -272,6 +274,25 @@ def validate_config(config): raise InvalidConfig( 'Config needs preserve_properties or owner and perm') + for section in ('directories', 'files'): + for data in config.get(section, list()): + missing = required_path_keys - set(data.keys()) + if missing: + raise InvalidConfig( + '%s config is missing required keys: %s' + % (section, missing)) + + for key in required_path_keys: + if data.get(key) is None: + raise InvalidConfig( + '%s config key "%s" must not be null' + % (section, key)) + + if glob.has_magic(data['path']): + raise InvalidConfig( + '%s config does not support glob paths: %s' + % (section, data['path'])) + def validate_source(data): source = data.get('source') @@ -291,13 +312,33 @@ def validate_source(data): def load_config(): def load_from_file(): - config_file = '/var/lib/kolla/config_files/config.json' - LOG.info("Loading config file at %s", config_file) + yaml_config_file = '/var/lib/kolla/config_files/config.yaml' + json_config_file = '/var/lib/kolla/config_files/config.json' - # Attempt to read config file - with open(config_file) as f: + if os.path.exists(yaml_config_file): + config_file = yaml_config_file + LOG.info("Loading config file at %s", config_file) try: - return json.load(f) + with open(config_file) as f: + config = yaml.safe_load(f) + + if config is None: + raise InvalidConfig( + "Invalid yaml file found at %s: " + "file is empty" % config_file) + return config + except yaml.YAMLError: + raise InvalidConfig( + "Invalid yaml file found at %s" % config_file) + except IOError as e: + raise InvalidConfig( + "Could not read file %s: %r" % (config_file, e)) + else: + config_file = json_config_file + LOG.info("Loading config file at %s", config_file) + try: + with open(config_file) as f: + return json.load(f) except ValueError: raise InvalidConfig( "Invalid json file found at %s" % config_file) @@ -334,6 +375,41 @@ def copy_config(config): LOG.exception('Failed to set permission of %s to 0o644', cmd) +def create_directories(config): + if 'directories' not in config: + return + LOG.info('Creating directories') + for data in config['directories']: + path = data['path'] + try: + os.makedirs(path, exist_ok=True) + except Exception: + raise OSError("Can't create destination directory (%s)" % (path)) + handle_permissions({'permissions': [data]}) + + +def create_files(config): + if 'files' not in config: + return + LOG.info('Creating files') + for data in config['files']: + path = data['path'] + if os.path.islink(path): + raise OSError( + "Path is a symbolic link, expected regular file (%s)" % path) + if os.path.isdir(path): + raise OSError( + "Path is a directory, expected file (%s)" % path) + parent = os.path.dirname(path) + if parent and not os.path.isdir(parent): + raise OSError( + "Parent directory does not exist (%s)" % parent) + if not os.path.exists(path): + with open(path, 'a'): + pass + handle_permissions({'permissions': [data]}) + + def user_group(owner): if ':' in owner: user, group = owner.split(':', 1) @@ -369,11 +445,20 @@ def handle_permissions(config): path, uid, gid) if perm: - # NOTE(Jeffrey4l): py3 need '0oXXX' format for octal literals, - # and py2 support such format too. - if len(perm) == 4 and perm[1] != 'o': - perm = ''.join([perm[:1], 'o', perm[1:]]) - perm = int(perm, base=0) + # Accept valid UNIX permission notation + # (e.g. 644, 0600, 1777, 2755) + # or equivalent Python octal literals + # (e.g. 0o644, 0o1777, 0o2755). + if re.fullmatch(r'[0-7]{3,4}', perm): + perm = int(perm, 8) + elif re.fullmatch(r'0o[0-7]{3,4}', perm): + perm = int(perm, 0) + else: + raise ValueError( + f"Invalid permission '{perm}'. Expected a valid UNIX " + "permission (e.g. 644, 0600, 2755) or a Python octal " + "literal (e.g. 0o644, 0o0600, 0o2755)." + ) # Ensure execute bit on directory if read bit is set if os.path.isdir(path): @@ -560,6 +645,8 @@ def execute_config_strategy(config): config_strategy = os.environ.get("KOLLA_CONFIG_STRATEGY") LOG.info("Kolla config strategy set to: %s", config_strategy) if config_strategy == "COPY_ALWAYS": + create_directories(config) + create_files(config) handle_defaults(config) copy_config(config) handle_permissions(config) @@ -569,6 +656,8 @@ def execute_config_strategy(config): "The config strategy prevents copying new configs", exit_code=0) else: + create_directories(config) + create_files(config) handle_defaults(config) copy_config(config) handle_permissions(config) @@ -609,7 +698,7 @@ def execute_config_check(config): """ state = get_defaults_state() - # Build a set of all current destination paths from config.json + # Build a set of all current destination paths from the config # If the destination is a directory, we append the # basename of the source current_dests = { @@ -620,7 +709,7 @@ def execute_config_check(config): } # Detect any paths that are present in the state file but - # missing from config.json. + # missing from the config file. # These would be either restored (if state[dest] has a backup) # or removed (if dest is null) removed_dests = [ @@ -631,7 +720,7 @@ def execute_config_check(config): if removed_dests: raise StateMismatch( f"The following config files are tracked in state but missing " - f"from config.json. " + f"from the config file. " f"They would be restored or removed: {sorted(removed_dests)}" ) diff --git a/docker/base/sources.list b/kolla/docker/base/sources.list index 1acbbcb59..1acbbcb59 100644 --- a/docker/base/sources.list +++ b/kolla/docker/base/sources.list diff --git a/docker/base/start.sh b/kolla/docker/base/start.sh index 7ac505aea..7ac505aea 100644 --- a/docker/base/start.sh +++ b/kolla/docker/base/start.sh diff --git a/docker/base/sudoers b/kolla/docker/base/sudoers index eb31bc98b..eb31bc98b 100644 --- a/docker/base/sudoers +++ b/kolla/docker/base/sudoers diff --git a/kolla/docker/base/ubuntu.sources b/kolla/docker/base/ubuntu.sources new file mode 100644 index 000000000..46b817b7e --- /dev/null +++ b/kolla/docker/base/ubuntu.sources @@ -0,0 +1,17 @@ +Types: deb +URIs: http://archive.ubuntu.com/ubuntu/ +Suites: noble noble-updates noble-backports +Components: main universe +Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg + +## Ubuntu security updates. Aside from URIs and Suites, +## this should mirror your choices in the previous section. +Types: deb +URIs: http://security.ubuntu.com/ubuntu/ +Suites: noble-security +Components: main universe +Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg + +# NOTE(hrw): extra repositories are added into image when they are needed as +# separate files in /etc/apt/sources.list.d/ directory. For that purpose they +# are defined in kolla/template/repos.yaml file. diff --git a/kolla/docker/base/ubuntu.sources.arm64 b/kolla/docker/base/ubuntu.sources.arm64 new file mode 100644 index 000000000..751af7ccf --- /dev/null +++ b/kolla/docker/base/ubuntu.sources.arm64 @@ -0,0 +1,24 @@ +Types: deb +URIs: http://ports.ubuntu.com/ubuntu-ports/ +Suites: noble noble-updates noble-backports +Components: main universe +Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg + +## Ubuntu security updates. Aside from URIs and Suites, +## this should mirror your choices in the previous section. +Types: deb +URIs: http://ports.ubuntu.com/ubuntu-ports/ +Suites: noble-security +Components: main universe +Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg + +## Ubuntu Cloud Archive +Types: deb +URIs: http://ubuntu-cloud.archive.canonical.com/ubuntu +Suites: noble-updates/gazpacho +Components: main +Signed-By: /usr/share/keyrings/ubuntu-cloud-keyring.gpg + +# NOTE(hrw): extra repositories are added into image when they are needed as +# separate files in /etc/apt/sources.list.d/ directory. For that purpose they +# are defined in kolla/template/repos.yaml file. diff --git a/docker/bifrost/bifrost-base/Dockerfile.j2 b/kolla/docker/bifrost/bifrost-base/Dockerfile.j2 index 154e44367..75e2fe822 100644 --- a/docker/bifrost/bifrost-base/Dockerfile.j2 +++ b/kolla/docker/bifrost/bifrost-base/Dockerfile.j2 @@ -1,39 +1,30 @@ FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block bifrost_base_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {% set venv_path='/var/lib/kolla/venv' %} {{ macros.configure_user(name='bifrost') }} -{# NOTE(mgoddard): EPEL required for nginx #} -{{ macros.enable_extra_repos(['epel']) }} - {% set bifrost_base_packages = [ 'cpio' ] %} {% if base_package_type == 'rpm' %} - {% set bifrost_base_packages = bifrost_base_packages + [ - 'python3.12', - 'python3.12-devel' - ] %} + +{# NOTE(mgoddard): EPEL required for nginx #} +{{ macros.enable_extra_repos(['crb', 'epel']) }} {% endif %} {{ macros.install_packages(bifrost_base_packages | customizable("packages")) }} -{# Ensure we use Python 3.12 on RPM-based systems #} -{% if base_package_type == 'rpm' %} -RUN cd /usr/bin && \ - rm -f python3 && \ - ln -s python3.12 python3 -{% endif %} - ENV VENV {{ venv_path }} {% set bifrost_base_pip_packages = [ @@ -46,12 +37,7 @@ COPY build_arg.yml /tmp/build_arg.yml RUN mkdir -p /requirements \ && curl -o /requirements/upper-constraints.txt ${UPPER_CONSTRAINTS_FILE:-https://releases.openstack.org/constraints/upper/{{ openstack_release }}} \ && python3 -m venv --system-site-packages {{ venv_path }} \ - && KOLLA_DISTRO_PYTHON_VERSION=$(/usr/bin/python3 -c "import sys; print('{}.{}'.format(sys.version_info.major, sys.version_info.minor))") \ - && cd {{ venv_path }}/lib \ - && rm -f python3 \ - && ln -s python${KOLLA_DISTRO_PYTHON_VERSION} python3 - -RUN ln -s bifrost-base-source/* bifrost \ + && ln -s bifrost-base-source/* bifrost \ && {{ macros.install_pip(['pip', 'wheel', 'setuptools']) }} \ && {{ macros.install_pip(bifrost_base_pip_packages | customizable("pip_packages")) }} @@ -66,7 +52,7 @@ RUN apt-get --error-on=any update && \ {%- else %} RUN echo " " && \ {%- endif %} - bash -c '$VENV/bin/pip install "ansible>=11,<12" && \ + bash -c '$VENV/bin/pip install "ansible>=12,<14" && \ $VENV/bin/ansible-galaxy collection install -r /bifrost/ansible-collections-requirements.yml && \ $VENV/bin/ansible-playbook -vvvv -i /bifrost/playbooks/inventory/target \ /bifrost/playbooks/install.yaml \ @@ -90,3 +76,4 @@ RUN chmod 750 /etc/sudoers.d \ {{ macros.kolla_patch_sources() }} {% block bifrost_base_footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/bifrost/bifrost-base/bifrost_sudoers b/kolla/docker/bifrost/bifrost-base/bifrost_sudoers index 6c343a956..6c343a956 100644 --- a/docker/bifrost/bifrost-base/bifrost_sudoers +++ b/kolla/docker/bifrost/bifrost-base/bifrost_sudoers diff --git a/docker/bifrost/bifrost-base/build_arg.yml b/kolla/docker/bifrost/bifrost-base/build_arg.yml index 8c810f133..8c810f133 100644 --- a/docker/bifrost/bifrost-base/build_arg.yml +++ b/kolla/docker/bifrost/bifrost-base/build_arg.yml diff --git a/docker/bifrost/bifrost-deploy/Dockerfile.j2 b/kolla/docker/bifrost/bifrost-deploy/Dockerfile.j2 index bea702f5e..3cb3d82a8 100644 --- a/docker/bifrost/bifrost-deploy/Dockerfile.j2 +++ b/kolla/docker/bifrost/bifrost-deploy/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}bifrost-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block bifrost_deploy_header %}{% endblock %} @@ -9,6 +9,8 @@ ENV container docker {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + RUN rm -f $(find /lib/systemd/system/sysinit.target.wants/ ! -name systemd-tmpfiles-setup.service -type l); \ rm -f /lib/systemd/system/multi-user.target.wants/*; \ rm -f /etc/systemd/system/*.wants/*; \ @@ -33,3 +35,4 @@ CMD [ "/sbin/init" ] {% block bifrost_deploy_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/blazar/blazar-api/Dockerfile.j2 b/kolla/docker/blazar/blazar-api/Dockerfile.j2 index db472a61e..70d6ba22a 100644 --- a/docker/blazar/blazar-api/Dockerfile.j2 +++ b/kolla/docker/blazar/blazar-api/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}blazar-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block blazar_api_header %}{% endblock %} diff --git a/docker/blazar/blazar-api/extend_start.sh b/kolla/docker/blazar/blazar-api/extend_start.sh index ff4f2b801..ff4f2b801 100644 --- a/docker/blazar/blazar-api/extend_start.sh +++ b/kolla/docker/blazar/blazar-api/extend_start.sh diff --git a/docker/blazar/blazar-base/Dockerfile.j2 b/kolla/docker/blazar/blazar-base/Dockerfile.j2 index 98bb0d5ac..926ba66a4 100644 --- a/docker/blazar/blazar-base/Dockerfile.j2 +++ b/kolla/docker/blazar/blazar-base/Dockerfile.j2 @@ -1,12 +1,14 @@ FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block blazar_base_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {{ macros.configure_user(name='blazar') }} ADD blazar-base-archive /blazar-base-source @@ -27,3 +29,4 @@ RUN ln -s blazar-base-source/* blazar \ {{ macros.kolla_patch_sources() }} {% block blazar_base_footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/blazar/blazar-base/extend_start.sh b/kolla/docker/blazar/blazar-base/extend_start.sh index a96a4c113..a96a4c113 100644 --- a/docker/blazar/blazar-base/extend_start.sh +++ b/kolla/docker/blazar/blazar-base/extend_start.sh diff --git a/docker/blazar/blazar-manager/Dockerfile.j2 b/kolla/docker/blazar/blazar-manager/Dockerfile.j2 index 6d0251f38..5cde3db3b 100644 --- a/docker/blazar/blazar-manager/Dockerfile.j2 +++ b/kolla/docker/blazar/blazar-manager/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}blazar-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block blazar_manager_header %}{% endblock %} diff --git a/docker/ceilometer/ceilometer-base/Dockerfile.j2 b/kolla/docker/ceilometer/ceilometer-base/Dockerfile.j2 index eb0fc1d02..4e3a63d02 100644 --- a/docker/ceilometer/ceilometer-base/Dockerfile.j2 +++ b/kolla/docker/ceilometer/ceilometer-base/Dockerfile.j2 @@ -1,12 +1,14 @@ FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block ceilometer_base_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {{ macros.configure_user(name='ceilometer') }} {% set ceilometer_base_pip_packages = [ @@ -41,3 +43,4 @@ RUN ln -s ceilometer-base-source/* ceilometer \ {{ macros.kolla_patch_sources() }} {% block ceilometer_base_footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/ceilometer/ceilometer-base/ceilometer_sudoers b/kolla/docker/ceilometer/ceilometer-base/ceilometer_sudoers index dd861bb58..dd861bb58 100644 --- a/docker/ceilometer/ceilometer-base/ceilometer_sudoers +++ b/kolla/docker/ceilometer/ceilometer-base/ceilometer_sudoers diff --git a/docker/ceilometer/ceilometer-base/extend_start.sh b/kolla/docker/ceilometer/ceilometer-base/extend_start.sh index 4d3fe6b61..4d3fe6b61 100644 --- a/docker/ceilometer/ceilometer-base/extend_start.sh +++ b/kolla/docker/ceilometer/ceilometer-base/extend_start.sh diff --git a/docker/ceilometer/ceilometer-central/Dockerfile.j2 b/kolla/docker/ceilometer/ceilometer-central/Dockerfile.j2 index f702ee647..df96d8ed3 100644 --- a/docker/ceilometer/ceilometer-central/Dockerfile.j2 +++ b/kolla/docker/ceilometer/ceilometer-central/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}ceilometer-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block ceilometer_central_header %}{% endblock %} diff --git a/docker/ceilometer/ceilometer-compute/Dockerfile.j2 b/kolla/docker/ceilometer/ceilometer-compute/Dockerfile.j2 index 48b0ae288..629aa5283 100644 --- a/docker/ceilometer/ceilometer-compute/Dockerfile.j2 +++ b/kolla/docker/ceilometer/ceilometer-compute/Dockerfile.j2 @@ -1,12 +1,14 @@ FROM {{ namespace }}/{{ image_prefix }}ceilometer-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block ceilometer_compute_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {% if base_package_type == 'rpm' %} {% set ceilometer_compute_packages = [ 'python3-libvirt' @@ -28,6 +30,7 @@ RUN {{ macros.install_pip(ceilometer_compute_pip_packages | customizable("pip_pa {% block ceilometer_compute_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} # NOTE(huikang): non-root user does not work with libvirt.sock. # Need configuration in nova-libvirt container to allow diff --git a/docker/ceilometer/ceilometer-ipmi/Dockerfile.j2 b/kolla/docker/ceilometer/ceilometer-ipmi/Dockerfile.j2 index d4aef5b7b..a86c01bac 100644 --- a/docker/ceilometer/ceilometer-ipmi/Dockerfile.j2 +++ b/kolla/docker/ceilometer/ceilometer-ipmi/Dockerfile.j2 @@ -1,12 +1,14 @@ FROM {{ namespace }}/{{ image_prefix }}ceilometer-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block ceilometer_ipmi_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {% if base_package_type == 'rpm' %} {% set ceilometer_ipmi_packages = [ 'ipmitool' @@ -23,5 +25,6 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% block ceilometer_ipmi_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} USER ceilometer diff --git a/docker/ceilometer/ceilometer-notification/Dockerfile.j2 b/kolla/docker/ceilometer/ceilometer-notification/Dockerfile.j2 index daf50d8e5..1fc03ffc4 100644 --- a/docker/ceilometer/ceilometer-notification/Dockerfile.j2 +++ b/kolla/docker/ceilometer/ceilometer-notification/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}ceilometer-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block ceilometer_notification_header %}{% endblock %} diff --git a/docker/ceilometer/ceilometer-notification/extend_start.sh b/kolla/docker/ceilometer/ceilometer-notification/extend_start.sh index 0abeeb1e1..0abeeb1e1 100644 --- a/docker/ceilometer/ceilometer-notification/extend_start.sh +++ b/kolla/docker/ceilometer/ceilometer-notification/extend_start.sh diff --git a/docker/cinder/cinder-api/Dockerfile.j2 b/kolla/docker/cinder/cinder-api/Dockerfile.j2 index f64291d7e..64a01e404 100644 --- a/docker/cinder/cinder-api/Dockerfile.j2 +++ b/kolla/docker/cinder/cinder-api/Dockerfile.j2 @@ -1,12 +1,14 @@ FROM {{ namespace }}/{{ image_prefix }}cinder-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block cinder_api_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {% set cinder_api_packages = [ ] %} @@ -20,3 +22,4 @@ RUN chmod 644 /usr/local/bin/kolla_cinder_extend_start {% block cinder_api_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/cinder/cinder-api/extend_start.sh b/kolla/docker/cinder/cinder-api/extend_start.sh index a5492b082..94b0fe875 100644 --- a/docker/cinder/cinder-api/extend_start.sh +++ b/kolla/docker/cinder/cinder-api/extend_start.sh @@ -12,5 +12,3 @@ if [[ "${!KOLLA_OSM[@]}" ]]; then cinder-manage db online_data_migrations exit 0 fi - -. /usr/local/bin/kolla_httpd_setup diff --git a/docker/cinder/cinder-backup/Dockerfile.j2 b/kolla/docker/cinder/cinder-backup/Dockerfile.j2 index aaa8a344f..4f42ddbb6 100644 --- a/docker/cinder/cinder-backup/Dockerfile.j2 +++ b/kolla/docker/cinder/cinder-backup/Dockerfile.j2 @@ -1,12 +1,14 @@ FROM {{ namespace }}/{{ image_prefix }}cinder-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block cinder_backup_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {% if base_package_type == 'rpm' %} {% set cinder_backup_packages = [ 'device-mapper-multipath', @@ -29,5 +31,6 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% block cinder_backup_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} USER cinder diff --git a/docker/cinder/cinder-base/Dockerfile.j2 b/kolla/docker/cinder/cinder-base/Dockerfile.j2 index 312f12808..1b85d92ef 100644 --- a/docker/cinder/cinder-base/Dockerfile.j2 +++ b/kolla/docker/cinder/cinder-base/Dockerfile.j2 @@ -1,23 +1,27 @@ FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block cinder_base_header %}{% endblock %} {% import "macros.j2" as macros with context %} -{{ macros.configure_user(name='cinder') }} +{{ macros.kolla_enable_base_repos() }} -{{ macros.enable_extra_repos(['ceph', 'epel']) }} +{{ macros.configure_user(name='cinder') }} {% if base_package_type == 'rpm' %} + +{{ macros.enable_extra_repos(['ceph', 'crb', 'epel']) }} + {% set cinder_base_packages = [ 'ceph-common', 'cryptsetup', 'lvm2', 'nvme-cli', - 'qemu-img' + 'qemu-img', + 'systemd-udev' ] %} {% elif base_package_type == 'deb' %} {% set cinder_base_packages = [ @@ -56,3 +60,4 @@ RUN ln -s cinder-base-source/* cinder \ {{ macros.kolla_patch_sources() }} {% block cinder_base_footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/cinder/cinder-base/cinder_sudoers b/kolla/docker/cinder/cinder-base/cinder_sudoers index 3750f31a0..3750f31a0 100644 --- a/docker/cinder/cinder-base/cinder_sudoers +++ b/kolla/docker/cinder/cinder-base/cinder_sudoers diff --git a/docker/cinder/cinder-base/extend_start.sh b/kolla/docker/cinder/cinder-base/extend_start.sh index ddf1469c9..ddf1469c9 100644 --- a/docker/cinder/cinder-base/extend_start.sh +++ b/kolla/docker/cinder/cinder-base/extend_start.sh diff --git a/docker/cinder/cinder-scheduler/Dockerfile.j2 b/kolla/docker/cinder/cinder-scheduler/Dockerfile.j2 index d1835092e..c43792dcc 100644 --- a/docker/cinder/cinder-scheduler/Dockerfile.j2 +++ b/kolla/docker/cinder/cinder-scheduler/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}cinder-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block cinder_scheduler_header %}{% endblock %} diff --git a/docker/cinder/cinder-volume/Dockerfile.j2 b/kolla/docker/cinder/cinder-volume/Dockerfile.j2 index e55b05e44..772350e4e 100644 --- a/docker/cinder/cinder-volume/Dockerfile.j2 +++ b/kolla/docker/cinder/cinder-volume/Dockerfile.j2 @@ -1,12 +1,14 @@ FROM {{ namespace }}/{{ image_prefix }}cinder-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block cinder_volume_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {% if base_package_type == 'rpm' %} {% set cinder_volume_packages = [ 'lsscsi', @@ -54,5 +56,6 @@ RUN chmod 750 /etc/sudoers.d \ {% block cinder_volume_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} USER cinder diff --git a/docker/cinder/cinder-volume/cinder_sudoers b/kolla/docker/cinder/cinder-volume/cinder_sudoers index f3bec8b13..f3bec8b13 100644 --- a/docker/cinder/cinder-volume/cinder_sudoers +++ b/kolla/docker/cinder/cinder-volume/cinder_sudoers diff --git a/docker/cinder/cinder-volume/extend_start.sh b/kolla/docker/cinder/cinder-volume/extend_start.sh index 67e866143..67e866143 100644 --- a/docker/cinder/cinder-volume/extend_start.sh +++ b/kolla/docker/cinder/cinder-volume/extend_start.sh diff --git a/docker/cloudkitty/cloudkitty-api/Dockerfile.j2 b/kolla/docker/cloudkitty/cloudkitty-api/Dockerfile.j2 index 9d9709bb8..65dbbe1f6 100644 --- a/docker/cloudkitty/cloudkitty-api/Dockerfile.j2 +++ b/kolla/docker/cloudkitty/cloudkitty-api/Dockerfile.j2 @@ -1,12 +1,14 @@ FROM {{ namespace }}/{{ image_prefix }}cloudkitty-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block cloudkitty_api_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {% set cloudkitty_api_packages = [ ] %} @@ -19,3 +21,4 @@ RUN chmod 644 /usr/local/bin/kolla_cloudkitty_extend_start {% block cloudkitty_api_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/cloudkitty/cloudkitty-api/extend_start.sh b/kolla/docker/cloudkitty/cloudkitty-api/extend_start.sh index 2b144fa3f..26d4a8c36 100644 --- a/docker/cloudkitty/cloudkitty-api/extend_start.sh +++ b/kolla/docker/cloudkitty/cloudkitty-api/extend_start.sh @@ -7,5 +7,3 @@ if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then cloudkitty-storage-init exit 0 fi - -. /usr/local/bin/kolla_httpd_setup diff --git a/docker/cloudkitty/cloudkitty-base/Dockerfile.j2 b/kolla/docker/cloudkitty/cloudkitty-base/Dockerfile.j2 index a56370936..11e517673 100644 --- a/docker/cloudkitty/cloudkitty-base/Dockerfile.j2 +++ b/kolla/docker/cloudkitty/cloudkitty-base/Dockerfile.j2 @@ -1,12 +1,14 @@ FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block cloudkitty_base_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {{ macros.configure_user(name='cloudkitty') }} {% set cloudkitty_base_pip_packages = [ @@ -27,3 +29,4 @@ RUN ln -s cloudkitty-base-source/* cloudkitty \ {{ macros.kolla_patch_sources() }} {% block cloudkitty_base_footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/cloudkitty/cloudkitty-base/extend_start.sh b/kolla/docker/cloudkitty/cloudkitty-base/extend_start.sh index cf49f9caf..cf49f9caf 100644 --- a/docker/cloudkitty/cloudkitty-base/extend_start.sh +++ b/kolla/docker/cloudkitty/cloudkitty-base/extend_start.sh diff --git a/docker/cloudkitty/cloudkitty-processor/Dockerfile.j2 b/kolla/docker/cloudkitty/cloudkitty-processor/Dockerfile.j2 index c2a9d1246..e71b52ebb 100644 --- a/docker/cloudkitty/cloudkitty-processor/Dockerfile.j2 +++ b/kolla/docker/cloudkitty/cloudkitty-processor/Dockerfile.j2 @@ -1,12 +1,14 @@ FROM {{ namespace }}/{{ image_prefix }}cloudkitty-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block cloudkitty_processor_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {% set cloudkitty_processor_packages = [ ] %} @@ -16,5 +18,6 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% block cloudkitty_processor_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} USER cloudkitty diff --git a/docker/collectd/Dockerfile.j2 b/kolla/docker/collectd/Dockerfile.j2 index 0633a94da..4ea5a4c40 100644 --- a/docker/collectd/Dockerfile.j2 +++ b/kolla/docker/collectd/Dockerfile.j2 @@ -1,21 +1,24 @@ FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block collectd_header %}{% endblock %} {% import "macros.j2" as macros with context %} -{{ macros.configure_user(name='collectd') }} +{{ macros.kolla_enable_base_repos() }} -{{ macros.enable_extra_repos(['opstools']) }} +{{ macros.configure_user(name='collectd') }} {% set collectd_packages = [ 'collectd' ] %} {% if base_package_type == 'rpm' %} + +{{ macros.enable_extra_repos(['opstools']) }} + {% set collectd_packages = collectd_packages + [ 'collectd-amqp', 'collectd-amqp1', @@ -76,5 +79,6 @@ RUN chmod 644 /usr/local/bin/kolla_extend_start \ {% block collectd_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} USER collectd diff --git a/docker/collectd/extend_start.sh b/kolla/docker/collectd/extend_start.sh index 80ef63db3..80ef63db3 100644 --- a/docker/collectd/extend_start.sh +++ b/kolla/docker/collectd/extend_start.sh diff --git a/docker/cron/Dockerfile.j2 b/kolla/docker/cron/Dockerfile.j2 index 029b65779..8a0aef268 100644 --- a/docker/cron/Dockerfile.j2 +++ b/kolla/docker/cron/Dockerfile.j2 @@ -1,12 +1,14 @@ FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block cron_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {% if base_package_type == 'rpm' %} {% set cron_packages = [ 'cronie', @@ -33,3 +35,4 @@ RUN chmod 644 /usr/local/bin/kolla_extend_start {% block cron_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/cron/extend_start.sh b/kolla/docker/cron/extend_start.sh index 3476302e1..3476302e1 100644 --- a/docker/cron/extend_start.sh +++ b/kolla/docker/cron/extend_start.sh diff --git a/docker/cron/logrotate b/kolla/docker/cron/logrotate index 1ac157001..1ac157001 100755 --- a/docker/cron/logrotate +++ b/kolla/docker/cron/logrotate diff --git a/docker/cyborg/cyborg-agent/Dockerfile.j2 b/kolla/docker/cyborg/cyborg-agent/Dockerfile.j2 index 222be13dc..e8b5d9c3c 100644 --- a/docker/cyborg/cyborg-agent/Dockerfile.j2 +++ b/kolla/docker/cyborg/cyborg-agent/Dockerfile.j2 @@ -1,11 +1,13 @@ FROM {{ namespace }}/{{ image_prefix }}cyborg-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block cyborg_agent_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {% set cyborg_agent_packages = [ 'pciutils', ] %} @@ -20,3 +22,4 @@ RUN {{ macros.install_pip(cyborg_agent_pip_packages | customizable("pip_packages {% block cyborg_agent_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/cyborg/cyborg-api/Dockerfile.j2 b/kolla/docker/cyborg/cyborg-api/Dockerfile.j2 index f087e572d..ba4e6f209 100644 --- a/docker/cyborg/cyborg-api/Dockerfile.j2 +++ b/kolla/docker/cyborg/cyborg-api/Dockerfile.j2 @@ -1,11 +1,13 @@ FROM {{ namespace }}/{{ image_prefix }}cyborg-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block cyborg_api_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {% set cyborg_api_packages = [ ] %} {{ macros.install_packages(cyborg_api_packages | customizable("packages")) }} @@ -17,3 +19,4 @@ RUN chmod 644 /usr/local/bin/kolla_cyborg_extend_start {% block cyborg_api_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/cyborg/cyborg-api/extend_start.sh b/kolla/docker/cyborg/cyborg-api/extend_start.sh index 63c62ef93..b1c7af7af 100644 --- a/docker/cyborg/cyborg-api/extend_start.sh +++ b/kolla/docker/cyborg/cyborg-api/extend_start.sh @@ -6,5 +6,3 @@ if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then cyborg-dbsync upgrade exit 0 fi - -. /usr/local/bin/kolla_httpd_setup diff --git a/docker/cyborg/cyborg-base/Dockerfile.j2 b/kolla/docker/cyborg/cyborg-base/Dockerfile.j2 index a0b3a4566..95a0eab8c 100644 --- a/docker/cyborg/cyborg-base/Dockerfile.j2 +++ b/kolla/docker/cyborg/cyborg-base/Dockerfile.j2 @@ -1,12 +1,14 @@ FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block cyborg_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {{ macros.configure_user(name='cyborg') }} ADD cyborg-base-archive /cyborg-base-source @@ -29,3 +31,4 @@ RUN ln -s cyborg-base-source/* cyborg \ {{ macros.kolla_patch_sources() }} {% block cyborg_footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/cyborg/cyborg-base/cyborg_sudoers b/kolla/docker/cyborg/cyborg-base/cyborg_sudoers index 63440026d..63440026d 100644 --- a/docker/cyborg/cyborg-base/cyborg_sudoers +++ b/kolla/docker/cyborg/cyborg-base/cyborg_sudoers diff --git a/docker/cyborg/cyborg-base/extend_start.sh b/kolla/docker/cyborg/cyborg-base/extend_start.sh index 10a58c626..10a58c626 100755 --- a/docker/cyborg/cyborg-base/extend_start.sh +++ b/kolla/docker/cyborg/cyborg-base/extend_start.sh diff --git a/docker/cyborg/cyborg-conductor/Dockerfile.j2 b/kolla/docker/cyborg/cyborg-conductor/Dockerfile.j2 index aeff1c7ed..d17d1cacd 100644 --- a/docker/cyborg/cyborg-conductor/Dockerfile.j2 +++ b/kolla/docker/cyborg/cyborg-conductor/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}cyborg-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block cyborg_conductor_header %}{% endblock %} diff --git a/docker/designate/designate-api/Dockerfile.j2 b/kolla/docker/designate/designate-api/Dockerfile.j2 index c4596b230..6ca9ac180 100644 --- a/docker/designate/designate-api/Dockerfile.j2 +++ b/kolla/docker/designate/designate-api/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}designate-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block designate_api_header %}{% endblock %} diff --git a/docker/designate/designate-backend-bind9/Dockerfile.j2 b/kolla/docker/designate/designate-backend-bind9/Dockerfile.j2 index dbf153b53..7fc0e69b5 100644 --- a/docker/designate/designate-backend-bind9/Dockerfile.j2 +++ b/kolla/docker/designate/designate-backend-bind9/Dockerfile.j2 @@ -1,12 +1,14 @@ FROM {{ namespace }}/{{ image_prefix }}designate-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block designate_backend_bind9_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {% if base_package_type == 'rpm' %} {% set designate_backend_bind9_packages = ['bind'] %} @@ -29,3 +31,4 @@ RUN mkdir -p /var/lib/kolla/ /var/lib/{{ designate_backend_bind_name }}/ /run/{{ {% block designate_backend_bind9_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/designate/designate-base/Dockerfile.j2 b/kolla/docker/designate/designate-base/Dockerfile.j2 index 35bfa81e9..46836d931 100644 --- a/docker/designate/designate-base/Dockerfile.j2 +++ b/kolla/docker/designate/designate-base/Dockerfile.j2 @@ -1,12 +1,14 @@ FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block designate_base_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {{ macros.configure_user(name='designate') }} {% set designate_base_pip_packages = [ @@ -31,3 +33,4 @@ RUN ln -s designate-base-source/* designate \ {{ macros.kolla_patch_sources() }} {% block designate_base_footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/designate/designate-base/designate_sudoers b/kolla/docker/designate/designate-base/designate_sudoers index d06679fe2..d06679fe2 100644 --- a/docker/designate/designate-base/designate_sudoers +++ b/kolla/docker/designate/designate-base/designate_sudoers diff --git a/docker/designate/designate-base/extend_start.sh b/kolla/docker/designate/designate-base/extend_start.sh index 66b376c30..66b376c30 100644 --- a/docker/designate/designate-base/extend_start.sh +++ b/kolla/docker/designate/designate-base/extend_start.sh diff --git a/docker/designate/designate-central/Dockerfile.j2 b/kolla/docker/designate/designate-central/Dockerfile.j2 index 229e8336f..81c3c901f 100644 --- a/docker/designate/designate-central/Dockerfile.j2 +++ b/kolla/docker/designate/designate-central/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}designate-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block designate_central_header %}{% endblock %} diff --git a/docker/designate/designate-central/extend_start.sh b/kolla/docker/designate/designate-central/extend_start.sh index 8e90f55fc..8e90f55fc 100644 --- a/docker/designate/designate-central/extend_start.sh +++ b/kolla/docker/designate/designate-central/extend_start.sh diff --git a/docker/designate/designate-mdns/Dockerfile.j2 b/kolla/docker/designate/designate-mdns/Dockerfile.j2 index c3b4f5b42..dd2e6df75 100644 --- a/docker/designate/designate-mdns/Dockerfile.j2 +++ b/kolla/docker/designate/designate-mdns/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}designate-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block designate_mdns_header %}{% endblock %} diff --git a/docker/designate/designate-producer/Dockerfile.j2 b/kolla/docker/designate/designate-producer/Dockerfile.j2 index f21388a05..bd1ce4e1d 100644 --- a/docker/designate/designate-producer/Dockerfile.j2 +++ b/kolla/docker/designate/designate-producer/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}designate-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block designate_producer_header %}{% endblock %} diff --git a/docker/designate/designate-sink/Dockerfile.j2 b/kolla/docker/designate/designate-sink/Dockerfile.j2 index 5ddbf9600..8b8e50adf 100644 --- a/docker/designate/designate-sink/Dockerfile.j2 +++ b/kolla/docker/designate/designate-sink/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}designate-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block designate_sink_header %}{% endblock %} diff --git a/docker/designate/designate-worker/Dockerfile.j2 b/kolla/docker/designate/designate-worker/Dockerfile.j2 index 6aa1cdf7a..1cfff0c54 100644 --- a/docker/designate/designate-worker/Dockerfile.j2 +++ b/kolla/docker/designate/designate-worker/Dockerfile.j2 @@ -1,12 +1,14 @@ FROM {{ namespace }}/{{ image_prefix }}designate-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block designate_worker_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + # The bind9 package here is only to provide the rndc binary. {% if base_package_type == 'rpm' %} {% set designate_worker_packages = [ @@ -23,5 +25,6 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% block designate_worker_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} USER designate diff --git a/docker/dnsmasq/Dockerfile.j2 b/kolla/docker/dnsmasq/Dockerfile.j2 index fb1fe5db5..a91b2fca8 100644 --- a/docker/dnsmasq/Dockerfile.j2 +++ b/kolla/docker/dnsmasq/Dockerfile.j2 @@ -1,12 +1,14 @@ FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block dnsmasq_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {% set dnsmasq_packages = ['dnsmasq'] %} {{ macros.install_packages(dnsmasq_packages| customizable("packages")) }} @@ -17,3 +19,4 @@ RUN chmod 644 /usr/local/bin/kolla_extend_start {% block dnsmasq_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/kolla/docker/dnsmasq/extend_start.sh b/kolla/docker/dnsmasq/extend_start.sh new file mode 100644 index 000000000..0c9734fa1 --- /dev/null +++ b/kolla/docker/dnsmasq/extend_start.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +DNSMASQ_PIDFILE=${DNSMASQ_PIDFILE:-/run/ironic/dnsmasq.pid} +DNSMASQ_PIDFILE_DIR="$(dirname $DNSMASQ_PIDFILE)" + +if [[ ! -d "/var/log/kolla/ironic" ]]; then + mkdir -p /var/log/kolla/ironic +fi +if [[ $(stat -c %a /var/log/kolla/ironic) != "755" ]]; then + chmod 755 /var/log/kolla/ironic +fi +if [[ ! -r "/var/log/kolla/ironic/dnsmasq.log" ]]; then + touch /var/log/kolla/ironic/dnsmasq.log + chown ironic:ironic /var/log/kolla/ironic/dnsmasq.log +fi + +if [[ ! -d "$DNSMASQ_PIDFILE_DIR" ]]; then + mkdir -p "$DNSMASQ_PIDFILE_DIR" +fi + +# NOTE(wszumski): This writes the PID of dnsmasq out to a file. The PIDFILE can be used in +# another container to send a signal to dnsmasq to reload its config (providing that the two +# containers share a PID namespace). The concrete use case is for the Ironic PXE filter to +# clean up stale host entries on startup as documented in: +# +# https://docs.openstack.org/ironic/latest/admin/inspection/pxe_filter.html +# +# We cannot use the pid-file option in dnsmasq, since it will only write the PIDFILE if you +# run dnsmasq in its non-forking mode i.e you do use the --no-daemon or --keep-in-foreground +# options. +echo $$ > "$DNSMASQ_PIDFILE" diff --git a/docker/etcd/Dockerfile.j2 b/kolla/docker/etcd/Dockerfile.j2 index f9d0c50f4..aafcd8666 100644 --- a/docker/etcd/Dockerfile.j2 +++ b/kolla/docker/etcd/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block etcd_header %}{% endblock %} diff --git a/docker/etcd/etcd_sudoers b/kolla/docker/etcd/etcd_sudoers index d3e244be0..d3e244be0 100644 --- a/docker/etcd/etcd_sudoers +++ b/kolla/docker/etcd/etcd_sudoers diff --git a/docker/etcd/extend_start.sh b/kolla/docker/etcd/extend_start.sh index c54023299..c54023299 100644 --- a/docker/etcd/extend_start.sh +++ b/kolla/docker/etcd/extend_start.sh diff --git a/docker/fluentd/Dockerfile.j2 b/kolla/docker/fluentd/Dockerfile.j2 index 899b4b6d1..68dd71976 100644 --- a/docker/fluentd/Dockerfile.j2 +++ b/kolla/docker/fluentd/Dockerfile.j2 @@ -3,13 +3,15 @@ FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }} {% set fluentd_user = 'fluentd' %} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" fluentd_binary="fluentd" fluentd_user="{{ fluentd_user }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" fluentd_binary="fluentd" fluentd_user="{{ fluentd_user }}" {% endblock %} {% block fluentd_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {{ macros.enable_extra_repos(['fluentd']) }} {% if base_package_type == 'rpm' %} @@ -58,5 +60,6 @@ COPY extend_start.sh /usr/local/bin/kolla_extend_start {% block fluentd_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} USER {{ fluentd_user }} diff --git a/docker/fluentd/extend_start.sh b/kolla/docker/fluentd/extend_start.sh index 6b304b92c..6b304b92c 100644 --- a/docker/fluentd/extend_start.sh +++ b/kolla/docker/fluentd/extend_start.sh diff --git a/docker/fluentd/fluentd_sudoers b/kolla/docker/fluentd/fluentd_sudoers index 25ca93f5a..25ca93f5a 100644 --- a/docker/fluentd/fluentd_sudoers +++ b/kolla/docker/fluentd/fluentd_sudoers diff --git a/docker/glance/glance-api/Dockerfile.j2 b/kolla/docker/glance/glance-api/Dockerfile.j2 index 992fc0996..ca1820631 100644 --- a/docker/glance/glance-api/Dockerfile.j2 +++ b/kolla/docker/glance/glance-api/Dockerfile.j2 @@ -1,23 +1,28 @@ FROM {{ namespace }}/{{ image_prefix }}glance-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block glance_api_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {% if base_package_type == 'rpm' %} {% set glance_api_packages = [ 'lsscsi', 'device-mapper-multipath', - 'qemu-img' + 'nvme-cli', + 'qemu-img', + 'systemd-udev' ] %} {% elif base_package_type == 'deb' %} {% set glance_api_packages = [ 'lsscsi', 'multipath-tools', 'nfs-common', + 'nvme-cli', 'qemu-utils' ] %} {% endif %} @@ -31,5 +36,6 @@ RUN chmod 644 /usr/local/bin/kolla_glance_extend_start {% block glance_api_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} USER glance diff --git a/docker/glance/glance-api/extend_start.sh b/kolla/docker/glance/glance-api/extend_start.sh index 3363539a5..3363539a5 100644 --- a/docker/glance/glance-api/extend_start.sh +++ b/kolla/docker/glance/glance-api/extend_start.sh diff --git a/docker/glance/glance-base/Dockerfile.j2 b/kolla/docker/glance/glance-base/Dockerfile.j2 index b0de55998..59402e663 100644 --- a/docker/glance/glance-base/Dockerfile.j2 +++ b/kolla/docker/glance/glance-base/Dockerfile.j2 @@ -1,17 +1,20 @@ FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block glance_base_header %}{% endblock %} {% import "macros.j2" as macros with context %} -{{ macros.configure_user(name='glance') }} +{{ macros.kolla_enable_base_repos() }} -{{ macros.enable_extra_repos(['ceph', 'epel']) }} +{{ macros.configure_user(name='glance') }} {% if base_package_type == 'rpm' %} + +{{ macros.enable_extra_repos(['ceph', 'crb', 'epel']) }} + {% set glance_base_packages = [ 'python3-rados', 'python3-rbd' @@ -51,3 +54,4 @@ RUN ln -s glance-base-source/* glance \ {{ macros.kolla_patch_sources() }} {% block glance_base_footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/glance/glance-base/etc/glance/rootwrap.conf b/kolla/docker/glance/glance-base/etc/glance/rootwrap.conf index 56e7529af..56e7529af 100644 --- a/docker/glance/glance-base/etc/glance/rootwrap.conf +++ b/kolla/docker/glance/glance-base/etc/glance/rootwrap.conf diff --git a/docker/glance/glance-base/etc/glance/rootwrap.d/glance_cinder_store.filters b/kolla/docker/glance/glance-base/etc/glance/rootwrap.d/glance_cinder_store.filters index 46c389b7e..46c389b7e 100644 --- a/docker/glance/glance-base/etc/glance/rootwrap.d/glance_cinder_store.filters +++ b/kolla/docker/glance/glance-base/etc/glance/rootwrap.d/glance_cinder_store.filters diff --git a/docker/glance/glance-base/extend_start.sh b/kolla/docker/glance/glance-base/extend_start.sh index 4f5f5ecaf..4f5f5ecaf 100644 --- a/docker/glance/glance-base/extend_start.sh +++ b/kolla/docker/glance/glance-base/extend_start.sh diff --git a/docker/glance/glance-base/glance_sudoers b/kolla/docker/glance/glance-base/glance_sudoers index 9af870983..9af870983 100644 --- a/docker/glance/glance-base/glance_sudoers +++ b/kolla/docker/glance/glance-base/glance_sudoers diff --git a/docker/gnocchi/gnocchi-api/Dockerfile.j2 b/kolla/docker/gnocchi/gnocchi-api/Dockerfile.j2 index 53710e078..c0cc2cc33 100644 --- a/docker/gnocchi/gnocchi-api/Dockerfile.j2 +++ b/kolla/docker/gnocchi/gnocchi-api/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}gnocchi-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block gnocchi_api_header %}{% endblock %} diff --git a/docker/gnocchi/gnocchi-api/extend_start.sh b/kolla/docker/gnocchi/gnocchi-api/extend_start.sh index 84f33e103..dda0461c6 100644 --- a/docker/gnocchi/gnocchi-api/extend_start.sh +++ b/kolla/docker/gnocchi/gnocchi-api/extend_start.sh @@ -6,5 +6,3 @@ if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then sudo -H -u gnocchi gnocchi-upgrade --log-file /var/log/kolla/gnocchi/gnocchi-upgrade.log exit 0 fi - -. /usr/local/bin/kolla_httpd_setup diff --git a/docker/gnocchi/gnocchi-base/Dockerfile.j2 b/kolla/docker/gnocchi/gnocchi-base/Dockerfile.j2 index 865a51da2..abbeb5636 100644 --- a/docker/gnocchi/gnocchi-base/Dockerfile.j2 +++ b/kolla/docker/gnocchi/gnocchi-base/Dockerfile.j2 @@ -1,24 +1,25 @@ FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block gnocchi_base_header %}{% endblock %} {% import "macros.j2" as macros with context %} -{{ macros.configure_user(name='gnocchi') }} +{{ macros.kolla_enable_base_repos() }} -{{ macros.enable_extra_repos(['ceph', 'epel']) }} +{{ macros.configure_user(name='gnocchi') }} {% if base_package_type == 'rpm' %} +{{ macros.enable_extra_repos(['ceph', 'crb', 'epel']) }} + {% set gnocchi_base_packages = [ 'librados2-devel', 'python3-rados', ] %} -RUN mkdir -p /var/www/cgi-bin/gnocchi {% elif base_package_type == 'deb' %} {% set gnocchi_base_packages = [ @@ -55,3 +56,4 @@ RUN ln -s gnocchi-base-source/* gnocchi \ {{ macros.kolla_patch_sources() }} {% block gnocchi_base_footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/gnocchi/gnocchi-base/extend_start.sh b/kolla/docker/gnocchi/gnocchi-base/extend_start.sh index adc05b1b3..adc05b1b3 100644 --- a/docker/gnocchi/gnocchi-base/extend_start.sh +++ b/kolla/docker/gnocchi/gnocchi-base/extend_start.sh diff --git a/docker/gnocchi/gnocchi-base/gnocchi_sudoers b/kolla/docker/gnocchi/gnocchi-base/gnocchi_sudoers index c2a01d709..c2a01d709 100644 --- a/docker/gnocchi/gnocchi-base/gnocchi_sudoers +++ b/kolla/docker/gnocchi/gnocchi-base/gnocchi_sudoers diff --git a/docker/gnocchi/gnocchi-metricd/Dockerfile.j2 b/kolla/docker/gnocchi/gnocchi-metricd/Dockerfile.j2 index 1c0870084..fe9978fa2 100644 --- a/docker/gnocchi/gnocchi-metricd/Dockerfile.j2 +++ b/kolla/docker/gnocchi/gnocchi-metricd/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}gnocchi-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block gnocchi_metricd_header %}{% endblock %} diff --git a/docker/gnocchi/gnocchi-statsd/Dockerfile.j2 b/kolla/docker/gnocchi/gnocchi-statsd/Dockerfile.j2 index 73e6dc0c2..8f1574946 100644 --- a/docker/gnocchi/gnocchi-statsd/Dockerfile.j2 +++ b/kolla/docker/gnocchi/gnocchi-statsd/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}gnocchi-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block gnocchi_statsd_header %}{% endblock %} diff --git a/docker/grafana/Dockerfile.j2 b/kolla/docker/grafana/Dockerfile.j2 index 8574aadc8..a3a2210e5 100644 --- a/docker/grafana/Dockerfile.j2 +++ b/kolla/docker/grafana/Dockerfile.j2 @@ -1,12 +1,14 @@ FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block grafana_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {{ macros.enable_extra_repos(['grafana']) }} {% set grafana_packages = ['grafana'] %} @@ -22,11 +24,14 @@ COPY extend_start.sh /usr/local/bin/kolla_extend_start {% block grafana_plugins_install %} -{% set grafana_default_plugins = ['grafana-opensearch-datasource'] %} +{% set grafana_default_plugins = [ + 'grafana-opensearch-datasource', + 'prometheus' +] %} {% set grafana_plugins = grafana_default_plugins | customizable("plugins") %} {% if grafana_plugins | length > 0 %} -RUN {{ (['grafana-cli plugins install %s'] * grafana_plugins | length ) | join(' && ') | format(*grafana_plugins) }} +RUN {{ (['grafana cli plugins install %s'] * grafana_plugins | length ) | join(' && ') | format(*grafana_plugins) }} {% endif %} {% endblock %} @@ -38,5 +43,6 @@ RUN chmod 750 /etc/sudoers.d \ {% block grafana_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} USER grafana diff --git a/docker/grafana/extend_start.sh b/kolla/docker/grafana/extend_start.sh index 5ed4dc56d..5ed4dc56d 100644 --- a/docker/grafana/extend_start.sh +++ b/kolla/docker/grafana/extend_start.sh diff --git a/docker/grafana/grafana_sudoers b/kolla/docker/grafana/grafana_sudoers index 386829969..386829969 100644 --- a/docker/grafana/grafana_sudoers +++ b/kolla/docker/grafana/grafana_sudoers diff --git a/docker/hacluster/hacluster-base/Dockerfile.j2 b/kolla/docker/hacluster/hacluster-base/Dockerfile.j2 index 7eb7a5965..52d255b88 100644 --- a/docker/hacluster/hacluster-base/Dockerfile.j2 +++ b/kolla/docker/hacluster/hacluster-base/Dockerfile.j2 @@ -1,14 +1,20 @@ FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block hacluster_base_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + +{% if base_package_type =='rpm' %} + {{ macros.enable_extra_repos(['hacluster']) }} +{% endif %} + COPY extend_start.sh /usr/local/bin/kolla_extend_start RUN chmod 644 /usr/local/bin/kolla_extend_start @@ -16,3 +22,4 @@ RUN chmod 644 /usr/local/bin/kolla_extend_start {{ macros.kolla_patch_sources() }} {% block hacluster_base_footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/hacluster/hacluster-base/extend_start.sh b/kolla/docker/hacluster/hacluster-base/extend_start.sh index c0e9301d0..c0e9301d0 100644 --- a/docker/hacluster/hacluster-base/extend_start.sh +++ b/kolla/docker/hacluster/hacluster-base/extend_start.sh diff --git a/docker/hacluster/hacluster-corosync/Dockerfile.j2 b/kolla/docker/hacluster/hacluster-corosync/Dockerfile.j2 index 8e8562913..e8ed1f147 100644 --- a/docker/hacluster/hacluster-corosync/Dockerfile.j2 +++ b/kolla/docker/hacluster/hacluster-corosync/Dockerfile.j2 @@ -1,15 +1,18 @@ FROM {{ namespace }}/{{ image_prefix }}hacluster-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block hacluster_corosync_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {% set hacluster_corosync_packages = ['corosync'] %} {{ macros.install_packages(hacluster_corosync_packages | customizable("packages")) }} {{ macros.kolla_patch_sources() }} {% block hacluster_corosync_footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/hacluster/hacluster-pacemaker-remote/Dockerfile.j2 b/kolla/docker/hacluster/hacluster-pacemaker-remote/Dockerfile.j2 index da4337a24..a6bf2a7d4 100644 --- a/docker/hacluster/hacluster-pacemaker-remote/Dockerfile.j2 +++ b/kolla/docker/hacluster/hacluster-pacemaker-remote/Dockerfile.j2 @@ -1,12 +1,14 @@ FROM {{ namespace }}/{{ image_prefix }}hacluster-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block hacluster_pacemaker_remote_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {% set hacluster_pacemaker_remote_packages = ['pacemaker-remote'] %} {% if base_package_type == 'deb' %} {% set hacluster_pacemaker_remote_packages = hacluster_pacemaker_remote_packages + [ @@ -19,3 +21,4 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.kolla_patch_sources() }} {% block hacluster_pacemaker_remote_footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/hacluster/hacluster-pacemaker/Dockerfile.j2 b/kolla/docker/hacluster/hacluster-pacemaker/Dockerfile.j2 index def59ce84..e3c38fbb8 100644 --- a/docker/hacluster/hacluster-pacemaker/Dockerfile.j2 +++ b/kolla/docker/hacluster/hacluster-pacemaker/Dockerfile.j2 @@ -1,12 +1,14 @@ FROM {{ namespace }}/{{ image_prefix }}hacluster-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block hacluster_pacemaker_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {% set hacluster_pacemaker_packages = ['pacemaker'] %} {% if base_package_type == 'deb' %} {% set hacluster_pacemaker_packages = hacluster_pacemaker_packages + [ @@ -19,3 +21,4 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.kolla_patch_sources() }} {% block hacluster_pacemaker_footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/hacluster/hacluster-pcs/Dockerfile.j2 b/kolla/docker/hacluster/hacluster-pcs/Dockerfile.j2 index 8a57babd3..c744ad68c 100644 --- a/docker/hacluster/hacluster-pcs/Dockerfile.j2 +++ b/kolla/docker/hacluster/hacluster-pcs/Dockerfile.j2 @@ -1,15 +1,18 @@ FROM {{ namespace }}/{{ image_prefix }}hacluster-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block hacluster_pcs_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {% set hacluster_pcs_packages = ['pcs','crmsh'] %} {{ macros.install_packages(hacluster_pcs_packages | customizable("packages")) }} {{ macros.kolla_patch_sources() }} {% block hacluster_pcs_footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/haproxy/haproxy-ssh/Dockerfile.j2 b/kolla/docker/haproxy/haproxy-ssh/Dockerfile.j2 index c5b8391a4..dda1c9d6f 100644 --- a/docker/haproxy/haproxy-ssh/Dockerfile.j2 +++ b/kolla/docker/haproxy/haproxy-ssh/Dockerfile.j2 @@ -1,12 +1,14 @@ FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block haproxy_ssh_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {{ macros.configure_user(name='haproxy', shell='/bin/bash') }} {% if base_package_type == 'rpm' %} @@ -40,3 +42,4 @@ COPY update-loadbalancer-cert.sh /usr/bin/update-loadbalancer-cert {% block haproxy_ssh_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/haproxy/haproxy-ssh/extend_start.sh b/kolla/docker/haproxy/haproxy-ssh/extend_start.sh index 421e4bd6f..4b2239100 100644 --- a/docker/haproxy/haproxy-ssh/extend_start.sh +++ b/kolla/docker/haproxy/haproxy-ssh/extend_start.sh @@ -1,6 +1,6 @@ #!/bin/bash -SSH_HOST_KEY_TYPES=( "rsa" "dsa" "ecdsa" "ed25519" ) +SSH_HOST_KEY_TYPES=( "rsa" "ecdsa" "ed25519" ) for key_type in ${SSH_HOST_KEY_TYPES[@]}; do KEY_PATH=/etc/ssh/ssh_host_${key_type}_key diff --git a/docker/haproxy/haproxy-ssh/update-loadbalancer-cert.sh b/kolla/docker/haproxy/haproxy-ssh/update-loadbalancer-cert.sh index 7e4122c65..7e4122c65 100755 --- a/docker/haproxy/haproxy-ssh/update-loadbalancer-cert.sh +++ b/kolla/docker/haproxy/haproxy-ssh/update-loadbalancer-cert.sh diff --git a/docker/haproxy/haproxy/Dockerfile.j2 b/kolla/docker/haproxy/haproxy/Dockerfile.j2 index 24567679f..aed0615fe 100644 --- a/docker/haproxy/haproxy/Dockerfile.j2 +++ b/kolla/docker/haproxy/haproxy/Dockerfile.j2 @@ -1,12 +1,14 @@ FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block haproxy_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {{ macros.configure_user(name='haproxy') }} {% set haproxy_packages = [ @@ -24,3 +26,4 @@ RUN mkdir -p /var/lib/kolla/haproxy \ {% block haproxy_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/haproxy/haproxy/ensure_latest_config.sh b/kolla/docker/haproxy/haproxy/ensure_latest_config.sh index 4b84f3aed..4b84f3aed 100644 --- a/docker/haproxy/haproxy/ensure_latest_config.sh +++ b/kolla/docker/haproxy/haproxy/ensure_latest_config.sh diff --git a/docker/heat/heat-api-cfn/Dockerfile.j2 b/kolla/docker/heat/heat-api-cfn/Dockerfile.j2 index 0384b7a56..db3030c8d 100644 --- a/docker/heat/heat-api-cfn/Dockerfile.j2 +++ b/kolla/docker/heat/heat-api-cfn/Dockerfile.j2 @@ -1,15 +1,12 @@ FROM {{ namespace }}/{{ image_prefix }}heat-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block heat_api_cfn_header %}{% endblock %} {% import "macros.j2" as macros with context %} -COPY extend_start.sh /usr/local/bin/kolla_heat_extend_start -RUN chmod 644 /usr/local/bin/kolla_heat_extend_start - {{ macros.kolla_patch_sources() }} {% block heat_api_cfn_footer %}{% endblock %} diff --git a/docker/heat/heat-api/Dockerfile.j2 b/kolla/docker/heat/heat-api/Dockerfile.j2 index 82c0d1e86..af2471279 100644 --- a/docker/heat/heat-api/Dockerfile.j2 +++ b/kolla/docker/heat/heat-api/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}heat-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block heat_api_header %}{% endblock %} diff --git a/docker/heat/heat-api/extend_start.sh b/kolla/docker/heat/heat-api/extend_start.sh index ba5f1450d..ddf4f81f4 100644 --- a/docker/heat/heat-api/extend_start.sh +++ b/kolla/docker/heat/heat-api/extend_start.sh @@ -15,5 +15,3 @@ if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then exit 0 fi - -. /usr/local/bin/kolla_httpd_setup diff --git a/docker/heat/heat-base/Dockerfile.j2 b/kolla/docker/heat/heat-base/Dockerfile.j2 index 59d6aabb8..65afe31fb 100644 --- a/docker/heat/heat-base/Dockerfile.j2 +++ b/kolla/docker/heat/heat-base/Dockerfile.j2 @@ -1,15 +1,22 @@ FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block heat_base_header %}{% endblock %} {% import "macros.j2" as macros with context %} -{{ macros.enable_extra_repos(['openvswitch']) }} +{{ macros.kolla_enable_base_repos() }} + {{ macros.configure_user(name='heat') }} +{% if base_package_type == 'rpm' %} + +{{ macros.enable_extra_repos(['openvswitch']) }} + +{% endif %} + {% set heat_base_packages = [ ] %} @@ -34,3 +41,4 @@ RUN ln -s heat-base-source/* heat \ {{ macros.kolla_patch_sources() }} {% block heat_base_footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/heat/heat-base/extend_start.sh b/kolla/docker/heat/heat-base/extend_start.sh index 1c1e86b8e..1c1e86b8e 100644 --- a/docker/heat/heat-base/extend_start.sh +++ b/kolla/docker/heat/heat-base/extend_start.sh diff --git a/docker/heat/heat-engine/Dockerfile.j2 b/kolla/docker/heat/heat-engine/Dockerfile.j2 index 87a7c8c91..86c943582 100644 --- a/docker/heat/heat-engine/Dockerfile.j2 +++ b/kolla/docker/heat/heat-engine/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}heat-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block heat_engine_header %}{% endblock %} diff --git a/docker/horizon/Dockerfile.j2 b/kolla/docker/horizon/Dockerfile.j2 index d73e5702d..6e0e8e84e 100644 --- a/docker/horizon/Dockerfile.j2 +++ b/kolla/docker/horizon/Dockerfile.j2 @@ -1,12 +1,14 @@ FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block horizon_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {{ macros.configure_user(name='horizon') }} {% if base_package_type == 'rpm' %} @@ -26,17 +28,14 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.install_packages(horizon_packages | customizable("packages")) }} -{% block horizon_ubuntu_source_setup %} -RUN ln -s ../mods-available/headers.load /etc/apache2/mods-enabled/headers.load -{% endblock %} - {% endif %} ADD horizon-archive /horizon-source ADD plugins-archive / {% set horizon_pip_packages = [ - '/horizon' + '/horizon', + 'django_redis' ] %} {% set horizon_plugins_pip_packages = [ @@ -49,9 +48,7 @@ COPY extend_start.sh /usr/local/bin/kolla_extend_start # NOTE(kevko): This dance with local settings python paths below is needed # because we are using different distros with different python version and we need to # know to which path symlink should point to. -# NOTE(mnasiadka): pinning setuptools due to https://bugs.launchpad.net/horizon/+bug/2007574 RUN ln -s horizon-source/* horizon \ - && {{ macros.install_pip(['setuptools==67.2.*']) }} \ && {{ macros.upper_constraints_remove("horizon") }} \ && {{ macros.install_pip(horizon_pip_packages | customizable("pip_packages")) }} \ && mkdir -p /etc/openstack-dashboard \ @@ -77,3 +74,4 @@ RUN ln -s horizon-source/* horizon \ {% block horizon_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/horizon/extend_start.sh b/kolla/docker/horizon/extend_start.sh index 41695a9d5..d1198adb4 100644 --- a/docker/horizon/extend_start.sh +++ b/kolla/docker/horizon/extend_start.sh @@ -172,14 +172,6 @@ function config_trove_dashboard { done } -function config_venus_dashboard { - for file in ${SITE_PACKAGES}/venus_dashboard/enabled/_*[^__].py; do - config_dashboard "${ENABLE_VENUS:-no}" \ - "${SITE_PACKAGES}/venus_dashboard/enabled/${file##*/}" \ - "${SITE_PACKAGES}/openstack_dashboard/local/enabled/${file##*/}" - done -} - function config_watcher_dashboard { for file in ${SITE_PACKAGES}/watcher_dashboard/local/enabled/_*[^__].py; do config_dashboard "${ENABLE_WATCHER:-no}" \ @@ -192,14 +184,6 @@ function config_watcher_dashboard { "/etc/openstack-dashboard/watcher_policy.json" } -function config_zun_dashboard { - for file in ${SITE_PACKAGES}/zun_ui/enabled/_*[^__].py; do - config_dashboard "${ENABLE_ZUN:-no}" \ - "${SITE_PACKAGES}/zun_ui/enabled/${file##*/}" \ - "${SITE_PACKAGES}/openstack_dashboard/local/enabled/${file##*/}" - done -} - # Regenerate the compressed javascript and css if any configuration files have # changed. Use a static modification date when generating the tarball # so that we only trigger on content changes. @@ -209,7 +193,8 @@ function settings_bundle { tar -cf- --mtime=1970-01-01 \ /etc/openstack-dashboard/local_settings \ /etc/openstack-dashboard/custom_local_settings \ - /etc/openstack-dashboard/local_settings.d 2> /dev/null || true + /etc/openstack-dashboard/local_settings.d \ + /etc/openstack-dashboard/themes 2> /dev/null || true } function settings_changed { @@ -236,9 +221,7 @@ config_neutron_vpnaas_dashboard config_octavia_dashboard config_tacker_dashboard config_trove_dashboard -config_venus_dashboard config_watcher_dashboard -config_zun_dashboard if settings_changed; then ${MANAGE_PY} collectstatic --noinput --clear @@ -263,5 +246,3 @@ fi if [[ -f ${SITE_PACKAGES}/openstack_dashboard/local/.secret_key_store ]] && [[ $(stat -c %U ${SITE_PACKAGES}/openstack_dashboard/local/.secret_key_store) != "horizon" ]]; then chown horizon ${SITE_PACKAGES}/openstack_dashboard/local/.secret_key_store fi - -. /usr/local/bin/kolla_httpd_setup diff --git a/kolla/docker/httpd/Dockerfile.j2 b/kolla/docker/httpd/Dockerfile.j2 new file mode 100644 index 000000000..3c86c57b7 --- /dev/null +++ b/kolla/docker/httpd/Dockerfile.j2 @@ -0,0 +1,46 @@ +FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }} +{% block labels %} +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" +{% endblock %} + +{% block apache_header %}{% endblock %} + +{% import "macros.j2" as macros with context %} + +{{ macros.kolla_enable_base_repos() }} + +{% if base_package_type == 'rpm' %} +{{ macros.enable_extra_repos(['epel']) }} + {% set apache_packages = [ + 'httpd', + 'mod_ssl', + 'mod_auth_mellon', + 'mod_auth_openidc', + 'mod_proxy_uwsgi' + ] %} +{% elif base_package_type == 'deb' %} + {% set apache_packages = [ + 'apache2', + 'ca-certificates', + 'libapache2-mod-auth-mellon', + 'libapache2-mod-auth-openidc' + ] %} +{% endif %} + +{{ macros.install_packages(apache_packages | customizable("packages")) }} + +{% if base_package_type == 'rpm' %} +RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ + && sed -i -r 's,^(Listen 443),#\1,' /etc/httpd/conf.d/ssl.conf +{% elif base_package_type == 'deb' %} +RUN echo > /etc/apache2/ports.conf +{% endif %} + +COPY extend_start.sh /usr/local/bin/kolla_extend_start +COPY httpd_setup.sh /usr/local/bin/kolla_httpd_setup +RUN chmod 644 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_httpd_setup +{{ macros.kolla_patch_sources() }} +USER root + +{% block apache_footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/heat/heat-api-cfn/extend_start.sh b/kolla/docker/httpd/extend_start.sh index c55f0b199..d47af64b9 100644 --- a/docker/heat/heat-api-cfn/extend_start.sh +++ b/kolla/docker/httpd/extend_start.sh @@ -1,3 +1 @@ -#!/bin/bash - . /usr/local/bin/kolla_httpd_setup diff --git a/docker/base/httpd_setup.sh b/kolla/docker/httpd/httpd_setup.sh index 35f7b5b1e..5188c5518 100644 --- a/docker/base/httpd_setup.sh +++ b/kolla/docker/httpd/httpd_setup.sh @@ -17,7 +17,7 @@ if [[ "$(whoami)" == 'root' ]]; then rm -rf /var/run/apache2/* else rm -rf /var/run/httpd/* /run/httpd/* /tmp/httpd* - # NOTE(mmalchuk): This added to make Rocky/Centos similar to Ubuntu/Debian + # NOTE(mmalchuk): This added to make Rocky similar to Ubuntu/Debian # to provide /server-status handler for local monitoring of the Apache. # The module already loaded in the /etc/httpd/conf.modules.d/00-base.conf. cat << EOF >/etc/httpd/conf.modules.d/99-server-status.conf @@ -28,13 +28,13 @@ if [[ "$(whoami)" == 'root' ]]; then EOF fi - # CentOS/Rocky have an issue with mod_ssl which produces an invalid Apache + # Rocky have an issue with mod_ssl which produces an invalid Apache # configuration in /etc/httpd/conf.d/ssl.conf. This causes the following error # on startup: # SSLCertificateFile: file '/etc/pki/tls/certs/localhost.crt' does not exist or is empty # Work around this by generating certificates manually. # NOTE(mnasiadka): in EL9 upgrade jobs gencerts is failing on wrong permissions to dhparams.pem - if [[ "${KOLLA_BASE_DISTRO}" =~ centos|rocky ]] && [[ ! -e /etc/pki/tls/certs/localhost.crt ]]; then + if [[ "${KOLLA_BASE_DISTRO}" =~ rocky ]] && [[ ! -e /etc/pki/tls/certs/localhost.crt ]]; then rm -f /tmp/dhparams.pem /usr/libexec/httpd-ssl-gencerts fi diff --git a/docker/ironic/ironic-api/Dockerfile.j2 b/kolla/docker/ironic/ironic-api/Dockerfile.j2 index a2406fb83..f5337f04a 100644 --- a/docker/ironic/ironic-api/Dockerfile.j2 +++ b/kolla/docker/ironic/ironic-api/Dockerfile.j2 @@ -1,12 +1,14 @@ FROM {{ namespace }}/{{ image_prefix }}ironic-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block ironic_api_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {% set ironic_api_packages = [ ] %} {{ macros.install_packages(ironic_api_packages | customizable("packages")) }} @@ -18,3 +20,4 @@ RUN chmod 644 /usr/local/bin/kolla_ironic_extend_start {% block ironic_api_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/ironic/ironic-api/extend_start.sh b/kolla/docker/ironic/ironic-api/extend_start.sh index b03feb65d..ce2f7fb3e 100644 --- a/docker/ironic/ironic-api/extend_start.sh +++ b/kolla/docker/ironic/ironic-api/extend_start.sh @@ -17,5 +17,3 @@ if [[ "${!KOLLA_OSM[@]}" ]]; then ironic-dbsync online_data_migrations exit 0 fi - -. /usr/local/bin/kolla_httpd_setup diff --git a/docker/ironic/ironic-base/Dockerfile.j2 b/kolla/docker/ironic/ironic-base/Dockerfile.j2 index 86f1d7014..7696d2911 100644 --- a/docker/ironic/ironic-base/Dockerfile.j2 +++ b/kolla/docker/ironic/ironic-base/Dockerfile.j2 @@ -1,19 +1,21 @@ FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block ironic_base_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {{ macros.configure_user(name='ironic', shell='/bin/bash') }} ADD ironic-base-archive /ironic-base-source ADD ironic_sudoers /etc/sudoers.d/kolla_ironic_sudoers {% set ironic_base_pip_packages = [ - '/ironic' + '/ironic[ansible,networking-generic-switch]' ] %} COPY extend_start.sh /usr/local/bin/kolla_extend_start @@ -30,3 +32,4 @@ RUN ln -s ironic-base-source/* ironic \ {{ macros.kolla_patch_sources() }} {% block ironic_base_footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/ironic/ironic-base/extend_start.sh b/kolla/docker/ironic/ironic-base/extend_start.sh index dc6b05caa..dc6b05caa 100644 --- a/docker/ironic/ironic-base/extend_start.sh +++ b/kolla/docker/ironic/ironic-base/extend_start.sh diff --git a/docker/ironic/ironic-base/ironic_sudoers b/kolla/docker/ironic/ironic-base/ironic_sudoers index 9b9deed4d..9b9deed4d 100644 --- a/docker/ironic/ironic-base/ironic_sudoers +++ b/kolla/docker/ironic/ironic-base/ironic_sudoers diff --git a/docker/ironic/ironic-conductor/Dockerfile.j2 b/kolla/docker/ironic/ironic-conductor/Dockerfile.j2 index 874a0b81f..ca0afd0cb 100644 --- a/docker/ironic/ironic-conductor/Dockerfile.j2 +++ b/kolla/docker/ironic/ironic-conductor/Dockerfile.j2 @@ -1,12 +1,14 @@ FROM {{ namespace }}/{{ image_prefix }}ironic-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block ironic_conductor_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {% if base_package_type == 'rpm' %} {% set ironic_conductor_packages = [ 'dosfstools', @@ -23,7 +25,8 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'systemd-udev', 'util-linux', 'xfsprogs', - 'xorriso' + 'xorriso', + 'zstd' ] %} {% if base_arch in ['x86_64'] %} {% set ironic_conductor_packages = ironic_conductor_packages + [ @@ -48,11 +51,11 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'shellinabox', 'udev', 'xfsprogs', + 'zstd' ] %} {% endif %} {% set ironic_conductor_pip_packages = [ - '-r /ironic/driver-requirements.txt', 'ironic-staging-drivers', ] %} @@ -72,5 +75,6 @@ RUN {{ macros.install_pip(ironic_conductor_pip_packages | customizable("pip_pack {% block ironic_conductor_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} USER ironic diff --git a/kolla/docker/ironic/ironic-prometheus-exporter/Dockerfile.j2 b/kolla/docker/ironic/ironic-prometheus-exporter/Dockerfile.j2 new file mode 100644 index 000000000..2ac448dfd --- /dev/null +++ b/kolla/docker/ironic/ironic-prometheus-exporter/Dockerfile.j2 @@ -0,0 +1,17 @@ +FROM {{ namespace }}/{{ image_prefix }}ironic-conductor:{{ tag }} +{% block labels %} +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" +{% endblock %} + +USER root + +{% block ironic_prometheus_exporter_header %}{% endblock %} + +{% import "macros.j2" as macros with context %} + +ENV IRONIC_CONFIG /etc/ironic/ironic.conf + +{{ macros.kolla_patch_sources() }} + +{% block ironic_prometheus_exporter_footer %}{% endblock %} +{% block footer %}{% endblock %} diff --git a/kolla/docker/ironic/ironic-pxe-filter/Dockerfile.j2 b/kolla/docker/ironic/ironic-pxe-filter/Dockerfile.j2 new file mode 100644 index 000000000..717c7849c --- /dev/null +++ b/kolla/docker/ironic/ironic-pxe-filter/Dockerfile.j2 @@ -0,0 +1,27 @@ +FROM {{ namespace }}/{{ image_prefix }}ironic-base:{{ tag }} +{% block labels %} +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" +{% endblock %} + +{% block ironic_pxe_filter_header %}{% endblock %} + +{% import "macros.j2" as macros with context %} + +{{ macros.kolla_enable_base_repos() }} + +{% set ironic_pxe_filter_packages = [] %} + +{% set ironic_pxe_filter_pip_packages = [] %} + +RUN {{ macros.install_pip(ironic_pxe_filter_pip_packages | customizable("pip_packages")) }} + +{{ macros.install_packages(ironic_pxe_filter_packages | customizable("packages")) }} + +{{ macros.kolla_patch_sources() }} + +COPY extend_start.sh /usr/local/bin/kolla_ironic_extend_start +RUN chmod 644 /usr/local/bin/kolla_ironic_extend_start + +{% block ironic_pxe_filter_footer %}{% endblock %} +{% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/kolla/docker/ironic/ironic-pxe-filter/extend_start.sh b/kolla/docker/ironic/ironic-pxe-filter/extend_start.sh new file mode 100644 index 000000000..c7a807c8d --- /dev/null +++ b/kolla/docker/ironic/ironic-pxe-filter/extend_start.sh @@ -0,0 +1,6 @@ +#!/bin/bash +IRONIC_DHCP_HOSTS_DIR=${IRONIC_DHCP_HOSTS_DIR:-/etc/dnsmasq/dhcp-hostsdir} +DNSMASQ_PIDFILE=${DNSMASQ_PIDFILE:-/run/ironic/dnsmasq.pid} + +# NOTE(wszumski): This container must be in same process namespace as dnsmasq +rm -f $IRONIC_DHCP_HOSTS_DIR/* && kill -HUP $(cat "$DNSMASQ_PIDFILE") || true diff --git a/docker/ironic/ironic-pxe/Dockerfile.j2 b/kolla/docker/ironic/ironic-pxe/Dockerfile.j2 index 6a2131de6..f198e3292 100644 --- a/docker/ironic/ironic-pxe/Dockerfile.j2 +++ b/kolla/docker/ironic/ironic-pxe/Dockerfile.j2 @@ -1,12 +1,14 @@ FROM {{ namespace }}/{{ image_prefix }}ironic-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block ironic_pxe_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {% if base_package_type == 'rpm' %} {% set ironic_pxe_packages = [ 'dosfstools', @@ -17,15 +19,10 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'ipxe-bootimgs-aarch64', 'mtools', 'shim-*64', + 'syslinux-tftpboot', 'tftp-server', ] %} - {% if base_arch in ['x86_64'] %} - {% set ironic_pxe_packages = ironic_pxe_packages + [ - 'syslinux-tftpboot' - ] %} - {% endif %} - {{ macros.install_packages(ironic_pxe_packages | customizable("packages")) }} {% elif base_package_type == 'deb' %} {% set ironic_pxe_packages = [ @@ -58,3 +55,4 @@ RUN chmod 644 /usr/local/bin/kolla_ironic_extend_start {% block ironic_pxe_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/ironic/ironic-pxe/extend_start.sh b/kolla/docker/ironic/ironic-pxe/extend_start.sh index 07652b803..e6100247d 100644 --- a/docker/ironic/ironic-pxe/extend_start.sh +++ b/kolla/docker/ironic/ironic-pxe/extend_start.sh @@ -7,7 +7,7 @@ function prepare_pxe_pxelinux { cp /usr/lib/PXELINUX/pxelinux.0 \ /usr/lib/syslinux/modules/bios/{chain.c32,ldlinux.c32} \ ${TFTPBOOT_PATH}/ - elif [[ "${KOLLA_BASE_DISTRO}" =~ centos|rocky ]]; then + elif [[ "${KOLLA_BASE_DISTRO}" =~ rocky ]]; then if [[ "${TFTPBOOT_PATH}" != /tftpboot ]]; then cp /tftpboot/{pxelinux.0,chain.c32,ldlinux.c32} \ ${TFTPBOOT_PATH}/ @@ -20,7 +20,7 @@ function prepare_pxe_grub { if [[ "${KOLLA_BASE_DISTRO}" =~ debian|ubuntu ]]; then shim_src_file="/usr/lib/shim/shim*64.efi.signed" grub_src_file="/usr/lib/grub/*-efi-signed/grubnet*64.efi.signed" - elif [[ "${KOLLA_BASE_DISTRO}" =~ centos|rocky ]]; then + elif [[ "${KOLLA_BASE_DISTRO}" =~ rocky ]]; then shim_src_file="/boot/efi/EFI/${KOLLA_BASE_DISTRO}/shim*64.efi" grub_src_file="/boot/efi/EFI/${KOLLA_BASE_DISTRO}/grub*64.efi" fi @@ -46,20 +46,13 @@ function prepare_ipxe { # NOTE(m-anson): ipxe-arm64.efi is not symlinked from /boot to # /usr/lib/ipxe by the Ubuntu ipxe package, so fix that here. if [[ -e /boot/ipxe-arm64.efi ]]; then - ln -s /boot/ipxe-arm64.efi /usr/lib/ipxe/ + ln -sf /boot/ipxe-arm64.efi /usr/lib/ipxe/ fi cp /usr/lib/ipxe/{undionly.kpxe,ipxe*.efi,snponly.efi} ${TFTPBOOT_PATH}/ - elif [[ "${KOLLA_BASE_DISTRO}" =~ centos|rocky ]]; then - cp /usr/share/ipxe/{undionly.kpxe,ipxe*.efi} ${TFTPBOOT_PATH}/ + elif [[ "${KOLLA_BASE_DISTRO}" =~ rocky ]]; then + cp /usr/share/ipxe/{undionly.kpxe,ipxe-snponly-x86_64.efi} ${TFTPBOOT_PATH}/ cp /usr/share/ipxe/arm64-efi/snponly.efi ${TFTPBOOT_PATH}/ipxe-snponly-aarch64.efi - if [[ ! -e ${TFTPBOOT_PATH}/ipxe.efi ]]; then - # NOTE(m-anson): No ipxe-aarch64.efi exists so no need to use - # $KOLLA_BASE_ARCH in the symlink target - ln -s ${TFTPBOOT_PATH}/ipxe-x86_64.efi ${TFTPBOOT_PATH}/ipxe.efi - fi - if [[ ! -e ${TFTPBOOT_PATH}/snponly.efi ]]; then - ln -s ${TFTPBOOT_PATH}/ipxe-snponly-${KOLLA_BASE_ARCH}.efi ${TFTPBOOT_PATH}/snponly.efi - fi + ln -sf ${TFTPBOOT_PATH}/ipxe-snponly-${KOLLA_BASE_ARCH}.efi ${TFTPBOOT_PATH}/snponly.efi fi } @@ -70,7 +63,7 @@ function prepare_esp_image { if [[ "${KOLLA_BASE_DISTRO}" =~ debian|ubuntu ]]; then shim_src_file="/usr/lib/shim/shim*64.efi.signed" grub_src_file="/usr/lib/grub/*-efi-signed/grubnet*64.efi.signed" - elif [[ "${KOLLA_BASE_DISTRO}" =~ centos|rocky ]]; then + elif [[ "${KOLLA_BASE_DISTRO}" =~ rocky ]]; then shim_src_file="/boot/efi/EFI/${KOLLA_BASE_DISTRO}/shim*64.efi" grub_src_file="/boot/efi/EFI/${KOLLA_BASE_DISTRO}/grub*64.efi" fi @@ -106,5 +99,3 @@ fi # Template out a TFTP map file, using the TFTPBOOT_PATH variable. envsubst < /map-file-template > /map-file - -. /usr/local/bin/kolla_httpd_setup diff --git a/docker/ironic/ironic-pxe/tftp-map-file-template b/kolla/docker/ironic/ironic-pxe/tftp-map-file-template index 5d3243a7e..5d3243a7e 100644 --- a/docker/ironic/ironic-pxe/tftp-map-file-template +++ b/kolla/docker/ironic/ironic-pxe/tftp-map-file-template diff --git a/docker/iscsid/Dockerfile.j2 b/kolla/docker/iscsid/Dockerfile.j2 index 869b832fa..d4f41463c 100644 --- a/docker/iscsid/Dockerfile.j2 +++ b/kolla/docker/iscsid/Dockerfile.j2 @@ -1,12 +1,14 @@ FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block iscsid_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {% if base_package_type == 'rpm' %} {% set iscsid_packages = [ 'iscsi-initiator-utils', @@ -26,7 +28,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.install_packages(iscsid_packages | customizable("packages")) }} COPY extend_start.sh /usr/local/bin/kolla_extend_start -# NOTE(hrw): CentOS Stream 9 lacks initiatorname.iscsi file +# NOTE(hrw): Rocky Linux lacks initiatorname.iscsi file RUN chmod 644 /usr/local/bin/kolla_extend_start \ && rm -f /etc/iscsi/initiatorname.iscsi @@ -34,3 +36,4 @@ RUN chmod 644 /usr/local/bin/kolla_extend_start \ {% block iscsid_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/iscsid/extend_start.sh b/kolla/docker/iscsid/extend_start.sh index 78f2317d2..78f2317d2 100644 --- a/docker/iscsid/extend_start.sh +++ b/kolla/docker/iscsid/extend_start.sh diff --git a/docker/keepalived/Dockerfile.j2 b/kolla/docker/keepalived/Dockerfile.j2 index 006ac9d85..93b8218c8 100644 --- a/docker/keepalived/Dockerfile.j2 +++ b/kolla/docker/keepalived/Dockerfile.j2 @@ -1,19 +1,25 @@ FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block keepalived_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + +{{ macros.enable_extra_repos(['mariadb']) }} + {% if base_package_type == 'rpm' %} {% set keepalived_packages = [ - 'keepalived' + 'keepalived', + 'MariaDB-client' ] %} {% elif base_package_type == 'deb' %} {% set keepalived_packages = [ - 'keepalived' + 'keepalived', + 'mariadb-client' ] %} {% endif %} {{ macros.install_packages(keepalived_packages | customizable("packages")) }} @@ -28,3 +34,4 @@ RUN chmod 644 /usr/local/bin/kolla_extend_start \ {% block keepalived_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/keepalived/check_alive.sh b/kolla/docker/keepalived/check_alive.sh index 857131123..857131123 100644 --- a/docker/keepalived/check_alive.sh +++ b/kolla/docker/keepalived/check_alive.sh diff --git a/docker/keepalived/extend_start.sh b/kolla/docker/keepalived/extend_start.sh index 889da64fd..889da64fd 100644 --- a/docker/keepalived/extend_start.sh +++ b/kolla/docker/keepalived/extend_start.sh diff --git a/kolla/docker/kerbside/kerbside-api/Dockerfile.j2 b/kolla/docker/kerbside/kerbside-api/Dockerfile.j2 new file mode 100644 index 000000000..28557fe52 --- /dev/null +++ b/kolla/docker/kerbside/kerbside-api/Dockerfile.j2 @@ -0,0 +1,11 @@ +FROM {{ namespace }}/{{ image_prefix }}kerbside-base:{{ tag }} +{% block labels %} +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" +{% endblock %} + +{% import "macros.j2" as macros with context %} + +COPY extend_start.sh /usr/local/bin/kolla_extend_start +RUN chmod 644 /usr/local/bin/kolla_extend_start +{{ macros.kolla_patch_sources() }} +USER kerbside diff --git a/kolla/docker/kerbside/kerbside-api/extend_start.sh b/kolla/docker/kerbside/kerbside-api/extend_start.sh new file mode 100644 index 000000000..92ef80a22 --- /dev/null +++ b/kolla/docker/kerbside/kerbside-api/extend_start.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +# Make the log directory +mkdir -p /var/log/kolla/kerbside diff --git a/kolla/docker/kerbside/kerbside-base/Dockerfile.j2 b/kolla/docker/kerbside/kerbside-base/Dockerfile.j2 new file mode 100644 index 000000000..bc181258f --- /dev/null +++ b/kolla/docker/kerbside/kerbside-base/Dockerfile.j2 @@ -0,0 +1,42 @@ +FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} +{% block labels %} +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" +{% endblock %} + +{% block kerbside_base_header %}{% endblock %} + +{% import "macros.j2" as macros with context %} + +{{ macros.kolla_enable_base_repos() }} + +{{ macros.configure_user(name='kerbside', groups='kerbside') }} + +{% if base_package_type == 'rpm' %} + {% set kerbside_packages = [ + 'mariadb-devel', + 'pkgconfig' + ] %} +{% elif base_package_type == 'deb' %} + {% set kerbside_packages = [ + 'libmariadb-dev-compat', + 'pkg-config' + ] %} +{% endif %} + +{{ macros.install_packages(kerbside_packages | customizable("packages")) }} + +{% set kerbside_pip_packages = [ + '/kerbside' +] %} + +ADD kerbside-base-archive /kerbside-source +RUN ln -s kerbside-source/* kerbside \ + && if [ "$(ls /plugins)" ]; then \ + {{ macros.install_pip(kerbside_plugins_pip_packages) }}; \ + fi \ + && {{ macros.install_pip(kerbside_pip_packages | customizable("pip_packages"), false) }} \ + && rm -f /etc/machine-id + +{{ macros.kolla_patch_sources() }} +{% block kerbside_base_footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/kolla/docker/kerbside/kerbside-proxy/Dockerfile.j2 b/kolla/docker/kerbside/kerbside-proxy/Dockerfile.j2 new file mode 100644 index 000000000..28557fe52 --- /dev/null +++ b/kolla/docker/kerbside/kerbside-proxy/Dockerfile.j2 @@ -0,0 +1,11 @@ +FROM {{ namespace }}/{{ image_prefix }}kerbside-base:{{ tag }} +{% block labels %} +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" +{% endblock %} + +{% import "macros.j2" as macros with context %} + +COPY extend_start.sh /usr/local/bin/kolla_extend_start +RUN chmod 644 /usr/local/bin/kolla_extend_start +{{ macros.kolla_patch_sources() }} +USER kerbside diff --git a/kolla/docker/kerbside/kerbside-proxy/extend_start.sh b/kolla/docker/kerbside/kerbside-proxy/extend_start.sh new file mode 100644 index 000000000..92ef80a22 --- /dev/null +++ b/kolla/docker/kerbside/kerbside-proxy/extend_start.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +# Make the log directory +mkdir -p /var/log/kolla/kerbside diff --git a/docker/keystone/keystone-base/Dockerfile.j2 b/kolla/docker/keystone/keystone-base/Dockerfile.j2 index 128c84148..82c90e6f6 100644 --- a/docker/keystone/keystone-base/Dockerfile.j2 +++ b/kolla/docker/keystone/keystone-base/Dockerfile.j2 @@ -1,29 +1,27 @@ FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block keystone_base_header %}{% endblock %} {% import "macros.j2" as macros with context %} -{# NOTE(mnasiadka): mod_auth_mellon missing in CentOS 10 Stream - temporarily from Kolla COPR #} -{{ macros.enable_extra_repos(['epel', 'kolla_el10']) }} +{{ macros.kolla_enable_base_repos() }} {{ macros.configure_user(name='keystone') }} {% if base_package_type == 'rpm' %} + +{{ macros.enable_extra_repos(['epel']) }} + {% set keystone_base_packages = [ 'cyrus-sasl-devel', - 'mod_auth_mellon', - 'mod_auth_openidc', 'openldap-devel', ] %} {% elif base_package_type == 'deb' %} {% set keystone_base_packages = [ - 'libapache2-mod-auth-mellon', - 'libapache2-mod-auth-openidc', 'libldap-common', 'libldap2-dev', 'libsasl2-dev', @@ -33,7 +31,6 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% block keystone_source_install %} ADD keystone-base-archive /keystone-base-source -ADD wsgi /var/lib/kolla/venv/bin/keystone-wsgi-public {% set keystone_base_pip_packages = [ '/keystone[ldap]', @@ -48,3 +45,4 @@ RUN ln -s keystone-base-source/* keystone \ {{ macros.kolla_patch_sources() }} {% block keystone_base_footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/keystone/keystone-fernet/Dockerfile.j2 b/kolla/docker/keystone/keystone-fernet/Dockerfile.j2 index 588b41023..92ee4738b 100644 --- a/docker/keystone/keystone-fernet/Dockerfile.j2 +++ b/kolla/docker/keystone/keystone-fernet/Dockerfile.j2 @@ -1,12 +1,14 @@ FROM {{ namespace }}/{{ image_prefix }}keystone-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block keystone_fernet_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {% if base_package_type == 'rpm' %} {% set keystone_fernet_packages = [ 'cronie', @@ -32,3 +34,4 @@ RUN chmod 644 /usr/local/bin/kolla_extend_start \ {% block keystone_fernet_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/keystone/keystone-fernet/extend_start.sh b/kolla/docker/keystone/keystone-fernet/extend_start.sh index cf356949f..cf356949f 100644 --- a/docker/keystone/keystone-fernet/extend_start.sh +++ b/kolla/docker/keystone/keystone-fernet/extend_start.sh diff --git a/docker/keystone/keystone-fernet/fetch_fernet_tokens.py b/kolla/docker/keystone/keystone-fernet/fetch_fernet_tokens.py index c57943630..c57943630 100644 --- a/docker/keystone/keystone-fernet/fetch_fernet_tokens.py +++ b/kolla/docker/keystone/keystone-fernet/fetch_fernet_tokens.py diff --git a/docker/keystone/keystone-fernet/keystone_bootstrap.sh b/kolla/docker/keystone/keystone-fernet/keystone_bootstrap.sh index d361767bb..d361767bb 100644 --- a/docker/keystone/keystone-fernet/keystone_bootstrap.sh +++ b/kolla/docker/keystone/keystone-fernet/keystone_bootstrap.sh diff --git a/docker/keystone/keystone-ssh/Dockerfile.j2 b/kolla/docker/keystone/keystone-ssh/Dockerfile.j2 index 9cf977ca0..a7b2a6e10 100644 --- a/docker/keystone/keystone-ssh/Dockerfile.j2 +++ b/kolla/docker/keystone/keystone-ssh/Dockerfile.j2 @@ -1,12 +1,14 @@ FROM {{ namespace }}/{{ image_prefix }}keystone-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block keystone_ssh_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {{ macros.configure_user(name='keystone', shell='/bin/bash') }} {% if base_package_type == 'rpm' %} @@ -36,3 +38,4 @@ RUN sed -ri 's/session(\s+)required(\s+)pam_loginuid.so/session\1optional\2pam_l {% block keystone_ssh_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/keystone/keystone-ssh/extend_start.sh b/kolla/docker/keystone/keystone-ssh/extend_start.sh index 559cd65a9..a6418b4d9 100644 --- a/docker/keystone/keystone-ssh/extend_start.sh +++ b/kolla/docker/keystone/keystone-ssh/extend_start.sh @@ -1,6 +1,6 @@ #!/bin/bash -# NOTE(mnasiadka): CentOS 10 does not support dsa +# NOTE(mnasiadka): Rocky 10 does not support dsa SSH_HOST_KEY_TYPES=( "rsa" "ecdsa" "ed25519" ) for key_type in ${SSH_HOST_KEY_TYPES[@]}; do diff --git a/docker/keystone/keystone/Dockerfile.j2 b/kolla/docker/keystone/keystone/Dockerfile.j2 index 26af6932e..df2003f10 100644 --- a/docker/keystone/keystone/Dockerfile.j2 +++ b/kolla/docker/keystone/keystone/Dockerfile.j2 @@ -1,20 +1,20 @@ FROM {{ namespace }}/{{ image_prefix }}keystone-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block keystone_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {% if base_package_type == 'rpm' %} {% set keystone_packages = [ 'krb5-devel', - 'mod_auth_gssapi', ] %} {% elif base_package_type == 'deb' %} {% set keystone_packages = [ - 'libapache2-mod-auth-gssapi', 'libkrb5-dev', ] %} {% endif %} @@ -45,3 +45,4 @@ RUN chmod 644 /usr/local/bin/kolla_extend_start \ {% block keystone_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/keystone/keystone/extend_start.sh b/kolla/docker/keystone/keystone/extend_start.sh index 25220b683..b45c94d0d 100644 --- a/docker/keystone/keystone/extend_start.sh +++ b/kolla/docker/keystone/keystone/extend_start.sh @@ -44,6 +44,3 @@ if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then sudo -H -u keystone keystone-manage ${EXTRA_KEYSTONE_MANAGE_ARGS} db_sync exit 0 fi - -. /usr/local/bin/kolla_httpd_setup - diff --git a/docker/keystone/keystone/keystone_bootstrap.sh b/kolla/docker/keystone/keystone/keystone_bootstrap.sh index 1b04d99b6..1b04d99b6 100644 --- a/docker/keystone/keystone/keystone_bootstrap.sh +++ b/kolla/docker/keystone/keystone/keystone_bootstrap.sh diff --git a/docker/kolla-toolbox/Dockerfile.j2 b/kolla/docker/kolla-toolbox/Dockerfile.j2 index ca4b8601d..2e4750e2a 100644 --- a/docker/kolla-toolbox/Dockerfile.j2 +++ b/kolla/docker/kolla-toolbox/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block kolla_toolbox_header %}{% endblock %} @@ -10,10 +10,12 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {{ macros.configure_user(name='ansible') }} {{ macros.configure_user(name='rabbitmq') }} -{{ macros.enable_extra_repos(['crb', 'epel', 'erlang', 'openvswitch', 'rabbitmq']) }} +{{ macros.enable_extra_repos(['erlang', 'rabbitmq']) }} {% block rabbitmq_apt_preferences %} {% if base_package_type == 'deb' %} @@ -22,6 +24,9 @@ COPY apt_preferences_rabbitmq.{{ base_distro }} /etc/apt/preferences.d/rabbitmq {% endblock %} {% if base_package_type == 'rpm' %} + +{{ macros.enable_extra_repos(['crb', 'epel', 'openvswitch']) }} + {% set kolla_toolbox_packages = [ 'erlang-27.*', 'gcc', @@ -37,7 +42,7 @@ COPY apt_preferences_rabbitmq.{{ base_distro }} /etc/apt/preferences.d/rabbitmq 'openvswitch${KOLLA_RPM_OVS_VERSION}', 'python3', 'python3-devel', - 'rabbitmq-server-4.1.*' + 'rabbitmq-server-4.3.*' ] %} {% elif base_package_type == 'deb' %} @@ -58,31 +63,17 @@ COPY apt_preferences_rabbitmq.{{ base_distro }} /etc/apt/preferences.d/rabbitmq {% endif %} {{ macros.install_packages(kolla_toolbox_packages | customizable("packages")) }} -{# NOTE(kevko): - In all distros, there is always a /usr/bin/python3 -> python3.X. - However, this is disrupted for RHEL-based systems because, unlike - other distros, we upgrade Python above [1], but we forget to set - the default python3 to the new python3.X. As a result also, everything - outside of the virtual environment ends up running on Python 3.9. - - So, let's correctly set python3 -> python3.X since we had to install - it and now have default python3 points to the new version. - - [1] https://review.opendev.org/c/openstack/kolla/+/924245 -#} -{% if base_package_type == 'rpm' %} -RUN cd /usr/bin && \ - rm -f python3 && \ - ln -s python3.12 python3 -{% endif %} - {% block kolla_toolbox_pip_conf %} -ENV UPPER_CONSTRAINTS_FILE=https://releases.openstack.org/constraints/upper/{{ openstack_release }} +ENV UPPER_CONSTRAINTS_FILE=/requirements/upper-constraints.txt {% endblock %} {% block kolla_toolbox_upper_constraints %} -RUN mkdir -p /requirements \ - && curl -o /requirements/upper-constraints.txt $UPPER_CONSTRAINTS_FILE \ +ADD kolla-toolbox-archive /kolla-toolbox-source + +RUN case "$UPPER_CONSTRAINTS_FILE" in \ + http*) mkdir -p /requirements && curl -LO $UPPER_CONSTRAINTS_FILE /requirements/upper-constraints.txt ;; \ + *) ln -s kolla-toolbox-source/* /requirements ;; \ + esac \ && {{ macros.upper_constraints_remove("openstacksdk") }} \ && python3 -m venv --system-site-packages {{ venv_path }} \ && KOLLA_DISTRO_PYTHON_VERSION=$(/usr/bin/python3 -c "import sys; print('{}.{}'.format(sys.version_info.major, sys.version_info.minor))") \ @@ -93,9 +84,9 @@ RUN mkdir -p /requirements \ ENV PATH {{ venv_path }}/bin:$PATH {% set kolla_toolbox_pip_packages = [ - 'ansible-core==2.18.*', + 'ansible-core==2.21.*', + 'ansible-runner', 'cmd2', - 'influxdb', 'openstacksdk', 'os-client-config', 'pbr', @@ -136,5 +127,6 @@ RUN chmod 644 /etc/ansible/ansible.cfg \ {% block kolla_toolbox_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} USER ansible diff --git a/docker/kolla-toolbox/ansible.cfg b/kolla/docker/kolla-toolbox/ansible.cfg index 53708de39..ec505f4a4 100644 --- a/docker/kolla-toolbox/ansible.cfg +++ b/kolla/docker/kolla-toolbox/ansible.cfg @@ -1,3 +1,4 @@ [defaults] -remote_tmp = /tmp +inject_facts_as_vars = False log_path = /var/log/kolla/ansible.log +remote_tmp = /tmp diff --git a/docker/kolla-toolbox/ansible_sudoers b/kolla/docker/kolla-toolbox/ansible_sudoers index 5a3f109b4..5a3f109b4 100644 --- a/docker/kolla-toolbox/ansible_sudoers +++ b/kolla/docker/kolla-toolbox/ansible_sudoers diff --git a/docker/kolla-toolbox/apt_preferences_rabbitmq.debian b/kolla/docker/kolla-toolbox/apt_preferences_rabbitmq.debian index f1cc84d9b..f1cc84d9b 120000 --- a/docker/kolla-toolbox/apt_preferences_rabbitmq.debian +++ b/kolla/docker/kolla-toolbox/apt_preferences_rabbitmq.debian diff --git a/docker/kolla-toolbox/apt_preferences_rabbitmq.ubuntu b/kolla/docker/kolla-toolbox/apt_preferences_rabbitmq.ubuntu index 977ded074..977ded074 120000 --- a/docker/kolla-toolbox/apt_preferences_rabbitmq.ubuntu +++ b/kolla/docker/kolla-toolbox/apt_preferences_rabbitmq.ubuntu diff --git a/docker/kolla-toolbox/extend_start.sh b/kolla/docker/kolla-toolbox/extend_start.sh index 198587145..198587145 100644 --- a/docker/kolla-toolbox/extend_start.sh +++ b/kolla/docker/kolla-toolbox/extend_start.sh diff --git a/docker/kolla-toolbox/kolla_toolbox.sh b/kolla/docker/kolla-toolbox/kolla_toolbox.sh index 5dfd65338..5dfd65338 100644 --- a/docker/kolla-toolbox/kolla_toolbox.sh +++ b/kolla/docker/kolla-toolbox/kolla_toolbox.sh diff --git a/docker/kolla-toolbox/requirements.yml b/kolla/docker/kolla-toolbox/requirements.yml index 0c4025d01..83c795142 100644 --- a/docker/kolla-toolbox/requirements.yml +++ b/kolla/docker/kolla-toolbox/requirements.yml @@ -1,11 +1,11 @@ --- collections: - name: ansible.posix - version: '<2' + version: '<3' - name: community.general - version: '<4' + version: '<13' - name: community.mysql - version: '<3' + version: '<5' - name: community.rabbitmq version: '<2' - name: openstack.cloud diff --git a/docker/letsencrypt/letsencrypt-base/Dockerfile.j2 b/kolla/docker/letsencrypt/letsencrypt-base/Dockerfile.j2 index aa18e482a..8e9e60db9 100644 --- a/docker/letsencrypt/letsencrypt-base/Dockerfile.j2 +++ b/kolla/docker/letsencrypt/letsencrypt-base/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block letsencrypt_base_header %}{% endblock %} diff --git a/docker/letsencrypt/letsencrypt-base/extend_start.sh b/kolla/docker/letsencrypt/letsencrypt-base/extend_start.sh index 0300f0b44..0300f0b44 100644 --- a/docker/letsencrypt/letsencrypt-base/extend_start.sh +++ b/kolla/docker/letsencrypt/letsencrypt-base/extend_start.sh diff --git a/docker/letsencrypt/letsencrypt-lego/Dockerfile.j2 b/kolla/docker/letsencrypt/letsencrypt-lego/Dockerfile.j2 index 2d7604bdf..a52199d0b 100755 --- a/docker/letsencrypt/letsencrypt-lego/Dockerfile.j2 +++ b/kolla/docker/letsencrypt/letsencrypt-lego/Dockerfile.j2 @@ -1,12 +1,14 @@ FROM {{ namespace }}/{{ image_prefix }}letsencrypt-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block letsencrypt_lego_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {{ macros.configure_user(name='letsencrypt', shell='/bin/bash') }} {% if base_package_type == 'rpm' %} @@ -39,3 +41,4 @@ RUN chmod +x /usr/bin/letsencrypt-certificates /usr/bin/sync-and-update-certific {% block letsencrypt_lego_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/letsencrypt/letsencrypt-lego/letsencrypt-certificates.sh b/kolla/docker/letsencrypt/letsencrypt-lego/letsencrypt-certificates.sh index 83bdede87..4c06688e1 100755 --- a/docker/letsencrypt/letsencrypt-lego/letsencrypt-certificates.sh +++ b/kolla/docker/letsencrypt/letsencrypt-lego/letsencrypt-certificates.sh @@ -24,6 +24,9 @@ function obtain_or_renew_certificate { local hmac="${9}" local key_id="${10}" local letsencrypt_key_type="${11:-}" + local challenge_type="${12:-http-01}" + local dns_provider="${13:-}" + local dns_additional_opts="${14:-}" certificate_domain_opts=$(echo ${certificate_fqdns} | sed -r -e 's/^/,/g' -e 's/,/--domains=/g' -e 's/--/ --/g') certificate_fqdn=$(echo ${certificate_fqdns} | awk -F ',' '{print $1}') @@ -68,17 +71,24 @@ function obtain_or_renew_certificate { fi fi - log_info "[${certificate_fqdn} - cron] Obtaining certificate for domains ${certificate_fqdns}." + if [ "${challenge_type}" = "http-01" ]; then + challenge_opts="--http --http.webroot /etc/letsencrypt/http-01 --http.port ${listen_port}" + elif [ "${challenge_type}" = "dns-01" ]; then + challenge_opts="--dns ${dns_provider} ${dns_additional_opts}" + else + log_error "Unsupported challenge type: ${challenge_type}." + exit 1 + fi + + log_info "[${certificate_fqdn} - cron] Obtaining certificate for domains ${certificate_fqdns} using ${challenge_type} challenge." mapfile -t cmd_output < <(/opt/lego --email="${mail}" \ $( [ -n "${letsencrypt_key_type}" ] && echo "--key-type ${letsencrypt_key_type}" ) \ ${certificate_domain_opts} \ --server "${acme_url}" \ --path "/etc/letsencrypt/lego/${certificate_type}/" \ - --http.webroot "/etc/letsencrypt/http-01" \ - --http.port ${listen_port} \ + ${challenge_opts} \ --cert.timeout ${valid_days} \ --accept-tos \ - --http \ ${eab_opts} \ --pem ${lego_action} \ --${lego_action}-hook="/usr/bin/sync-and-update-certificate --${certificate_type} --fqdn ${certificate_fqdn} --haproxies-ssh ${letsencrypt_ssh_port}" 2>&1) @@ -117,10 +127,14 @@ EXTERNAL_SET="false" EXTERNAL_ACCOUNT_BINDING="false" HMAC="NONE" KEY_ID="NONE" +CHALLENGE_TYPE="http-01" +DNS_PROVIDER="" +DNS_ADDITIONAL_OPTS="" +DNS_ENV_FILE="" LOG_FILE="/var/log/kolla/letsencrypt/lesencrypt-lego.log" -VALID_ARGS=$(getopt -o ief:p:d:m:a:v:h:k: --long internal,external,fqdns:,port:,days:,mail:,acme:,vips:,haproxies-ssh:,eab,kid:,hmac:,key-type: -- "$@") +VALID_ARGS=$(getopt -o ief:p:d:m:a:v:h:k: --long internal,external,fqdns:,port:,days:,mail:,acme:,vips:,haproxies-ssh:,eab,kid:,hmac:,key-type:,challenge:,dns-provider:,dns-additional-opts:,env-file: -- "$@") if [[ $? -ne 0 ]]; then exit 1; fi @@ -182,12 +196,53 @@ while [ : ]; do LETSENCRYPT_KEY_TYPE="${2}" shift 2 ;; + --challenge) + CHALLENGE_TYPE="${2}" + shift 2 + ;; + --dns-provider) + DNS_PROVIDER="${2}" + shift 2 + ;; + --dns-additional-opts) + DNS_ADDITIONAL_OPTS="${2}" + shift 2 + ;; + --env-file) + DNS_ENV_FILE="${2}" + shift 2 + ;; --) shift; break ;; esac done +if [ "${CHALLENGE_TYPE}" = "dns-01" ]; then + if [ "${DNS_PROVIDER}" = "" ]; then + log_error "dns-01 challenge requires --dns-provider." + exit 1 + fi + # lego DNS providers take their credentials from environment variables, + # so the env file must be exported into this process before lego runs. + # The file is parsed like docker --env-file: literal KEY=VALUE pairs, + # split on the first '=', values taken verbatim. It is deliberately not + # sourced, so values containing spaces or shell metacharacters survive + # and nothing in the file is ever executed. + if [ "${DNS_ENV_FILE}" != "" ]; then + if [ ! -r "${DNS_ENV_FILE}" ]; then + log_error "DNS provider environment file ${DNS_ENV_FILE} is not readable." + exit 1 + fi + while IFS='=' read -r env_key env_value || [ -n "${env_key}" ]; do + case "${env_key}" in + ''|\#*) continue ;; + esac + export "${env_key}=${env_value}" + done < "${DNS_ENV_FILE}" + fi +fi + FQDN=$(echo "${FQDNS}" | awk -F ',' '{print $1}') if [ "${INTERNAL_SET}" = "true" ] || [ "${EXTERNAL_SET}" = "true" ]; then @@ -209,12 +264,12 @@ if [ "${INTERNAL_SET}" = "true" ] || [ "${EXTERNAL_SET}" = "true" ]; then log_info "[${FQDN} - cron] This Letsencrypt-lego host is active..." if [ "${LETSENCRYPT_INTERNAL_FQDNS}" != "" ]; then log_info "[${FQDN} - cron] Processing domains ${LETSENCRYPT_INTERNAL_FQDNS}" - obtain_or_renew_certificate ${LETSENCRYPT_INTERNAL_FQDNS} internal ${PORT} ${DAYS} ${ACME} ${MAIL} ${LETSENCRYPT_SSH_PORT} ${EXTERNAL_ACCOUNT_BINDING} ${HMAC} ${KEY_ID} ${LETSENCRYPT_KEY_TYPE} + obtain_or_renew_certificate "${LETSENCRYPT_INTERNAL_FQDNS}" "internal" "${PORT}" "${DAYS}" "${ACME}" "${MAIL}" "${LETSENCRYPT_SSH_PORT}" "${EXTERNAL_ACCOUNT_BINDING}" "${HMAC}" "${KEY_ID}" "${LETSENCRYPT_KEY_TYPE}" "${CHALLENGE_TYPE}" "${DNS_PROVIDER}" "${DNS_ADDITIONAL_OPTS}" fi if [ "${LETSENCRYPT_EXTERNAL_FQDNS}" != "" ]; then log_info "[${FQDN} - cron] Processing domains ${LETSENCRYPT_EXTERNAL_FQDNS}" - obtain_or_renew_certificate ${LETSENCRYPT_EXTERNAL_FQDNS} external ${PORT} ${DAYS} ${ACME} ${MAIL} ${LETSENCRYPT_SSH_PORT} ${EXTERNAL_ACCOUNT_BINDING} ${HMAC} ${KEY_ID} ${LETSENCRYPT_KEY_TYPE} + obtain_or_renew_certificate "${LETSENCRYPT_EXTERNAL_FQDNS}" "external" "${PORT}" "${DAYS}" "${ACME}" "${MAIL}" "${LETSENCRYPT_SSH_PORT}" "${EXTERNAL_ACCOUNT_BINDING}" "${HMAC}" "${KEY_ID}" "${LETSENCRYPT_KEY_TYPE}" "${CHALLENGE_TYPE}" "${DNS_PROVIDER}" "${DNS_ADDITIONAL_OPTS}" fi else log_info "[${FQDN} - cron] This Letsencrypt-lego host is passive, nothing to do..." diff --git a/docker/letsencrypt/letsencrypt-lego/sync-and-update-certificate.sh b/kolla/docker/letsencrypt/letsencrypt-lego/sync-and-update-certificate.sh index e1e421c46..e1e421c46 100644 --- a/docker/letsencrypt/letsencrypt-lego/sync-and-update-certificate.sh +++ b/kolla/docker/letsencrypt/letsencrypt-lego/sync-and-update-certificate.sh diff --git a/docker/macros.j2 b/kolla/docker/macros.j2 index 34d67335c..6d43b4ccf 100644 --- a/docker/macros.j2 +++ b/kolla/docker/macros.j2 @@ -95,3 +95,19 @@ sed -e "s/^{{package_name}}==={{ from }}/{{package_name}}=={{ to }}/g" -i requir RUN kolla_patch {% endif %} {%- endmacro %} + +{% macro kolla_cleanup_repos() -%} +{{ cleanup_repos() }} +{%- endmacro %} + +{% macro kolla_enable_base_repos() %} +{% if base_package_type == 'rpm' %} +{{ handle_repos(['baseos', 'appstream'], 'enable') }} +{% elif base_package_type == 'deb' %} +{% if base_distro == 'debian' %} +{{ handle_repos(['debian', 'debian-security'], 'enable') }} +{% elif base_distro == 'ubuntu' %} +{{ handle_repos(['ubuntu', 'ubuntu-security', 'ubuntu-cloud-archive'], 'enable') }} +{% endif %} +{% endif %} +{% endmacro %} diff --git a/docker/magnum/magnum-api/Dockerfile.j2 b/kolla/docker/magnum/magnum-api/Dockerfile.j2 index dc99b1806..304b54e20 100644 --- a/docker/magnum/magnum-api/Dockerfile.j2 +++ b/kolla/docker/magnum/magnum-api/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}magnum-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block magnum_api_header %}{% endblock %} diff --git a/docker/magnum/magnum-api/extend_start.sh b/kolla/docker/magnum/magnum-api/extend_start.sh index 0f92f6e7b..0f92f6e7b 100644 --- a/docker/magnum/magnum-api/extend_start.sh +++ b/kolla/docker/magnum/magnum-api/extend_start.sh diff --git a/docker/magnum/magnum-base/Dockerfile.j2 b/kolla/docker/magnum/magnum-base/Dockerfile.j2 index 8afb51a21..ef070f88f 100644 --- a/docker/magnum/magnum-base/Dockerfile.j2 +++ b/kolla/docker/magnum/magnum-base/Dockerfile.j2 @@ -1,12 +1,14 @@ FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block magnum_base_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {{ macros.configure_user(name='magnum') }} ADD magnum-base-archive /magnum-base-source @@ -29,3 +31,4 @@ RUN ln -s magnum-base-source/* magnum \ {{ macros.kolla_patch_sources() }} {% block magnum_base_footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/magnum/magnum-base/extend_start.sh b/kolla/docker/magnum/magnum-base/extend_start.sh index 2e58c9776..2e58c9776 100644 --- a/docker/magnum/magnum-base/extend_start.sh +++ b/kolla/docker/magnum/magnum-base/extend_start.sh diff --git a/docker/magnum/magnum-conductor/Dockerfile.j2 b/kolla/docker/magnum/magnum-conductor/Dockerfile.j2 index 640cf5d99..6e2df8fed 100644 --- a/docker/magnum/magnum-conductor/Dockerfile.j2 +++ b/kolla/docker/magnum/magnum-conductor/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}magnum-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block magnum_conductor_header %}{% endblock %} diff --git a/docker/manila/manila-api/Dockerfile.j2 b/kolla/docker/manila/manila-api/Dockerfile.j2 index 4e13321f5..ea5f46195 100644 --- a/docker/manila/manila-api/Dockerfile.j2 +++ b/kolla/docker/manila/manila-api/Dockerfile.j2 @@ -1,12 +1,14 @@ FROM {{ namespace }}/{{ image_prefix }}manila-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block manila_api_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {% set manila_api_packages = [ ] %} {{ macros.install_packages(manila_api_packages | customizable("packages")) }} @@ -19,5 +21,6 @@ RUN chmod 644 /usr/local/bin/kolla_manila_extend_start {% block manila_api_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} USER manila diff --git a/docker/manila/manila-api/extend_start.sh b/kolla/docker/manila/manila-api/extend_start.sh index 925d5bf60..bea77dbba 100644 --- a/docker/manila/manila-api/extend_start.sh +++ b/kolla/docker/manila/manila-api/extend_start.sh @@ -7,5 +7,3 @@ if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then manila-manage db sync exit 0 fi - -. /usr/local/bin/kolla_httpd_setup diff --git a/docker/manila/manila-base/Dockerfile.j2 b/kolla/docker/manila/manila-base/Dockerfile.j2 index fde3989df..fff2d5bd3 100644 --- a/docker/manila/manila-base/Dockerfile.j2 +++ b/kolla/docker/manila/manila-base/Dockerfile.j2 @@ -1,17 +1,20 @@ FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block manila_base_header %}{% endblock %} {% import "macros.j2" as macros with context %} -{{ macros.enable_extra_repos(['openvswitch']) }} +{{ macros.kolla_enable_base_repos() }} + {{ macros.configure_user(name='manila') }} {% if base_package_type == 'rpm' %} +{{ macros.enable_extra_repos(['openvswitch']) }} + {% set manila_base_packages = ['openvswitch${KOLLA_RPM_OVS_VERSION}'] %} {% elif base_package_type == 'deb' %} @@ -45,3 +48,4 @@ RUN ln -s manila-base-source/* manila \ {{ macros.kolla_patch_sources() }} {% block manila_base_footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/manila/manila-base/extend_start.sh b/kolla/docker/manila/manila-base/extend_start.sh index c018416a3..c018416a3 100644 --- a/docker/manila/manila-base/extend_start.sh +++ b/kolla/docker/manila/manila-base/extend_start.sh diff --git a/docker/manila/manila-base/manila_sudoers b/kolla/docker/manila/manila-base/manila_sudoers index 623e6789b..623e6789b 100644 --- a/docker/manila/manila-base/manila_sudoers +++ b/kolla/docker/manila/manila-base/manila_sudoers diff --git a/docker/manila/manila-data/Dockerfile.j2 b/kolla/docker/manila/manila-data/Dockerfile.j2 index d2d413d94..f0454c122 100644 --- a/docker/manila/manila-data/Dockerfile.j2 +++ b/kolla/docker/manila/manila-data/Dockerfile.j2 @@ -1,12 +1,14 @@ FROM {{ namespace }}/{{ image_prefix }}manila-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block manila_data_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {% if base_package_type == 'rpm' %} {% set manila_data_packages = [ @@ -27,5 +29,6 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% block manila_data_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} USER manila diff --git a/docker/manila/manila-scheduler/Dockerfile.j2 b/kolla/docker/manila/manila-scheduler/Dockerfile.j2 index cafe36f27..12f7860f4 100644 --- a/docker/manila/manila-scheduler/Dockerfile.j2 +++ b/kolla/docker/manila/manila-scheduler/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}manila-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block manila_scheduler_header %}{% endblock %} diff --git a/docker/manila/manila-share/Dockerfile.j2 b/kolla/docker/manila/manila-share/Dockerfile.j2 index a49d697f6..f5bc29bb7 100644 --- a/docker/manila/manila-share/Dockerfile.j2 +++ b/kolla/docker/manila/manila-share/Dockerfile.j2 @@ -1,16 +1,18 @@ FROM {{ namespace }}/{{ image_prefix }}manila-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block manila_share_header %}{% endblock %} {% import "macros.j2" as macros with context %} -{# NOTE(mnasiadka): glusterfs-fuse missing in CentOS 10 Stream - temporarily from Kolla COPR #} -{{ macros.enable_extra_repos(['ceph', 'epel', 'kolla_el10']) }} +{{ macros.kolla_enable_base_repos() }} {% if base_package_type == 'rpm' %} + +{{ macros.enable_extra_repos(['crb']) }} + {% set manila_share_packages = [ 'ceph-common', 'sqlite', @@ -33,5 +35,6 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% block manila_share_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} USER manila diff --git a/docker/mariadb/mariadb-server/Dockerfile.j2 b/kolla/docker/mariadb-server/Dockerfile.j2 index 55dd8b5b6..436953e80 100644 --- a/docker/mariadb/mariadb-server/Dockerfile.j2 +++ b/kolla/docker/mariadb-server/Dockerfile.j2 @@ -1,24 +1,26 @@ -FROM {{ namespace }}/{{ image_prefix }}mariadb-base:{{ tag }} +FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block mariadb_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {{ macros.configure_user(name='mysql') }} +{% if base_package_type == 'rpm' %} + {# NOTE(mgoddard): EPEL required for pv package #} -{# NOTE(mnasiadka): Use AppStream version of MariaDB for now in CentOS #} -{{ macros.enable_extra_repos(['epel']) }} +{{ macros.enable_extra_repos(['epel', 'mariadb']) }} -{% if base_package_type == 'rpm' %} {% set mariadb_packages = [ 'expect', + 'mariadb', 'mariadb-backup', 'mariadb-server', - 'mariadb-server-galera', 'pv', 'rsync', 'tar' @@ -32,22 +34,30 @@ RUN ln -s /usr/lib64/galera-4 /usr/lib64/galera {% set mariadb_packages = [ 'expect', 'mariadb-backup', - 'mariadb-server' + 'mariadb-client', + 'mariadb-server', + 'pv', + 'rsync', + 'tar' ] %} {% endif %} {{ macros.install_packages(mariadb_packages | customizable("packages")) }} +{% block mariadb_healthcheck %} +ENV MARIADB_VERSION=11.4 +ADD plugins-archive / +RUN install -m 755 /plugins/mariadb-server-plugin-mariadb-docker-archive*/$MARIADB_VERSION/healthcheck.sh /usr/bin/healthcheck.sh +{% endblock %} + COPY mariadb_sudoers /etc/sudoers.d/kolla_mariadb_sudoers COPY extend_start.sh /usr/local/bin/kolla_extend_start COPY security_reset.expect /usr/local/bin/kolla_security_reset COPY backup.sh /usr/local/bin/kolla_mariadb_backup.sh -COPY backup_replica.sh /usr/local/bin/kolla_mariadb_backup_replica.sh RUN chmod 644 /usr/local/bin/kolla_extend_start \ && chmod 755 /usr/local/bin/kolla_security_reset \ /usr/local/bin/kolla_mariadb_backup.sh \ - /usr/local/bin/kolla_mariadb_backup_replica.sh \ && chmod 750 /etc/sudoers.d \ && chmod 440 /etc/sudoers.d/kolla_mariadb_sudoers \ && rm -rf /var/lib/mysql/* @@ -82,5 +92,6 @@ CMD ["kolla_start"] {% block mariadb_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} USER mysql diff --git a/docker/mariadb/mariadb-server/backup.sh b/kolla/docker/mariadb-server/backup.sh index be63cd938..be63cd938 100644 --- a/docker/mariadb/mariadb-server/backup.sh +++ b/kolla/docker/mariadb-server/backup.sh diff --git a/docker/mariadb/mariadb-server/extend_start.sh b/kolla/docker/mariadb-server/extend_start.sh index 53a54557d..f14c85949 100644 --- a/docker/mariadb/mariadb-server/extend_start.sh +++ b/kolla/docker/mariadb-server/extend_start.sh @@ -3,7 +3,7 @@ : ${MARIADB_LOG_DIR:=/var/log/kolla/mariadb} function bootstrap_db { - mysqld_safe --wsrep-new-cluster --skip-networking --wsrep-on=OFF --pid-file=/var/lib/mysql/mariadb.pid & + mariadbd-safe --wsrep-new-cluster --skip-networking --wsrep-on=OFF --pid-file=/var/lib/mysql/mariadb.pid & # Wait for the mariadb server to be "Ready" before starting the security reset with a max timeout # NOTE(huikang): the location of mysql's socket file varies depending on the OS distributions. # Querying the cluster status has to be executed after the existence of mysql.sock and mariadb.pid. @@ -22,9 +22,9 @@ function bootstrap_db { sudo -E kolla_security_reset set +o xtrace - mysql -u root --password="${DB_ROOT_PASSWORD}" -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY '${DB_ROOT_PASSWORD}' WITH GRANT OPTION;" - mysql -u root --password="${DB_ROOT_PASSWORD}" -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '${DB_ROOT_PASSWORD}' WITH GRANT OPTION;" - mysqladmin -uroot -p"${DB_ROOT_PASSWORD}" shutdown + mariadb -u root --password="${DB_ROOT_PASSWORD}" -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY '${DB_ROOT_PASSWORD}' WITH GRANT OPTION;" + mariadb -u root --password="${DB_ROOT_PASSWORD}" -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '${DB_ROOT_PASSWORD}' WITH GRANT OPTION;" + mariadb-admin -uroot -p"${DB_ROOT_PASSWORD}" shutdown set -o xtrace } @@ -38,21 +38,21 @@ fi # This catches all cases of the BOOTSTRAP variable being set, including empty if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then - mysql_install_db 2>&1 | tee -a ${MARIADB_LOG_DIR}/mariadb-bootstrap.log + mariadb-install-db 2>&1 | tee -a ${MARIADB_LOG_DIR}/mariadb-bootstrap.log bootstrap_db 2>&1 | tee -a ${MARIADB_LOG_DIR}/mariadb-bootstrap.log exit 0 fi # This catches all cases of the KOLLA_UPGRADE variable being set, including empty if [[ "${!KOLLA_UPGRADE[@]}" ]]; then - # The mysql_upgrade command treats any directories under /var/lib/mysql as + # The mariadb-upgrade command treats any directories under /var/lib/mysql as # databases. Somehow we can end up with a .pki directory, which causes the # command to fail with this error: # Incorrect database name '#mysql50#.pki' when selecting the database # There doesn't seem to be anything in the directory, so remove it. rm -rf /var/lib/mysql/.pki - mysql_upgrade --host=${DB_HOST} --port=${DB_PORT} --user=root --password="${DB_ROOT_PASSWORD}" 2>&1 | tee -a ${MARIADB_LOG_DIR}/mariadb-upgrade.log + mariadb-upgrade --host=${DB_HOST} --port=${DB_PORT} --user=root --password="${DB_ROOT_PASSWORD}" 2>&1 | tee -a ${MARIADB_LOG_DIR}/mariadb-upgrade.log exit 0 fi diff --git a/docker/mariadb/mariadb-server/healthcheck_mariadb b/kolla/docker/mariadb-server/healthcheck_mariadb index 0d9f59a95..0d9f59a95 100755 --- a/docker/mariadb/mariadb-server/healthcheck_mariadb +++ b/kolla/docker/mariadb-server/healthcheck_mariadb diff --git a/docker/mariadb/mariadb-server/mariadb_sudoers b/kolla/docker/mariadb-server/mariadb_sudoers index 150534e16..150534e16 100644 --- a/docker/mariadb/mariadb-server/mariadb_sudoers +++ b/kolla/docker/mariadb-server/mariadb_sudoers diff --git a/docker/mariadb/mariadb-server/security_reset.expect b/kolla/docker/mariadb-server/security_reset.expect index 06f1d5c8e..06f1d5c8e 100644 --- a/docker/mariadb/mariadb-server/security_reset.expect +++ b/kolla/docker/mariadb-server/security_reset.expect diff --git a/docker/masakari/masakari-api/Dockerfile.j2 b/kolla/docker/masakari/masakari-api/Dockerfile.j2 index ed8c336fc..5285c6a36 100644 --- a/docker/masakari/masakari-api/Dockerfile.j2 +++ b/kolla/docker/masakari/masakari-api/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}masakari-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block masakari_api_header %}{% endblock %} diff --git a/docker/masakari/masakari-api/extend_start.sh b/kolla/docker/masakari/masakari-api/extend_start.sh index 0e0d917a2..549759f49 100755 --- a/docker/masakari/masakari-api/extend_start.sh +++ b/kolla/docker/masakari/masakari-api/extend_start.sh @@ -6,5 +6,3 @@ if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then masakari-manage db sync exit 0 fi - -. /usr/local/bin/kolla_httpd_setup diff --git a/docker/masakari/masakari-base/Dockerfile.j2 b/kolla/docker/masakari/masakari-base/Dockerfile.j2 index 9b5e117bc..92ac9bad9 100644 --- a/docker/masakari/masakari-base/Dockerfile.j2 +++ b/kolla/docker/masakari/masakari-base/Dockerfile.j2 @@ -1,12 +1,14 @@ FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block masakari_base_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {{ macros.configure_user(name='masakari') }} {% if base_package_type == 'rpm' %} @@ -33,12 +35,12 @@ COPY extend_start.sh /usr/local/bin/kolla_extend_start RUN ln -s masakari-base-source/* masakari \ && {{ macros.install_pip(masakari_base_pip_packages | customizable("pip_packages")) }} \ - && mkdir -p /etc/masakari /var/www/cgi-bin/masakari \ + && mkdir -p /etc/masakari \ && cp -r /masakari/etc/masakari/* /etc/masakari/ \ - && chmod 755 /var/www/cgi-bin/masakari \ && touch /usr/local/bin/kolla_masakari_extend_start \ && chmod 644 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_masakari_extend_start {{ macros.kolla_patch_sources() }} {% block masakari_base_footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/masakari/masakari-base/extend_start.sh b/kolla/docker/masakari/masakari-base/extend_start.sh index 4f13d3e8b..4f13d3e8b 100755 --- a/docker/masakari/masakari-base/extend_start.sh +++ b/kolla/docker/masakari/masakari-base/extend_start.sh diff --git a/docker/masakari/masakari-engine/Dockerfile.j2 b/kolla/docker/masakari/masakari-engine/Dockerfile.j2 index 4ff38b526..8dfb3175c 100644 --- a/docker/masakari/masakari-engine/Dockerfile.j2 +++ b/kolla/docker/masakari/masakari-engine/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}masakari-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block masakari_engine_header %}{% endblock %} diff --git a/docker/masakari/masakari-monitors/Dockerfile.j2 b/kolla/docker/masakari/masakari-monitors/Dockerfile.j2 index b7c847e1e..701521b4b 100644 --- a/docker/masakari/masakari-monitors/Dockerfile.j2 +++ b/kolla/docker/masakari/masakari-monitors/Dockerfile.j2 @@ -1,16 +1,18 @@ FROM {{ namespace }}/{{ image_prefix }}masakari-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block masakari_monitors_header %}{% endblock %} {% import "macros.j2" as macros with context %} -{{ macros.enable_extra_repos(['hacluster']) }} +{{ macros.kolla_enable_base_repos() }} {% if base_package_type == 'rpm' %} +{{ macros.enable_extra_repos(['hacluster']) }} + {% set masakari_monitors_packages = [ 'cyrus-sasl-md5', 'cyrus-sasl-scram', @@ -51,5 +53,6 @@ RUN ln -s masakari-monitors-source/* masakari-monitors \ {% block masakari_monitors_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} USER masakari diff --git a/docker/masakari/masakari-monitors/masakari_monitors_sudoers b/kolla/docker/masakari/masakari-monitors/masakari_monitors_sudoers index 6cc823d78..be3867b5c 100644 --- a/docker/masakari/masakari-monitors/masakari_monitors_sudoers +++ b/kolla/docker/masakari/masakari-monitors/masakari_monitors_sudoers @@ -1,3 +1,5 @@ masakari ALL=(root) NOPASSWD: /var/lib/kolla/venv/bin/privsep-helper masakari ALL=(root) NOPASSWD: /usr/sbin/tcpdump * masakari ALL=(root) NOPASSWD: /usr/sbin/crm_mon -X +masakari ALL=(root) NOPASSWD: /usr/sbin/crmadmin * +masakari ALL=(root) NOPASSWD: /usr/sbin/cibadmin --query diff --git a/docker/memcached/Dockerfile.j2 b/kolla/docker/memcached/Dockerfile.j2 index eea5c5935..8cf2e09d7 100644 --- a/docker/memcached/Dockerfile.j2 +++ b/kolla/docker/memcached/Dockerfile.j2 @@ -1,12 +1,14 @@ FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block memcached_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {{ macros.configure_user(name='memcached', homedir='/run/memcache') }} {% set memcached_packages = ['memcached'] %} @@ -16,5 +18,6 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% block memcached_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} USER memcached diff --git a/docker/mistral/mistral-api/Dockerfile.j2 b/kolla/docker/mistral/mistral-api/Dockerfile.j2 index 4c6416c82..0ad4fb767 100644 --- a/docker/mistral/mistral-api/Dockerfile.j2 +++ b/kolla/docker/mistral/mistral-api/Dockerfile.j2 @@ -1,12 +1,14 @@ FROM {{ namespace }}/{{ image_prefix }}mistral-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block mistral_api_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {% set mistral_api_packages = [ ] %} {{ macros.install_packages(mistral_api_packages | customizable("packages")) }} @@ -18,3 +20,4 @@ RUN chmod 644 /usr/local/bin/kolla_mistral_extend_start {% block mistral_api_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/mistral/mistral-api/extend_start.sh b/kolla/docker/mistral/mistral-api/extend_start.sh index 149554191..113adb8a2 100644 --- a/docker/mistral/mistral-api/extend_start.sh +++ b/kolla/docker/mistral/mistral-api/extend_start.sh @@ -7,5 +7,3 @@ if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then mistral-db-manage --config-file /etc/mistral/mistral.conf populate exit 0 fi - -. /usr/local/bin/kolla_httpd_setup diff --git a/docker/mistral/mistral-base/Dockerfile.j2 b/kolla/docker/mistral/mistral-base/Dockerfile.j2 index f7fb3f416..d459fda1f 100644 --- a/docker/mistral/mistral-base/Dockerfile.j2 +++ b/kolla/docker/mistral/mistral-base/Dockerfile.j2 @@ -1,12 +1,14 @@ FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block mistral_base_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {{ macros.configure_user(name='mistral') }} ADD mistral-base-archive /mistral-base-source @@ -36,3 +38,4 @@ RUN ln -s mistral-base-source/* mistral \ {{ macros.kolla_patch_sources() }} {% block mistral_base_footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/mistral/mistral-base/extend_start.sh b/kolla/docker/mistral/mistral-base/extend_start.sh index ac2980d6c..ac2980d6c 100644 --- a/docker/mistral/mistral-base/extend_start.sh +++ b/kolla/docker/mistral/mistral-base/extend_start.sh diff --git a/docker/mistral/mistral-engine/Dockerfile.j2 b/kolla/docker/mistral/mistral-engine/Dockerfile.j2 index 1ccc79d1f..c5fd5eb0d 100644 --- a/docker/mistral/mistral-engine/Dockerfile.j2 +++ b/kolla/docker/mistral/mistral-engine/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}mistral-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block mistral_engine_header %}{% endblock %} diff --git a/docker/mistral/mistral-event-engine/Dockerfile.j2 b/kolla/docker/mistral/mistral-event-engine/Dockerfile.j2 index c04e1abb8..2a05ecf76 100644 --- a/docker/mistral/mistral-event-engine/Dockerfile.j2 +++ b/kolla/docker/mistral/mistral-event-engine/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}mistral-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block mistral_event_engine_header %}{% endblock %} diff --git a/docker/mistral/mistral-executor/Dockerfile.j2 b/kolla/docker/mistral/mistral-executor/Dockerfile.j2 index 297ed011e..aeae9ed06 100644 --- a/docker/mistral/mistral-executor/Dockerfile.j2 +++ b/kolla/docker/mistral/mistral-executor/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}mistral-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block mistral_executor_header %}{% endblock %} diff --git a/docker/multipathd/Dockerfile.j2 b/kolla/docker/multipathd/Dockerfile.j2 index e5e2443ce..19ef76fa5 100644 --- a/docker/multipathd/Dockerfile.j2 +++ b/kolla/docker/multipathd/Dockerfile.j2 @@ -1,12 +1,14 @@ FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block multipathd_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {% if base_package_type == 'rpm' %} {% set multipathd_packages = ['device-mapper-multipath'] %} {% elif base_package_type == 'deb' %} @@ -19,3 +21,4 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% block multipathd_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/networking-baremetal/ironic-neutron-agent/Dockerfile.j2 b/kolla/docker/networking-baremetal/ironic-neutron-agent/Dockerfile.j2 index 45b9d2b7f..a7ae6ccb4 100644 --- a/docker/networking-baremetal/ironic-neutron-agent/Dockerfile.j2 +++ b/kolla/docker/networking-baremetal/ironic-neutron-agent/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}neutron-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block ironic_neutron_agent_header %}{% endblock %} diff --git a/docker/neutron/neutron-base/Dockerfile.j2 b/kolla/docker/neutron/neutron-base/Dockerfile.j2 index 3e4ef5a15..1c454e0ce 100644 --- a/docker/neutron/neutron-base/Dockerfile.j2 +++ b/kolla/docker/neutron/neutron-base/Dockerfile.j2 @@ -1,17 +1,21 @@ FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block neutron_base_header %}{% endblock %} {% import "macros.j2" as macros with context %} -{{ macros.enable_extra_repos(['docker-ce', 'openvswitch']) }} +{{ macros.kolla_enable_base_repos() }} + +{{ macros.enable_extra_repos(['docker-ce']) }} {{ macros.configure_user(name='neutron') }} {% if base_package_type == 'rpm' %} +{{ macros.enable_extra_repos(['openvswitch']) }} + {% set neutron_base_packages = [ 'conntrack-tools', 'dnsmasq', @@ -61,7 +65,6 @@ ADD plugins-archive / {% set neutron_base_pip_packages = [ '/neutron', 'oslo-vmware', - 'tap-as-a-service' ] %} {% set neutron_base_plugins_pip_packages = [ @@ -76,6 +79,7 @@ RUN chmod +x /usr/local/lib/neutron-wrappers/copy-wrappers \ && chmod +x /usr/local/lib/neutron-wrappers/delete-wrappers RUN ln -s neutron-base-source/* neutron \ + && {{ macros.upper_constraints_remove('networking-generic-switch') }} \ && {{ macros.install_pip(neutron_base_pip_packages | customizable("pip_packages")) }} \ && mkdir -p /etc/neutron \ && cp -r /neutron/etc/* /etc/neutron/ \ @@ -99,3 +103,4 @@ RUN ln -s neutron-base-source/* neutron \ {{ macros.kolla_patch_sources() }} {% block neutron_base_footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/neutron/neutron-base/copy-wrappers b/kolla/docker/neutron/neutron-base/copy-wrappers index e03bdfdf7..e03bdfdf7 100644 --- a/docker/neutron/neutron-base/copy-wrappers +++ b/kolla/docker/neutron/neutron-base/copy-wrappers diff --git a/docker/neutron/neutron-base/delete-wrappers b/kolla/docker/neutron/neutron-base/delete-wrappers index 239d977f2..239d977f2 100644 --- a/docker/neutron/neutron-base/delete-wrappers +++ b/kolla/docker/neutron/neutron-base/delete-wrappers diff --git a/docker/neutron/neutron-base/dnsmasq b/kolla/docker/neutron/neutron-base/dnsmasq index 44b73f0b2..44b73f0b2 100644 --- a/docker/neutron/neutron-base/dnsmasq +++ b/kolla/docker/neutron/neutron-base/dnsmasq diff --git a/docker/neutron/neutron-base/extend_start.sh b/kolla/docker/neutron/neutron-base/extend_start.sh index e2a2dfca4..6e6288ffb 100644 --- a/docker/neutron/neutron-base/extend_start.sh +++ b/kolla/docker/neutron/neutron-base/extend_start.sh @@ -14,7 +14,7 @@ fi # so no need to even use u-a on RHEL 9 family as there is one provider # (and there is no u-a for ip6tables so script fails) -if [[ ! ${KOLLA_BASE_DISTRO} =~ centos|rocky ]]; then +if [[ ! ${KOLLA_BASE_DISTRO} =~ rocky ]]; then if /usr/bin/update-alternatives --display iptables; then # NOTE(yoctozepto): Kolla-Ansible does not always set KOLLA_LEGACY_IPTABLES; # the workaround below ensures it gets set to `false` in such cases to fix diff --git a/docker/neutron/neutron-base/haproxy b/kolla/docker/neutron/neutron-base/haproxy index 43b9ef9d2..43b9ef9d2 100644 --- a/docker/neutron/neutron-base/haproxy +++ b/kolla/docker/neutron/neutron-base/haproxy diff --git a/docker/neutron/neutron-base/keepalived b/kolla/docker/neutron/neutron-base/keepalived index 34b1afaea..6bb2b4d3d 100644 --- a/docker/neutron/neutron-base/keepalived +++ b/kolla/docker/neutron/neutron-base/keepalived @@ -30,7 +30,7 @@ LIST=$($CLI ps -a --filter name=${KOLLA_SERVICE}_keepalived_ --format '{{.ID}}:{ printf "%s\n" "${LIST}" | grep -q "${NAME}$" && NAME="${NAME}_$(date +%Y-%m-%d-%H%M%S-%N)" echo "Starting a new child container ${NAME} using image ${KOLLA_IMAGE}" -$CLI run --detach \ +$CLI run --rm --detach \ -v /etc/kolla/${KOLLA_SERVICE_NAME}:/etc/neutron:ro \ -v /lib/modules:/lib/modules:ro \ -v /sbin/modprobe:/sbin/modprobe:ro \ diff --git a/docker/neutron/neutron-base/neutron-keepalived-state-change b/kolla/docker/neutron/neutron-base/neutron-keepalived-state-change index 0b30d88cf..0b30d88cf 100644 --- a/docker/neutron/neutron-base/neutron-keepalived-state-change +++ b/kolla/docker/neutron/neutron-base/neutron-keepalived-state-change diff --git a/docker/neutron/neutron-base/neutron_sudoers b/kolla/docker/neutron/neutron-base/neutron_sudoers index d0de94f0e..d0de94f0e 100644 --- a/docker/neutron/neutron-base/neutron_sudoers +++ b/kolla/docker/neutron/neutron-base/neutron_sudoers diff --git a/docker/neutron/neutron-base/radvd b/kolla/docker/neutron/neutron-base/radvd index 3f5dd1cfa..3f5dd1cfa 100644 --- a/docker/neutron/neutron-base/radvd +++ b/kolla/docker/neutron/neutron-base/radvd diff --git a/docker/neutron/neutron-bgp-dragent/Dockerfile.j2 b/kolla/docker/neutron/neutron-bgp-dragent/Dockerfile.j2 index 794804483..66ee77f63 100644 --- a/docker/neutron/neutron-bgp-dragent/Dockerfile.j2 +++ b/kolla/docker/neutron/neutron-bgp-dragent/Dockerfile.j2 @@ -1,12 +1,14 @@ FROM {{ namespace }}/{{ image_prefix }}neutron-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block neutron_bgp_dragent_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + ADD neutron-bgp-dragent-archive /neutron-bgp-dragent-source {% set neutron_bgp_dragent_pip_packages = [ @@ -20,5 +22,6 @@ RUN ln -s neutron-bgp-dragent-source/* neutron_dynamic_routing \ {% block neutron_bgp_dragent_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} USER neutron diff --git a/docker/neutron/neutron-dhcp-agent/Dockerfile.j2 b/kolla/docker/neutron/neutron-dhcp-agent/Dockerfile.j2 index 7353c2a2d..750526097 100644 --- a/docker/neutron/neutron-dhcp-agent/Dockerfile.j2 +++ b/kolla/docker/neutron/neutron-dhcp-agent/Dockerfile.j2 @@ -1,12 +1,14 @@ FROM {{ namespace }}/{{ image_prefix }}neutron-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block neutron_dhcp_agent_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {% set neutron_dhcp_agent_packages = [ ] %} @@ -18,5 +20,6 @@ COPY extend_start.sh /usr/local/bin/kolla_extend_start {% block neutron_dhcp_agent_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} USER neutron diff --git a/docker/neutron/neutron-dhcp-agent/extend_start.sh b/kolla/docker/neutron/neutron-dhcp-agent/extend_start.sh index edaad2a3a..edaad2a3a 100644 --- a/docker/neutron/neutron-dhcp-agent/extend_start.sh +++ b/kolla/docker/neutron/neutron-dhcp-agent/extend_start.sh diff --git a/docker/neutron/neutron-l3-agent/Dockerfile.j2 b/kolla/docker/neutron/neutron-l3-agent/Dockerfile.j2 index 2787dae5b..52b63462a 100644 --- a/docker/neutron/neutron-l3-agent/Dockerfile.j2 +++ b/kolla/docker/neutron/neutron-l3-agent/Dockerfile.j2 @@ -1,12 +1,14 @@ FROM {{ namespace }}/{{ image_prefix }}neutron-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block neutron_l3_agent_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {% if base_package_type == 'rpm' %} {% set neutron_l3_agent_packages = [ 'libreswan', @@ -28,5 +30,6 @@ COPY extend_start.sh /usr/local/bin/kolla_extend_start {% block neutron_l3_agent_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} USER neutron diff --git a/docker/neutron/neutron-l3-agent/extend_start.sh b/kolla/docker/neutron/neutron-l3-agent/extend_start.sh index f95c1eda2..4c7cd345f 100644 --- a/docker/neutron/neutron-l3-agent/extend_start.sh +++ b/kolla/docker/neutron/neutron-l3-agent/extend_start.sh @@ -12,7 +12,7 @@ fi # nftables framework." # so no need to even use u-a on RHEL 9 family as there is one provider # (and there is no u-a for ip6tables so script fails) -if [[ ! ${KOLLA_BASE_DISTRO} =~ centos|rocky ]]; then +if [[ ! ${KOLLA_BASE_DISTRO} =~ rocky ]]; then if /usr/bin/update-alternatives --display iptables; then # NOTE(yoctozepto): Kolla-Ansible does not always set KOLLA_LEGACY_IPTABLES; # the workaround below ensures it gets set to `false` in such cases to fix diff --git a/docker/neutron/neutron-metadata-agent/Dockerfile.j2 b/kolla/docker/neutron/neutron-metadata-agent/Dockerfile.j2 index 676ee1a85..b6be8d739 100644 --- a/docker/neutron/neutron-metadata-agent/Dockerfile.j2 +++ b/kolla/docker/neutron/neutron-metadata-agent/Dockerfile.j2 @@ -1,12 +1,14 @@ FROM {{ namespace }}/{{ image_prefix }}neutron-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block neutron_metadata_agent_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {% set neutron_metadata_agent_packages = [ ] %} @@ -14,7 +16,10 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.kolla_patch_sources() }} +COPY extend_start.sh /usr/local/bin/kolla_extend_start + {% block neutron_metadata_agent_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} USER neutron diff --git a/kolla/docker/neutron/neutron-metadata-agent/extend_start.sh b/kolla/docker/neutron/neutron-metadata-agent/extend_start.sh new file mode 100644 index 000000000..001898f68 --- /dev/null +++ b/kolla/docker/neutron/neutron-metadata-agent/extend_start.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +if [[ ! -d "/var/log/kolla/neutron" ]]; then + mkdir -p /var/log/kolla/neutron +fi +if [[ $(stat -c %a /var/log/kolla/neutron) != "755" ]]; then + chmod 755 /var/log/kolla/neutron +fi + +if [[ "${KOLLA_NEUTRON_WRAPPERS:-false}" == "true" ]]; then + echo "Copying neutron agent wrappers to /usr/local/bin" + sudo -E /usr/local/lib/neutron-wrappers/copy-wrappers +else + echo "Removing neutron agent wrappers from /usr/local/bin" + sudo -E /usr/local/lib/neutron-wrappers/delete-wrappers +fi + +. /usr/local/bin/kolla_neutron_extend_start diff --git a/docker/neutron/neutron-metering-agent/Dockerfile.j2 b/kolla/docker/neutron/neutron-metering-agent/Dockerfile.j2 index a921d8430..e9d7f74e0 100644 --- a/docker/neutron/neutron-metering-agent/Dockerfile.j2 +++ b/kolla/docker/neutron/neutron-metering-agent/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}neutron-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block neutron_metering_agent_header %}{% endblock %} diff --git a/docker/neutron/neutron-mlnx-agent/Dockerfile.j2 b/kolla/docker/neutron/neutron-mlnx-agent/Dockerfile.j2 index 2ff8e0ff5..7eb6305fe 100644 --- a/docker/neutron/neutron-mlnx-agent/Dockerfile.j2 +++ b/kolla/docker/neutron/neutron-mlnx-agent/Dockerfile.j2 @@ -1,12 +1,14 @@ FROM {{ namespace }}/{{ image_prefix }}neutron-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block neutron_mlnx_agent_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {% set neutron_mlnx_agent_packages = [ 'python3-libvirt', ] %} @@ -23,5 +25,6 @@ RUN {{ macros.install_pip(neutron_mlnx_agent_pip_packages | customizable("pip_pa {% block neutron_mlnx_agent_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} USER neutron diff --git a/docker/neutron/neutron-openvswitch-agent/Dockerfile.j2 b/kolla/docker/neutron/neutron-openvswitch-agent/Dockerfile.j2 index 4a4cc26a8..d0a963259 100644 --- a/docker/neutron/neutron-openvswitch-agent/Dockerfile.j2 +++ b/kolla/docker/neutron/neutron-openvswitch-agent/Dockerfile.j2 @@ -1,17 +1,20 @@ FROM {{ namespace }}/{{ image_prefix }}neutron-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block neutron_openvswitch_agent_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {{ macros.install_packages(neutron_openvswitch_agent_packages | customizable("packages")) }} {{ macros.kolla_patch_sources() }} {% block neutron_openvswitch_agent_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} USER neutron diff --git a/docker/neutron/neutron-ovn-agent/Dockerfile.j2 b/kolla/docker/neutron/neutron-ovn-agent/Dockerfile.j2 index da750fd78..915bef108 100644 --- a/docker/neutron/neutron-ovn-agent/Dockerfile.j2 +++ b/kolla/docker/neutron/neutron-ovn-agent/Dockerfile.j2 @@ -1,12 +1,14 @@ FROM {{ namespace }}/{{ image_prefix }}neutron-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block neutron_ovn_agent_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {% set neutron_ovn_agent_packages = [ ] %} @@ -16,5 +18,6 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% block neutron_ovn_agent_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} USER neutron diff --git a/kolla/docker/neutron/neutron-ovn-vpn-agent/Dockerfile.j2 b/kolla/docker/neutron/neutron-ovn-vpn-agent/Dockerfile.j2 new file mode 100644 index 000000000..ff1f6b48f --- /dev/null +++ b/kolla/docker/neutron/neutron-ovn-vpn-agent/Dockerfile.j2 @@ -0,0 +1,34 @@ +FROM {{ namespace }}/{{ image_prefix }}neutron-base:{{ tag }} +{% block labels %} +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" +{% endblock %} + +{% block neutron_ovn_vpn_agent_header %}{% endblock %} + +{% import "macros.j2" as macros with context %} + +{{ macros.kolla_enable_base_repos() }} + +# Note: VPN is currently not working on RHEL 10 due to a known issue: +# https://bugs.launchpad.net/neutron/+bug/2146308 +{% if base_package_type == 'rpm' %} + {% set neutron_ovn_vpn_agent_packages = [ + 'libreswan' + ] %} +{% elif base_package_type == 'deb' %} + {% set neutron_ovn_vpn_agent_packages = [ + 'strongswan', + 'strongswan-starter', + 'strongswan-charon' + ] %} +{% endif %} + +{{ macros.install_packages(neutron_ovn_vpn_agent_packages | customizable("packages")) }} + +{{ macros.kolla_patch_sources() }} + +{% block neutron_ovn_vpn_agent_footer %}{% endblock %} +{% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} + +USER neutron diff --git a/docker/neutron/neutron-server/Dockerfile.j2 b/kolla/docker/neutron/neutron-server/Dockerfile.j2 index 73399eb19..0ee7ceabf 100644 --- a/docker/neutron/neutron-server/Dockerfile.j2 +++ b/kolla/docker/neutron/neutron-server/Dockerfile.j2 @@ -1,12 +1,14 @@ FROM {{ namespace }}/{{ image_prefix }}neutron-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block neutron_server_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {% set neutron_server_pip_packages = [ 'networking-hyperv' ] %} @@ -29,5 +31,6 @@ RUN {{ macros.install_pip(neutron_server_pip_packages | customizable("pip_packag {% block neutron_server_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} USER neutron diff --git a/docker/neutron/neutron-server/extend_start.sh b/kolla/docker/neutron/neutron-server/extend_start.sh index 630eb6e1f..630eb6e1f 100644 --- a/docker/neutron/neutron-server/extend_start.sh +++ b/kolla/docker/neutron/neutron-server/extend_start.sh diff --git a/docker/neutron/neutron-sriov-agent/Dockerfile.j2 b/kolla/docker/neutron/neutron-sriov-agent/Dockerfile.j2 index 92108fa37..c4a1f1d4b 100644 --- a/docker/neutron/neutron-sriov-agent/Dockerfile.j2 +++ b/kolla/docker/neutron/neutron-sriov-agent/Dockerfile.j2 @@ -1,17 +1,20 @@ FROM {{ namespace }}/{{ image_prefix }}neutron-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block neutron_sriov_agent_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {{ macros.install_packages(neutron_sriov_agent_packages | customizable("packages")) }} {{ macros.kolla_patch_sources() }} {% block neutron_sriov_agent_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} USER neutron diff --git a/docker/nova/nova-api/Dockerfile.j2 b/kolla/docker/nova/nova-api/Dockerfile.j2 index 01399edca..08353a708 100644 --- a/docker/nova/nova-api/Dockerfile.j2 +++ b/kolla/docker/nova/nova-api/Dockerfile.j2 @@ -1,12 +1,14 @@ FROM {{ namespace }}/{{ image_prefix }}nova-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block nova_api_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {% set nova_api_packages = [ ] %} {{ macros.install_packages(nova_api_packages | customizable("packages")) }} @@ -18,3 +20,4 @@ RUN chmod 644 /usr/local/bin/kolla_nova_extend_start {% block nova_api_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/nova/nova-api/extend_start.sh b/kolla/docker/nova/nova-api/extend_start.sh index 40210f81c..ead6c252b 100644 --- a/docker/nova/nova-api/extend_start.sh +++ b/kolla/docker/nova/nova-api/extend_start.sh @@ -28,5 +28,3 @@ if [[ "${!KOLLA_UPGRADE_CHECK[@]}" ]]; then nova-status upgrade check exit $? fi - -. /usr/local/bin/kolla_httpd_setup diff --git a/docker/nova/nova-base/Dockerfile.j2 b/kolla/docker/nova/nova-base/Dockerfile.j2 index 747393944..da5340f2a 100644 --- a/docker/nova/nova-base/Dockerfile.j2 +++ b/kolla/docker/nova/nova-base/Dockerfile.j2 @@ -1,17 +1,20 @@ FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block nova_base_header %}{% endblock %} {% import "macros.j2" as macros with context %} -{{ macros.enable_extra_repos(['openvswitch']) }} +{{ macros.kolla_enable_base_repos() }} + {{ macros.configure_user(name='nova', groups='qemu') }} {% if base_package_type == 'rpm' %} +{{ macros.enable_extra_repos(['openvswitch']) }} + {% set nova_base_packages = [ 'openvswitch${KOLLA_RPM_OVS_VERSION}', 'python3-openvswitch${KOLLA_RPM_OVS_VERSION}' @@ -83,3 +86,4 @@ RUN ln -s nova-base-source/* nova \ {{ macros.kolla_patch_sources() }} {% block nova_base_footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/nova/nova-base/extend_start.sh b/kolla/docker/nova/nova-base/extend_start.sh index eee0f16a1..eee0f16a1 100644 --- a/docker/nova/nova-base/extend_start.sh +++ b/kolla/docker/nova/nova-base/extend_start.sh diff --git a/docker/nova/nova-base/nova_sudoers b/kolla/docker/nova/nova-base/nova_sudoers index 6d73da6d3..6d73da6d3 100644 --- a/docker/nova/nova-base/nova_sudoers +++ b/kolla/docker/nova/nova-base/nova_sudoers diff --git a/docker/nova/nova-compute-ironic/Dockerfile.j2 b/kolla/docker/nova/nova-compute-ironic/Dockerfile.j2 index b248025c8..69227056c 100644 --- a/docker/nova/nova-compute-ironic/Dockerfile.j2 +++ b/kolla/docker/nova/nova-compute-ironic/Dockerfile.j2 @@ -1,13 +1,19 @@ FROM {{ namespace }}/{{ image_prefix }}nova-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block nova_compute_ironic_header %}{% endblock %} {% import "macros.j2" as macros with context %} -{% set nova_compute_ironic_packages = ['xorriso', 'nvme-cli'] %} +{{ macros.kolla_enable_base_repos() }} + +{% set nova_compute_ironic_packages = [ + 'genisoimage', + 'nvme-cli', + 'xorriso' +] %} {{ macros.install_packages(nova_compute_ironic_packages | customizable("packages")) }} @@ -15,5 +21,6 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% block nova_compute_ironic_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} USER nova diff --git a/docker/nova/nova-compute/Dockerfile.j2 b/kolla/docker/nova/nova-compute/Dockerfile.j2 index 1378b21e6..864222f11 100644 --- a/docker/nova/nova-compute/Dockerfile.j2 +++ b/kolla/docker/nova/nova-compute/Dockerfile.j2 @@ -1,16 +1,18 @@ FROM {{ namespace }}/{{ image_prefix }}nova-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block nova_compute_header %}{% endblock %} {% import "macros.j2" as macros with context %} -{{ macros.enable_extra_repos(['ceph', 'epel']) }} +{{ macros.kolla_enable_base_repos() }} {% if base_package_type == 'rpm' %} +{{ macros.enable_extra_repos(['ceph', 'crb', 'epel']) }} + {% set nova_compute_packages = [ 'ceph-common', 'cyrus-sasl-md5', @@ -36,7 +38,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'xfsprogs' ] %} - # NOTE(hrw): daxio is part of pmdk which is x86-64 only in CentOS 8 + # NOTE(hrw): daxio is part of pmdk which is x86-64 only in Rocky {% if base_arch == 'x86_64' %} {% set nova_compute_packages = nova_compute_packages + [ 'daxio' @@ -108,5 +110,6 @@ RUN {{ macros.install_pip(nova_compute_pip_packages | customizable("pip_packages {% block nova_compute_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} USER nova diff --git a/docker/nova/nova-compute/extend_start.sh b/kolla/docker/nova/nova-compute/extend_start.sh index a458625ec..a458625ec 100644 --- a/docker/nova/nova-compute/extend_start.sh +++ b/kolla/docker/nova/nova-compute/extend_start.sh diff --git a/docker/nova/nova-conductor/Dockerfile.j2 b/kolla/docker/nova/nova-conductor/Dockerfile.j2 index f91cc76c6..b14000400 100644 --- a/docker/nova/nova-conductor/Dockerfile.j2 +++ b/kolla/docker/nova/nova-conductor/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}nova-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block nova_conductor_header %}{% endblock %} diff --git a/docker/nova/nova-conductor/extend_start.sh b/kolla/docker/nova/nova-conductor/extend_start.sh index 72c9493f5..72c9493f5 100644 --- a/docker/nova/nova-conductor/extend_start.sh +++ b/kolla/docker/nova/nova-conductor/extend_start.sh diff --git a/kolla/docker/nova/nova-libvirt-spice/Dockerfile.j2 b/kolla/docker/nova/nova-libvirt-spice/Dockerfile.j2 new file mode 100644 index 000000000..4691df8fd --- /dev/null +++ b/kolla/docker/nova/nova-libvirt-spice/Dockerfile.j2 @@ -0,0 +1,123 @@ +FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }} +{% block labels %} +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +{% endblock %} + +{% block nova_libvirt_header %}{% endblock %} + +{% import "macros.j2" as macros with context %} + +{{ macros.kolla_enable_base_repos() }} + +{{ macros.configure_user(name='nova', groups='qemu') }} + +{% if base_package_type == 'rpm' %} + + {% set nova_libvirt_extra_repos = ['ceph', 'crb', 'epel', 'openvswitch'] %} + {% if base_distro == 'rocky' %} + {# + The stock Rocky qemu-kvm has SPICE compiled out. To enable + Kerbside and the nova ``spice-direct`` console we therefore + layer the ligenix COPR in so that qemu-kvm and spice-server + are available with SPICE re-enabled. The repo definition + lives in kolla/template/repos.yaml so deployers can override + it like any other extra repo. + #} + {% set nova_libvirt_extra_repos = nova_libvirt_extra_repos + ['ligenix-qemu-spice'] %} + {% endif %} + +{{ macros.enable_extra_repos(nova_libvirt_extra_repos) }} + + {% set nova_libvirt_packages = [ + 'ceph-common', + 'cyrus-sasl-md5', + 'cyrus-sasl-scram', + 'libguestfs', + 'libvirt-client', + 'libvirt-daemon', + 'libvirt-daemon-log', + 'libvirt-daemon-config-nwfilter', + 'libvirt-daemon-driver-nwfilter', + 'libvirt-daemon-driver-nodedev', + 'openvswitch${KOLLA_RPM_OVS_VERSION}', + 'qemu-img', + 'qemu-kvm', + 'swtpm', + ] %} + {% if base_arch == 'x86_64' %} + {% set nova_libvirt_packages = nova_libvirt_packages + [ + 'edk2-ovmf' + ] %} + {% elif base_arch == 'aarch64' %} + {% set nova_libvirt_packages = nova_libvirt_packages + [ + 'edk2-aarch64' + ] %} + {% endif %} + + {% if use_ligenix_qemu | default(false) and base_distro == 'rocky' %} + {% set nova_libvirt_packages = nova_libvirt_packages + [ + 'qemu-kvm-ui-spice', + 'spice-server', + ] %} + {% endif %} + +{% elif base_package_type == 'deb' %} + + {% set nova_libvirt_packages = [ + 'ceph-common', + 'ebtables', + 'libsasl2-modules-gssapi-mit', + 'libvirt-clients', + 'libvirt-daemon-system', + 'mdevctl', + 'openvswitch-switch', + 'pm-utils', + 'python3-cephfs', + 'python3-rados', + 'python3-rbd', + 'qemu-block-extra', + 'qemu-system', + 'qemu-system-modules-spice', + 'qemu-utils', + 'sasl2-bin', + 'swtpm', + 'swtpm-tools', + 'tpm2-tools', + 'trousers' + ] %} + + {% if base_arch == "aarch64" %} + {% set nova_libvirt_packages = nova_libvirt_packages + [ + 'qemu-efi-aarch64' + ] %} + {% elif base_arch == "x86_64" %} + {% set nova_libvirt_packages = nova_libvirt_packages + [ + 'ovmf', + ] %} + {% endif %} + + {% if base_distro in ['debian'] %} + {% set nova_libvirt_packages = nova_libvirt_packages + [ + 'libvirt-daemon-log', + 'usermode' + ] %} + {% endif %} +{% endif %} + +{{ macros.install_packages(nova_libvirt_packages | customizable("packages")) }} + +{% if base_package_type == 'deb' %} + +RUN rm -f /etc/libvirt/qemu/networks/default.xml /etc/libvirt/qemu/networks/autostart/default.xml + +{% endif %} + +COPY extend_start.sh /usr/local/bin/kolla_extend_start +COPY kolla_nova_libvirt_start.sh /usr/local/bin/kolla_nova_libvirt_start +RUN chmod 644 /usr/local/bin/kolla_extend_start && chmod 744 /usr/local/bin/kolla_nova_libvirt_start + +{{ macros.kolla_patch_sources() }} + +{% block nova_libvirt_footer %}{% endblock %} +{% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/nova/nova-libvirt/extend_start.sh b/kolla/docker/nova/nova-libvirt-spice/extend_start.sh index cc41b480b..cc41b480b 100644 --- a/docker/nova/nova-libvirt/extend_start.sh +++ b/kolla/docker/nova/nova-libvirt-spice/extend_start.sh diff --git a/kolla/docker/nova/nova-libvirt-spice/kolla_nova_libvirt_start.sh b/kolla/docker/nova/nova-libvirt-spice/kolla_nova_libvirt_start.sh new file mode 100644 index 000000000..f06a63d9e --- /dev/null +++ b/kolla/docker/nova/nova-libvirt-spice/kolla_nova_libvirt_start.sh @@ -0,0 +1,12 @@ +#!/bin/bash +set -euo pipefail + +# NOTE(mikal): Start virtlogd as a sidecar. We need this for +# nova instance console logs to rotate. Otherwise they will +# consume unbounded amounts of disk. +# +# No exec here: libvirtd will be the "main" process. +/usr/sbin/virtlogd & + +# Now hand over PID 1's direct child role to libvirtd. +exec /usr/sbin/libvirtd --listen diff --git a/docker/nova/nova-libvirt/Dockerfile.j2 b/kolla/docker/nova/nova-libvirt/Dockerfile.j2 index ea165b100..cfca7306a 100644 --- a/docker/nova/nova-libvirt/Dockerfile.j2 +++ b/kolla/docker/nova/nova-libvirt/Dockerfile.j2 @@ -1,18 +1,20 @@ FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block nova_libvirt_header %}{% endblock %} {% import "macros.j2" as macros with context %} -{{ macros.configure_user(name='nova', groups='qemu') }} +{{ macros.kolla_enable_base_repos() }} -{{ macros.enable_extra_repos(['ceph', 'crb', 'epel', 'openvswitch']) }} +{{ macros.configure_user(name='nova', groups='qemu') }} {% if base_package_type == 'rpm' %} +{{ macros.enable_extra_repos(['ceph', 'crb', 'epel', 'openvswitch']) }} + {% set nova_libvirt_packages = [ 'ceph-common', 'cyrus-sasl-md5', @@ -20,6 +22,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'libguestfs', 'libvirt-client', 'libvirt-daemon', + 'libvirt-daemon-log', 'libvirt-daemon-config-nwfilter', 'libvirt-daemon-driver-nwfilter', 'libvirt-daemon-driver-nodedev', @@ -54,6 +57,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'python3-rbd', 'qemu-block-extra', 'qemu-system', + 'qemu-system-modules-spice', 'qemu-utils', 'sasl2-bin', 'swtpm', @@ -74,6 +78,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if base_distro in ['debian'] %} {% set nova_libvirt_packages = nova_libvirt_packages + [ + 'libvirt-daemon-log', 'usermode' ] %} {% endif %} @@ -88,9 +93,11 @@ RUN rm -f /etc/libvirt/qemu/networks/default.xml /etc/libvirt/qemu/networks/auto {% endif %} COPY extend_start.sh /usr/local/bin/kolla_extend_start -RUN chmod 644 /usr/local/bin/kolla_extend_start +COPY kolla_nova_libvirt_start.sh /usr/local/bin/kolla_nova_libvirt_start +RUN chmod 644 /usr/local/bin/kolla_extend_start && chmod 744 /usr/local/bin/kolla_nova_libvirt_start {{ macros.kolla_patch_sources() }} {% block nova_libvirt_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/kolla/docker/nova/nova-libvirt/extend_start.sh b/kolla/docker/nova/nova-libvirt/extend_start.sh new file mode 100644 index 000000000..cc41b480b --- /dev/null +++ b/kolla/docker/nova/nova-libvirt/extend_start.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +if [[ ! -e "/var/log/kolla/libvirt/libvirtd.log" ]]; then + mkdir -p /var/log/kolla/libvirt + touch /var/log/kolla/libvirt/libvirtd.log + chmod 644 /var/log/kolla/libvirt/libvirtd.log +fi +if [[ $(stat -c %a /var/log/kolla/libvirt) != "755" ]]; then + chmod 755 /var/log/kolla/libvirt + chmod 644 /var/log/kolla/libvirt/libvirtd.log +fi diff --git a/kolla/docker/nova/nova-libvirt/kolla_nova_libvirt_start.sh b/kolla/docker/nova/nova-libvirt/kolla_nova_libvirt_start.sh new file mode 100644 index 000000000..f06a63d9e --- /dev/null +++ b/kolla/docker/nova/nova-libvirt/kolla_nova_libvirt_start.sh @@ -0,0 +1,12 @@ +#!/bin/bash +set -euo pipefail + +# NOTE(mikal): Start virtlogd as a sidecar. We need this for +# nova instance console logs to rotate. Otherwise they will +# consume unbounded amounts of disk. +# +# No exec here: libvirtd will be the "main" process. +/usr/sbin/virtlogd & + +# Now hand over PID 1's direct child role to libvirtd. +exec /usr/sbin/libvirtd --listen diff --git a/docker/nova/nova-novncproxy/Dockerfile.j2 b/kolla/docker/nova/nova-novncproxy/Dockerfile.j2 index 208637b9a..2c13db694 100644 --- a/docker/nova/nova-novncproxy/Dockerfile.j2 +++ b/kolla/docker/nova/nova-novncproxy/Dockerfile.j2 @@ -1,12 +1,14 @@ FROM {{ namespace }}/{{ image_prefix }}nova-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block nova_novncproxy_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {% set nova_novncproxy_packages = [ 'novnc' ] %} @@ -17,5 +19,6 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% block nova_novncproxy_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} USER nova diff --git a/docker/nova/nova-scheduler/Dockerfile.j2 b/kolla/docker/nova/nova-scheduler/Dockerfile.j2 index 16d8aba10..5b0b0b98e 100644 --- a/docker/nova/nova-scheduler/Dockerfile.j2 +++ b/kolla/docker/nova/nova-scheduler/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}nova-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block nova_scheduler_header %}{% endblock %} diff --git a/docker/nova/nova-serialproxy/Dockerfile.j2 b/kolla/docker/nova/nova-serialproxy/Dockerfile.j2 index 62e859efa..c63e925d5 100644 --- a/docker/nova/nova-serialproxy/Dockerfile.j2 +++ b/kolla/docker/nova/nova-serialproxy/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}nova-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block nova_serialproxy_header %}{% endblock %} diff --git a/docker/nova/nova-spicehtml5proxy/Dockerfile.j2 b/kolla/docker/nova/nova-spicehtml5proxy/Dockerfile.j2 index fe7a671b4..4d22973f5 100644 --- a/docker/nova/nova-spicehtml5proxy/Dockerfile.j2 +++ b/kolla/docker/nova/nova-spicehtml5proxy/Dockerfile.j2 @@ -1,12 +1,14 @@ FROM {{ namespace }}/{{ image_prefix }}nova-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block nova_spicehtml5proxy_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {% if base_package_type == 'rpm' %} {% set nova_spicehtml5proxy_packages = [ @@ -29,5 +31,6 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% block nova_spicehtml5proxy_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} USER nova diff --git a/docker/nova/nova-ssh/Dockerfile.j2 b/kolla/docker/nova/nova-ssh/Dockerfile.j2 index a17df28cb..dfb269180 100644 --- a/docker/nova/nova-ssh/Dockerfile.j2 +++ b/kolla/docker/nova/nova-ssh/Dockerfile.j2 @@ -1,12 +1,14 @@ FROM {{ namespace }}/{{ image_prefix }}nova-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block nova_ssh_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {{ macros.configure_user(name='nova', shell='/bin/bash') }} {% set nova_ssh_packages = [ @@ -32,3 +34,4 @@ RUN sed -ri 's/session(\s+)required(\s+)pam_loginuid.so/session\1optional\2pam_l {% block nova_ssh_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/nova/nova-ssh/extend_start.sh b/kolla/docker/nova/nova-ssh/extend_start.sh index b80114c0a..b80114c0a 100644 --- a/docker/nova/nova-ssh/extend_start.sh +++ b/kolla/docker/nova/nova-ssh/extend_start.sh diff --git a/docker/octavia/octavia-api/Dockerfile.j2 b/kolla/docker/octavia/octavia-api/Dockerfile.j2 index 64e03e01d..c5c7406a8 100644 --- a/docker/octavia/octavia-api/Dockerfile.j2 +++ b/kolla/docker/octavia/octavia-api/Dockerfile.j2 @@ -1,12 +1,14 @@ FROM {{ namespace }}/{{ image_prefix }}octavia-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block octavia_api_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {% set octavia_api_packages = [ ] %} @@ -29,3 +31,4 @@ RUN if [ "$(ls /plugins)" ]; then \ {% block octavia_api_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/octavia/octavia-api/extend_start.sh b/kolla/docker/octavia/octavia-api/extend_start.sh index 3c45e2558..b05d8abf1 100644 --- a/docker/octavia/octavia-api/extend_start.sh +++ b/kolla/docker/octavia/octavia-api/extend_start.sh @@ -7,5 +7,3 @@ if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then octavia-db-manage upgrade_persistence exit 0 fi - -. /usr/local/bin/kolla_httpd_setup diff --git a/docker/octavia/octavia-base/Dockerfile.j2 b/kolla/docker/octavia/octavia-base/Dockerfile.j2 index 5c0327470..9cd040578 100644 --- a/docker/octavia/octavia-base/Dockerfile.j2 +++ b/kolla/docker/octavia/octavia-base/Dockerfile.j2 @@ -1,17 +1,20 @@ FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block octavia_base_header %}{% endblock %} {% import "macros.j2" as macros with context %} -{{ macros.enable_extra_repos(['openvswitch']) }} +{{ macros.kolla_enable_base_repos() }} + {{ macros.configure_user(name='octavia') }} {% if base_package_type == 'rpm' %} +{{ macros.enable_extra_repos(['openvswitch']) }} + {% set octavia_base_packages = [ 'python3-openvswitch${KOLLA_RPM_OVS_VERSION}' ] %} @@ -45,3 +48,4 @@ RUN ln -s /octavia-base-source/* octavia \ {{ macros.kolla_patch_sources() }} {% block octavia_base_footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/octavia/octavia-base/extend_start.sh b/kolla/docker/octavia/octavia-base/extend_start.sh index b27a88a31..b27a88a31 100644 --- a/docker/octavia/octavia-base/extend_start.sh +++ b/kolla/docker/octavia/octavia-base/extend_start.sh diff --git a/docker/octavia/octavia-driver-agent/Dockerfile.j2 b/kolla/docker/octavia/octavia-driver-agent/Dockerfile.j2 index 02f778034..fdd078ed7 100644 --- a/docker/octavia/octavia-driver-agent/Dockerfile.j2 +++ b/kolla/docker/octavia/octavia-driver-agent/Dockerfile.j2 @@ -1,12 +1,14 @@ FROM {{ namespace }}/{{ image_prefix }}octavia-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block octavia_driver_agent_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {% set octavia_driver_agent_packages = [ ] %} @@ -25,5 +27,6 @@ RUN if [ "$(ls /plugins)" ]; then \ {% block octavia_driver_agent_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} USER octavia diff --git a/docker/octavia/octavia-health-manager/Dockerfile.j2 b/kolla/docker/octavia/octavia-health-manager/Dockerfile.j2 index d45b2340b..1ffbe2050 100644 --- a/docker/octavia/octavia-health-manager/Dockerfile.j2 +++ b/kolla/docker/octavia/octavia-health-manager/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}octavia-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block octavia_health_manager_header %}{% endblock %} diff --git a/docker/octavia/octavia-housekeeping/Dockerfile.j2 b/kolla/docker/octavia/octavia-housekeeping/Dockerfile.j2 index 3602e1830..775797cca 100644 --- a/docker/octavia/octavia-housekeeping/Dockerfile.j2 +++ b/kolla/docker/octavia/octavia-housekeeping/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}octavia-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block octavia_housekeeping_header %}{% endblock %} diff --git a/docker/octavia/octavia-worker/Dockerfile.j2 b/kolla/docker/octavia/octavia-worker/Dockerfile.j2 index 4545d7c34..85d4727b7 100644 --- a/docker/octavia/octavia-worker/Dockerfile.j2 +++ b/kolla/docker/octavia/octavia-worker/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}octavia-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block octavia_worker_header %}{% endblock %} diff --git a/docker/opensearch/opensearch-dashboards/Dockerfile.j2 b/kolla/docker/opensearch/opensearch-dashboards/Dockerfile.j2 index 4edf1bf63..f6bd31587 100644 --- a/docker/opensearch/opensearch-dashboards/Dockerfile.j2 +++ b/kolla/docker/opensearch/opensearch-dashboards/Dockerfile.j2 @@ -1,12 +1,14 @@ FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block opensearch_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {{ macros.configure_user(name='opensearch-dashboards', shell='/bin/bash', homedir='/usr/share/opensearch-dashboards') }} {{ macros.enable_extra_repos(['opensearch-dashboards']) }} @@ -22,5 +24,6 @@ RUN chmod 755 /usr/local/bin/kolla_extend_start {% block opensearch_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} USER opensearch-dashboards diff --git a/docker/opensearch/opensearch-dashboards/extend_start.sh b/kolla/docker/opensearch/opensearch-dashboards/extend_start.sh index 608bb34bf..608bb34bf 100644 --- a/docker/opensearch/opensearch-dashboards/extend_start.sh +++ b/kolla/docker/opensearch/opensearch-dashboards/extend_start.sh diff --git a/docker/opensearch/opensearch/Dockerfile.j2 b/kolla/docker/opensearch/opensearch/Dockerfile.j2 index 207d42cad..2765d9985 100644 --- a/docker/opensearch/opensearch/Dockerfile.j2 +++ b/kolla/docker/opensearch/opensearch/Dockerfile.j2 @@ -1,12 +1,14 @@ FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block opensearch_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {{ macros.configure_user(name='opensearch', shell='/bin/bash', homedir='/usr/share/opensearch') }} {{ macros.enable_extra_repos(['opensearch']) }} @@ -28,5 +30,6 @@ RUN chmod 755 /usr/local/bin/kolla_extend_start {% block opensearch_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} USER opensearch diff --git a/docker/opensearch/opensearch/extend_start.sh b/kolla/docker/opensearch/opensearch/extend_start.sh index 5855b1be2..5855b1be2 100644 --- a/docker/opensearch/opensearch/extend_start.sh +++ b/kolla/docker/opensearch/opensearch/extend_start.sh diff --git a/docker/openstack-base/Dockerfile.j2 b/kolla/docker/openstack-base/Dockerfile.j2 index 47301fff9..e062045c9 100644 --- a/docker/openstack-base/Dockerfile.j2 +++ b/kolla/docker/openstack-base/Dockerfile.j2 @@ -1,15 +1,18 @@ FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block openstack_base_header %}{% endblock %} {% import "macros.j2" as macros with context %} -{{ macros.enable_extra_repos(['crb', 'epel']) }} +{{ macros.kolla_enable_base_repos() }} {% if base_package_type == 'rpm' %} + +{{ macros.enable_extra_repos(['crb', 'epel']) }} + {% set openstack_base_packages = [ 'gcc', 'gcc-c++', @@ -29,7 +32,6 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'postgresql-devel', 'postgresql-server-devel', 'python3-devel', - 'python3-mod_wsgi', 'sqlite-devel', 'uwsgi-plugin-python3', 'zip' @@ -37,13 +39,11 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% elif base_package_type == 'deb' %} {% set openstack_base_packages = [ - 'apache2', 'build-essential', 'ca-certificates', 'git', - 'libapache2-mod-wsgi-py3', 'libffi-dev', - 'libpcre3-dev', + 'libpcre2-dev', 'libpq-dev', 'libssl-dev', 'libxml2-dev', @@ -62,7 +62,6 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.install_packages(openstack_base_packages | customizable("packages")) }} {% set openstack_base_pip_packages = [ - 'Babel', 'Mako', 'MarkupSafe', 'Paste', @@ -173,10 +172,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'simplegeneric', 'simplejson', 'six', - 'sqlalchemy-migrate', 'sqlparse', 'stevedore', - 'tooz[consul,etcd,etcd3gw,zake,redis,postgresql,mysql,zookeeper,memcached,ipc]', + 'tooz[consul,etcd,etcd3gw,redis,postgresql,mysql,zookeeper,memcached,ipc]', 'unicodecsv', 'uwsgi', 'warlock', @@ -212,13 +210,7 @@ ENV PATH /var/lib/kolla/venv/bin:$PATH RUN {{ macros.install_pip(['pip', 'wheel', 'setuptools']) }} \ && {{ macros.install_pip(openstack_base_pip_packages | customizable("pip_packages")) }} -{% if base_package_type == 'rpm' %} -RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ - && sed -i -r 's,^(Listen 443),#\1,' /etc/httpd/conf.d/ssl.conf -{% elif base_package_type == 'deb' %} -RUN echo > /etc/apache2/ports.conf -{% endif %} - {{ macros.kolla_patch_sources() }} {% block openstack_base_footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/openvswitch/openvswitch-base/Dockerfile.j2 b/kolla/docker/openvswitch/openvswitch-base/Dockerfile.j2 index 1a40e846e..46fe0be83 100644 --- a/docker/openvswitch/openvswitch-base/Dockerfile.j2 +++ b/kolla/docker/openvswitch/openvswitch-base/Dockerfile.j2 @@ -1,17 +1,20 @@ FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block openvswitch_base_header %}{% endblock %} {% import "macros.j2" as macros with context %} -{{ macros.enable_extra_repos(['openvswitch']) }} +{{ macros.kolla_enable_base_repos() }} {% block ovs_install %} {% if base_package_type == 'rpm' %} + +{{ macros.enable_extra_repos(['openvswitch']) }} + {% set openvswitch_base_packages = [ 'libibverbs', 'openvswitch${KOLLA_RPM_OVS_VERSION}', @@ -42,3 +45,4 @@ RUN if [ -e /usr/sbin/tcpdump ]; then mv /usr/sbin/tcpdump /usr/bin/tcpdump; fi {{ macros.kolla_patch_sources() }} {% block openvswitch_base_footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/openvswitch/openvswitch-base/extend_start.sh b/kolla/docker/openvswitch/openvswitch-base/extend_start.sh index 1b0ed1300..1b0ed1300 100644 --- a/docker/openvswitch/openvswitch-base/extend_start.sh +++ b/kolla/docker/openvswitch/openvswitch-base/extend_start.sh diff --git a/docker/openvswitch/openvswitch-base/ovs_wrapper.sh b/kolla/docker/openvswitch/openvswitch-base/ovs_wrapper.sh index 552c496ac..552c496ac 100644 --- a/docker/openvswitch/openvswitch-base/ovs_wrapper.sh +++ b/kolla/docker/openvswitch/openvswitch-base/ovs_wrapper.sh diff --git a/docker/openvswitch/openvswitch-db-server/Dockerfile.j2 b/kolla/docker/openvswitch/openvswitch-db-server/Dockerfile.j2 index 59d701dfb..869dbabb6 100644 --- a/docker/openvswitch/openvswitch-db-server/Dockerfile.j2 +++ b/kolla/docker/openvswitch/openvswitch-db-server/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}openvswitch-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block openvswitch_db_server_header %}{% endblock %} diff --git a/docker/openvswitch/openvswitch-db-server/extend_start.sh b/kolla/docker/openvswitch/openvswitch-db-server/extend_start.sh index d25038bdd..d25038bdd 100644 --- a/docker/openvswitch/openvswitch-db-server/extend_start.sh +++ b/kolla/docker/openvswitch/openvswitch-db-server/extend_start.sh diff --git a/docker/openvswitch/openvswitch-db-server/releasenotes/notes/drop-ovs-ensure-configured-7973d36969e157fa.yaml b/kolla/docker/openvswitch/openvswitch-db-server/releasenotes/notes/drop-ovs-ensure-configured-7973d36969e157fa.yaml index cc8daf1f4..cc8daf1f4 100644 --- a/docker/openvswitch/openvswitch-db-server/releasenotes/notes/drop-ovs-ensure-configured-7973d36969e157fa.yaml +++ b/kolla/docker/openvswitch/openvswitch-db-server/releasenotes/notes/drop-ovs-ensure-configured-7973d36969e157fa.yaml diff --git a/docker/openvswitch/openvswitch-vswitchd/Dockerfile.j2 b/kolla/docker/openvswitch/openvswitch-vswitchd/Dockerfile.j2 index a0f761a83..fe6dd4347 100644 --- a/docker/openvswitch/openvswitch-vswitchd/Dockerfile.j2 +++ b/kolla/docker/openvswitch/openvswitch-vswitchd/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}openvswitch-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block openvswitch_vswitchd_header %}{% endblock %} diff --git a/docker/openvswitch/openvswitch-vswitchd/extend_start.sh b/kolla/docker/openvswitch/openvswitch-vswitchd/extend_start.sh index fde542130..fde542130 100644 --- a/docker/openvswitch/openvswitch-vswitchd/extend_start.sh +++ b/kolla/docker/openvswitch/openvswitch-vswitchd/extend_start.sh diff --git a/docker/ovn/ovn-base/Dockerfile.j2 b/kolla/docker/ovn/ovn-base/Dockerfile.j2 index 0871383d3..96893782a 100644 --- a/docker/ovn/ovn-base/Dockerfile.j2 +++ b/kolla/docker/ovn/ovn-base/Dockerfile.j2 @@ -1,13 +1,18 @@ FROM {{ namespace }}/{{ image_prefix }}openvswitch-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block ovn_base_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {% if base_package_type == 'rpm' %} + +{{ macros.enable_extra_repos(['openvswitch']) }} + {% set ovn_base_packages = [ 'ovn${KOLLA_RPM_OVN_VERSION}', ] %} @@ -27,3 +32,4 @@ RUN chmod 644 /usr/local/bin/kolla_extend_start {{ macros.kolla_patch_sources() }} {% block ovn_base_footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/ovn/ovn-base/extend_start.sh b/kolla/docker/ovn/ovn-base/extend_start.sh index eae4ab9e1..eae4ab9e1 100644 --- a/docker/ovn/ovn-base/extend_start.sh +++ b/kolla/docker/ovn/ovn-base/extend_start.sh diff --git a/docker/ovn/ovn-controller/Dockerfile.j2 b/kolla/docker/ovn/ovn-controller/Dockerfile.j2 index 8dfcb163d..b70db50e6 100644 --- a/docker/ovn/ovn-controller/Dockerfile.j2 +++ b/kolla/docker/ovn/ovn-controller/Dockerfile.j2 @@ -1,13 +1,18 @@ FROM {{ namespace }}/{{ image_prefix }}ovn-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block ovn_controller_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {% if base_package_type == 'rpm' %} + +{{ macros.enable_extra_repos(['openvswitch']) }} + {% set ovn_controller_packages = [ 'ovn${KOLLA_RPM_OVN_VERSION}-host' ] %} @@ -27,3 +32,4 @@ RUN chmod 644 /usr/local/bin/kolla_ovn_extend_start {% block ovn_controller_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/ovn/ovn-controller/extend_start.sh b/kolla/docker/ovn/ovn-controller/extend_start.sh index 8080ea7c8..8080ea7c8 100644 --- a/docker/ovn/ovn-controller/extend_start.sh +++ b/kolla/docker/ovn/ovn-controller/extend_start.sh diff --git a/docker/ovn/ovn-nb-db-server/Dockerfile.j2 b/kolla/docker/ovn/ovn-nb-db-server/Dockerfile.j2 index 05d99d437..472c6e8c9 100644 --- a/docker/ovn/ovn-nb-db-server/Dockerfile.j2 +++ b/kolla/docker/ovn/ovn-nb-db-server/Dockerfile.j2 @@ -1,13 +1,18 @@ FROM {{ namespace }}/{{ image_prefix }}ovn-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block ovn_nb_db_server_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {% if base_package_type == 'rpm' %} + +{{ macros.enable_extra_repos(['openvswitch']) }} + {% set ovn_nb_db_server_packages = [ 'ovn${KOLLA_RPM_OVN_VERSION}-central', ] %} @@ -29,3 +34,4 @@ RUN chmod 644 /usr/local/bin/kolla_ovn_extend_start {% block ovn_nb_db_server_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/ovn/ovn-nb-db-server/extend_start.sh b/kolla/docker/ovn/ovn-nb-db-server/extend_start.sh index 4c0e742f5..4c0e742f5 100644 --- a/docker/ovn/ovn-nb-db-server/extend_start.sh +++ b/kolla/docker/ovn/ovn-nb-db-server/extend_start.sh diff --git a/docker/ovn/ovn-nb-db-server/start_nb_db_server.sh b/kolla/docker/ovn/ovn-nb-db-server/start_nb_db_server.sh index d08dd2890..d08dd2890 100755 --- a/docker/ovn/ovn-nb-db-server/start_nb_db_server.sh +++ b/kolla/docker/ovn/ovn-nb-db-server/start_nb_db_server.sh diff --git a/docker/ovn/ovn-northd/Dockerfile.j2 b/kolla/docker/ovn/ovn-northd/Dockerfile.j2 index 2d1a873dc..6a9c1b03f 100644 --- a/docker/ovn/ovn-northd/Dockerfile.j2 +++ b/kolla/docker/ovn/ovn-northd/Dockerfile.j2 @@ -1,13 +1,18 @@ FROM {{ namespace }}/{{ image_prefix }}ovn-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block ovn_northd_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {% if base_package_type == 'rpm' %} + +{{ macros.enable_extra_repos(['openvswitch']) }} + {% set ovn_northd_packages = [ 'ovn${KOLLA_RPM_OVN_VERSION}-central', ] %} @@ -27,3 +32,4 @@ RUN chmod 644 /usr/local/bin/kolla_ovn_extend_start {% block ovn_northd_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/ovn/ovn-northd/extend_start.sh b/kolla/docker/ovn/ovn-northd/extend_start.sh index c832c5383..c832c5383 100644 --- a/docker/ovn/ovn-northd/extend_start.sh +++ b/kolla/docker/ovn/ovn-northd/extend_start.sh diff --git a/kolla/docker/ovn/ovn-sb-db-relay/Dockerfile.j2 b/kolla/docker/ovn/ovn-sb-db-relay/Dockerfile.j2 new file mode 100644 index 000000000..667c89afd --- /dev/null +++ b/kolla/docker/ovn/ovn-sb-db-relay/Dockerfile.j2 @@ -0,0 +1,15 @@ +FROM {{ namespace }}/{{ image_prefix }}ovn-sb-db-server:{{ tag }} +{% block labels %} +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" +{% endblock %} + +{% block ovn_sb_db_server_header %}{% endblock %} + +{% import "macros.j2" as macros with context %} + +COPY extend_start.sh /usr/local/bin/kolla_ovn_extend_start +RUN chmod 644 /usr/local/bin/kolla_ovn_extend_start + +{{ macros.kolla_patch_sources() }} +{% block ovn_sb_db_relay_footer %}{% endblock %} +{% block footer %}{% endblock %} diff --git a/docker/ovn/ovn-sb-db-relay/extend_start.sh b/kolla/docker/ovn/ovn-sb-db-relay/extend_start.sh index 04b6c5357..04b6c5357 100644 --- a/docker/ovn/ovn-sb-db-relay/extend_start.sh +++ b/kolla/docker/ovn/ovn-sb-db-relay/extend_start.sh diff --git a/docker/ovn/ovn-sb-db-server/Dockerfile.j2 b/kolla/docker/ovn/ovn-sb-db-server/Dockerfile.j2 index 96d27ce1f..419622389 100644 --- a/docker/ovn/ovn-sb-db-server/Dockerfile.j2 +++ b/kolla/docker/ovn/ovn-sb-db-server/Dockerfile.j2 @@ -1,13 +1,18 @@ FROM {{ namespace }}/{{ image_prefix }}ovn-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block ovn_sb_db_server_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {% if base_package_type == 'rpm' %} + +{{ macros.enable_extra_repos(['openvswitch']) }} + {% set ovn_sb_db_server_packages = [ 'ovn${KOLLA_RPM_OVN_VERSION}-central', ] %} @@ -29,3 +34,4 @@ RUN chmod 644 /usr/local/bin/kolla_ovn_extend_start {% block ovn_sb_db_server_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/ovn/ovn-sb-db-server/extend_start.sh b/kolla/docker/ovn/ovn-sb-db-server/extend_start.sh index 07bcd1b45..07bcd1b45 100644 --- a/docker/ovn/ovn-sb-db-server/extend_start.sh +++ b/kolla/docker/ovn/ovn-sb-db-server/extend_start.sh diff --git a/docker/ovn/ovn-sb-db-server/start_sb_db_server.sh b/kolla/docker/ovn/ovn-sb-db-server/start_sb_db_server.sh index ef39b8d25..ef39b8d25 100755 --- a/docker/ovn/ovn-sb-db-server/start_sb_db_server.sh +++ b/kolla/docker/ovn/ovn-sb-db-server/start_sb_db_server.sh diff --git a/docker/ovsdpdk/ovsdpdk-db/Dockerfile.j2 b/kolla/docker/ovsdpdk/ovsdpdk-db/Dockerfile.j2 index 3b2e99854..2527fa0e6 100644 --- a/docker/ovsdpdk/ovsdpdk-db/Dockerfile.j2 +++ b/kolla/docker/ovsdpdk/ovsdpdk-db/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}ovsdpdk:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block ovsdpdk_db_header %}{% endblock %} diff --git a/docker/ovsdpdk/ovsdpdk-db/extend_start.sh b/kolla/docker/ovsdpdk/ovsdpdk-db/extend_start.sh index 3883b50ed..3883b50ed 100644 --- a/docker/ovsdpdk/ovsdpdk-db/extend_start.sh +++ b/kolla/docker/ovsdpdk/ovsdpdk-db/extend_start.sh diff --git a/docker/ovsdpdk/ovsdpdk-db/start_ovsdb_server.sh b/kolla/docker/ovsdpdk/ovsdpdk-db/start_ovsdb_server.sh index 5c92fba78..5c92fba78 100755 --- a/docker/ovsdpdk/ovsdpdk-db/start_ovsdb_server.sh +++ b/kolla/docker/ovsdpdk/ovsdpdk-db/start_ovsdb_server.sh diff --git a/docker/ovsdpdk/ovsdpdk-vswitchd/Dockerfile.j2 b/kolla/docker/ovsdpdk/ovsdpdk-vswitchd/Dockerfile.j2 index 378103b9c..059efd46b 100644 --- a/docker/ovsdpdk/ovsdpdk-vswitchd/Dockerfile.j2 +++ b/kolla/docker/ovsdpdk/ovsdpdk-vswitchd/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}ovsdpdk:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block ovsdpdk_vswitchd_header %}{% endblock %} diff --git a/docker/ovsdpdk/ovsdpdk-vswitchd/extend_start.sh b/kolla/docker/ovsdpdk/ovsdpdk-vswitchd/extend_start.sh index cf9d733e8..cf9d733e8 100644 --- a/docker/ovsdpdk/ovsdpdk-vswitchd/extend_start.sh +++ b/kolla/docker/ovsdpdk/ovsdpdk-vswitchd/extend_start.sh diff --git a/docker/ovsdpdk/ovsdpdk/Dockerfile.j2 b/kolla/docker/ovsdpdk/ovsdpdk/Dockerfile.j2 index 47a6d3473..fc0b55646 100644 --- a/docker/ovsdpdk/ovsdpdk/Dockerfile.j2 +++ b/kolla/docker/ovsdpdk/ovsdpdk/Dockerfile.j2 @@ -1,9 +1,11 @@ FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% import "macros.j2" as macros with context %} + +{{ macros.kolla_enable_base_repos() }} {% block ovsdpdk_header %}{% endblock %} {% block ovsdpdk_install %} @@ -11,7 +13,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if base_package_type == 'rpm' %} #TODO(sean-k-mooney) create repo via open suse build system to package -# for centos distro. +# for rocky distro. RUN echo 'image not yet available for {{ base_distro }}' \ && /bin/false @@ -38,3 +40,4 @@ RUN chmod 644 /usr/local/bin/kolla_extend_start {{ macros.kolla_patch_sources() }} {% block ovsdpdk_footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/ovsdpdk/ovsdpdk/extend_start.sh b/kolla/docker/ovsdpdk/ovsdpdk/extend_start.sh index 60ab0c088..60ab0c088 100644 --- a/docker/ovsdpdk/ovsdpdk/extend_start.sh +++ b/kolla/docker/ovsdpdk/ovsdpdk/extend_start.sh diff --git a/docker/placement/placement-api/Dockerfile.j2 b/kolla/docker/placement/placement-api/Dockerfile.j2 index 13654f520..6f5281ca4 100644 --- a/docker/placement/placement-api/Dockerfile.j2 +++ b/kolla/docker/placement/placement-api/Dockerfile.j2 @@ -1,12 +1,14 @@ FROM {{ namespace }}/{{ image_prefix }}placement-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block placement_api_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {% set placement_api_packages = [ ] %} {{ macros.install_packages(placement_api_packages | customizable("packages")) }} @@ -17,3 +19,4 @@ COPY extend_start.sh /usr/local/bin/kolla_placement_extend_start {% block placement_api_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/placement/placement-api/extend_start.sh b/kolla/docker/placement/placement-api/extend_start.sh index 0dd48948f..e468cbcaf 100644 --- a/docker/placement/placement-api/extend_start.sh +++ b/kolla/docker/placement/placement-api/extend_start.sh @@ -19,5 +19,3 @@ if [[ "${!KOLLA_OSM[@]}" ]]; then placement-manage db online_data_migrations exit 0 fi - -. /usr/local/bin/kolla_httpd_setup diff --git a/docker/placement/placement-base/Dockerfile.j2 b/kolla/docker/placement/placement-base/Dockerfile.j2 index b4d7519db..258b09cee 100644 --- a/docker/placement/placement-base/Dockerfile.j2 +++ b/kolla/docker/placement/placement-base/Dockerfile.j2 @@ -1,12 +1,14 @@ FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block placement_base_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {{ macros.configure_user(name='placement') }} {% if base_package_type == 'rpm' %} @@ -42,3 +44,4 @@ RUN ln -s placement-base-source/* placement \ {{ macros.kolla_patch_sources() }} {% block placement_base_footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/placement/placement-base/extend_start.sh b/kolla/docker/placement/placement-base/extend_start.sh index 900ea8447..900ea8447 100644 --- a/docker/placement/placement-base/extend_start.sh +++ b/kolla/docker/placement/placement-base/extend_start.sh diff --git a/docker/prometheus/prometheus-alertmanager/Dockerfile.j2 b/kolla/docker/prometheus/prometheus-alertmanager/Dockerfile.j2 index d06f47dde..8f2df0492 100644 --- a/docker/prometheus/prometheus-alertmanager/Dockerfile.j2 +++ b/kolla/docker/prometheus/prometheus-alertmanager/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}prometheus-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block prometheus_alertmanager_header %}{% endblock %} diff --git a/docker/prometheus/prometheus-base/Dockerfile.j2 b/kolla/docker/prometheus/prometheus-base/Dockerfile.j2 index a8032920c..123bd4ba3 100644 --- a/docker/prometheus/prometheus-base/Dockerfile.j2 +++ b/kolla/docker/prometheus/prometheus-base/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block prometheus_base_header %}{% endblock %} diff --git a/docker/prometheus/prometheus-base/extend_start.sh b/kolla/docker/prometheus/prometheus-base/extend_start.sh index 8613330c6..8613330c6 100644 --- a/docker/prometheus/prometheus-base/extend_start.sh +++ b/kolla/docker/prometheus/prometheus-base/extend_start.sh diff --git a/docker/prometheus/prometheus-blackbox-exporter/Dockerfile.j2 b/kolla/docker/prometheus/prometheus-blackbox-exporter/Dockerfile.j2 index cb0b52f62..f918d4f12 100644 --- a/docker/prometheus/prometheus-blackbox-exporter/Dockerfile.j2 +++ b/kolla/docker/prometheus/prometheus-blackbox-exporter/Dockerfile.j2 @@ -1,12 +1,14 @@ FROM {{ namespace }}/{{ image_prefix }}prometheus-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block prometheus_blackbox_exporter_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {% if base_package_type == 'rpm' %} {% set blackbox_packages = [ 'libcap' @@ -32,5 +34,6 @@ RUN ln -s /prometheus-blackbox-exporter-source/* prometheus-blackbox-exporter \ {% block prometheus_blackbox_exporter_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} USER prometheus diff --git a/docker/prometheus/prometheus-cadvisor/Dockerfile.j2 b/kolla/docker/prometheus/prometheus-cadvisor/Dockerfile.j2 index a86183d4b..884f4acd2 100644 --- a/docker/prometheus/prometheus-cadvisor/Dockerfile.j2 +++ b/kolla/docker/prometheus/prometheus-cadvisor/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}prometheus-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block prometheus_cadvisor_header %}{% endblock %} diff --git a/docker/prometheus/prometheus-elasticsearch-exporter/Dockerfile.j2 b/kolla/docker/prometheus/prometheus-elasticsearch-exporter/Dockerfile.j2 index e9dd84f7b..63d09409c 100644 --- a/docker/prometheus/prometheus-elasticsearch-exporter/Dockerfile.j2 +++ b/kolla/docker/prometheus/prometheus-elasticsearch-exporter/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}prometheus-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block prometheus_elasticsearch_exporter_header %}{% endblock %} diff --git a/docker/prometheus/prometheus-libvirt-exporter/Dockerfile.j2 b/kolla/docker/prometheus/prometheus-libvirt-exporter/Dockerfile.j2 index 57330f58b..cdf01797f 100644 --- a/docker/prometheus/prometheus-libvirt-exporter/Dockerfile.j2 +++ b/kolla/docker/prometheus/prometheus-libvirt-exporter/Dockerfile.j2 @@ -1,10 +1,12 @@ FROM {{ namespace }}/{{ image_prefix }}prometheus-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {% block prometheus_libvirt_exporter_header %}{% endblock %} {{ macros.install_packages(prometheus_libvirt_exporter_packages | customizable("packages")) }} @@ -21,5 +23,6 @@ RUN ln -s /prometheus-libvirt-exporter-source/* prometheus-libvirt-exporter \ {% block prometheus_libvirt_exporter_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} USER root diff --git a/docker/prometheus/prometheus-memcached-exporter/Dockerfile.j2 b/kolla/docker/prometheus/prometheus-memcached-exporter/Dockerfile.j2 index a4924ec64..cb50c2095 100644 --- a/docker/prometheus/prometheus-memcached-exporter/Dockerfile.j2 +++ b/kolla/docker/prometheus/prometheus-memcached-exporter/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}prometheus-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block prometheus_memcached_exporter_header %}{% endblock %} diff --git a/docker/prometheus/prometheus-mtail/Dockerfile.j2 b/kolla/docker/prometheus/prometheus-mtail/Dockerfile.j2 index a071bf2a2..a562bfd71 100644 --- a/docker/prometheus/prometheus-mtail/Dockerfile.j2 +++ b/kolla/docker/prometheus/prometheus-mtail/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}prometheus-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block prometheus_mtail_header %}{% endblock %} diff --git a/docker/prometheus/prometheus-mysqld-exporter/Dockerfile.j2 b/kolla/docker/prometheus/prometheus-mysqld-exporter/Dockerfile.j2 index 5965a6c77..f8d2abaa6 100644 --- a/docker/prometheus/prometheus-mysqld-exporter/Dockerfile.j2 +++ b/kolla/docker/prometheus/prometheus-mysqld-exporter/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}prometheus-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block mysqld_exporter_header %}{% endblock %} diff --git a/docker/prometheus/prometheus-node-exporter/Dockerfile.j2 b/kolla/docker/prometheus/prometheus-node-exporter/Dockerfile.j2 index 7a7eaad67..3250d3d7a 100644 --- a/docker/prometheus/prometheus-node-exporter/Dockerfile.j2 +++ b/kolla/docker/prometheus/prometheus-node-exporter/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}prometheus-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block node_exporter_header %}{% endblock %} diff --git a/docker/prometheus/prometheus-openstack-exporter/Dockerfile.j2 b/kolla/docker/prometheus/prometheus-openstack-exporter/Dockerfile.j2 index 547363d30..437f3a6cd 100644 --- a/docker/prometheus/prometheus-openstack-exporter/Dockerfile.j2 +++ b/kolla/docker/prometheus/prometheus-openstack-exporter/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}prometheus-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block prometheus_openstack_exporter_header %}{% endblock %} diff --git a/kolla/docker/prometheus/prometheus-openstack-network-exporter/Dockerfile.j2 b/kolla/docker/prometheus/prometheus-openstack-network-exporter/Dockerfile.j2 new file mode 100644 index 000000000..3d4d9197b --- /dev/null +++ b/kolla/docker/prometheus/prometheus-openstack-network-exporter/Dockerfile.j2 @@ -0,0 +1,24 @@ +FROM {{ namespace }}/{{ image_prefix }}prometheus-base:{{ tag }} +{% block labels %} +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" +{% endblock %} + +{% block prometheus_openstack_network_exporter_header %}{% endblock %} + +{% import "macros.j2" as macros with context %} + +{% block prometheus_openstack_network_exporter_install %} +ADD prometheus-openstack-network-exporter-archive /prometheus-openstack-network-exporter-source + +RUN mkdir /opt/openstack-network-exporter \ + && cp /prometheus-openstack-network-exporter-source /opt/openstack-network-exporter/openstack-network-exporter \ + && chmod 0755 /opt/openstack-network-exporter/openstack-network-exporter +{% endblock %} + +{{ macros.kolla_patch_sources() }} + +{% block prometheus_openstack_network_exporter_footer %}{% endblock %} +{% block footer %}{% endblock %} + +# NOTE: OVN/OVS are running as root. Since we need to read sockets owned by +# these services we don't switch to the Prometheus user here. diff --git a/docker/prometheus/prometheus-server/Dockerfile.j2 b/kolla/docker/prometheus/prometheus-server/Dockerfile.j2 index bcbc3021b..a3b227d7e 100644 --- a/docker/prometheus/prometheus-server/Dockerfile.j2 +++ b/kolla/docker/prometheus/prometheus-server/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}prometheus-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block prometheus_server_header %}{% endblock %} diff --git a/kolla/docker/prometheus/prometheus-valkey-exporter/Dockerfile.j2 b/kolla/docker/prometheus/prometheus-valkey-exporter/Dockerfile.j2 new file mode 100644 index 000000000..348c7fe2a --- /dev/null +++ b/kolla/docker/prometheus/prometheus-valkey-exporter/Dockerfile.j2 @@ -0,0 +1,28 @@ +FROM {{ namespace }}/{{ image_prefix }}prometheus-base:{{ tag }} +{% block labels %} +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" +{% endblock %} + +{% import "macros.j2" as macros with context %} + +{{ macros.kolla_enable_base_repos() }} + +{% block prometheus_valkey_exporter_header %}{% endblock %} + +{{ macros.install_packages(prometheus_valkey_exporter_packages | customizable("packages")) }} + +{% block prometheus_valkey_exporter_install %} +ADD prometheus-valkey-exporter-archive /prometheus-valkey-exporter-source + +RUN ln -s /prometheus-valkey-exporter-source/* prometheus-valkey-exporter \ + && cp /prometheus-valkey-exporter/redis_exporter /opt/valkey-exporter + +{% endblock %} + +{{ macros.kolla_patch_sources() }} + +{% block prometheus_valkey_exporter_footer %}{% endblock %} +{% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} + +USER prometheus diff --git a/docker/proxysql/Dockerfile.j2 b/kolla/docker/proxysql/Dockerfile.j2 index 41df913f9..4ddf7d5cb 100644 --- a/docker/proxysql/Dockerfile.j2 +++ b/kolla/docker/proxysql/Dockerfile.j2 @@ -1,12 +1,14 @@ FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block proxysql_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {{ macros.enable_extra_repos(['proxysql']) }} {% set proxysql_packages = [ @@ -39,5 +41,6 @@ RUN install -g proxysql -o proxysql -m 770 -d /var/lib/kolla/proxysql \ {% block proxysql_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} USER proxysql diff --git a/docker/proxysql/kolla_extend_start b/kolla/docker/proxysql/kolla_extend_start index 229e8ada2..229e8ada2 100644 --- a/docker/proxysql/kolla_extend_start +++ b/kolla/docker/proxysql/kolla_extend_start diff --git a/docker/proxysql/kolla_proxysql_config_sync b/kolla/docker/proxysql/kolla_proxysql_config_sync index 094642c8a..094642c8a 100644 --- a/docker/proxysql/kolla_proxysql_config_sync +++ b/kolla/docker/proxysql/kolla_proxysql_config_sync diff --git a/docker/rabbitmq/Dockerfile.j2 b/kolla/docker/rabbitmq/Dockerfile.j2 index 3ff00eef7..79c762e4c 100644 --- a/docker/rabbitmq/Dockerfile.j2 +++ b/kolla/docker/rabbitmq/Dockerfile.j2 @@ -1,15 +1,17 @@ FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block rabbitmq_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {{ macros.configure_user(name='rabbitmq') }} -{{ macros.enable_extra_repos(['crb', 'erlang', 'rabbitmq']) }} +{{ macros.enable_extra_repos(['erlang', 'rabbitmq']) }} {% block rabbitmq_apt_preferences %} {% if base_package_type == 'deb' %} @@ -20,9 +22,11 @@ COPY apt_preferences_rabbitmq.{{ base_distro }} /etc/apt/preferences.d/rabbitmq {% block rabbitmq_install %} {% if base_package_type == 'rpm' %} +{{ macros.enable_extra_repos(['crb']) }} + {% set rabbitmq_packages = [ 'erlang-27.*', - 'rabbitmq-server-4.1.*' + 'rabbitmq-server-4.3.*' ] %} {% elif base_package_type == 'deb' %} @@ -63,5 +67,6 @@ RUN chmod 644 /usr/local/bin/kolla_extend_start {% block rabbitmq_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} USER rabbitmq diff --git a/docker/rabbitmq/apt_preferences_rabbitmq.debian b/kolla/docker/rabbitmq/apt_preferences_rabbitmq.debian index 714f52fac..547fcef34 100644 --- a/docker/rabbitmq/apt_preferences_rabbitmq.debian +++ b/kolla/docker/rabbitmq/apt_preferences_rabbitmq.debian @@ -1,5 +1,5 @@ Package: rabbitmq-server -Pin: version 4.1.* +Pin: version 4.3.* Pin-Priority: 1000 Package: erlang* diff --git a/docker/rabbitmq/apt_preferences_rabbitmq.ubuntu b/kolla/docker/rabbitmq/apt_preferences_rabbitmq.ubuntu index 714f52fac..547fcef34 100644 --- a/docker/rabbitmq/apt_preferences_rabbitmq.ubuntu +++ b/kolla/docker/rabbitmq/apt_preferences_rabbitmq.ubuntu @@ -1,5 +1,5 @@ Package: rabbitmq-server -Pin: version 4.1.* +Pin: version 4.3.* Pin-Priority: 1000 Package: erlang* diff --git a/docker/rabbitmq/extend_start.sh b/kolla/docker/rabbitmq/extend_start.sh index ef28d2b5f..ef28d2b5f 100644 --- a/docker/rabbitmq/extend_start.sh +++ b/kolla/docker/rabbitmq/extend_start.sh diff --git a/docker/rabbitmq/healthcheck_rabbitmq b/kolla/docker/rabbitmq/healthcheck_rabbitmq index 277ab098c..277ab098c 100644 --- a/docker/rabbitmq/healthcheck_rabbitmq +++ b/kolla/docker/rabbitmq/healthcheck_rabbitmq diff --git a/docker/skyline/skyline-apiserver/Dockerfile.j2 b/kolla/docker/skyline/skyline-apiserver/Dockerfile.j2 index 00c871165..e50b0467d 100644 --- a/docker/skyline/skyline-apiserver/Dockerfile.j2 +++ b/kolla/docker/skyline/skyline-apiserver/Dockerfile.j2 @@ -1,12 +1,14 @@ FROM {{ namespace }}/{{ image_prefix }}skyline-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block skyline_apiserver_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + ADD skyline-apiserver-archive /skyline-apiserver-source {% set skyline_apiserver_pip_packages = [ @@ -23,5 +25,6 @@ RUN ln -s skyline-apiserver-source/* skyline-apiserver \ {% block skyline_apiserver_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} USER skyline diff --git a/docker/skyline/skyline-apiserver/extend_start.sh b/kolla/docker/skyline/skyline-apiserver/extend_start.sh index e1802937b..e1802937b 100644 --- a/docker/skyline/skyline-apiserver/extend_start.sh +++ b/kolla/docker/skyline/skyline-apiserver/extend_start.sh diff --git a/docker/skyline/skyline-base/Dockerfile.j2 b/kolla/docker/skyline/skyline-base/Dockerfile.j2 index 0af501e55..815fa504f 100644 --- a/docker/skyline/skyline-base/Dockerfile.j2 +++ b/kolla/docker/skyline/skyline-base/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block skyline_base_header %}{% endblock %} diff --git a/docker/skyline/skyline-base/extend_start.sh b/kolla/docker/skyline/skyline-base/extend_start.sh index 34362ad04..34362ad04 100644 --- a/docker/skyline/skyline-base/extend_start.sh +++ b/kolla/docker/skyline/skyline-base/extend_start.sh diff --git a/docker/skyline/skyline-console/Dockerfile.j2 b/kolla/docker/skyline/skyline-console/Dockerfile.j2 index fea06a7b6..9b34f503f 100644 --- a/docker/skyline/skyline-console/Dockerfile.j2 +++ b/kolla/docker/skyline/skyline-console/Dockerfile.j2 @@ -1,12 +1,14 @@ FROM {{ namespace }}/{{ image_prefix }}skyline-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block skyline_console_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {% set skyline_console_packages = [ 'nginx' ] %} @@ -26,5 +28,6 @@ RUN ln -s skyline-console-source/* skyline-console \ {% block skyline_console_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} USER root diff --git a/docker/tacker/tacker-base/Dockerfile.j2 b/kolla/docker/tacker/tacker-base/Dockerfile.j2 index 51459eae0..e84a4fe21 100644 --- a/docker/tacker/tacker-base/Dockerfile.j2 +++ b/kolla/docker/tacker/tacker-base/Dockerfile.j2 @@ -1,15 +1,22 @@ FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block tacker_base_header %}{% endblock %} {% import "macros.j2" as macros with context %} -{{ macros.enable_extra_repos(['openvswitch']) }} +{{ macros.kolla_enable_base_repos() }} + {{ macros.configure_user(name='tacker') }} +{% if base_package_type == 'rpm' %} + +{{ macros.enable_extra_repos(['openvswitch']) }} + +{% endif %} + ADD tacker-base-archive /tacker-base-source ADD plugins-archive / @@ -36,3 +43,4 @@ RUN ln -s tacker-base-source/* tacker \ {{ macros.kolla_patch_sources() }} {% block tacker_base_footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/tacker/tacker-base/extend_start.sh b/kolla/docker/tacker/tacker-base/extend_start.sh index a3b7db8d3..a3b7db8d3 100644 --- a/docker/tacker/tacker-base/extend_start.sh +++ b/kolla/docker/tacker/tacker-base/extend_start.sh diff --git a/docker/tacker/tacker-conductor/Dockerfile.j2 b/kolla/docker/tacker/tacker-conductor/Dockerfile.j2 index bbabddbe6..676c90106 100644 --- a/docker/tacker/tacker-conductor/Dockerfile.j2 +++ b/kolla/docker/tacker/tacker-conductor/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}tacker-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block tacker_conductor_header %}{% endblock %} diff --git a/docker/tacker/tacker-server/Dockerfile.j2 b/kolla/docker/tacker/tacker-server/Dockerfile.j2 index 584a23839..659b70bea 100644 --- a/docker/tacker/tacker-server/Dockerfile.j2 +++ b/kolla/docker/tacker/tacker-server/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}tacker-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block tacker_server_header %}{% endblock %} diff --git a/docker/tacker/tacker-server/extend_start.sh b/kolla/docker/tacker/tacker-server/extend_start.sh index 311d21f71..311d21f71 100644 --- a/docker/tacker/tacker-server/extend_start.sh +++ b/kolla/docker/tacker/tacker-server/extend_start.sh diff --git a/docker/tgtd/Dockerfile.j2 b/kolla/docker/tgtd/Dockerfile.j2 index 0fd9fbfaa..864aa1232 100644 --- a/docker/tgtd/Dockerfile.j2 +++ b/kolla/docker/tgtd/Dockerfile.j2 @@ -1,12 +1,14 @@ FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block tgtd_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {% if base_package_type == 'rpm' %} RUN echo 'Not available for {{ base_distro }}' \ @@ -24,3 +26,4 @@ RUN sed -i '1 i include /var/lib/cinder/volumes/*' /etc/tgt/targets.conf {% block tgtd_footer %}{% endblock %} {% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/trove/trove-api/Dockerfile.j2 b/kolla/docker/trove/trove-api/Dockerfile.j2 index 941b79074..8d2885b86 100644 --- a/docker/trove/trove-api/Dockerfile.j2 +++ b/kolla/docker/trove/trove-api/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}trove-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block trove_api_header %}{% endblock %} diff --git a/docker/trove/trove-api/extend_start.sh b/kolla/docker/trove/trove-api/extend_start.sh index 02314baa7..76839e2d4 100644 --- a/docker/trove/trove-api/extend_start.sh +++ b/kolla/docker/trove/trove-api/extend_start.sh @@ -6,5 +6,3 @@ if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then trove-manage db_sync exit 0 fi - -. /usr/local/bin/kolla_httpd_setup diff --git a/docker/trove/trove-base/Dockerfile.j2 b/kolla/docker/trove/trove-base/Dockerfile.j2 index 2a3c18880..5309b744e 100644 --- a/docker/trove/trove-base/Dockerfile.j2 +++ b/kolla/docker/trove/trove-base/Dockerfile.j2 @@ -1,12 +1,14 @@ FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block trove_base_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {{ macros.configure_user(name='trove') }} ADD trove-base-archive /trove-base-source @@ -28,3 +30,4 @@ RUN ln -s trove-base-source/* trove \ {{ macros.kolla_patch_sources() }} {% block trove_base_footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/trove/trove-base/extend_start.sh b/kolla/docker/trove/trove-base/extend_start.sh index 581a83d7b..581a83d7b 100644 --- a/docker/trove/trove-base/extend_start.sh +++ b/kolla/docker/trove/trove-base/extend_start.sh diff --git a/docker/trove/trove-conductor/Dockerfile.j2 b/kolla/docker/trove/trove-conductor/Dockerfile.j2 index 16205c55c..4a038c7f9 100644 --- a/docker/trove/trove-conductor/Dockerfile.j2 +++ b/kolla/docker/trove/trove-conductor/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}trove-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block trove_conductor_header %}{% endblock %} diff --git a/docker/trove/trove-guestagent/Dockerfile.j2 b/kolla/docker/trove/trove-guestagent/Dockerfile.j2 index a35c96342..178260cae 100644 --- a/docker/trove/trove-guestagent/Dockerfile.j2 +++ b/kolla/docker/trove/trove-guestagent/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}trove-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block trove_guestagent_header %}{% endblock %} diff --git a/docker/trove/trove-taskmanager/Dockerfile.j2 b/kolla/docker/trove/trove-taskmanager/Dockerfile.j2 index fcd5dbfca..cef0a0ce9 100644 --- a/docker/trove/trove-taskmanager/Dockerfile.j2 +++ b/kolla/docker/trove/trove-taskmanager/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}trove-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block trove_taskmanager_header %}{% endblock %} diff --git a/docker/redis/redis-base/Dockerfile.j2 b/kolla/docker/valkey/valkey-base/Dockerfile.j2 index 89dccd258..bc17c0cbb 100644 --- a/docker/redis/redis-base/Dockerfile.j2 +++ b/kolla/docker/valkey/valkey-base/Dockerfile.j2 @@ -1,17 +1,17 @@ FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} -{% block redis_base_header %}{% endblock %} +{% block valkey_base_header %}{% endblock %} {% import "macros.j2" as macros with context %} -{{ macros.configure_user(name='redis', homedir='/run/redis') }} +{{ macros.configure_user(name='valkey', homedir='/run/valkey') }} COPY extend_start.sh /usr/local/bin/kolla_extend_start RUN chmod 644 /usr/local/bin/kolla_extend_start {{ macros.kolla_patch_sources() }} -{% block redis_base_footer %}{% endblock %} +{% block valkey_base_footer %}{% endblock %} diff --git a/kolla/docker/valkey/valkey-base/extend_start.sh b/kolla/docker/valkey/valkey-base/extend_start.sh new file mode 100644 index 000000000..3a3a321d4 --- /dev/null +++ b/kolla/docker/valkey/valkey-base/extend_start.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +if [[ ! -d "/var/log/kolla/valkey" ]]; then + mkdir -p /var/log/kolla/valkey +fi + +if [[ $(stat -c %a /var/log/kolla/valkey) != "755" ]]; then + chmod 755 /var/log/kolla/valkey +fi diff --git a/kolla/docker/valkey/valkey-sentinel/Dockerfile.j2 b/kolla/docker/valkey/valkey-sentinel/Dockerfile.j2 new file mode 100644 index 000000000..e9b89113b --- /dev/null +++ b/kolla/docker/valkey/valkey-sentinel/Dockerfile.j2 @@ -0,0 +1,29 @@ +FROM {{ namespace }}/{{ image_prefix }}valkey-base:{{ tag }} +{% block labels %} +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" +{% endblock %} + +{% block valkey_sentinel_header %}{% endblock %} + +{% import "macros.j2" as macros with context %} + +{{ macros.kolla_enable_base_repos() }} + +{% if base_package_type == 'rpm' %} +{{ macros.enable_extra_repos(['epel']) }} + {% set valkey_sentinel_packages = ['valkey'] %} +{% elif base_package_type == 'deb' %} + {% set valkey_sentinel_packages = ['valkey-sentinel'] %} +{% endif %} +{{ macros.install_packages(valkey_sentinel_packages | customizable("packages")) }} + +COPY extend_start.sh /usr/local/bin/kolla_extend_start +RUN chmod 644 /usr/local/bin/kolla_extend_start + +{{ macros.kolla_patch_sources() }} + +{% block valkey_sentinel_footer %}{% endblock %} +{% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} + +USER valkey diff --git a/docker/redis/redis-sentinel/extend_start.sh b/kolla/docker/valkey/valkey-sentinel/extend_start.sh index 9044f3990..e6af42ef6 100644 --- a/docker/redis/redis-sentinel/extend_start.sh +++ b/kolla/docker/valkey/valkey-sentinel/extend_start.sh @@ -1,21 +1,21 @@ #!/bin/bash -if [[ ! -d "/var/log/kolla/redis" ]]; then - mkdir -p /var/log/kolla/redis +if [[ ! -d "/var/log/kolla/valkey" ]]; then + mkdir -p /var/log/kolla/valkey fi -if [[ $(stat -c %a /var/log/kolla/redis) != "755" ]]; then - chmod 755 /var/log/kolla/redis +if [[ $(stat -c %a /var/log/kolla/valkey) != "755" ]]; then + chmod 755 /var/log/kolla/valkey fi -# The CONFIG REWRITE command rewrites the redis.conf +# The CONFIG REWRITE command rewrites the valkey.conf # file the server was started with, applying the minimal # changes needed to make it reflect the configuration # currently used by the server, which may be different # compared to the original one because of the use of # the CONFIG SET command. # -# https://redis.io/commands/config-rewrite/ +# https://valkey.io/commands/config-rewrite/ # # Because of above behaviour it's needed to # hack kolla's CMD. @@ -24,9 +24,9 @@ fi # /usr/local/bin/kolla_set_configs --check # is always reporting changed. # -# Therefore redis-sentinel is always restarted +# Therefore valkey-sentinel is always restarted # even if configuration is not changed from # kolla-ansible side. -if [ ! -z "${REDIS_CONF}" ] && [ ! -z ${REDIS_GEN_CONF} ]; then - cp ${REDIS_CONF} ${REDIS_GEN_CONF} +if [ ! -z "${VALKEY_CONF}" ] && [ ! -z ${VALKEY_GEN_CONF} ]; then + cp ${VALKEY_CONF} ${VALKEY_GEN_CONF} fi diff --git a/kolla/docker/valkey/valkey-server/Dockerfile.j2 b/kolla/docker/valkey/valkey-server/Dockerfile.j2 new file mode 100644 index 000000000..e0005a9e0 --- /dev/null +++ b/kolla/docker/valkey/valkey-server/Dockerfile.j2 @@ -0,0 +1,26 @@ +FROM {{ namespace }}/{{ image_prefix }}valkey-base:{{ tag }} +{% block labels %} +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" +{% endblock %} + +{% block valkey_server_header %}{% endblock %} + +{% import "macros.j2" as macros with context %} + +{{ macros.kolla_enable_base_repos() }} + +{% if base_package_type == 'rpm' %} +{{ macros.enable_extra_repos(['epel']) }} +{% endif %} + +{% set valkey_server_packages = ['valkey'] %} + +{{ macros.install_packages(valkey_server_packages | customizable("packages")) }} + +{{ macros.kolla_patch_sources() }} + +{% block valkey_server_footer %}{% endblock %} +{% block footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} + +USER valkey diff --git a/docker/watcher/watcher-api/Dockerfile.j2 b/kolla/docker/watcher/watcher-api/Dockerfile.j2 index ea0f5bb3f..f31b53ecf 100644 --- a/docker/watcher/watcher-api/Dockerfile.j2 +++ b/kolla/docker/watcher/watcher-api/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}watcher-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block watcher_api_header %}{% endblock %} diff --git a/docker/watcher/watcher-api/extend_start.sh b/kolla/docker/watcher/watcher-api/extend_start.sh index 629ea6355..629ea6355 100644 --- a/docker/watcher/watcher-api/extend_start.sh +++ b/kolla/docker/watcher/watcher-api/extend_start.sh diff --git a/docker/watcher/watcher-applier/Dockerfile.j2 b/kolla/docker/watcher/watcher-applier/Dockerfile.j2 index 4a332a24a..db28d81d9 100644 --- a/docker/watcher/watcher-applier/Dockerfile.j2 +++ b/kolla/docker/watcher/watcher-applier/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}watcher-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block watcher_applier_header %}{% endblock %} diff --git a/docker/watcher/watcher-base/Dockerfile.j2 b/kolla/docker/watcher/watcher-base/Dockerfile.j2 index 97d9eb898..e5530842d 100644 --- a/docker/watcher/watcher-base/Dockerfile.j2 +++ b/kolla/docker/watcher/watcher-base/Dockerfile.j2 @@ -1,12 +1,14 @@ FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block watcher_base_header %}{% endblock %} {% import "macros.j2" as macros with context %} +{{ macros.kolla_enable_base_repos() }} + {{ macros.configure_user(name='watcher') }} ADD watcher-base-archive /watcher-base-source @@ -27,3 +29,4 @@ RUN ln -s watcher-base-source/* watcher \ {{ macros.kolla_patch_sources() }} {% block watcher_base_footer %}{% endblock %} +{{ macros.kolla_cleanup_repos() }} diff --git a/docker/watcher/watcher-base/extend_start.sh b/kolla/docker/watcher/watcher-base/extend_start.sh index 9e27a9cf0..9e27a9cf0 100644 --- a/docker/watcher/watcher-base/extend_start.sh +++ b/kolla/docker/watcher/watcher-base/extend_start.sh diff --git a/docker/watcher/watcher-engine/Dockerfile.j2 b/kolla/docker/watcher/watcher-engine/Dockerfile.j2 index ce018ece4..2518a92b6 100644 --- a/docker/watcher/watcher-engine/Dockerfile.j2 +++ b/kolla/docker/watcher/watcher-engine/Dockerfile.j2 @@ -1,6 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}watcher-base:{{ tag }} {% block labels %} -LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% endblock %} {% block watcher_engine_header %}{% endblock %} diff --git a/kolla/image/build.py b/kolla/image/build.py index 9b6571d36..a0513b22a 100644 --- a/kolla/image/build.py +++ b/kolla/image/build.py @@ -120,6 +120,10 @@ def run_build(): "Try running 'pip install docker'\n" "Python error: %s", e) sys.exit(1) + if conf.buildkit and conf.squash: + LOG.error('--buildkit and --squash are mutually exclusive: ' + 'docker buildx build does not support squashing.') + sys.exit(1) if conf.squash: squash_version = utils.get_docker_squash_version() LOG.info('Image squash is enabled and "docker-squash" version ' @@ -171,6 +175,12 @@ def run_build(): kolla.list_dependencies() return + if (conf.engine == engine.Engine.DOCKER.value and conf.buildkit): + try: + utils.check_docker_buildx() + except Exception: + sys.exit(1) + push_queue = queue.Queue() build_queue = kolla.build_queue(push_queue) workers = [] diff --git a/kolla/image/kolla_worker.py b/kolla/image/kolla_worker.py index 3a78a7f35..837bd797c 100644 --- a/kolla/image/kolla_worker.py +++ b/kolla/image/kolla_worker.py @@ -11,6 +11,8 @@ # limitations under the License. import datetime +import git +import importlib.metadata import json import os import queue @@ -21,6 +23,7 @@ import tempfile import time import jinja2 +import jinja2.sandbox from kolla.common import config as common_config from kolla.common import utils from kolla.engine_adapter import engine @@ -37,12 +40,14 @@ from oslo_config import cfg PROJECT_ROOT = os.path.abspath(os.path.join( os.path.dirname(os.path.realpath(__file__)), '../..')) +KOLLA_PACKAGE_DIR = os.path.abspath(os.path.join( + os.path.dirname(os.path.realpath(__file__)), '..')) class Image(object): def __init__(self, name, canonical_name, path, parent_name='', status=Status.UNPROCESSED, parent=None, - source=None, logger=None, engine_client=None): + source=None, logger=None, engine_client=None, labels=None): self.name = name self.canonical_name = canonical_name self.path = path @@ -57,11 +62,12 @@ class Image(object): self.plugins = [] self.additions = [] self.engine_client = engine_client + self.labels = labels or {} def copy(self): c = Image(self.name, self.canonical_name, self.path, logger=self.logger, parent_name=self.parent_name, - status=self.status, parent=self.parent) + status=self.status, parent=self.parent, labels=self.labels) if self.source: c.source = self.source.copy() if self.children: @@ -106,6 +112,7 @@ class KollaWorker(object): self.debian_arch = 'amd64' self.images = list() self.openstack_release = conf.openstack_release + self.openstack_release_codename = conf.openstack_release_codename self.openstack_branch = conf.openstack_branch self.openstack_branch_slashed = conf.openstack_branch_slashed self.docker_healthchecks = conf.docker_healthchecks @@ -113,7 +120,7 @@ class KollaWorker(object): conf.rpm_setup_config if repo_file is not None]) self.rpm_setup = self.build_rpm_setup(rpm_setup_config) - if self.base in ['centos', 'rocky']: + if self.base == 'rocky': self.distro_package_manager = 'dnf' self.base_package_type = 'rpm' elif self.base in ['debian']: @@ -142,6 +149,9 @@ class KollaWorker(object): self.image_statuses_allowed_to_fail = dict() self.maintainer = conf.maintainer self.patches_path = conf.patches_path + self.scm_labels = self._get_scm_labels() + self.build_created = (datetime.datetime.now(datetime.timezone.utc) + .strftime('%Y-%m-%dT%H:%M:%SZ')) try: self.engine_client = engine.getEngineClient(self.conf) @@ -156,8 +166,56 @@ class KollaWorker(object): LOG.info("Exception caught: {0}".format(e)) sys.exit(1) + def _get_scm_labels(self): + labels = {} + + # Method 1: Install via PIP (direct_url.json) + try: + dist = importlib.metadata.distribution('kolla') + direct_url_file = [ + p for p in dist.files if p.name == 'direct_url.json' + ] + + if direct_url_file: + content = dist.read_text('direct_url.json') + if content: + data = json.loads(content) + if 'url' in data: + labels['org.opencontainers.image.source'] = data['url'] + if 'vcs_info' in data and 'commit_id' in data['vcs_info']: + labels['org.opencontainers.image.revision'] = ( + data['vcs_info']['commit_id']) + except Exception as e: + LOG.debug(f"Could not retrieve PIP direct_url info: {e}") + + # Method 2: Fallback to Git (if PIP info is local or missing) + source = labels.get('org.opencontainers.image.source', '') + if not labels.get('org.opencontainers.image.revision') or \ + source.startswith('file:'): + try: + repo = git.Repo(PROJECT_ROOT, search_parent_directories=True) + + labels['org.opencontainers.image.revision'] = ( + repo.head.object.hexsha) + + if source.startswith('file:') or not source: + labels['org.opencontainers.image.source'] = ( + 'https://opendev.org/openstack/kolla') + + LOG.debug("Detected SCM info via Git fallback: %s", labels) + except Exception as e: + LOG.debug("Git fallback failed: %s", e) + + source_url = labels.get('org.opencontainers.image.source', '') + if source_url.startswith('file:'): + labels['org.opencontainers.image.source'] = ( + 'https://opendev.org/openstack/kolla') + + return labels + def _get_images_dir(self): possible_paths = ( + KOLLA_PACKAGE_DIR, PROJECT_ROOT, os.path.join(sys.prefix, 'share/kolla'), os.path.join(sys.prefix, 'local/share/kolla'), @@ -271,6 +329,7 @@ class KollaWorker(object): return { 'debian_package_install': jinja_methods.debian_package_install, 'handle_repos': jinja_methods.handle_repos, + 'cleanup_repos': jinja_methods.cleanup_repos, 'raise_error': jinja_methods.raise_error, } @@ -307,9 +366,6 @@ class KollaWorker(object): for path in self.docker_build_paths: template_name = "Dockerfile.j2" image_name = path.split("/")[-1] - ts = time.time() - build_date = datetime.datetime.fromtimestamp(ts).strftime( - '%Y%m%d') values = {'base_distro': self.base, 'base_image': self.conf.base_image, 'base_distro_tag': self.base_tag, @@ -323,6 +379,8 @@ class KollaWorker(object): 'image_prefix': self.image_prefix, 'namespace': self.namespace, 'openstack_release': self.openstack_release, + 'openstack_release_codename': + self.openstack_release_codename, 'openstack_branch': self.openstack_branch, 'openstack_branch_slashed': self.openstack_branch_slashed, @@ -333,10 +391,9 @@ class KollaWorker(object): 'users': self.get_users(), 'distro_package_manager': self.distro_package_manager, 'rpm_setup': self.rpm_setup, - 'build_date': build_date, 'clean_package_cache': self.clean_package_cache, 'patches_path': self.patches_path} - env = jinja2.Environment( # nosec: not used to render HTML + env = jinja2.sandbox.SandboxedEnvironment( loader=jinja2.FileSystemLoader(self.working_dir)) env.filters.update(self._get_filters()) env.globals.update(self._get_methods()) @@ -349,12 +406,27 @@ class KollaWorker(object): tpl_dict = self._merge_overrides(self.conf.template_override) template_name = os.path.basename(list(tpl_dict.keys())[0]) values['parent_template'] = template - env = jinja2.Environment( # nosec: not used to render HTML + env = jinja2.sandbox.SandboxedEnvironment( loader=jinja2.DictLoader(tpl_dict)) env.filters.update(self._get_filters()) env.globals.update(self._get_methods()) template = env.get_template(template_name) content = template.render(values, env=os.environ) + pip_args = [ + 'ARG {}'.format(k) + for k, v in ( + ('PIP_INDEX_URL', self.conf.pip_index_url), + ('PIP_TRUSTED_HOST', self.conf.pip_trusted_host), + ('PIP_EXTRA_INDEX_URL', self.conf.pip_extra_index_url), + ) if v + ] + if pip_args: + lines = content.split('\n') + for i, line in enumerate(lines): + if re.match(r'^FROM\s', line, re.IGNORECASE): + lines[i + 1:i + 1] = pip_args + break + content = '\n'.join(lines) content_path = os.path.join(path, 'Dockerfile') with open(content_path, 'w') as f: LOG.debug("Rendered %s into:", tpl_path) @@ -684,17 +756,33 @@ class KollaWorker(object): image_name = os.path.basename(path) canonical_name = (self.namespace + '/' + self.image_prefix + image_name + ':' + self.tag) - parent_search_pattern = re.compile(r'^FROM.*$', re.MULTILINE) + parent_search_pattern = re.compile(r'^FROM.*$', + re.MULTILINE | re.IGNORECASE) match = re.search(parent_search_pattern, content) if match: parent_name = match.group(0).split(' ')[1] else: parent_name = '' del match + + oci_labels = self.scm_labels.copy() + oci_labels.update({ + "org.opencontainers.image.title": image_name, + "org.opencontainers.image.description": ( + "OpenStack Kolla {} image".format(image_name)), + "org.opencontainers.image.version": self.tag, + "org.opencontainers.image.created": self.build_created, + "org.opencontainers.image.authors": self.maintainer, + "org.opencontainers.image.url": ( + "https://opendev.org/openstack/kolla"), + "org.opencontainers.image.licenses": "Apache-2.0" + }) + image = Image(image_name, canonical_name, path, parent_name=parent_name, logger=utils.make_a_logger(self.conf, image_name), - engine_client=self.engine_client) + engine_client=self.engine_client, + labels=oci_labels) # NOTE(jeffrey4l): register the opts if the section didn't # register in the kolla/common/config.py file diff --git a/kolla/image/tasks.py b/kolla/image/tasks.py index 39d759390..87dff5640 100644 --- a/kolla/image/tasks.py +++ b/kolla/image/tasks.py @@ -16,6 +16,7 @@ import hashlib import json import os import shutil +import subprocess # nosec import tarfile try: @@ -43,6 +44,27 @@ class ArchivingError(Exception): pass +def normalize_tarinfo(tarinfo): + # NOTE(mgoddard): Change ownership of files to root:root. This + # avoids an issue introduced by the fix for git CVE-2022-24765, + # which breaks PBR when the source checkout is not owned by the + # user installing it. LP#1969096 + tarinfo.uid = tarinfo.gid = 0 + tarinfo.uname = tarinfo.gname = "root" + # Pin mtime so archive bytes do not depend on checkout/extraction + # time, keeping the engine's layer cache valid when the content is + # unchanged. An integer mtime also stops tarfile's PAX writer + # emitting per-entry float-mtime extended headers. + tarinfo.mtime = 0 + + # Ensure directories are writable. Git repos contain directories + # such as .git/objects/pack/ with mode 0555, which prevents + # non-root users from re-extracting into an existing items_path + # on build retry. + tarinfo.mode |= 0o200 + return tarinfo + + class EngineTask(task.Task): def __init__(self, conf): super(EngineTask, self).__init__() @@ -156,6 +178,11 @@ class BuildTask(EngineTask): def name(self): return 'BuildTask(%s)' % self.image.name + @property + def _buildkit_active(self): + return (self.conf.engine == engine.Engine.DOCKER.value + and self.conf.buildkit) + def run(self): self.builder(self.image) if self.image.status in (Status.BUILT, Status.SKIPPED): @@ -164,7 +191,7 @@ class BuildTask(EngineTask): @property def followups(self): followups = [] - if self.conf.push and self.success: + if self.conf.push and self.success and not self._buildkit_active: followups.extend([ # If we are supposed to push the image into a # container image repository, @@ -188,15 +215,6 @@ class BuildTask(EngineTask): dest_archive = os.path.join(image.path, source['name'] + '-archive') - # NOTE(mgoddard): Change ownership of files to root:root. This - # avoids an issue introduced by the fix for git CVE-2022-24765, - # which breaks PBR when the source checkout is not owned by the - # user installing it. LP#1969096 - def reset_userinfo(tarinfo): - tarinfo.uid = tarinfo.gid = 0 - tarinfo.uname = tarinfo.gname = "root" - return tarinfo - if source.get('type') == 'url': self.logger.debug("Getting archive from %s", source['source']) try: @@ -256,7 +274,7 @@ class BuildTask(EngineTask): with tarfile.open(dest_archive, 'w') as tar: tar.add(clone_dir, arcname=os.path.basename(clone_dir), - filter=reset_userinfo) + filter=normalize_tarinfo) elif source.get('type') == 'local': self.logger.debug("Getting local archive from %s", @@ -265,7 +283,7 @@ class BuildTask(EngineTask): with tarfile.open(dest_archive, 'w') as tar: tar.add(source['source'], arcname=os.path.basename(source['source']), - filter=reset_userinfo) + filter=normalize_tarinfo) else: shutil.copyfile(source['source'], dest_archive) @@ -292,6 +310,15 @@ class BuildTask(EngineTask): if proxy_var in os.environ and proxy_var not in buildargs: buildargs[proxy_var] = os.environ.get(proxy_var) + pip_vars = ( + ('PIP_INDEX_URL', self.conf.pip_index_url), + ('PIP_TRUSTED_HOST', self.conf.pip_trusted_host), + ('PIP_EXTRA_INDEX_URL', self.conf.pip_extra_index_url), + ) + for pip_var, value in pip_vars: + if value and pip_var not in buildargs: + buildargs[pip_var] = value + if not buildargs: return None return buildargs @@ -342,17 +369,10 @@ class BuildTask(EngineTask): raise ArchivingError arc_path = os.path.join(image.path, '%s-archive' % arcname) - # NOTE(jneumann): Change ownership of files to root:root. This - # avoids an issue introduced by the fix for git CVE-2022-24765, - # which breaks PBR when the source checkout is not owned by the - # user installing it. LP#1969096 - def reset_userinfo(tarinfo): - tarinfo.uid = tarinfo.gid = 0 - tarinfo.uname = tarinfo.gname = "root" - return tarinfo - with tarfile.open(arc_path, 'w') as tar: - tar.add(items_path, arcname=arcname, filter=reset_userinfo) + tar.add(items_path, arcname=arcname, + filter=normalize_tarinfo) + return len(os.listdir(items_path)) self.logger.debug('Processing') @@ -373,6 +393,7 @@ class BuildTask(EngineTask): image.status = Status.BUILDING image.start = datetime.datetime.now() + image.labels['build-date'] = image.start.strftime('%Y%m%d') self.logger.info('Building started at %s' % image.start) if image.source and 'source' in image.source: @@ -406,7 +427,14 @@ class BuildTask(EngineTask): buildargs = self.update_buildargs() + if self._buildkit_active: + self._build_buildkit(image, pull, buildargs) + return + kwargs = {} + if hasattr(image, 'labels') and image.labels: + kwargs['labels'] = image.labels + if self.conf.engine == engine.Engine.PODMAN.value: # TODO(kevko): dockerfile path is a workaround, # should be removed as soon as it will be fixed in podman-py @@ -475,6 +503,88 @@ class BuildTask(EngineTask): self.logger.info('Built at %s (took %s)' % (now, now - image.start)) + def _build_buildkit(self, image, pull, buildargs): + platform = self.conf.platform or '' + # Multi-platform (comma-separated): buildx pushes a manifest list + # directly to the registry. --load is not supported for multi-platform + # output, so --push is required. + # + # Single platform: load into the local daemon so child FROM lines + # resolve without a registry round-trip, then push the canonical tag. + # + # No platform: use --push or --load based on conf.push. + multi_platform = ',' in platform + single_platform = bool(platform and not multi_platform) + + if multi_platform and not self.conf.push: + self.logger.error( + 'Multi-platform buildkit build requires --push: ' + 'docker buildx does not support --load for multi-platform ' + 'output.') + image.status = Status.ERROR + return + + cmd = ['docker', 'buildx', 'build', '--progress=plain'] + if self.conf.buildkit_builder: + cmd.extend(['--builder', self.conf.buildkit_builder]) + if pull: + cmd.append('--pull') + if not self.conf.cache: + cmd.append('--no-cache') + if self.conf.network_mode: + cmd.extend(['--network', self.conf.network_mode]) + if platform: + cmd.extend(['--platform', platform]) + + cmd.extend(['-t', image.canonical_name]) + + if self.conf.push and not single_platform: + # Multi-platform or no-platform with push: let buildx push directly + cmd.append('--push') + else: + # Load into the local daemon so child image FROM lines resolve + # locally. For single-platform builds with --push, the canonical + # tag is pushed explicitly after the build. + cmd.append('--load') + + if buildargs: + for k, v in buildargs.items(): + cmd.extend(['--build-arg', '%s=%s' % (k, v)]) + if hasattr(image, 'labels') and image.labels: + for k, v in image.labels.items(): + cmd.extend(['--label', '%s=%s' % (k, v)]) + cmd.append(image.path) + + try: + self._run_cmd(cmd) + if single_platform and self.conf.push: + self._run_cmd(['docker', 'push', image.canonical_name]) + except Exception: + image.status = Status.ERROR + self.logger.exception('Unknown error when building') + else: + image.status = Status.BUILT + now = datetime.datetime.now() + self.logger.info('Built at %s (took %s)' % + (now, now - image.start)) + + def _run_cmd(self, cmd): + env = os.environ.copy() + env['NO_COLOR'] = '1' + with subprocess.Popen( # nosec + cmd, + stdout=subprocess.PIPE, + stderr=subprocess.STDOUT, + universal_newlines=True, + bufsize=1, + env=env, + ) as proc: + for line in proc.stdout: + self.logger.info(line.rstrip()) + proc.wait() + if proc.returncode != 0: + raise subprocess.CalledProcessError(proc.returncode, cmd) + def squash(self): image_tag = self.image.canonical_name image_id = self.engine_client.images.get(image_tag).id diff --git a/kolla/image/unbuildable.py b/kolla/image/unbuildable.py index c426b3eab..6d7f4eb5c 100644 --- a/kolla/image/unbuildable.py +++ b/kolla/image/unbuildable.py @@ -19,29 +19,15 @@ UNBUILDABLE_IMAGES = { "bifrost-base", # someone need to get upstream working first }, - # Issues for SHA1 keys: - # https://github.com/grafana/grafana/issues/41036 - 'centos': { - "collectd", # CS10 no opstools repo - "hacluster-pcs", # Missing crmsh package - "nova-spicehtml5proxy", # Missing spicehtml5 package - "ovsdpdk", # Not supported on CentOS - "redis-base", # Missing in CS10 - "tgtd", # Not supported on CentOS - "telegraf", # CS10 no opstools repo - }, - 'debian': { - "openvswitch-netcontrold", - # https://bugs.launchpad.net/kolla/+bug/2027668 }, 'rocky': { "collectd", # Missing libpqos.so.4()(64bit) "hacluster-pcs", # Missing crmsh package "nova-spicehtml5proxy", # Missing spicehtml5 package - "ovsdpdk", # Not supported on CentOS - "tgtd", # Not supported on CentOS + "ovsdpdk", # Not supported on Rocky + "tgtd", # Not supported on Rocky }, 'ubuntu': { @@ -49,7 +35,4 @@ UNBUILDABLE_IMAGES = { 'ubuntu+aarch64': { }, - - 'centos+aarch64': { - }, } diff --git a/kolla/template/methods.py b/kolla/template/methods.py index e9edbfeb0..461003fa0 100644 --- a/kolla/template/methods.py +++ b/kolla/template/methods.py @@ -10,6 +10,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +from kolla.image.utils import LOG import os import typing as t @@ -17,6 +18,49 @@ import yaml from jinja2 import pass_context +APT_ARCH = " && echo 'Architectures: {arch}' \ +>>/etc/apt/sources.list.d/{repo}.sources" +APT_REPO = "echo 'Uris: {url}' >/etc/apt/sources.list.d/{repo}.sources && \ +echo 'Components: {component}' >>/etc/apt/sources.list.d/{repo}.sources && \ +echo 'Types: deb' >>/etc/apt/sources.list.d/{repo}.sources && \ +echo 'Suites: {suite}' >>/etc/apt/sources.list.d/{repo}.sources && \ +echo 'Signed-By: {signed_by}' \ +>>/etc/apt/sources.list.d/{repo}.sources" +APT_TRUSTED = " && echo 'Trusted: yes' \ +>>/etc/apt/sources.list.d/{repo}.sources" +DNF_BASEURL = " && echo 'baseurl={baseurl}' >>/etc/yum.repos.d/{repo}.repo" +DNF_DISABLE = "dnf config-manager --disable {name} || true" +DNF_ENABLE = "dnf config-manager --enable {name} || true" +DNF_GPGCHECK = " && echo 'gpgcheck={gpgcheck}' >>/etc/yum.repos.d/{repo}.repo" +DNF_GPGKEY = " && echo 'gpgkey={gpgkey}' >>/etc/yum.repos.d/{repo}.repo" +DNF_GPGKEY_ADD = " && echo ' {gpgkey}' >>/etc/yum.repos.d/{repo}.repo" +DNF_METALINK = " && echo 'metalink={metalink}' >>/etc/yum.repos.d/{repo}.repo" +DNF_MIRRORLIST = " && \ +echo 'mirrorlist={mirrorlist}' >>/etc/yum.repos.d/{repo}.repo" +DNF_REMOVE_EXISTING = \ + "grep -rlF '[{name}]' /etc/yum.repos.d/ 2>/dev/null | xargs -r rm -f" +DNF_REPO = "echo '[{name}]' >/etc/yum.repos.d/{repo}.repo && \ +echo 'name={name}' >>/etc/yum.repos.d/{repo}.repo && \ +echo 'enabled=1' >>/etc/yum.repos.d/{repo}.repo" +DNF_REPO_GPGCHECK = " && echo 'repo_gpgcheck={repo_gpgcheck}' \ +>>/etc/yum.repos.d/{repo}.repo" + +BACKUP_DIR = '/tmp/kolla-repos-backup' # nosec B108 +APT_BACKUP = ( + 'mkdir -p {backup_dir}' + ' && cp /etc/apt/sources.list.d/{repo}.sources' + ' {backup_dir}/{repo}.sources 2>/dev/null || true' + ' && touch {backup_dir}/{repo}.enabled' + ' && ' +) +RPM_BACKUP = ( + 'mkdir -p {backup_dir}' + ' && cp /etc/yum.repos.d/{file}' + ' {backup_dir}/{file} 2>/dev/null || true' + ' && touch {backup_dir}/{file}.enabled' + ' && ' +) + def debian_package_install(packages, clean_package_cache=True): """Jinja utility method for building debian-based package install command. @@ -71,82 +115,226 @@ def debian_package_install(packages, clean_package_cache=True): return ' && '.join(cmds) +def _load_repos(repos_yaml_override=None): + """Load default repos.yaml and merge an optional override file.""" + default_repofile = os.path.dirname( + os.path.realpath(__file__)) + '/repos.yaml' + with open(default_repofile, 'r') as f: + repo_data = yaml.safe_load(f) + + if repos_yaml_override: + with open(repos_yaml_override, 'r') as f: + for section, repos in yaml.safe_load(f).items(): + if section in repo_data: + repo_data[section].update(repos) + else: + repo_data[section] = repos + + return repo_data + + +def _build_repo_list(repo_data, base_package_type, base_distro, base_arch): + """Flatten repo_data sections for the current distro/arch into one dict.""" + result = {} + for section in (base_package_type, base_distro, + '%s-%s' % (base_distro, base_arch)): + for repo_name, repo_info in repo_data.get(section, {}).items(): + if repo_name in result: + merged = {**result[repo_name], **repo_info} + if any(k in merged for k in + ('baseurl', 'metalink', 'mirrorlist', 'url')): + merged.pop('distro', None) + result[repo_name] = merged + else: + result[repo_name] = repo_info + return result + + @pass_context def handle_repos(context, reponames, mode): - """NOTE(hrw): we need to handle CentOS, Debian and Ubuntu with one macro. + """Generate Dockerfile RUN commands to enable or disable package repos. - Repo names have to be simple names mapped to proper ones. So 'ceph' == - 'centos-ceph-pacific' for CentOS, UCA for Ubuntu (enabled by default) and - something else for Debian. - Distro/arch are not required to have all entries - we ignore missing ones. - """ + Takes a list of logical repo names (e.g. 'ceph', 'grafana') and a mode + ('enable' or 'disable'), looks them up in repos.yaml (merging any + user-supplied repos_yaml override), and returns a shell command string + suitable for use in a Dockerfile RUN instruction. + + Repo names are distro/arch-agnostic aliases that map to the real repo + name and URL for the target platform. So 'ceph' becomes + 'centos-ceph-squid' on Rocky, uses UCA on Ubuntu, and so on. + Distro/arch sections are not required to have all entries - missing ones + are silently ignored. - if mode == 'enable': - rpm_switch = '--enable' - elif mode == 'disable': - rpm_switch = '--disable' - else: - raise KeyError + NOTE(hrw): we need to handle Debian, Rocky and Ubuntu with one macro. + """ if not isinstance(reponames, list): raise TypeError("First argument should be a list of repositories") - if context.get('repos_yaml'): - repofile = context.get('repos_yaml') - else: - repofile = os.path.dirname(os.path.realpath(__file__)) + '/repos.yaml' - - with open(repofile, 'r') as repos_file: - repo_data = {} - for name, params in yaml.safe_load(repos_file).items(): - repo_data[name] = params + repos_yaml = context.get('repos_yaml') + repo_data = _load_repos(repos_yaml) + default_repo_data = _load_repos() base_package_type = context.get('base_package_type') base_distro = context.get('base_distro') base_arch = context.get('base_arch') + image_name = context.get('image_name') + openstack_release_codename = context.get('openstack_release_codename') commands = '' + backed_up_files = set() try: - repo_list = repo_data['%s-%s' % (base_distro, base_arch)] + repo_list = _build_repo_list( + repo_data, base_package_type, base_distro, base_arch) except KeyError: # NOTE(hrw): Fallback to distro list repo_list = repo_data[base_distro] - for repo in reponames: + # NOTE: repos_yaml overrides replace a repo's whole entry (see + # _load_repos), so an override that doesn't restate 'file_group' would + # otherwise lose it. Keep the default list around to fall back to the + # distro's real on-disk layout for repos sharing a file. + default_repo_list = _build_repo_list( + default_repo_data, base_package_type, base_distro, base_arch) + + if base_package_type == 'rpm' and repos_yaml: + distro_overridden = {r for r, d in repo_list.items() + if not d.get('distro') + and default_repo_list.get(r, {}).get('distro')} + if distro_overridden: + overridden_groups = { + default_repo_list[r].get('file_group') + for r in distro_overridden + if default_repo_list.get(r, {}).get('file_group')} + distro_not_overridden = sorted( + r for r, d in repo_list.items() + if d.get('distro') + and r not in distro_overridden + and d.get('file_group') in overridden_groups) + if distro_not_overridden: + raise ValueError( + "Repositories %s override distro-provided repos and will " + "remove their .repo file. Repositories %s are still using " + "distro defaults and share the same file. Please also " + "override them in your repos.yaml." + % (sorted(distro_overridden), distro_not_overridden)) + + for index, repo in enumerate(reponames): try: + _repo = repo_list[repo] if base_package_type == 'rpm': - commands += ' %s %s' % (rpm_switch, repo_list[repo]) - elif base_package_type == 'deb': if mode == 'enable': - commands += f"""echo 'Uris: {repo_list[repo]['url']}' \ ->/etc/apt/sources.list.d/{repo}.sources \ -&& echo 'Components: {repo_list[repo]['component']}' \ ->>/etc/apt/sources.list.d/{repo}.sources \ -&& echo 'Types: deb' >>/etc/apt/sources.list.d/{repo}.sources \ -&& echo 'Suites: {repo_list[repo]['suite']}' \ ->>/etc/apt/sources.list.d/{repo}.sources \ -&& echo 'Signed-By: /etc/kolla/apt-keys/{repo_list[repo]['gpg_key']}' \ ->>/etc/apt/sources.list.d/{repo}.sources \ -&& """ - if repo_list[repo]['arch']: - commands += f"""echo 'Architectures: \ -{repo_list[repo]['arch']}' \ ->>/etc/apt/sources.list.d/{repo}.sources \ -&& """ - except KeyError: - # NOTE(hrw): we ignore missing repositories for a given - # distro/arch - pass - - if base_package_type == 'rpm' and commands: - # NOTE(hrw): if commands is empty then no repos are enabled - # otherwise we need to add command to handle repositories - # NOTE(hrw) dnf errors out if we enable unknown repo - commands = 'dnf config-manager %s || true' % commands - elif base_package_type == 'deb': - # NOTE(hrw): Debian commands end with '&&' - commands = commands[0:-4] + if not _repo.get('distro'): + if _repo.get('build_only'): + # NOTE: some distros (e.g. Rocky's baseos, + # appstream and crb) share a single .repo file, + # so back up that shared file, not one named + # after this repo, or the original content is + # lost once handle_repos rewrites the file. + repo_file = ( + _repo.get('file_group') + or default_repo_list.get(repo, {}).get( + 'file_group') + or '{}.repo'.format(repo)) + if repo_file not in backed_up_files: + commands += RPM_BACKUP.format( + backup_dir=BACKUP_DIR, file=repo_file) + backed_up_files.add(repo_file) + commands += DNF_REMOVE_EXISTING.format( + name=_repo['name']) + commands += " && " + commands += DNF_REPO.format( + name=_repo['name'], + repo=repo, + ) + if _repo.get('gpgcheck'): + commands += DNF_GPGCHECK.format( + gpgcheck=_repo['gpgcheck'], + repo=repo) + + if _repo.get('repo_gpgcheck'): + commands += DNF_REPO_GPGCHECK.format( + repo_gpgcheck=_repo['repo_gpgcheck'], + repo=repo) + + if not any(k in _repo for k in + ('baseurl', 'metalink', 'mirrorlist')): + raise ValueError( + "Repository '%s' has no baseurl, metalink," + " or mirrorlist" % repo) + if 'gpgkey' not in _repo: + raise ValueError( + "Repository '%s' has no gpgkey" % repo) + # NOTE(mnasiadka): Support multiple gpgkeys + gpgkeys = _repo['gpgkey'].splitlines() + for _, gpgkey in enumerate(gpgkeys): + if _ == 0: + commands += DNF_GPGKEY.format(gpgkey=gpgkey, + repo=repo) + else: + commands += DNF_GPGKEY_ADD.format( + gpgkey=gpgkey, + repo=repo) + if 'baseurl' in _repo: + # NOTE(mnasiadka): Support multiple baseurls + baseurl = _repo['baseurl'].splitlines() + for url in baseurl: + commands += DNF_BASEURL.format(baseurl=url, + repo=repo) + elif 'metalink' in _repo: + commands += DNF_METALINK.format( + metalink=_repo['metalink'], repo=repo + ) + elif 'mirrorlist' in _repo: + commands += DNF_MIRRORLIST.format( + mirrorlist=_repo['mirrorlist'], repo=repo + ) + else: + commands += DNF_ENABLE.format(name=_repo['name']) + + if index != len(reponames) - 1: + commands += " && " + + elif mode == 'disable' and _repo.get('distro'): + commands += DNF_DISABLE.format(name=_repo['name']) + + elif base_package_type == "deb": + if mode == "enable" and not _repo.get('distro'): + if _repo.get('build_only'): + sources_file = ( + '/etc/apt/sources.list.d/{}.sources'.format(repo)) + if sources_file not in backed_up_files: + commands += APT_BACKUP.format( + backup_dir=BACKUP_DIR, repo=repo) + backed_up_files.add(sources_file) + gpg_key = _repo['gpg_key'] + signed_by = gpg_key if gpg_key.startswith('/') \ + else '/etc/kolla/apt-keys/' + gpg_key + suite = _repo['suite'].replace( + '{openstack_release_codename}', + openstack_release_codename.lower()) + commands += APT_REPO.format( + component=_repo['component'], + signed_by=signed_by, + suite=suite, + url=_repo['url'], + repo=repo, + ) + if _repo.get('trusted'): + commands += APT_TRUSTED.format(repo=repo) + + if 'arch' in _repo: + commands += APT_ARCH.format( + arch=_repo['arch'], repo=repo + ) + + if index != len(reponames) - 1: + commands += ' && ' + except KeyError as e: + LOG.exception("Error enabling repository %s in image %s", e, + image_name) + raise if commands: commands = "RUN %s" % commands @@ -154,5 +342,76 @@ def handle_repos(context, reponames, mode): return commands +def get_cleanup_commands(repos_yaml, base_package_type, base_distro, + base_arch): + """Return a RUN command string restoring or removing build_only repos. + + Repos marked build_only: true are backed up before being overwritten in + handle_repos(). This function generates the matching restore commands so + that mirror URLs are not baked into the final image. Repos that had no + prior file (no backup exists) are deleted instead of restored. + + Returns an empty string when there are no build_only repos. + """ + repo_data = _load_repos(repos_yaml) + repo_list = _build_repo_list( + repo_data, base_package_type, base_distro, base_arch) + default_repo_list = _build_repo_list( + _load_repos(), base_package_type, base_distro, base_arch) + + cleanup_cmds = [] + restored_file_groups = set() + for repo_name, repo_info in repo_list.items(): + if not repo_info.get('build_only'): + continue + if base_package_type == 'rpm' and not repo_info.get('distro'): + own_file = '{}.repo'.format(repo_name) + file_group = ( + repo_info.get('file_group') + or default_repo_list.get(repo_name, {}).get('file_group') + or own_file) + if file_group != own_file: + # handle_repos always writes this repo's override to + # own_file, regardless of where the original repo lived, + # so it always needs dropping on its own. + cleanup_cmds.append( + 'rm -f /etc/yum.repos.d/{}'.format(own_file)) + if file_group in restored_file_groups: + continue + restored_file_groups.add(file_group) + cleanup_cmds.append( + '[ -f {backup_dir}/{file}.enabled ]' + ' && ( mv {backup_dir}/{file}' + ' /etc/yum.repos.d/{file} 2>/dev/null' + ' || rm -f /etc/yum.repos.d/{file} )' + ' || true'.format( + backup_dir=BACKUP_DIR, file=file_group)) + elif base_package_type == 'deb' and not repo_info.get('distro'): + cleanup_cmds.append( + '[ -f {backup_dir}/{repo}.enabled ]' + ' && ( mv {backup_dir}/{repo}.sources' + ' /etc/apt/sources.list.d/{repo}.sources 2>/dev/null' + ' || rm -f /etc/apt/sources.list.d/{repo}.sources )' + ' || true'.format( + backup_dir=BACKUP_DIR, repo=repo_name)) + + if not cleanup_cmds: + return '' + + cleanup_cmds.append('rm -rf {}'.format(BACKUP_DIR)) + return 'RUN ' + ' \\\n && '.join(cleanup_cmds) + + +@pass_context +def cleanup_repos(context): + """Jinja2-callable wrapper around get_cleanup_commands().""" + return get_cleanup_commands( + context.get('repos_yaml'), + context.get('base_package_type'), + context.get('base_distro'), + context.get('base_arch'), + ) + + def raise_error(msg: str) -> t.NoReturn: raise Exception(msg) diff --git a/kolla/template/repos.yaml b/kolla/template/repos.yaml index a72e734ce..1ae76d137 100644 --- a/kolla/template/repos.yaml +++ b/kolla/template/repos.yaml @@ -1,78 +1,13 @@ --- -centos: - ceph: "centos-ceph-squid" - crb: "crb" - docker-ce: "docker-ce" - epel: "epel" - erlang: "rabbitmq_rabbitmq-erlang" - extras: "extras" - fluentd: "fluent-package-lts" - grafana: "grafana" - hacluster: "highavailability" - influxdb: "influxdb" - kolla_el10: "kolla_el10" - mariadb: "mariadb" - opensearch: "opensearch-3.x" - opensearch-dashboards: "opensearch-dashboards-3.x" - openvswitch: "centos-nfv-openvswitch" - opstools: "centos-opstools" - proxysql: "proxysql" - rabbitmq: "rabbitmq_rabbitmq-server" - -centos-aarch64: - ceph: "centos-ceph-squid" - crb: "crb" - docker-ce: "docker-ce" - epel: "epel" - erlang: "copr-rabbitmq-erlang" - extras: "extras" - fluentd: "fluent-package-lts" - grafana: "grafana" - hacluster: "highavailability" - influxdb: "influxdb" - kolla_el10: "kolla_el10" - mariadb: "mariadb" - opensearch: "opensearch-3.x" - opensearch-dashboards: "opensearch-dashboards-3.x" - openvswitch: "centos-nfv-openvswitch" - opstools: "centos-opstools" - proxysql: "proxysql" - rabbitmq: "rabbitmq_rabbitmq-server" - # NOTE(mnasiadka): For RabbitMQ Debuntu suite names is following: # https://www.rabbitmq.com/install-debian.html#apt-cloudsmith -debian: - docker-ce: - url: "https://download.docker.com/linux/debian" - suite: "bookworm" - component: "stable" - gpg_key: "docker-ce.asc" - erlang: - url: "https://ppa.launchpadcontent.net/rabbitmq/rabbitmq-erlang/ubuntu" - suite: "jammy" - component: "main" - gpg_key: "erlang-ppa.gpg" - fluentd: - url: "https://packages.treasuredata.com/lts/5/debian/bookworm" - suite: "bookworm" - component: "contrib" - gpg_key: "treasuredata.asc" +deb: grafana: url: "https://apt.grafana.com" suite: "stable" component: "main" gpg_key: "grafana.asc" - influxdb: - url: "https://repos.influxdata.com/ubuntu" - suite: "jammy" - component: "stable" - gpg_key: "influxdb.asc" - mariadb: - url: "https://dlm.mariadb.com/repo/mariadb-server/10.11/repo/debian" - suite: "bookworm" - component: "main" - gpg_key: "mariadb.gpg" opensearch: url: "https://artifacts.opensearch.org/releases/bundle/opensearch/3.x/apt/" suite: "stable" @@ -83,213 +18,197 @@ debian: suite: "stable" component: "main" gpg_key: "opensearch.asc" - proxysql: - url: "https://repo.proxysql.com/ProxySQL/proxysql-3.0.x/bookworm/" - suite: "./" - component: "" - gpg_key: "proxysql.asc" - rabbitmq: - url: "https://ppa1.rabbitmq.com/rabbitmq/rabbitmq-server/deb/debian" - suite: "bookworm" - component: "main" - gpg_key: "rabbitmq.gpg" -debian-aarch64: - docker-ce: - url: "https://download.docker.com/linux/debian" - suite: "bookworm" - component: "stable" - gpg_key: "docker-ce.asc" +debian: + debian: + distro: True + debian-security: + distro: True erlang: url: "https://ppa.launchpadcontent.net/rabbitmq/rabbitmq-erlang/ubuntu" - suite: "jammy" + suite: "noble" component: "main" gpg_key: "erlang-ppa.gpg" + docker-ce: + url: "https://download.docker.com/linux/debian" + suite: "trixie" + component: "stable" + gpg_key: "docker-ce.asc" fluentd: - url: "https://packages.treasuredata.com/lts/5/debian/bookworm" - suite: "bookworm" + url: "https://fluentd.cdn.cncf.io/lts/6/debian/trixie" + suite: "trixie" component: "contrib" - gpg_key: "treasuredata.asc" - grafana: - url: "https://apt.grafana.com" - suite: "stable" - component: "main" - gpg_key: "grafana.asc" - influxdb: - url: "https://repos.influxdata.com/ubuntu" - suite: "jammy" - component: "stable" - gpg_key: "influxdb.asc" + gpg_key: "fluentd.asc" + # NOTE(mnasiadka): 11.4 does not have trixie builds yet mariadb: - url: "https://dlm.mariadb.com/repo/mariadb-server/10.11/repo/debian" + url: "https://dlm.mariadb.com/repo/mariadb-server/11.4/repo/debian" suite: "bookworm" component: "main" gpg_key: "mariadb.gpg" - opensearch: - url: "https://artifacts.opensearch.org/releases/bundle/opensearch/3.x/apt/" - suite: "stable" - component: "main" - gpg_key: "opensearch.asc" - opensearch-dashboards: - url: "https://artifacts.opensearch.org/releases/bundle/opensearch-dashboards/3.x/apt/" - suite: "stable" - component: "main" - gpg_key: "opensearch.asc" proxysql: - url: "https://repo.proxysql.com/ProxySQL/proxysql-3.0.x/bookworm/" + url: "https://repo.proxysql.com/ProxySQL/proxysql-3.0.x/trixie/" suite: "./" component: "" gpg_key: "proxysql.asc" rabbitmq: - url: "https://ppa1.rabbitmq.com/rabbitmq/rabbitmq-server/deb/debian" - suite: "bookworm" + url: "https://deb1.rabbitmq.com/rabbitmq-server/debian/trixie/" + suite: "trixie" + component: "main" + gpg_key: "rabbitmq.gpg" + +debian-aarch64: + rabbitmq: + url: "https://deb1.rabbitmq.com/rabbitmq-server/debian/trixie" + suite: "trixie" component: "main" # NOTE(mnasiadka): Since rabbitmq is really noarch and community mirror is not # syncing binary-aarch64 - we're using amd64 here. arch: "amd64" gpg_key: "rabbitmq.gpg" -rocky: - ceph: "centos-ceph-reef" - crb: "crb" - docker-ce: "docker-ce" - epel: "epel" - erlang: "rabbitmq_rabbitmq-erlang" - extras: "extras" - fluentd: "fluent-package-lts" - grafana: "grafana" - hacluster: "highavailability" - influxdb: "influxdb" - mariadb: "mariadb" - opensearch: "opensearch-3.x" - opensearch-dashboards: "opensearch-dashboards-3.x" - openvswitch: "centos-nfv-openvswitch" - opstools: "centos-opstools" - proxysql: "proxysql" - rabbitmq: "rabbitmq_rabbitmq-server" - -rocky-aarch64: - ceph: "centos-ceph-reef" - crb: "crb" - docker-ce: "docker-ce" - epel: "epel" - erlang: "copr-rabbitmq-erlang" - extras: "extras" - fluentd: "fluent-package-lts" - grafana: "grafana" - influxdb: "influxdb" - hacluster: "highavailability" - mariadb: "mariadb" - opensearch: "opensearch-3.x" - opensearch-dashboards: "opensearch-dashboards-3.x" - openvswitch: "centos-nfv-openvswitch" - opstools: "centos-opstools" - proxysql: "proxysql" - rabbitmq: "rabbitmq_rabbitmq-server" - ubuntu: - docker-ce: - url: "https://download.docker.com/linux/ubuntu" - suite: "noble" - component: "stable" - gpg_key: "docker-ce.asc" + ubuntu: + distro: True + ubuntu-security: + distro: True + ubuntu-cloud-archive: + url: "http://ubuntu-cloud.archive.canonical.com/ubuntu" + suite: "noble-updates/{openstack_release_codename}" + component: "main" + gpg_key: "/usr/share/keyrings/ubuntu-cloud-keyring.gpg" erlang: url: "https://ppa.launchpadcontent.net/rabbitmq/rabbitmq-erlang/ubuntu" suite: "noble" component: "main" gpg_key: "erlang-ppa.gpg" + docker-ce: + url: "https://download.docker.com/linux/ubuntu" + suite: "noble" + component: "stable" + gpg_key: "docker-ce.asc" fluentd: - url: "https://packages.treasuredata.com/lts/5/ubuntu/noble/" + url: "https://fluentd.cdn.cncf.io/lts/6/ubuntu/noble" suite: "noble" component: "contrib" - gpg_key: "treasuredata.asc" - grafana: - url: "https://apt.grafana.com" - suite: "stable" - component: "main" - gpg_key: "grafana.asc" - influxdb: - url: "https://repos.influxdata.com/ubuntu" - # TODO(mnasiadka): Switch to noble when available - suite: "jammy" - component: "stable" - gpg_key: "influxdb.asc" + gpg_key: "fluentd.asc" mariadb: - url: "https://dlm.mariadb.com/repo/mariadb-server/10.11/repo/ubuntu" + url: "https://dlm.mariadb.com/repo/mariadb-server/11.4/repo/ubuntu" suite: "noble" component: "main" gpg_key: "mariadb.gpg" - opensearch: - url: "https://artifacts.opensearch.org/releases/bundle/opensearch/3.x/apt/" - suite: "stable" - component: "main" - gpg_key: "opensearch.asc" - opensearch-dashboards: - url: "https://artifacts.opensearch.org/releases/bundle/opensearch-dashboards/3.x/apt/" - suite: "stable" - component: "main" - gpg_key: "opensearch.asc" proxysql: url: "https://repo.proxysql.com/ProxySQL/proxysql-3.0.x/noble/" suite: "./" component: "" gpg_key: "proxysql.asc" rabbitmq: - url: "https://ppa1.rabbitmq.com/rabbitmq/rabbitmq-server/deb/ubuntu" + url: "https://deb1.rabbitmq.com/rabbitmq-server/ubuntu/noble" suite: "noble" component: "main" gpg_key: "rabbitmq.gpg" ubuntu-aarch64: - docker-ce: - url: "https://download.docker.com/linux/ubuntu" - suite: "noble" - component: "stable" - gpg_key: "docker-ce.asc" - erlang: - url: "https://ppa.launchpadcontent.net/rabbitmq/rabbitmq-erlang/ubuntu" + ubuntu: + distro: True + ubuntu-security: + distro: True + rabbitmq: + url: "https://deb1.rabbitmq.com/rabbitmq-server/ubuntu/noble" suite: "noble" component: "main" - gpg_key: "erlang-ppa.gpg" + # NOTE(mnasiadka): Since rabbitmq is really noarch and community mirror is not + # syncing binary-aarch64 - we're using amd64 here. + arch: "amd64" + gpg_key: "rabbitmq.gpg" + +rpm: + ceph: + distro: True + name: "centos-ceph-squid" + crb: + distro: True + name: "crb" + docker-ce: + gpgkey: "https://download.docker.com/linux/centos/gpg" + baseurl: "https://download.docker.com/linux/centos/$releasever/$basearch/stable" + name: "docker-ce" + epel: + gpgkey: "https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-$releasever" + metalink: "https://mirrors.fedoraproject.org/metalink?repo=epel-$releasever&arch=$basearch&infra=$infra&content=$contentdir" + name: "epel" + erlang: + baseurl: | + https://yum1.rabbitmq.com/erlang/el/9/$basearch + https://yum2.rabbitmq.com/erlang/el/9/$basearch + gpgkey: "https://github.com/rabbitmq/signing-keys/releases/download/3.0/cloudsmith.rabbitmq-erlang.E495BB49CC4BBE5B.key" + name: "rabbitmq_rabbitmq-erlang" + extras: + distro: True + name: "extras" fluentd: - url: "https://packages.treasuredata.com/lts/5/ubuntu/noble/" - suite: "noble" - component: "contrib" - gpg_key: "treasuredata.asc" + baseurl: "https://fluentd.cdn.cncf.io/lts/6/redhat/$releasever/$basearch" + gpgkey: "https://fluentd.cdn.cncf.io/GPG-KEY-fluent-package" + name: "fluent-package-lts" grafana: - url: "https://apt.grafana.com" - suite: "stable" - component: "main" - gpg_key: "grafana.asc" - influxdb: - url: "https://repos.influxdata.com/ubuntu" - # TODO(mnasiadka): Switch to noble when available - suite: "jammy" - component: "stable" - gpg_key: "influxdb.asc" + baseurl: "https://rpm.grafana.com" + gpgkey: "https://rpm.grafana.com/gpg.key" + name: "grafana" + hacluster: + name: "highavailability" + distro: true + ligenix-qemu-spice: + baseurl: "https://download.copr.fedorainfracloud.org/results/ligenix/enterprise-qemu-spice/epel-$releasever-$basearch/" + gpgkey: "https://download.copr.fedorainfracloud.org/results/ligenix/enterprise-qemu-spice/pubkey.gpg" + gpgcheck: 1 + name: "ligenix-qemu-spice" mariadb: - url: "https://dlm.mariadb.com/repo/mariadb-server/10.11/repo/ubuntu" - suite: "noble" - component: "main" - gpg_key: "mariadb.gpg" + baseurl: "https://dlm.mariadb.com/repo/mariadb-server/11.4/yum/rhel/$releasever/$basearch" + gpgkey: "https://downloads.mariadb.com/MariaDB/RPM-GPG-KEY-MariaDB" + name: "mariadb" opensearch: - url: "https://artifacts.opensearch.org/releases/bundle/opensearch/3.x/apt/" - suite: "stable" - component: "main" - gpg_key: "opensearch.asc" + baseurl: "https://artifacts.opensearch.org/releases/bundle/opensearch/3.x/yum" + gpgkey: "https://artifacts.opensearch.org/publickeys/opensearch-release.pgp" + repo_gpgcheck: 1 + name: "opensearch-3.x" opensearch-dashboards: - url: "https://artifacts.opensearch.org/releases/bundle/opensearch-dashboards/3.x/apt/" - suite: "stable" - component: "main" - gpg_key: "opensearch.asc" + baseurl: "https://artifacts.opensearch.org/releases/bundle/opensearch-dashboards/3.x/yum" + gpgkey: "https://artifacts.opensearch.org/publickeys/opensearch-release.pgp" + repo_gpgcheck: 1 + name: "opensearch-dashboards-3.x" + openvswitch: + gpgkey: "https://www.centos.org/keys/RPM-GPG-KEY-CentOS-SIG-NFV" + metalink: "https://mirrors.centos.org/metalink?repo=centos-nfv-sig-openvswitch-2-$stream&arch=$basearch&protocol=https,http" + name: "centos-nfv-openvswitch" + opstools: + distro: True + name: "opstools" proxysql: - url: "https://repo.proxysql.com/ProxySQL/proxysql-3.0.x/noble/" - suite: "./" - component: "" - gpg_key: "proxysql.asc" + baseurl: "https://repo.proxysql.com/ProxySQL/proxysql-3.0.x/almalinux/10" + gpgkey: "https://repo.proxysql.com/ProxySQL/proxysql-3.0.x/repo_pub_key" + name: "proxysql" rabbitmq: - url: "https://ppa1.rabbitmq.com/rabbitmq/rabbitmq-server/deb/ubuntu" - suite: "noble" - component: "main" - arch: "amd64" - gpg_key: "rabbitmq.gpg" + baseurl: | + https://yum1.rabbitmq.com/rabbitmq/el/9/noarch + https://yum2.rabbitmq.com/rabbitmq/el/9/noarch + gpgkey: | + https://github.com/rabbitmq/signing-keys/releases/download/3.0/cloudsmith.rabbitmq-server.9F4587F226208342.key + https://github.com/rabbitmq/signing-keys/releases/download/3.0/rabbitmq-release-signing-key.asc + name: "rabbitmq_rabbitmq-server" + +rocky: + appstream: + distro: True + file_group: "rocky.repo" + name: "appstream" + baseos: + distro: True + file_group: "rocky.repo" + name: "baseos" + crb: + file_group: "rocky.repo" + +rocky-aarch64: + erlang: + baseurl: "https://download.copr.fedorainfracloud.org/results/@openstack-kolla/rabbitmq-erlang-27/rhel-$releasever-aarch64/" + gpgkey: "https://download.copr.fedorainfracloud.org/results/@openstack-kolla/rabbitmq-erlang-27/pubkey.gpg" + name: "copr-rabbitmq-erlang" diff --git a/kolla/tests/test_build.py b/kolla/tests/test_build.py index deb2dfa10..7d7c58d0f 100644 --- a/kolla/tests/test_build.py +++ b/kolla/tests/test_build.py @@ -10,7 +10,10 @@ # See the License for the specific language governing permissions and # limitations under the License. +import datetime import fixtures +import io +import jinja2 import os import requests import sys @@ -19,6 +22,7 @@ import tempfile from unittest import mock from kolla.cmd import build as build_cmd +from kolla.common import utils as common_utils from kolla.image import build from kolla.image.kolla_worker import Image from kolla.image import tasks @@ -76,6 +80,11 @@ class TasksTest(base.TestCase): self.build_kwargs["squash"] = False else: self.build_kwargs = {} + # Existing tests exercise the docker-py SDK path; disable BuildKit so + # they are not routed through _build_buildkit. + self.conf.set_override('buildkit', False) + # Mock build-date + self.build_kwargs['labels'] = {'build-date': mock.ANY} @mock.patch.dict(os.environ, clear=True) @mock.patch(engine_client) @@ -362,6 +371,67 @@ class TasksTest(base.TestCase): @mock.patch.dict(os.environ, clear=True) @mock.patch(engine_client) + def test_local_directory_archive_reproducible(self, mock_client): + src_dir = self.useFixture(fixtures.TempDir()).path + sub_dir = os.path.join(src_dir, 'sub') + os.mkdir(sub_dir) + file_path = os.path.join(sub_dir, 'test.txt') + with open(file_path, 'w') as f: + f.write('Hello') + + source = {'name': 'fake-image-base', + 'type': 'local', + 'enabled': True, + 'source': src_dir} + push_queue = mock.Mock() + + archives = [] + for mtime in (1000000000, 2000000000): + os.utime(file_path, (mtime, mtime)) + os.utime(sub_dir, (mtime, mtime)) + os.utime(src_dir, (mtime, mtime)) + image = FAKE_IMAGE.copy() + image.path = self.useFixture(fixtures.TempDir()).path + builder = tasks.BuildTask(self.conf, image, push_queue) + dest_archive = builder.process_source(image, source) + self.assertIsNotNone(dest_archive) + with open(dest_archive, 'rb') as f: + archives.append(f.read()) + + self.assertEqual(archives[0], archives[1]) + with tarfile.open(fileobj=io.BytesIO(archives[0])) as tar: + for member in tar.getmembers(): + self.assertEqual(0, member.mtime) + self.assertEqual(0, member.uid) + self.assertEqual(0, member.gid) + self.assertEqual('root', member.uname) + self.assertEqual('root', member.gname) + + @mock.patch.dict(os.environ, clear=True) + @mock.patch(engine_client) + def test_empty_plugins_archive_reproducible(self, mock_client): + self.dc = mock_client + push_queue = mock.Mock() + + archives = [] + for _ in range(2): + image = FAKE_IMAGE.copy() + image.path = self.useFixture(fixtures.TempDir()).path + builder = tasks.BuildTask(self.conf, image, push_queue) + builder.run() + self.assertTrue(builder.success) + with open(os.path.join(image.path, 'plugins-archive'), + 'rb') as f: + archives.append(f.read()) + + self.assertEqual(archives[0], archives[1]) + with tarfile.open(fileobj=io.BytesIO(archives[0])) as tar: + members = tar.getmembers() + self.assertEqual(['plugins'], [m.name for m in members]) + self.assertEqual(0, members[0].mtime) + + @mock.patch.dict(os.environ, clear=True) + @mock.patch(engine_client) def test_malicious_tar(self, mock_client): tmpdir = tempfile.mkdtemp() file_name = 'test.txt' @@ -478,6 +548,253 @@ class TasksTest(base.TestCase): get_result = builder.followups self.assertEqual(1, len(get_result)) + @mock.patch(engine_client) + def test_followups_buildkit_skips_push(self, mock_client): + """PushTask must not be added when buildkit is active (docker).""" + self.conf.set_override('buildkit', True) + push_queue = mock.Mock() + builder = tasks.BuildTask(self.conf, self.imageChild, push_queue) + builder.success = True + self.conf.push = True + followups = builder.followups + push_tasks = [f for f in followups if + isinstance(f, tasks.PushIntoQueueTask)] + self.assertEqual(0, len(push_tasks)) + + @mock.patch(engine_client) + def test_followups_buildkit_true_podman_includes_push(self, mock_client): + """PushTask must be added for Podman even when buildkit=True.""" + self.conf.set_override('buildkit', True) + self.conf.set_override('engine', 'podman') + push_queue = mock.Mock() + builder = tasks.BuildTask(self.conf, self.imageChild, push_queue) + builder.success = True + self.conf.push = True + followups = builder.followups + push_tasks = [f for f in followups if + isinstance(f, tasks.PushIntoQueueTask)] + self.assertEqual(1, len(push_tasks)) + + @mock.patch.object(tasks.BuildTask, '_run_cmd') + def test_build_buildkit_no_platform_no_push(self, mock_run_cmd): + """No --platform and no push: command uses --load.""" + self.conf.set_override('buildkit', True) + push_queue = mock.Mock() + builder = tasks.BuildTask(self.conf, self.image, push_queue) + self.image.start = datetime.datetime.now() + builder._build_buildkit(self.image, pull=True, buildargs=None) + + mock_run_cmd.assert_called_once() + cmd = mock_run_cmd.call_args[0][0] + self.assertIn('--load', cmd) + self.assertNotIn('--push', cmd) + self.assertNotIn('--platform', cmd) + self.assertEqual(utils.Status.BUILT, self.image.status) + + @mock.patch.object(tasks.BuildTask, '_run_cmd') + def test_build_buildkit_no_platform_with_push(self, mock_run_cmd): + """No platform + push=True: buildx pushes directly.""" + self.conf.set_override('buildkit', True) + self.conf.set_override('push', True) + push_queue = mock.Mock() + builder = tasks.BuildTask(self.conf, self.image, push_queue) + self.image.start = datetime.datetime.now() + builder._build_buildkit(self.image, pull=False, buildargs=None) + + mock_run_cmd.assert_called_once() + cmd = mock_run_cmd.call_args[0][0] + self.assertIn('--push', cmd) + self.assertNotIn('--load', cmd) + self.assertEqual(utils.Status.BUILT, self.image.status) + + @mock.patch.object(tasks.BuildTask, '_run_cmd') + def test_build_buildkit_single_platform_no_push(self, mock_run_cmd): + """Single platform without push: --load, no push_tag, no extra push.""" + self.conf.set_override('buildkit', True) + self.conf.set_override('platform', 'linux/amd64') + push_queue = mock.Mock() + builder = tasks.BuildTask(self.conf, self.image, push_queue) + self.image.start = datetime.datetime.now() + builder._build_buildkit(self.image, pull=False, buildargs=None) + + mock_run_cmd.assert_called_once() + cmd = mock_run_cmd.call_args[0][0] + self.assertIn('--platform', cmd) + self.assertIn('linux/amd64', cmd) + self.assertIn('--load', cmd) + self.assertNotIn('--push', cmd) + self.assertEqual(utils.Status.BUILT, self.image.status) + + @mock.patch.object(tasks.BuildTask, '_run_cmd') + def test_build_buildkit_single_platform_with_push(self, mock_run_cmd): + """Single platform + push: --load then push canonical tag.""" + self.conf.set_override('buildkit', True) + self.conf.set_override('platform', 'linux/amd64') + self.conf.set_override('push', True) + push_queue = mock.Mock() + builder = tasks.BuildTask(self.conf, self.image, push_queue) + self.image.start = datetime.datetime.now() + builder._build_buildkit(self.image, pull=False, buildargs=None) + + self.assertEqual(2, mock_run_cmd.call_count) + build_cmd = mock_run_cmd.call_args_list[0][0][0] + push_cmd = mock_run_cmd.call_args_list[1][0][0] + + self.assertIn('--load', build_cmd) + self.assertNotIn('--push', build_cmd) + self.assertNotIn('image-base:latest-amd64', build_cmd) + self.assertEqual( + ['docker', 'push', self.image.canonical_name], push_cmd) + self.assertEqual(utils.Status.BUILT, self.image.status) + + @mock.patch.object(tasks.BuildTask, '_run_cmd') + def test_build_buildkit_multi_platform_with_push(self, mock_run_cmd): + """Multi-platform + push: single --push invocation, no separate push""" + self.conf.set_override('buildkit', True) + self.conf.set_override('platform', 'linux/amd64,linux/arm64') + self.conf.set_override('push', True) + push_queue = mock.Mock() + builder = tasks.BuildTask(self.conf, self.image, push_queue) + self.image.start = datetime.datetime.now() + builder._build_buildkit(self.image, pull=False, buildargs=None) + + mock_run_cmd.assert_called_once() + cmd = mock_run_cmd.call_args[0][0] + self.assertIn('--push', cmd) + self.assertNotIn('--load', cmd) + self.assertIn('linux/amd64,linux/arm64', cmd) + self.assertEqual(utils.Status.BUILT, self.image.status) + + @mock.patch.object(tasks.BuildTask, '_run_cmd') + def test_build_buildkit_multi_platform_no_push(self, mock_run_cmd): + """Multi-platform without push: fails fast (--load unsupported).""" + self.conf.set_override('buildkit', True) + self.conf.set_override('platform', 'linux/amd64,linux/arm64') + push_queue = mock.Mock() + builder = tasks.BuildTask(self.conf, self.image, push_queue) + self.image.start = datetime.datetime.now() + builder._build_buildkit(self.image, pull=False, buildargs=None) + + mock_run_cmd.assert_not_called() + self.assertEqual(utils.Status.ERROR, self.image.status) + + @mock.patch.object(tasks.BuildTask, '_run_cmd') + def test_build_buildkit_with_named_builder(self, mock_run_cmd): + """--buildkit-builder is forwarded as --builder to the command.""" + self.conf.set_override('buildkit', True) + self.conf.set_override('buildkit_builder', 'mybuilder') + push_queue = mock.Mock() + builder = tasks.BuildTask(self.conf, self.image, push_queue) + self.image.start = datetime.datetime.now() + builder._build_buildkit(self.image, pull=False, buildargs=None) + + cmd = mock_run_cmd.call_args[0][0] + self.assertIn('--builder', cmd) + idx = cmd.index('--builder') + self.assertEqual('mybuilder', cmd[idx + 1]) + + @mock.patch.object(tasks.BuildTask, '_run_cmd') + def test_build_buildkit_no_cache(self, mock_run_cmd): + """cache=False adds --no-cache to the command.""" + self.conf.set_override('buildkit', True) + self.conf.set_override('cache', False) + push_queue = mock.Mock() + builder = tasks.BuildTask(self.conf, self.image, push_queue) + self.image.start = datetime.datetime.now() + builder._build_buildkit(self.image, pull=False, buildargs=None) + + cmd = mock_run_cmd.call_args[0][0] + self.assertIn('--no-cache', cmd) + + @mock.patch.object(tasks.BuildTask, '_run_cmd') + def test_build_buildkit_with_buildargs(self, mock_run_cmd): + """Build args are forwarded as --build-arg KEY=VALUE pairs.""" + self.conf.set_override('buildkit', True) + push_queue = mock.Mock() + builder = tasks.BuildTask(self.conf, self.image, push_queue) + self.image.start = datetime.datetime.now() + buildargs = {'HTTP_PROXY': 'http://proxy:8080', + 'NO_PROXY': '127.0.0.1'} + builder._build_buildkit(self.image, pull=False, buildargs=buildargs) + + cmd = mock_run_cmd.call_args[0][0] + self.assertIn('--build-arg', cmd) + self.assertIn('HTTP_PROXY=http://proxy:8080', cmd) + self.assertIn('NO_PROXY=127.0.0.1', cmd) + + @mock.patch.object(tasks.BuildTask, '_run_cmd') + def test_build_buildkit_with_labels(self, mock_run_cmd): + """Image labels are forwarded as --label key=value pairs.""" + self.conf.set_override('buildkit', True) + push_queue = mock.Mock() + builder = tasks.BuildTask(self.conf, self.image, push_queue) + self.image.start = datetime.datetime.now() + self.image.labels = {'maintainer': 'kolla', 'version': '1.0'} + builder._build_buildkit(self.image, pull=False, buildargs=None) + + cmd = mock_run_cmd.call_args[0][0] + self.assertIn('--label', cmd) + self.assertIn('maintainer=kolla', cmd) + self.assertIn('version=1.0', cmd) + + @mock.patch.object(tasks.BuildTask, '_run_cmd') + def test_build_buildkit_error_sets_status(self, mock_run_cmd): + """An exception from _run_cmd marks the image as ERROR.""" + self.conf.set_override('buildkit', True) + mock_run_cmd.side_effect = Exception('build failed') + push_queue = mock.Mock() + builder = tasks.BuildTask(self.conf, self.image, push_queue) + self.image.start = datetime.datetime.now() + builder._build_buildkit(self.image, pull=False, buildargs=None) + + self.assertEqual(utils.Status.ERROR, self.image.status) + + @mock.patch('subprocess.Popen') + def test_run_cmd_success(self, mock_popen): + """Zero exit code does not raise.""" + mock_proc = mock.MagicMock() + mock_proc.__enter__.return_value = mock_proc + mock_proc.stdout = [] + mock_proc.returncode = 0 + mock_popen.return_value = mock_proc + + push_queue = mock.Mock() + builder = tasks.BuildTask(self.conf, self.image, push_queue) + builder._run_cmd(['docker', 'buildx', 'build', self.image.path]) + + @mock.patch('subprocess.Popen') + def test_run_cmd_failure_raises(self, mock_popen): + """Non-zero exit code raises CalledProcessError.""" + import subprocess as sp # nosec + mock_proc = mock.MagicMock() + mock_proc.__enter__.return_value = mock_proc + mock_proc.stdout = [] + mock_proc.returncode = 1 + mock_popen.return_value = mock_proc + + push_queue = mock.Mock() + builder = tasks.BuildTask(self.conf, self.image, push_queue) + cmd = ['docker', 'buildx', 'build', self.image.path] + self.assertRaises(sp.CalledProcessError, builder._run_cmd, cmd) + + @mock.patch(engine_client) + def test_build_image_buildkit_dispatches(self, mock_client): + """When buildkit=True and engine=docker, calls _build_buildkit.""" + self.conf.set_override('buildkit', True) + push_queue = mock.Mock() + builder = tasks.BuildTask(self.conf, self.image, push_queue) + with mock.patch.object(builder, '_build_buildkit') as mock_bk: + builder.run() + mock_bk.assert_called_once() + + @mock.patch(engine_client) + def test_build_image_no_buildkit_uses_sdk(self, mock_client): + """When buildkit=False, builder uses docker-py SDK (images.build).""" + push_queue = mock.Mock() + builder = tasks.BuildTask(self.conf, self.image, push_queue) + builder.run() + mock_client().images.build.assert_called_once() + class KollaWorkerTest(base.TestCase): @@ -503,7 +820,7 @@ class KollaWorkerTest(base.TestCase): self.mock_client = patcher.start() def test_supported_base_distro(self): - build_base = ['centos', 'debian', 'ubuntu'] + build_base = ['debian', 'rocky', 'ubuntu'] for base_distro in build_base: self.conf.set_override('base', base_distro) @@ -579,6 +896,114 @@ class KollaWorkerTest(base.TestCase): kolla.setup_working_dir() kolla.set_time() + @mock.patch.dict(os.environ, {'http_proxy': 'http://test-proxy:8080'}, + clear=False) + @mock.patch(engine_client) + def test_create_dockerfiles_env_http_proxy(self, mock_client): + tmpdir = self.useFixture(fixtures.TempDir()).path + base_dir = os.path.join(tmpdir, 'base') + os.makedirs(base_dir) + with open(os.path.join(base_dir, 'Dockerfile.j2'), 'w') as f: + f.write( + '{% if env.http_proxy %}' + 'ARG http_proxy={{ env.http_proxy }}' + '{% endif %}\n' + ) + with mock.patch.object(build.KollaWorker, '_get_images_dir', + return_value=tmpdir): + kolla = build.KollaWorker(self.conf) + kolla.setup_working_dir() + kolla.find_dockerfiles() + kolla.create_dockerfiles() + dockerfile = os.path.join(kolla.working_dir, 'base', 'Dockerfile') + with open(dockerfile) as f: + content = f.read() + self.assertIn('http://test-proxy:8080', content) + + @mock.patch(engine_client) + def test_create_dockerfiles_ssti_blocked(self, mock_client): + tmpdir = self.useFixture(fixtures.TempDir()).path + base_dir = os.path.join(tmpdir, 'base') + os.makedirs(base_dir) + with open(os.path.join(base_dir, 'Dockerfile.j2'), 'w') as f: + f.write( + "{{ self.__init__.__globals__['__builtins__']" + "['__import__']('os').popen('id').read() }}\n" + ) + with mock.patch.object(build.KollaWorker, '_get_images_dir', + return_value=tmpdir): + kolla = build.KollaWorker(self.conf) + kolla.setup_working_dir() + kolla.find_dockerfiles() + self.assertRaises(jinja2.exceptions.SecurityError, + kolla.create_dockerfiles) + + @mock.patch(engine_client) + def test_create_dockerfiles_template_override_ssti_blocked( + self, mock_client): + tmpdir = self.useFixture(fixtures.TempDir()).path + base_dir = os.path.join(tmpdir, 'base') + os.makedirs(base_dir) + with open(os.path.join(base_dir, 'Dockerfile.j2'), 'w') as f: + f.write('FROM {{ base_distro }}:{{ base_distro_tag }}\n') + override_file = os.path.join( + self.useFixture(fixtures.TempDir()).path, 'template_override.j2') + with open(override_file, 'w') as f: + f.write( + "{{ self.__init__.__globals__['__builtins__']" + "['__import__']('os').popen('id').read() }}\n" + ) + self.conf.set_override('template_override', [override_file]) + with mock.patch.object(build.KollaWorker, '_get_images_dir', + return_value=tmpdir): + kolla = build.KollaWorker(self.conf) + kolla.setup_working_dir() + kolla.find_dockerfiles() + self.assertRaises(jinja2.exceptions.SecurityError, + kolla.create_dockerfiles) + + @mock.patch(engine_client) + def test_create_dockerfiles_pip_args_lowercase_from(self, mock_client): + tmpdir = self.useFixture(fixtures.TempDir()).path + base_dir = os.path.join(tmpdir, 'base') + os.makedirs(base_dir) + with open(os.path.join(base_dir, 'Dockerfile.j2'), 'w') as f: + f.write('from {{ base_distro }}:{{ base_distro_tag }}\n') + self.conf.set_override('pip_index_url', 'https://example.org/simple') + with mock.patch.object(build.KollaWorker, '_get_images_dir', + return_value=tmpdir): + kolla = build.KollaWorker(self.conf) + kolla.setup_working_dir() + kolla.find_dockerfiles() + kolla.create_dockerfiles() + dockerfile = os.path.join(kolla.working_dir, 'base', 'Dockerfile') + with open(dockerfile) as f: + content = f.read() + self.assertIn('ARG PIP_INDEX_URL', content) + + @mock.patch(engine_client) + def test_build_image_list_parent_name_lowercase_from(self, mock_client): + tmpdir = self.useFixture(fixtures.TempDir()).path + base_dir = os.path.join(tmpdir, 'base') + os.makedirs(base_dir) + with open(os.path.join(base_dir, 'Dockerfile.j2'), 'w') as f: + f.write('FROM {{ base_distro }}:{{ base_distro_tag }}\n') + child_dir = os.path.join(tmpdir, 'child') + os.makedirs(child_dir) + with open(os.path.join(child_dir, 'Dockerfile.j2'), 'w') as f: + f.write('from {{ namespace }}/{{ image_prefix }}base:{{ tag }}\n') + with mock.patch.object(build.KollaWorker, '_get_images_dir', + return_value=tmpdir): + kolla = build.KollaWorker(self.conf) + kolla.setup_working_dir() + kolla.find_dockerfiles() + kolla.create_dockerfiles() + kolla.build_image_list() + expected_parent = '{}/{}base:{}'.format( + kolla.namespace, kolla.image_prefix, kolla.tag) + child = [i for i in kolla.images if i.name == 'child'][0] + self.assertEqual(expected_parent, child.parent_name) + def _get_matched_images(self, images): return [image for image in images if image.status == utils.Status.MATCHED] @@ -802,8 +1227,49 @@ class KollaWorkerTest(base.TestCase): self.assertEqual('tmp/foo/docker', kolla.working_dir) +class BuildKitCheckTest(base.TestCase): + + @mock.patch('subprocess.check_output') + def test_check_docker_buildx_success(self, mock_check_output): + mock_check_output.return_value = b'github.com/docker/buildx v0.21.0' + common_utils.check_docker_buildx() + mock_check_output.assert_called_once_with( + ['docker', 'buildx', 'version'], stderr=mock.ANY) + + @mock.patch('subprocess.check_output') + def test_check_docker_buildx_not_installed(self, mock_check_output): + import subprocess as sp # nosec + mock_check_output.side_effect = sp.CalledProcessError(1, 'docker') + self.assertRaises(sp.CalledProcessError, + common_utils.check_docker_buildx) + + @mock.patch('subprocess.check_output') + def test_check_docker_buildx_docker_missing(self, mock_check_output): + mock_check_output.side_effect = OSError(2, 'No such file or directory') + self.assertRaises(OSError, common_utils.check_docker_buildx) + + class MainTest(base.TestCase): + def setUp(self): + super(MainTest, self).setUp() + self.conf.set_override('buildkit', False) + # Mock subprocess so that _build_buildkit and check_docker_buildx + # succeed when the full build pipeline is exercised (buildkit=True is + # the default for a fresh conf). + mock_proc = mock.MagicMock() + mock_proc.__enter__.return_value = mock_proc + mock_proc.stdout = [] + mock_proc.returncode = 0 + popen_patcher = mock.patch('subprocess.Popen', return_value=mock_proc) + popen_patcher.start() + self.addCleanup(popen_patcher.stop) + check_output_patcher = mock.patch( + 'subprocess.check_output', + return_value=b'github.com/docker/buildx v0.21.0') + check_output_patcher.start() + self.addCleanup(check_output_patcher.stop) + @mock.patch.object(build, 'run_build') def test_images_built(self, mock_run_build): image_statuses = ({}, {'img': 'built'}, {}, {}, {}, {}) @@ -837,6 +1303,15 @@ class MainTest(base.TestCase): result = build.run_build() self.assertTrue(result) + @mock.patch('sys.argv') + @mock.patch('kolla.common.utils.check_docker_buildx') + @mock.patch(engine_client) + def test_run_build_exits_when_buildx_missing( + self, mock_client, mock_check_buildx, mock_sys): + import subprocess as sp # nosec + mock_check_buildx.side_effect = sp.CalledProcessError(1, 'docker') + self.assertRaises(SystemExit, build.run_build) + @mock.patch.object(build, 'run_build') def test_skipped_images(self, mock_run_build): image_statuses = ({}, {}, {}, {'img': 'skipped'}, {}, {}) diff --git a/kolla/tests/test_methods.py b/kolla/tests/test_methods.py index 395dadd4e..9b5dd212a 100644 --- a/kolla/tests/test_methods.py +++ b/kolla/tests/test_methods.py @@ -10,6 +10,11 @@ # See the License for the specific language governing permissions and # limitations under the License. +import os +import tempfile + +import yaml + from kolla.template import methods from kolla.tests import base @@ -22,50 +27,157 @@ class MethodsTest(base.TestCase): expectCmd = 'apt-get -y install --no-install-recommends package2.deb' self.assertEqual(expectCmd, result.split("&&")[1].strip()) - def test_enable_repos_centos(self): + def test_enable_repos_rocky_baseurl(self): template_vars = { 'base_arch': 'x86_64', - 'base_distro': 'centos', + 'base_distro': 'rocky', 'base_package_type': 'rpm', } - result = methods.handle_repos(template_vars, ['grafana'], 'enable') - expectCmd = 'RUN dnf config-manager --enable grafana || true' + result = methods.handle_repos(template_vars, ["grafana"], "enable") + expectCmd = "RUN grep -rlF '[grafana]' /etc/yum.repos.d/ " + expectCmd += "2>/dev/null | xargs -r rm -f && " + expectCmd += "echo '[grafana]' " + expectCmd += ">/etc/yum.repos.d/grafana.repo && " + expectCmd += "echo 'name=grafana' " + expectCmd += ">>/etc/yum.repos.d/grafana.repo && " + expectCmd += "echo 'enabled=1' " + expectCmd += ">>/etc/yum.repos.d/grafana.repo && " + expectCmd += "echo 'gpgkey=https://rpm.grafana.com/gpg.key' " + expectCmd += ">>/etc/yum.repos.d/grafana.repo && " + expectCmd += "echo 'baseurl=https://rpm.grafana.com' " + expectCmd += ">>/etc/yum.repos.d/grafana.repo" self.assertEqual(expectCmd, result) - def test_enable_repos_centos_missing_repo(self): + def test_enable_repos_rocky_ceph_distro(self): template_vars = { 'base_arch': 'x86_64', - 'base_distro': 'centos', + 'base_distro': 'rocky', 'base_package_type': 'rpm', } - result = methods.handle_repos(template_vars, ['missing_repo'], - 'enable') - expectCmd = '' + result = methods.handle_repos(template_vars, ["ceph"], "enable") + expectCmd = "RUN dnf config-manager --enable centos-ceph-squid || true" self.assertEqual(expectCmd, result) - def test_enable_repos_centos_multiple(self): + def test_enable_repos_rocky_arch(self): template_vars = { - 'base_arch': 'x86_64', - 'base_distro': 'centos', - 'base_package_type': 'rpm', + "base_arch": "aarch64", + "base_distro": "rocky", + "base_package_type": "rpm", + } + + result = methods.handle_repos(template_vars, ["grafana"], "enable") + expectCmd = "RUN grep -rlF '[grafana]' /etc/yum.repos.d/ " + expectCmd += "2>/dev/null | xargs -r rm -f && " + expectCmd += "echo '[grafana]' " + expectCmd += ">/etc/yum.repos.d/grafana.repo && " + expectCmd += "echo 'name=grafana' " + expectCmd += ">>/etc/yum.repos.d/grafana.repo && " + expectCmd += "echo 'enabled=1' " + expectCmd += ">>/etc/yum.repos.d/grafana.repo && " + expectCmd += "echo 'gpgkey=https://rpm.grafana.com/gpg.key' " + expectCmd += ">>/etc/yum.repos.d/grafana.repo && " + expectCmd += "echo 'baseurl=https://rpm.grafana.com' " + expectCmd += ">>/etc/yum.repos.d/grafana.repo" + self.assertEqual(expectCmd, result) + + def test_enable_repos_rocky_multiple(self): + template_vars = { + "base_arch": "x86_64", + "base_distro": "rocky", + "base_package_type": "rpm", + } + + result = methods.handle_repos(template_vars, + ["grafana", "rabbitmq"], "enable") + expectCmd = "RUN grep -rlF '[grafana]' /etc/yum.repos.d/ " + expectCmd += "2>/dev/null | xargs -r rm -f && " + expectCmd += "echo '[grafana]' " + expectCmd += ">/etc/yum.repos.d/grafana.repo && " + expectCmd += "echo 'name=grafana' " + expectCmd += ">>/etc/yum.repos.d/grafana.repo && " + expectCmd += "echo 'enabled=1' " + expectCmd += ">>/etc/yum.repos.d/grafana.repo && " + expectCmd += "echo 'gpgkey=https://rpm.grafana.com/gpg.key' " + expectCmd += ">>/etc/yum.repos.d/grafana.repo && " + expectCmd += "echo 'baseurl=https://rpm.grafana.com' " + expectCmd += ">>/etc/yum.repos.d/grafana.repo && " + + expectCmd += "grep -rlF '[rabbitmq_rabbitmq-server]' " + expectCmd += "/etc/yum.repos.d/ 2>/dev/null | xargs -r rm -f && " + expectCmd += "echo '[rabbitmq_rabbitmq-server]' " + expectCmd += ">/etc/yum.repos.d/rabbitmq.repo && " + expectCmd += "echo 'name=rabbitmq_rabbitmq-server' " + expectCmd += ">>/etc/yum.repos.d/rabbitmq.repo && " + expectCmd += "echo 'enabled=1' " + expectCmd += ">>/etc/yum.repos.d/rabbitmq.repo && " + expectCmd += "echo 'gpgkey=https://github.com/rabbitmq/signing-keys/releases/download/3.0/cloudsmith.rabbitmq-server.9F4587F226208342.key' " # noqa + expectCmd += ">>/etc/yum.repos.d/rabbitmq.repo && " + expectCmd += "echo ' https://github.com/rabbitmq/signing-keys/releases/download/3.0/rabbitmq-release-signing-key.asc' " # noqa + expectCmd += ">>/etc/yum.repos.d/rabbitmq.repo && " + expectCmd += "echo 'baseurl=https://yum1.rabbitmq.com/rabbitmq/el/9/noarch' " # noqa + expectCmd += ">>/etc/yum.repos.d/rabbitmq.repo && " + expectCmd += "echo 'baseurl=https://yum2.rabbitmq.com/rabbitmq/el/9/noarch' " # noqa + expectCmd += ">>/etc/yum.repos.d/rabbitmq.repo" + self.assertEqual(expectCmd, result) + + def test_enable_repos_rocky_distro_enable(self): + template_vars = { + "base_arch": "x86_64", + "base_distro": "rocky", + "base_package_type": "rpm", + } + + result = methods.handle_repos(template_vars, + ['crb'], 'enable') + expectCmd = "RUN dnf config-manager --enable crb || true" + self.assertEqual(expectCmd, result) + + def test_enable_repos_rocky_distro_disable(self): + template_vars = { + "base_arch": "x86_64", + "base_distro": "rocky", + "base_package_type": "rpm", + } + + result = methods.handle_repos(template_vars, ['crb'], 'disable') + expectCmd = "RUN dnf config-manager --disable crb || true" + self.assertEqual(expectCmd, result) + + def test_enable_repos_rocky_distro_enable_multiple(self): + template_vars = { + "base_arch": "x86_64", + "base_distro": "rocky", + "base_package_type": "rpm", } - result = methods.handle_repos(template_vars, ['grafana', 'ceph'], - 'enable') - expectCmd = 'RUN dnf config-manager --enable grafana ' - expectCmd += '--enable centos-ceph-squid || true' + result = methods.handle_repos(template_vars, + ['crb', 'grafana'], 'enable') + expectCmd = "RUN dnf config-manager --enable crb || true && " + expectCmd += "grep -rlF '[grafana]' /etc/yum.repos.d/ " + expectCmd += "2>/dev/null | xargs -r rm -f && " + expectCmd += "echo '[grafana]' " + expectCmd += ">/etc/yum.repos.d/grafana.repo && " + expectCmd += "echo 'name=grafana' " + expectCmd += ">>/etc/yum.repos.d/grafana.repo && " + expectCmd += "echo 'enabled=1' " + expectCmd += ">>/etc/yum.repos.d/grafana.repo && " + expectCmd += "echo 'gpgkey=https://rpm.grafana.com/gpg.key' " + expectCmd += ">>/etc/yum.repos.d/grafana.repo && " + expectCmd += "echo 'baseurl=https://rpm.grafana.com' " + expectCmd += ">>/etc/yum.repos.d/grafana.repo" self.assertEqual(expectCmd, result) def test_enable_repos_debian(self): template_vars = { - 'base_arch': 'x86_64', - 'base_distro': 'debian', - 'base_package_type': 'deb' + "base_arch": "x86_64", + "base_distro": "debian", + "base_package_type": "deb", + "openstack_release_codename": "Gazpacho", } - result = methods.handle_repos(template_vars, ['grafana'], 'enable') + result = methods.handle_repos(template_vars, ["grafana"], "enable") expectCmd = "RUN echo 'Uris: https://apt.grafana.com' " expectCmd += ">/etc/apt/sources.list.d/grafana.sources && " expectCmd += "echo 'Components: main' " @@ -82,17 +194,18 @@ class MethodsTest(base.TestCase): template_vars = { 'base_arch': 'aarch64', 'base_distro': 'debian', - 'base_package_type': 'deb' + 'base_package_type': 'deb', + 'openstack_release_codename': 'Gazpacho', } - result = methods.handle_repos(template_vars, ['rabbitmq'], 'enable') - expectCmd = "RUN echo 'Uris: https://ppa1.rabbitmq.com/rabbitmq/rabbitmq-server/deb/debian' " # noqa: E501 + result = methods.handle_repos(template_vars, ["rabbitmq"], "enable") + expectCmd = "RUN echo 'Uris: https://deb1.rabbitmq.com/rabbitmq-server/debian/trixie' " # noqa: E501 expectCmd += ">/etc/apt/sources.list.d/rabbitmq.sources && " expectCmd += "echo 'Components: main' " expectCmd += ">>/etc/apt/sources.list.d/rabbitmq.sources && " expectCmd += "echo 'Types: deb' " expectCmd += ">>/etc/apt/sources.list.d/rabbitmq.sources && " - expectCmd += "echo 'Suites: bookworm' " + expectCmd += "echo 'Suites: trixie' " expectCmd += ">>/etc/apt/sources.list.d/rabbitmq.sources && " expectCmd += "echo 'Signed-By: /etc/kolla/apt-keys/rabbitmq.gpg' " expectCmd += ">>/etc/apt/sources.list.d/rabbitmq.sources && " @@ -104,23 +217,22 @@ class MethodsTest(base.TestCase): template_vars = { 'base_arch': 'x86_64', 'base_distro': 'debian', - 'base_package_type': 'deb' + 'base_package_type': 'deb', } - result = methods.handle_repos(template_vars, ['missing_repo'], - 'enable') - expectCmd = '' - self.assertEqual(expectCmd, result) + self.assertRaises(KeyError, methods.handle_repos, template_vars, + ['missing_repo'], 'enable') def test_enable_repos_debian_multiple(self): template_vars = { 'base_arch': 'x86_64', 'base_distro': 'debian', - 'base_package_type': 'deb' + 'base_package_type': 'deb', + 'openstack_release_codename': 'Gazpacho', } - result = methods.handle_repos(template_vars, ['grafana', 'rabbitmq'], - 'enable') + result = methods.handle_repos(template_vars, + ['grafana', 'rabbitmq'], 'enable') expectCmd = "RUN echo 'Uris: https://apt.grafana.com' " expectCmd += ">/etc/apt/sources.list.d/grafana.sources && " expectCmd += "echo 'Components: main' " @@ -133,64 +245,599 @@ class MethodsTest(base.TestCase): expectCmd += ">>/etc/apt/sources.list.d/grafana.sources && " expectCmd += "echo 'Uris: " - expectCmd += "https://ppa1.rabbitmq.com/rabbitmq/rabbitmq-server/deb/debian' " # noqa: E501 + expectCmd += "https://deb1.rabbitmq.com/rabbitmq-server/debian/trixie/' " # noqa: E501 expectCmd += ">/etc/apt/sources.list.d/rabbitmq.sources && " expectCmd += "echo 'Components: main' " expectCmd += ">>/etc/apt/sources.list.d/rabbitmq.sources && " expectCmd += "echo 'Types: deb' " expectCmd += ">>/etc/apt/sources.list.d/rabbitmq.sources && " - expectCmd += "echo 'Suites: bookworm' " + expectCmd += "echo 'Suites: trixie' " expectCmd += ">>/etc/apt/sources.list.d/rabbitmq.sources && " expectCmd += "echo 'Signed-By: /etc/kolla/apt-keys/rabbitmq.gpg' " expectCmd += ">>/etc/apt/sources.list.d/rabbitmq.sources" self.assertEqual(expectCmd, result) - def test_disable_repos_centos(self): + # NOTE(hrw): there is no disabling of repos for Debian/Ubuntu + def test_disable_repos_debian(self): template_vars = { 'base_arch': 'x86_64', - 'base_distro': 'centos', - 'base_package_type': 'rpm', + 'base_distro': 'debian', + 'base_package_type': 'deb', } - result = methods.handle_repos(template_vars, ['grafana'], 'disable') - expectCmd = 'RUN dnf config-manager --disable grafana || true' + result = methods.handle_repos(template_vars, ["grafana"], "disable") + expectCmd = "" self.assertEqual(expectCmd, result) - def test_disable_repos_centos_multiple(self): + def test_handle_repos_string(self): template_vars = { 'base_arch': 'x86_64', - 'base_distro': 'centos', - 'base_package_type': 'rpm', + 'base_distro': 'debian', + 'base_package_type': 'deb', } - result = methods.handle_repos(template_vars, ['grafana', 'ceph'], - 'disable') - expectCmd = 'RUN dnf config-manager --disable grafana ' - expectCmd += '--disable centos-ceph-squid || true' - self.assertEqual(expectCmd, result) + self.assertRaisesRegex(TypeError, + r'First argument should be a list of ' + r'repositories', + methods.handle_repos, template_vars, 'grafana', + 'disable') - # NOTE(hrw): there is no disabling of repos for Debian/Ubuntu - def test_disable_repos_debian(self): + def test_enable_repos_debian_distro_noop(self): template_vars = { 'base_arch': 'x86_64', 'base_distro': 'debian', - 'base_package_type': 'deb' + 'base_package_type': 'deb', } - result = methods.handle_repos(template_vars, ['grafana'], 'disable') - expectCmd = '' - self.assertEqual(expectCmd, result) + result = methods.handle_repos(template_vars, ['debian'], 'enable') + self.assertEqual('', result) - def test_handle_repos_string(self): + def test_enable_repos_deb_absolute_signed_by(self): + repos = {'debian': {'test-repo': { + 'url': 'http://example.com/debian', + 'suite': 'trixie', + 'component': 'main', + 'gpg_key': '/usr/share/keyrings/test.gpg', + }}} + with tempfile.NamedTemporaryFile(mode='w', suffix='.yaml') as f: + yaml.dump(repos, f) + f.flush() + template_vars = { + 'base_arch': 'x86_64', + 'base_distro': 'debian', + 'base_package_type': 'deb', + 'openstack_release_codename': 'Gazpacho', + 'repos_yaml': f.name, + } + result = methods.handle_repos( + template_vars, ['test-repo'], 'enable') + self.assertIn( + 'Signed-By: /usr/share/keyrings/test.gpg', result) + + def test_repos_yaml_merge_keeps_default_repos(self): + mirror_url = ("http://mirror.example.com/rocky/10/{component}/" + "$basearch/") + repos = {'rocky': { + 'appstream': { + 'name': 'appstream', + 'baseurl': mirror_url.format(component='AppStream'), + 'gpgkey': 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-10'}, + 'baseos': { + 'name': 'baseos', + 'baseurl': mirror_url.format(component='BaseOS'), + 'gpgkey': 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-10'}, + 'crb': { + 'name': 'crb', + 'baseurl': mirror_url.format(component='CRB'), + 'gpgkey': 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-10'}, + }} + with tempfile.NamedTemporaryFile(mode='w', suffix='.yaml') as f: + yaml.dump(repos, f) + f.flush() + template_vars = { + 'base_arch': 'x86_64', + 'base_distro': 'rocky', + 'base_package_type': 'rpm', + 'repos_yaml': f.name, + } + expected_commands = methods.handle_repos( + template_vars, ['grafana'], 'enable') + self.assertIn( + "echo 'gpgkey=https://rpm.grafana.com/gpg.key' " + ">>/etc/yum.repos.d/grafana.repo", + expected_commands) + + def test_repos_yaml_distro_override_validation(self): + """Overriding baseos and appstream would delete rocky.repo. + + crb is a distro repo that also uses that file group. Verify a + ValueError is raised so the user knows to override crb as well. + """ + repos = {'rocky': { + 'baseos': { + 'name': 'baseos', + 'baseurl': 'http://mirror.example.com/rocky/10/BaseOS/', + 'gpgkey': 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-10', + }, + 'appstream': { + 'name': 'appstream', + 'baseurl': 'http://mirror.example.com/rocky/10/AppStream/', + 'gpgkey': 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-10', + }, + }} + with tempfile.NamedTemporaryFile(mode='w', suffix='.yaml') as f: + yaml.dump(repos, f) + f.flush() + template_vars = { + 'base_arch': 'x86_64', + 'base_distro': 'rocky', + 'base_package_type': 'rpm', + 'repos_yaml': f.name, + } + self.assertRaisesRegex( + ValueError, "still using distro defaults and share the same", + methods.handle_repos, template_vars, ['baseos'], 'enable') + + def test_enable_repos_rpm_missing_url_raises(self): + repos = {'rpm': {'test-repo': {'name': 'test-repo'}}} + with tempfile.NamedTemporaryFile(mode='w', suffix='.yaml') as f: + yaml.dump(repos, f) + f.flush() + template_vars = { + 'base_arch': 'x86_64', + 'base_distro': 'rocky', + 'base_package_type': 'rpm', + 'repos_yaml': f.name, + } + self.assertRaises(ValueError, methods.handle_repos, + template_vars, ['test-repo'], 'enable') + + def test_enable_repos_rpm_missing_gpgkey_raises(self): + repos = {'rpm': {'test-repo': { + 'name': 'test-repo', + 'baseurl': 'http://mirror.example.com/repo/', + }}} + with tempfile.NamedTemporaryFile(mode='w', suffix='.yaml') as f: + yaml.dump(repos, f) + f.flush() + template_vars = { + 'base_arch': 'x86_64', + 'base_distro': 'rocky', + 'base_package_type': 'rpm', + 'repos_yaml': f.name, + } + self.assertRaises(ValueError, methods.handle_repos, + template_vars, ['test-repo'], 'enable') + + def test_handle_repos_deb_build_only_backup(self): + repos = {'debian': {'build-only-mirror': { + 'build_only': True, + 'url': 'http://mirror.example.com/debian', + 'suite': 'trixie', + 'component': 'main', + 'gpg_key': '/usr/share/keyrings/debian-archive-keyring.gpg', + }}} + with tempfile.NamedTemporaryFile(mode='w', suffix='.yaml', + delete=False) as f: + yaml.dump(repos, f) + fname = f.name + try: + template_vars = { + 'base_arch': 'x86_64', + 'base_distro': 'debian', + 'base_package_type': 'deb', + 'openstack_release_codename': 'Gazpacho', + 'repos_yaml': fname, + } + result = methods.handle_repos( + template_vars, ['build-only-mirror'], 'enable') + self.assertIn('mkdir -p /tmp/kolla-repos-backup', result) + self.assertIn( + 'cp /etc/apt/sources.list.d/build-only-mirror.sources' + ' /tmp/kolla-repos-backup/build-only-mirror.sources', + result) + self.assertIn( + 'touch /tmp/kolla-repos-backup/build-only-mirror.enabled', + result) + # backup must precede the actual repo write + self.assertLess( + result.index('cp /etc/apt/sources.list.d/build-only-mirror'), + result.index("echo 'Uris:")) + finally: + os.unlink(fname) + + def test_handle_repos_rpm_build_only_backup(self): + repos = {'rpm': {'build-only-mirror': { + 'build_only': True, + 'name': 'build-only-mirror', + 'baseurl': 'http://mirror.example.com/rpm/', + 'gpgkey': 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-10', + }}} + with tempfile.NamedTemporaryFile(mode='w', suffix='.yaml', + delete=False) as f: + yaml.dump(repos, f) + fname = f.name + try: + template_vars = { + 'base_arch': 'x86_64', + 'base_distro': 'centos', + 'base_package_type': 'rpm', + 'repos_yaml': fname, + } + result = methods.handle_repos( + template_vars, ['build-only-mirror'], 'enable') + self.assertIn('mkdir -p /tmp/kolla-repos-backup', result) + self.assertIn( + 'cp /etc/yum.repos.d/build-only-mirror.repo' + ' /tmp/kolla-repos-backup/build-only-mirror.repo', + result) + self.assertIn( + 'touch /tmp/kolla-repos-backup/build-only-mirror.repo' + '.enabled', + result) + # backup must precede DNF_REMOVE_EXISTING + self.assertLess( + result.index( + 'cp /etc/yum.repos.d/build-only-mirror.repo'), + result.index('grep -rlF')) + finally: + os.unlink(fname) + + def test_handle_repos_rpm_shared_file_group_backup(self): + """Repos sharing a file_group back up that file once, by its name. + + e.g. Rocky's baseos/appstream/crb all live in rocky.repo. + """ + repos = {'rpm': { + 'shared-a': { + 'build_only': True, + 'file_group': 'shared.repo', + 'name': 'shared-a', + 'baseurl': 'http://mirror.example.com/a/', + 'gpgkey': 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-a', + }, + 'shared-b': { + 'build_only': True, + 'file_group': 'shared.repo', + 'name': 'shared-b', + 'baseurl': 'http://mirror.example.com/b/', + 'gpgkey': 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-b', + }, + }} + with tempfile.NamedTemporaryFile(mode='w', suffix='.yaml', + delete=False) as f: + yaml.dump(repos, f) + fname = f.name + try: + template_vars = { + 'base_arch': 'x86_64', + 'base_distro': 'centos', + 'base_package_type': 'rpm', + 'repos_yaml': fname, + } + result = methods.handle_repos( + template_vars, ['shared-a', 'shared-b'], 'enable') + self.assertEqual( + 1, + result.count( + 'cp /etc/yum.repos.d/shared.repo' + ' /tmp/kolla-repos-backup/shared.repo')) + self.assertNotIn('shared-a.repo /tmp/kolla-repos-backup', + result) + self.assertNotIn('shared-b.repo /tmp/kolla-repos-backup', + result) + # each repo still gets its own override file written + self.assertIn('>/etc/yum.repos.d/shared-a.repo', result) + self.assertIn('>/etc/yum.repos.d/shared-b.repo', result) + finally: + os.unlink(fname) + + def test_get_cleanup_commands_rpm_shared_file_group(self): + """The shared file is restored once, each own override always.""" + repos = {'rpm': { + 'shared-a': { + 'build_only': True, + 'file_group': 'shared.repo', + 'name': 'shared-a', + 'baseurl': 'http://mirror.example.com/a/', + 'gpgkey': 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-a', + }, + 'shared-b': { + 'build_only': True, + 'file_group': 'shared.repo', + 'name': 'shared-b', + 'baseurl': 'http://mirror.example.com/b/', + 'gpgkey': 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-b', + }, + }} + with tempfile.NamedTemporaryFile(mode='w', suffix='.yaml', + delete=False) as f: + yaml.dump(repos, f) + fname = f.name + try: + result = methods.get_cleanup_commands( + fname, 'rpm', 'centos', 'x86_64') + self.assertEqual( + 1, + result.count( + 'mv /tmp/kolla-repos-backup/shared.repo' + ' /etc/yum.repos.d/shared.repo')) + self.assertIn('rm -f /etc/yum.repos.d/shared-a.repo', result) + self.assertIn('rm -f /etc/yum.repos.d/shared-b.repo', result) + finally: + os.unlink(fname) + + def _rocky_mirror_override(self): + """The exact override shape documented for Rocky, minus file_group. + + repos_yaml overrides replace a repo's whole entry, so this matches + what a real user would write per doc/source/admin/image-building + .rst - it must not restate 'file_group' for the fix to be tested. + """ + return {'rocky': { + 'baseos': { + 'build_only': True, + 'name': 'baseos', + 'baseurl': 'http://mirror.example.com/rocky/10/BaseOS/', + 'gpgkey': 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-10', + }, + 'appstream': { + 'build_only': True, + 'name': 'appstream', + 'baseurl': 'http://mirror.example.com/rocky/10/AppStream/', + 'gpgkey': 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-10', + }, + 'crb': { + 'build_only': True, + 'name': 'crb', + 'baseurl': 'http://mirror.example.com/rocky/10/CRB/', + 'gpgkey': 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-10', + }, + }} + + def test_handle_repos_rocky_baseos_backs_up_shared_file(self): + """file_group must be resolved even if the override omits it. + + Rocky's baseos/appstream/crb live in rocky.repo, not their own + .repo files, and a repos_yaml override doesn't restate file_group. + """ + with tempfile.NamedTemporaryFile(mode='w', suffix='.yaml', + delete=False) as f: + yaml.dump(self._rocky_mirror_override(), f) + fname = f.name + try: + template_vars = { + 'base_arch': 'x86_64', + 'base_distro': 'rocky', + 'base_package_type': 'rpm', + 'repos_yaml': fname, + } + result = methods.handle_repos( + template_vars, ['baseos', 'appstream'], 'enable') + self.assertEqual( + 1, + result.count( + 'cp /etc/yum.repos.d/rocky.repo' + ' /tmp/kolla-repos-backup/rocky.repo')) + self.assertNotIn('baseos.repo /tmp/kolla-repos-backup', result) + self.assertNotIn('appstream.repo /tmp/kolla-repos-backup', + result) + finally: + os.unlink(fname) + + def test_get_cleanup_commands_rocky_restores_shared_file(self): + """Restoring baseos/appstream/crb recovers the shared rocky.repo.""" + with tempfile.NamedTemporaryFile(mode='w', suffix='.yaml', + delete=False) as f: + yaml.dump(self._rocky_mirror_override(), f) + fname = f.name + try: + result = methods.get_cleanup_commands( + fname, 'rpm', 'rocky', 'x86_64') + self.assertEqual( + 1, + result.count( + 'mv /tmp/kolla-repos-backup/rocky.repo' + ' /etc/yum.repos.d/rocky.repo')) + self.assertIn('rm -f /etc/yum.repos.d/baseos.repo', result) + self.assertIn('rm -f /etc/yum.repos.d/appstream.repo', result) + self.assertIn('rm -f /etc/yum.repos.d/crb.repo', result) + finally: + os.unlink(fname) + + def test_handle_repos_build_only_no_double_backup(self): + """Each distinct file is backed up exactly once per handle_repos.""" + repos = {'debian': { + 'mirror-a': { + 'build_only': True, + 'url': 'http://mirror.example.com/a', + 'suite': 'trixie', + 'component': 'main', + 'gpg_key': '/usr/share/keyrings/debian-archive-keyring.gpg', + }, + 'mirror-b': { + 'build_only': True, + 'url': 'http://mirror.example.com/b', + 'suite': 'trixie', + 'component': 'main', + 'gpg_key': '/usr/share/keyrings/debian-archive-keyring.gpg', + }, + }} + with tempfile.NamedTemporaryFile(mode='w', suffix='.yaml', + delete=False) as f: + yaml.dump(repos, f) + fname = f.name + try: + template_vars = { + 'base_arch': 'x86_64', + 'base_distro': 'debian', + 'base_package_type': 'deb', + 'openstack_release_codename': 'Gazpacho', + 'repos_yaml': fname, + } + result = methods.handle_repos( + template_vars, ['mirror-a', 'mirror-b'], 'enable') + self.assertEqual( + 1, + result.count( + 'cp /etc/apt/sources.list.d/mirror-a.sources' + ' /tmp/kolla-repos-backup/mirror-a.sources')) + self.assertEqual( + 1, + result.count( + 'cp /etc/apt/sources.list.d/mirror-b.sources' + ' /tmp/kolla-repos-backup/mirror-b.sources')) + finally: + os.unlink(fname) + + def test_handle_repos_without_build_only_no_backup(self): template_vars = { 'base_arch': 'x86_64', 'base_distro': 'debian', - 'base_package_type': 'deb' + 'base_package_type': 'deb', + 'openstack_release_codename': 'Gazpacho', } + result = methods.handle_repos(template_vars, ['grafana'], 'enable') + self.assertNotIn('kolla-repos-backup', result) - self.assertRaisesRegex(TypeError, - r'First argument should be a list of ' - r'repositories', - methods.handle_repos, template_vars, 'grafana', - 'disable') + def test_get_cleanup_commands_deb(self): + repos = {'debian': {'build-only-mirror': { + 'build_only': True, + 'url': 'http://mirror.example.com/debian', + 'suite': 'trixie', + 'component': 'main', + 'gpg_key': '/usr/share/keyrings/debian-archive-keyring.gpg', + }}} + with tempfile.NamedTemporaryFile(mode='w', suffix='.yaml', + delete=False) as f: + yaml.dump(repos, f) + fname = f.name + try: + result = methods.get_cleanup_commands( + fname, 'deb', 'debian', 'x86_64') + self.assertTrue(result.startswith('RUN ')) + self.assertIn( + '[ -f /tmp/kolla-repos-backup/build-only-mirror.enabled ]', + result) + self.assertIn( + 'mv /tmp/kolla-repos-backup/build-only-mirror.sources' + ' /etc/apt/sources.list.d/build-only-mirror.sources', + result) + self.assertIn( + 'rm -f /etc/apt/sources.list.d/build-only-mirror.sources', + result) + self.assertIn('rm -rf /tmp/kolla-repos-backup', result) + finally: + os.unlink(fname) + + def test_get_cleanup_commands_rpm(self): + repos = {'rpm': {'build-only-mirror': { + 'build_only': True, + 'name': 'build-only-mirror', + 'baseurl': 'http://mirror.example.com/', + 'gpgkey': 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-10', + }}} + with tempfile.NamedTemporaryFile(mode='w', suffix='.yaml', + delete=False) as f: + yaml.dump(repos, f) + fname = f.name + try: + result = methods.get_cleanup_commands( + fname, 'rpm', 'centos', 'x86_64') + self.assertTrue(result.startswith('RUN ')) + self.assertIn( + '[ -f /tmp/kolla-repos-backup/build-only-mirror.repo' + '.enabled ]', + result) + self.assertIn( + 'mv /tmp/kolla-repos-backup/build-only-mirror.repo' + ' /etc/yum.repos.d/build-only-mirror.repo', + result) + self.assertIn( + 'rm -f /etc/yum.repos.d/build-only-mirror.repo', + result) + self.assertIn('rm -rf /tmp/kolla-repos-backup', result) + finally: + os.unlink(fname) + + def test_get_cleanup_commands_empty_without_build_only(self): + result = methods.get_cleanup_commands(None, 'deb', 'debian', 'x86_64') + self.assertEqual('', result) + + def test_get_cleanup_commands_skips_distro_repos(self): + """distro: True repos are a no-op in handle_repos.""" + repos = {'debian': {'debian': { + 'build_only': True, + 'distro': True, + }}} + with tempfile.NamedTemporaryFile(mode='w', suffix='.yaml', + delete=False) as f: + yaml.dump(repos, f) + fname = f.name + try: + result = methods.get_cleanup_commands( + fname, 'deb', 'debian', 'x86_64') + self.assertEqual('', result) + finally: + os.unlink(fname) + + def test_repos_yaml_rpm_section_override_not_blocked_by_distro_section( + self): + """Overriding distro repos in 'rpm' section must not be undone. + + The more-specific distro section must not merge distro:True back + on top of a URL-bearing override from the generic 'rpm' section. + """ + base = 'http://mirror.example.com/rocky/10' + gpgkey = 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial' + repos = {'rpm': { + 'baseos': { + 'name': 'baseos', + 'baseurl': base + '/BaseOS/$basearch/', + 'gpgkey': gpgkey, + }, + 'appstream': { + 'name': 'appstream', + 'baseurl': base + '/AppStream/$basearch/', + 'gpgkey': gpgkey, + }, + 'crb': { + 'name': 'crb', + 'baseurl': base + '/CRB/$basearch/', + 'gpgkey': gpgkey, + }, + }} + with tempfile.NamedTemporaryFile(mode='w', suffix='.yaml') as f: + yaml.dump(repos, f) + f.flush() + template_vars = { + 'base_arch': 'x86_64', + 'base_distro': 'rocky', + 'base_package_type': 'rpm', + 'repos_yaml': f.name, + } + result = methods.handle_repos( + template_vars, ['baseos', 'appstream', 'crb'], 'enable') + self.assertIn('mirror.example.com', result) + + def test_enable_repos_openstack_release_codename_substitution(self): + repos = {'ubuntu': {'ubuntu-cloud-archive': { + 'url': 'http://ubuntu-cloud.archive.canonical.com/ubuntu', + 'suite': 'noble-updates/{openstack_release_codename}', + 'component': 'main', + 'gpg_key': '/usr/share/keyrings/ubuntu-cloud-keyring.gpg', + }}} + with tempfile.NamedTemporaryFile(mode='w', suffix='.yaml') as f: + yaml.dump(repos, f) + f.flush() + template_vars = { + 'base_arch': 'x86_64', + 'base_distro': 'ubuntu', + 'base_package_type': 'deb', + 'openstack_release_codename': 'Gazpacho', + 'repos_yaml': f.name, + } + result = methods.handle_repos( + template_vars, ['ubuntu-cloud-archive'], 'enable') + self.assertIn('noble-updates/gazpacho', result) diff --git a/kolla/tests/test_validate_all_file.py b/kolla/tests/test_validate_all_file.py new file mode 100644 index 000000000..04dab530e --- /dev/null +++ b/kolla/tests/test_validate_all_file.py @@ -0,0 +1,43 @@ +# 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. + +import importlib.util +import os +import tempfile +from unittest import mock + +from kolla.tests import base + +_VALIDATE_SCRIPT = os.path.abspath( + os.path.join(os.path.dirname(__file__), '..', '..', 'tools', + 'validate-all-file.py')) +_spec = importlib.util.spec_from_file_location('validate_all_file', + _VALIDATE_SCRIPT) +validate_all_file = importlib.util.module_from_spec(_spec) +_spec.loader.exec_module(validate_all_file) + +_SSTI_PAYLOAD = ( + "{{ self.__init__.__globals__['__builtins__']" + "['__import__']('os').popen('id').read() }}" +) + + +class ValidateAllFileTest(base.TestCase): + + def test_check_json_j2_ssti_blocked(self): + with tempfile.TemporaryDirectory() as tmpdir: + malicious = os.path.join(tmpdir, 'test.json.j2') + with open(malicious, 'w') as f: + f.write(_SSTI_PAYLOAD + '\n') + with mock.patch.object(validate_all_file, 'PROJECT_ROOT', tmpdir): + result = validate_all_file.check_json_j2() + self.assertEqual(1, result) diff --git a/lint-requirements.txt b/lint-requirements.txt new file mode 100644 index 000000000..e88fa52c4 --- /dev/null +++ b/lint-requirements.txt @@ -0,0 +1 @@ +ansible-lint===26.9.0 # MIT diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 000000000..25628706c --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,43 @@ +[build-system] +requires = ["pbr>=6.1.1"] +build-backend = "pbr.build" + +[project] +name = "kolla" +description = "Tool for building production-ready OpenStack and infrastructure containers" +authors = [ + {name = "OpenStack", email = "openstack-discuss@lists.openstack.org"}, +] +readme = {file = "README.rst", content-type = "text/x-rst"} +license = "Apache-2.0" +dynamic = ["version", "dependencies"] +requires-python = ">=3.10" +classifiers = [ + "Environment :: OpenStack", + "Intended Audience :: Information Technology", + "Intended Audience :: System Administrators", + "Operating System :: POSIX :: Linux", + "Programming Language :: Python", + "Programming Language :: Python :: Implementation :: CPython", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", +] + +[project.urls] +Homepage = "https://docs.openstack.org/kolla/latest/" + +[project.scripts] +kolla-build = "kolla.cmd.build:main" + +[project.entry-points."oslo.config.opts"] +kolla = "kolla.opts:list_opts" + +[tool.setuptools.packages.find] +include = ["kolla*"] + +[tool.setuptools.package-data] +kolla = ["docker/**"] diff --git a/releasenotes/notes/add-buildkit-support-via-buildx-c4fda2286c2d7d1e.yaml b/releasenotes/notes/add-buildkit-support-via-buildx-c4fda2286c2d7d1e.yaml new file mode 100644 index 000000000..1fe5febde --- /dev/null +++ b/releasenotes/notes/add-buildkit-support-via-buildx-c4fda2286c2d7d1e.yaml @@ -0,0 +1,22 @@ +--- +features: + - | + Added support for building images using Docker BuildKit via + ``docker buildx build``. It is enabled by default, users can + disable it with the ``--nobuildkit`` flag or by + setting ``buildkit = False`` in the ``[DEFAULT]`` section of + ``kolla-build.conf``. Requires the ``docker-buildx-plugin`` to be + installed and only applies when ``--engine docker`` is used. An optional + ``--buildkit-builder`` flag selects a named buildx builder instance, + enabling docker-container or remote drivers for multi-arch builds. +upgrade: + - | + Docker BuildKit (``docker buildx build``) is now enabled by default when + using ``--engine docker``. Set ``buildkit = False`` in + ``kolla-build.conf`` or pass ``--nobuildkit`` on the CLI to revert to + the legacy docker-py SDK build path. + - | + Multi-platform BuildKit builds (comma-separated ``--platform`` values) + require ``--push``, as ``docker buildx`` does not support ``--load`` for + multi-platform output. Omitting ``--push`` will result in an immediate + error. diff --git a/releasenotes/notes/add-kerbside-images-04d28d7e76e5bc1f.yaml b/releasenotes/notes/add-kerbside-images-04d28d7e76e5bc1f.yaml new file mode 100644 index 000000000..78be07bb9 --- /dev/null +++ b/releasenotes/notes/add-kerbside-images-04d28d7e76e5bc1f.yaml @@ -0,0 +1,9 @@ +--- +features: + - | + This release adds images for Kerbside. Kerbside is a SPICE protocol + native proxy used to expose the new spice-direct console type provided + by Openstack Compute. This allows high fidelity virtual desktop + experiences without requiring transcoding of the console into HTML5 + in Horizon, or allowing users direct access to the console ports on + your hypervisors. diff --git a/releasenotes/notes/add-mariadb-healthcheck-script-916e5ad7a216e05e.yaml b/releasenotes/notes/add-mariadb-healthcheck-script-916e5ad7a216e05e.yaml new file mode 100644 index 000000000..16be532eb --- /dev/null +++ b/releasenotes/notes/add-mariadb-healthcheck-script-916e5ad7a216e05e.yaml @@ -0,0 +1,8 @@ +--- +features: + - | + Added new MariaDB container health check script ``healthcheck.sh``. + This script is from official docker images of MariaDB. + + This script is planned to replace current health check script + ``clustercheck.sh`` to keep compatibility with newer MariaDB releases. diff --git a/releasenotes/notes/add-oci-standard-labels-f68cc6eb3a4db7c7.yaml b/releasenotes/notes/add-oci-standard-labels-f68cc6eb3a4db7c7.yaml new file mode 100644 index 000000000..e9ba30dfb --- /dev/null +++ b/releasenotes/notes/add-oci-standard-labels-f68cc6eb3a4db7c7.yaml @@ -0,0 +1,10 @@ +--- +features: + - | + Implemented support for Open Container Initiative (OCI) standard labels + in generated container images. + + Kolla images are now tagged with standard metadata to improve traceability + and observability. The build process automatically detects source + information and populates labels such as build creation time, version, + source URL, and commit revision. diff --git a/releasenotes/notes/add-openstack-network-exporter-fd37c9bbe2fe387d.yaml b/releasenotes/notes/add-openstack-network-exporter-fd37c9bbe2fe387d.yaml new file mode 100644 index 000000000..6e9692ea4 --- /dev/null +++ b/releasenotes/notes/add-openstack-network-exporter-fd37c9bbe2fe387d.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + Adds a Prometheus network exporter which can collect + metrics from both OVN and OVS based deployments. diff --git a/releasenotes/notes/add-valkey-exporter-e21762a106307538.yaml b/releasenotes/notes/add-valkey-exporter-e21762a106307538.yaml new file mode 100644 index 000000000..78cf5d4f8 --- /dev/null +++ b/releasenotes/notes/add-valkey-exporter-e21762a106307538.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + Adds support for Valkey monitoring by introducing a new + ``prometheus-valkey-exporter`` container image. diff --git a/releasenotes/notes/align-default-tag-with-kolla-ansible-7b2224d881848864.yaml b/releasenotes/notes/align-default-tag-with-kolla-ansible-7b2224d881848864.yaml new file mode 100644 index 000000000..3d0339b36 --- /dev/null +++ b/releasenotes/notes/align-default-tag-with-kolla-ansible-7b2224d881848864.yaml @@ -0,0 +1,9 @@ +--- +upgrade: + - | + The default value of the ``tag`` option has changed. Previously it + defaulted to the Kolla version string. It now defaults to a composite + value of ``<openstack_release>-<base>-<base_tag>``, aligning with the + convention used by Kolla-Ansible. Users who relied on the implicit + version-based tag should set ``--tag`` explicitly to preserve the old + behaviour. diff --git a/releasenotes/notes/ansible-core-2-20-bd912e1767d5f197.yaml b/releasenotes/notes/ansible-core-2-20-bd912e1767d5f197.yaml new file mode 100644 index 000000000..bf7ac0e7d --- /dev/null +++ b/releasenotes/notes/ansible-core-2-20-bd912e1767d5f197.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + Version of ``ansible-core`` in ``kolla-toolbox`` has been updated to + ``2.20``. diff --git a/releasenotes/notes/ansible-core-2-21-f4ce0f38d15c7606.yaml b/releasenotes/notes/ansible-core-2-21-f4ce0f38d15c7606.yaml new file mode 100644 index 000000000..f4ca30d03 --- /dev/null +++ b/releasenotes/notes/ansible-core-2-21-f4ce0f38d15c7606.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + Version of ``ansible-core`` in ``kolla-toolbox`` has been updated to + ``2.21``. diff --git a/releasenotes/notes/base-repos-in-yaml-f6a4a871da92c823.yaml b/releasenotes/notes/base-repos-in-yaml-f6a4a871da92c823.yaml new file mode 100644 index 000000000..1f98f7d60 --- /dev/null +++ b/releasenotes/notes/base-repos-in-yaml-f6a4a871da92c823.yaml @@ -0,0 +1,23 @@ +--- +features: + - | + Base OS repositories for CentOS Stream and Rocky Linux (``baseos``, + ``appstream``, ``crb``) are now defined in ``repos.yaml`` and can be + overridden via ``--repos-yaml`` to point at local mirrors. When + overriding any of these repositories, all others sharing the same + ``.repo`` file (identified by the ``file_group`` field) must also be + overridden to avoid silently disabling them. + - | + Base OS repositories for Debian and Ubuntu are now defined in + ``repos.yaml`` with ``distro: True``. They can be overridden via + ``--repos-yaml`` to point at local mirrors. The ``gpg_key`` field for + Debian/Ubuntu repositories now supports absolute paths, allowing use of + distro-provided keyrings such as + ``/usr/share/keyrings/debian-archive-keyring.gpg``. + - | + When overriding an RPM base repository, any existing ``.repo`` file on + the image containing that repository ID is automatically removed before + the new one is created. + - | + User-provided ``repos.yaml`` is now merged with upstream default instead of + requiring a full copy of stock file. diff --git a/releasenotes/notes/bug-2035975-94c5670049a7e1a6.yaml b/releasenotes/notes/bug-2035975-94c5670049a7e1a6.yaml new file mode 100644 index 000000000..2c4186576 --- /dev/null +++ b/releasenotes/notes/bug-2035975-94c5670049a7e1a6.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - | + Fix missing nvme-cli package in Glance container. + `LP#2035975 <https://launchpad.net/bugs/2035975>`__ diff --git a/releasenotes/notes/bug-2093414-12e2d0f21e34bc59.yaml b/releasenotes/notes/bug-2093414-12e2d0f21e34bc59.yaml new file mode 100644 index 000000000..0cf23f330 --- /dev/null +++ b/releasenotes/notes/bug-2093414-12e2d0f21e34bc59.yaml @@ -0,0 +1,7 @@ +--- +fixes: + - | + Adds the ``django-redis`` package to the Horizon image. + This enables using Redis or Valkey as a Django cache and + session backend. + `LP#2093414 <https://launchpad.net/bugs/2093414>`__ diff --git a/releasenotes/notes/bug-2132960-genisoimage_package_nova-compute-ironic-28f4c262ec201f99.yaml b/releasenotes/notes/bug-2132960-genisoimage_package_nova-compute-ironic-28f4c262ec201f99.yaml new file mode 100644 index 000000000..beffc2df0 --- /dev/null +++ b/releasenotes/notes/bug-2132960-genisoimage_package_nova-compute-ironic-28f4c262ec201f99.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + Add missing genisoimage package to nova-compute-ironic + container to fix ironic baremetal provisioning error. + `LP#2132960 <https://bugs.launchpad.net/kolla/+bug/2132960>`__ diff --git a/releasenotes/notes/bug-2154269-0b79adc81dab29a8.yaml b/releasenotes/notes/bug-2154269-0b79adc81dab29a8.yaml new file mode 100644 index 000000000..ed2ec4021 --- /dev/null +++ b/releasenotes/notes/bug-2154269-0b79adc81dab29a8.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + Fixes ``kolla_set_configs`` failing to parse traditional UNIX + permissions with special bits. + `LP#2154269 <https://launchpad.net/bugs/2154269>`__ diff --git a/releasenotes/notes/bug-2163314-d99dd8d0f7a76a95.yaml b/releasenotes/notes/bug-2163314-d99dd8d0f7a76a95.yaml new file mode 100644 index 000000000..0683c8ced --- /dev/null +++ b/releasenotes/notes/bug-2163314-d99dd8d0f7a76a95.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + Fixes child image builds from ``openvswitch-base`` with a custom + OpenvSwitch repo. + `LP#2163314 <https://launchpad.net/bugs/2163314>`__ diff --git a/releasenotes/notes/bug-2165921-a70d2839ab32f423.yaml b/releasenotes/notes/bug-2165921-a70d2839ab32f423.yaml new file mode 100644 index 000000000..91f900ec4 --- /dev/null +++ b/releasenotes/notes/bug-2165921-a70d2839ab32f423.yaml @@ -0,0 +1,7 @@ +--- +fixes: + - | + Install the Prometheus datasource plugin for Grafana 13.2+. + Grafana 13.2 moved Prometheus to a standalone plugin, which + is not automatically installed in offline environments. + `LP#2165921 <https://launchpad.net/bugs/2165921>`__ diff --git a/releasenotes/notes/bug-2166075-ea3b86dd40834b08.yaml b/releasenotes/notes/bug-2166075-ea3b86dd40834b08.yaml new file mode 100644 index 000000000..62dda913c --- /dev/null +++ b/releasenotes/notes/bug-2166075-ea3b86dd40834b08.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - | + Replace deprecated ``grafana-cli`` with ``grafana cli``. + `LP#2166075 <https://launchpad.net/bugs/2166075>`__ diff --git a/releasenotes/notes/bug-2167459-3dbfafe10ea28fdc.yaml b/releasenotes/notes/bug-2167459-3dbfafe10ea28fdc.yaml new file mode 100644 index 000000000..ca6ba4080 --- /dev/null +++ b/releasenotes/notes/bug-2167459-3dbfafe10ea28fdc.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - | + Fixes ironic-conductor failing to decompress zstd + compressed files. `LP#2167459 <https://launchpad.net/bugs/2167459>_` diff --git a/releasenotes/notes/cleanup-repos-85faf33025fd7e5c.yaml b/releasenotes/notes/cleanup-repos-85faf33025fd7e5c.yaml new file mode 100644 index 000000000..627cce663 --- /dev/null +++ b/releasenotes/notes/cleanup-repos-85faf33025fd7e5c.yaml @@ -0,0 +1,16 @@ +--- +features: + - | + Repository cleanup is now performed via Jinja2 macros + (``kolla_cleanup_repos()``) injected directly into each Dockerfile + template, replacing the previous Python-level injection in + ``kolla_worker.py``. This ensures cleanup always runs before any + ``USER`` directive, avoiding permission errors when non-root service + users attempted to modify root-owned repository files. + - | + Base OS repositories (``baseos``, ``appstream`` on RPM distros; + ``debian``/``debian-security`` or ``ubuntu``/``ubuntu-security``/ + ``ubuntu-cloud-archive`` on Debian-based distros) are now explicitly + re-enabled in every service image via the new ``kolla_enable_base_repos()`` + macro. This guarantees that packages from base OS repositories remain + available in child images after parent image cleanup. diff --git a/releasenotes/notes/deb822-3f0435dfce6da841.yaml b/releasenotes/notes/deb822-3f0435dfce6da841.yaml new file mode 100644 index 000000000..572248317 --- /dev/null +++ b/releasenotes/notes/deb822-3f0435dfce6da841.yaml @@ -0,0 +1,6 @@ +--- +features: + - | + ``base`` container image sources.list for Debian and Ubuntu have been + reworked to use ``deb822`` and now are called ``debian.sources`` and + ``ubuntu.sources``. diff --git a/releasenotes/notes/debian-trixie-23987480043dc662.yaml b/releasenotes/notes/debian-trixie-23987480043dc662.yaml new file mode 100644 index 000000000..68555cfea --- /dev/null +++ b/releasenotes/notes/debian-trixie-23987480043dc662.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + Debian ``trixie`` is now used instead of ``bookworm``. Trixie is the current + stable release of Debian. diff --git a/releasenotes/notes/debian-trixie-spice-814929ed1efbcad1.yaml b/releasenotes/notes/debian-trixie-spice-814929ed1efbcad1.yaml new file mode 100644 index 000000000..eca8927dd --- /dev/null +++ b/releasenotes/notes/debian-trixie-spice-814929ed1efbcad1.yaml @@ -0,0 +1,8 @@ +--- +fixes: + - | + Debian Trixie container images require the additional + qemu-system-modules-spice operating system package for SPICE consoles + to function correctly. This package has therefore been added + to the nova-libvirt container build. Further details are available in + the bug report at `LP#2138186 <https://launchpad.net/bugs/2138186>`__. diff --git a/releasenotes/notes/deprecate-collectd-8ba94052bdc9424b.yaml b/releasenotes/notes/deprecate-collectd-8ba94052bdc9424b.yaml deleted file mode 100644 index c41b720f9..000000000 --- a/releasenotes/notes/deprecate-collectd-8ba94052bdc9424b.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -deprecations: - - | - Deprecates support for building ``collectd`` images. diff --git a/releasenotes/notes/deprecate-telegraf-db2b0b9f30591552.yaml b/releasenotes/notes/deprecate-telegraf-db2b0b9f30591552.yaml index 7aa96baff..0667f571d 100644 --- a/releasenotes/notes/deprecate-telegraf-db2b0b9f30591552.yaml +++ b/releasenotes/notes/deprecate-telegraf-db2b0b9f30591552.yaml @@ -1,4 +1,4 @@ --- deprecations: - | - Deprecates support for building ``telegraf`` images. + Deprecates support for building ``collectd`` and ``telegraf`` images. diff --git a/releasenotes/notes/drop-apache-installation-outside-of-http-container-46ee0394e484c1f5.yaml b/releasenotes/notes/drop-apache-installation-outside-of-http-container-46ee0394e484c1f5.yaml new file mode 100644 index 000000000..9c74bc874 --- /dev/null +++ b/releasenotes/notes/drop-apache-installation-outside-of-http-container-46ee0394e484c1f5.yaml @@ -0,0 +1,8 @@ +--- +upgrade: + - | + ``apache2`` installation has been dropped from ``keystone-base`` and + ``ironic-prometheus-exporter`` and ``openstack-base`` container images. + - | + ``letsencrypt-webserver`` container image has been dropped, + because it was replaced with ``httpd``. diff --git a/releasenotes/notes/drop-centos10-c53c4eee6f8253d0.yaml b/releasenotes/notes/drop-centos10-c53c4eee6f8253d0.yaml new file mode 100644 index 000000000..69cd340e1 --- /dev/null +++ b/releasenotes/notes/drop-centos10-c53c4eee6f8253d0.yaml @@ -0,0 +1,6 @@ +--- +upgrade: + - | + Support for ``CentOS Stream 10`` has been dropped. Users using + ``base_centos_*`` override blocks should adapt them to + ``base_rocky_*``. diff --git a/releasenotes/notes/drop-influxdb-cb3161a1e04fa38e.yaml b/releasenotes/notes/drop-influxdb-cb3161a1e04fa38e.yaml new file mode 100644 index 000000000..47800626e --- /dev/null +++ b/releasenotes/notes/drop-influxdb-cb3161a1e04fa38e.yaml @@ -0,0 +1,4 @@ +--- +upgrade: + - | + Support for building ``influxdb`` container images has been dropped. diff --git a/releasenotes/notes/drop-kuryr-and-zun-e48eb3d9d6a61758.yaml b/releasenotes/notes/drop-kuryr-and-zun-e48eb3d9d6a61758.yaml new file mode 100644 index 000000000..e3de80a66 --- /dev/null +++ b/releasenotes/notes/drop-kuryr-and-zun-e48eb3d9d6a61758.yaml @@ -0,0 +1,6 @@ +--- +upgrade: + - | + Support for building ``zun`` images has been dropped, due to the project + being released broken. ``kuryr`` container images support has also been + dropped because only ``zun`` was using them. diff --git a/releasenotes/notes/drop-neutron-linuxbridge-agent-5c4596f148c143ed.yaml b/releasenotes/notes/drop-neutron-linuxbridge-agent-5c4596f148c143ed.yaml new file mode 100644 index 000000000..e4d951f53 --- /dev/null +++ b/releasenotes/notes/drop-neutron-linuxbridge-agent-5c4596f148c143ed.yaml @@ -0,0 +1,5 @@ +--- +upgrade: + - | + Support for building ``neutron-linuxbridge-agent`` container image has + been dropped following removal in Neutron. diff --git a/releasenotes/notes/drop-redis-d286ca1237747c48.yaml b/releasenotes/notes/drop-redis-d286ca1237747c48.yaml new file mode 100644 index 000000000..9710a37a2 --- /dev/null +++ b/releasenotes/notes/drop-redis-d286ca1237747c48.yaml @@ -0,0 +1,4 @@ +--- +upgrade: + - | + ``redis`` container image has been dropped due to migration to ``valkey``. diff --git a/releasenotes/notes/drop-telegraf-28dd961f18ed7825.yaml b/releasenotes/notes/drop-telegraf-28dd961f18ed7825.yaml new file mode 100644 index 000000000..93de985b2 --- /dev/null +++ b/releasenotes/notes/drop-telegraf-28dd961f18ed7825.yaml @@ -0,0 +1,4 @@ +--- +upgrade: + - | + Support for building ``telegraf`` container images has been dropped. diff --git a/releasenotes/notes/drop-venus-435234b3bff7f209.yaml b/releasenotes/notes/drop-venus-435234b3bff7f209.yaml new file mode 100644 index 000000000..b6d221842 --- /dev/null +++ b/releasenotes/notes/drop-venus-435234b3bff7f209.yaml @@ -0,0 +1,5 @@ +--- +upgrade: + - | + Support for building ``Venus`` container images has been dropped due to the + project's inactivity and the Horizon plugin build failures it caused. diff --git a/releasenotes/notes/flamingo-prelude-b72f2599ed9d25d5.yaml b/releasenotes/notes/flamingo-prelude-b72f2599ed9d25d5.yaml new file mode 100644 index 000000000..c0b40675a --- /dev/null +++ b/releasenotes/notes/flamingo-prelude-b72f2599ed9d25d5.yaml @@ -0,0 +1,24 @@ +--- +prelude: | + The Kolla ``21.0.0`` (Flamingo) release modernises the base operating + systems and core infrastructure shipped by the containers. Highlights + include: + + * Rocky Linux 10 replaces Rocky Linux 9 as the only supported Rocky base + image, removing the Delorean/CentOS Cloud SIG dependency and tightening RPM + repository handling via ``repos.yaml`` (including a new versioned Erlang + source for aarch64). + * Data-plane services received major upgrades: ``MariaDB`` now tracks the + 11.4 LTS series with the upstream health check script and the legacy + clustercheck image removed, ``ProxySQL`` moves to 3.x, ``Bifrost`` consumes + Ansible 11, ``RabbitMQ`` advances to 4.1, and ``Gnocchi`` is updated to + 4.7.0. + * Observability components were refreshed with ``Fluentd`` 6.x LTS, + ``OpenSearch``/``OpenSearch Dashboards`` 3.x, broad ``Prometheus`` exporter + and infrastructure bumps (``etcd``, ``helm``, ``letsencrypt-lego``), and the + retirement of the ``collectd``, ``telegraf``, and ``prometheus-ovn-exporter`` + images. + * The container portfolio was streamlined: support landed for the + ``ironic-pxe-filter`` image and ``neutron-metadata-agent`` wrapper scripts, + while dormant services such as ``ironic-inspector`` and ``Venus`` were + dropped. diff --git a/releasenotes/notes/fluentd-update-8db10e760b2dc4d5.yaml b/releasenotes/notes/fluentd-update-8db10e760b2dc4d5.yaml new file mode 100644 index 000000000..7ac12764b --- /dev/null +++ b/releasenotes/notes/fluentd-update-8db10e760b2dc4d5.yaml @@ -0,0 +1,4 @@ +--- +upgrade: + - | + Updates ``Fluentd`` to the 6.x LTS series. diff --git a/releasenotes/notes/handle-deprecated-rabbitmq-package-archive-47548e7a41baa68b.yaml b/releasenotes/notes/handle-deprecated-rabbitmq-package-archive-47548e7a41baa68b.yaml new file mode 100644 index 000000000..b24cc3cdc --- /dev/null +++ b/releasenotes/notes/handle-deprecated-rabbitmq-package-archive-47548e7a41baa68b.yaml @@ -0,0 +1,7 @@ +--- +fixes: + - | + `As announced in July 2025 <https://www.rabbitmq.com/blog/2025/07/16/debian-apt-repositories-are-moving>`__, + the RabbitMQ project has changed the location and signing key for their Debian and + Ubuntu packages. The repository configuration has been updated accordingly. + `LP#2131736 <https://launchpad.net/bugs/2131736>`__ diff --git a/releasenotes/notes/horizon-theme-rebuilds-65e5f50c1d0cc8dd.yaml b/releasenotes/notes/horizon-theme-rebuilds-65e5f50c1d0cc8dd.yaml new file mode 100644 index 000000000..a85f1e5f4 --- /dev/null +++ b/releasenotes/notes/horizon-theme-rebuilds-65e5f50c1d0cc8dd.yaml @@ -0,0 +1,7 @@ +--- +fixes: + - | + Fixed Horizon static asset regeneration for custom theme updates. + Changes under ``/etc/openstack-dashboard/themes`` now invalidate the + startup settings hash, so Horizon reruns ``collectstatic`` and + ``compress`` after a restart or recreate. diff --git a/releasenotes/notes/image-purpose-1884e00f993e09d0.yaml b/releasenotes/notes/image-purpose-1884e00f993e09d0.yaml new file mode 100644 index 000000000..0296e9e1b --- /dev/null +++ b/releasenotes/notes/image-purpose-1884e00f993e09d0.yaml @@ -0,0 +1,7 @@ +--- +prelude: > + The Kolla project publishes images to quay.io. + These are however only intended for demonstration and testing purposes. + In particular, they do not undergo any security scrutiny. If you intend to + deploy Kolla for production purposes, you are advised to create and curate your + own set of images. diff --git a/releasenotes/notes/influxdb-repo-gpg-key-04eb924f249e54a5.yaml b/releasenotes/notes/influxdb-repo-gpg-key-04eb924f249e54a5.yaml new file mode 100644 index 000000000..07b865f2c --- /dev/null +++ b/releasenotes/notes/influxdb-repo-gpg-key-04eb924f249e54a5.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + Updates the InfluxDB repository GPG key from the expired + ``influxdata-archive_compat.key`` to the recommended + ``influxdata-archive.key`` as per https://repos.influxdata.com. diff --git a/releasenotes/notes/ironic-pxe-filter-b3b29090b0661ca2.yaml b/releasenotes/notes/ironic-pxe-filter-b3b29090b0661ca2.yaml new file mode 100644 index 000000000..ffe875c34 --- /dev/null +++ b/releasenotes/notes/ironic-pxe-filter-b3b29090b0661ca2.yaml @@ -0,0 +1,4 @@ +--- +features: + - | + Adds ``ironic-pxe-filter`` container image. diff --git a/releasenotes/notes/ironic-pxe-symlinks-18d09b19373f16c4.yaml b/releasenotes/notes/ironic-pxe-symlinks-18d09b19373f16c4.yaml new file mode 100644 index 000000000..1f4d4db37 --- /dev/null +++ b/releasenotes/notes/ironic-pxe-symlinks-18d09b19373f16c4.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + Fixes ``ironic_pxe`` launch failures when symlinks to EFI files have + previously been created. + `LP#2160317 <https://launchpad.net/bugs/2160317>`__ diff --git a/releasenotes/notes/ironic-pxe-syslinux-tftpboot-3dc6415ed140dc50.yaml b/releasenotes/notes/ironic-pxe-syslinux-tftpboot-3dc6415ed140dc50.yaml new file mode 100644 index 000000000..a2764704b --- /dev/null +++ b/releasenotes/notes/ironic-pxe-syslinux-tftpboot-3dc6415ed140dc50.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + Install syslinux-tftpboot in the ironic-pxe RPM image on all architectures + so TFTP boot files (pxelinux.0, chain.c32, ldlinux.c32) are present on + aarch64. diff --git a/releasenotes/notes/letsencrypt-dns01-challenge-432b5122dc832f4a.yaml b/releasenotes/notes/letsencrypt-dns01-challenge-432b5122dc832f4a.yaml new file mode 100644 index 000000000..0b35c17ca --- /dev/null +++ b/releasenotes/notes/letsencrypt-dns01-challenge-432b5122dc832f4a.yaml @@ -0,0 +1,14 @@ +--- +features: + - | + The ``letsencrypt-lego`` image now supports the ACME ``dns-01`` challenge + in addition to the existing ``http-01`` challenge. The + ``letsencrypt-certificates`` script accepts a new ``--challenge`` option + (defaulting to ``http-01``) and, when ``dns-01`` is selected, a + ``--dns-provider`` option naming any DNS provider supported by the bundled + ``lego`` binary. An optional ``--dns-additional-opts`` passthrough allows + forwarding extra ``lego`` DNS flags (such as ``--dns.resolvers`` or + ``--dns.propagation-disable-ans``) for environments where the default + authoritative name server propagation check cannot be performed. The + default behaviour is unchanged: without ``--challenge`` the ``http-01`` + challenge is used exactly as before. diff --git a/releasenotes/notes/mariadb-11.4-b66b5baf9f5e6cd0.yaml b/releasenotes/notes/mariadb-11.4-b66b5baf9f5e6cd0.yaml new file mode 100644 index 000000000..9fa74e899 --- /dev/null +++ b/releasenotes/notes/mariadb-11.4-b66b5baf9f5e6cd0.yaml @@ -0,0 +1,5 @@ +--- +upgrade: + - | + Updates ``MariaDB`` to the ``11.4`` LTS release, which is supported until + 29 May 2029. diff --git a/releasenotes/notes/neutron-metadata-agent-wrapper-scripts-d6163080d169ea14.yaml b/releasenotes/notes/neutron-metadata-agent-wrapper-scripts-d6163080d169ea14.yaml new file mode 100644 index 000000000..8155aa568 --- /dev/null +++ b/releasenotes/notes/neutron-metadata-agent-wrapper-scripts-d6163080d169ea14.yaml @@ -0,0 +1,7 @@ +--- +features: + - | + The neutron wrapper scripts, which were introduced in + I679ac66186d457ae53f89469fe22c5662089019a, are now included in the + ``neutron-metadata-agent`` container, making it possible to run + haproxy processes as separate containers. diff --git a/releasenotes/notes/opensearch-upgrade-9e263a65f015a376.yaml b/releasenotes/notes/opensearch-upgrade-9e263a65f015a376.yaml index d7e00e331..9c3f5a300 100644 --- a/releasenotes/notes/opensearch-upgrade-9e263a65f015a376.yaml +++ b/releasenotes/notes/opensearch-upgrade-9e263a65f015a376.yaml @@ -1,4 +1,4 @@ --- upgrade: - | - Update OpenSearch and OpenSearch Dashboards to version 3.x. + Updates ``OpenSearch`` and ``OpenSearch Dashboards`` to version 3.x. diff --git a/releasenotes/notes/pip-build-args-3e222f6a67c57407.yaml b/releasenotes/notes/pip-build-args-3e222f6a67c57407.yaml new file mode 100644 index 000000000..38830a328 --- /dev/null +++ b/releasenotes/notes/pip-build-args-3e222f6a67c57407.yaml @@ -0,0 +1,19 @@ +--- +features: + - | + Added ``pip_index_url``, ``pip_trusted_host`` and ``pip_extra_index_url`` + options to ``kolla-build.conf``. These set the corresponding + ``PIP_INDEX_URL``, ``PIP_TRUSTED_HOST`` and ``PIP_EXTRA_INDEX_URL`` + build-time ``ARG`` instructions in the base image, passed via + ``--build-arg`` so the values do not persist in the final image. +upgrade: + - | + Pip index configuration for image builds should now be set via the new + ``pip_index_url``, ``pip_trusted_host`` and ``pip_extra_index_url`` + options in ``kolla-build.conf``, instead of ``ENV PIP_*`` lines in a + ``base_pip_conf`` template override. If your ``template_overrides.j2`` + still sets ``ENV PIP_INDEX_URL``/``ENV PIP_TRUSTED_HOST``/ + ``ENV PIP_EXTRA_INDEX_URL`` in that block, it will continue to take + precedence over the new build ``ARG`` values (``ENV`` persists in the + image and is evaluated after ``ARG``). Remove those ``ENV`` overrides + and use the new config options instead. diff --git a/releasenotes/notes/prometheus-server-3.13LTS-b33f7bc56ed9cd44.yaml b/releasenotes/notes/prometheus-server-3.13LTS-b33f7bc56ed9cd44.yaml new file mode 100644 index 000000000..5dcd22e29 --- /dev/null +++ b/releasenotes/notes/prometheus-server-3.13LTS-b33f7bc56ed9cd44.yaml @@ -0,0 +1,4 @@ +--- +upgrade: + - | + Update Prometheus server to latest LTS release (3.5.x -> 3.13.x). diff --git a/releasenotes/notes/rabbitmq-41-d881d0b6bbf46446.yaml b/releasenotes/notes/rabbitmq-41-d881d0b6bbf46446.yaml index 8046fc722..2456bcf66 100644 --- a/releasenotes/notes/rabbitmq-41-d881d0b6bbf46446.yaml +++ b/releasenotes/notes/rabbitmq-41-d881d0b6bbf46446.yaml @@ -1,4 +1,4 @@ --- upgrade: - | - ``rabbitmq`` version has been updated to ``4.1``. + Updates ``RabbitMQ`` to version ``4.1``. diff --git a/releasenotes/notes/rabbitmq-42-84cf0d09c9f33ef4.yaml b/releasenotes/notes/rabbitmq-42-84cf0d09c9f33ef4.yaml new file mode 100644 index 000000000..f30512f6e --- /dev/null +++ b/releasenotes/notes/rabbitmq-42-84cf0d09c9f33ef4.yaml @@ -0,0 +1,4 @@ +--- +upgrade: + - | + ``rabbitmq`` version has been updated to ``4.2``. diff --git a/releasenotes/notes/rabbitmq-43-c85e64fbee6e0d99.yaml b/releasenotes/notes/rabbitmq-43-c85e64fbee6e0d99.yaml new file mode 100644 index 000000000..245ced829 --- /dev/null +++ b/releasenotes/notes/rabbitmq-43-c85e64fbee6e0d99.yaml @@ -0,0 +1,4 @@ +--- +upgrade: + - | + ``rabbitmq`` version has been updated to ``4.3``. diff --git a/releasenotes/notes/releasenotes/notes/neutron-ovn-vpn-agent-kolla-image-979df04014ed9440.yaml b/releasenotes/notes/releasenotes/notes/neutron-ovn-vpn-agent-kolla-image-979df04014ed9440.yaml new file mode 100644 index 000000000..fa67df975 --- /dev/null +++ b/releasenotes/notes/releasenotes/notes/neutron-ovn-vpn-agent-kolla-image-979df04014ed9440.yaml @@ -0,0 +1,4 @@ +--- +features: + - | + Added the neutron ovn vpn agent container image (``neutron-ovn-vpn-agent``) diff --git a/releasenotes/notes/remove-mariadb-clustercheck-427a6cfb3f39c508.yaml b/releasenotes/notes/remove-mariadb-clustercheck-427a6cfb3f39c508.yaml new file mode 100644 index 000000000..2a6fcadba --- /dev/null +++ b/releasenotes/notes/remove-mariadb-clustercheck-427a6cfb3f39c508.yaml @@ -0,0 +1,5 @@ +--- +upgrade: + - | + Dropped support for building MariaDB clustercheck container image as it + will not be compatible with MariaDB 11.4 (the next LTS version). diff --git a/releasenotes/notes/remove-networking-infoblox-d2819f908d7d2b54.yaml b/releasenotes/notes/remove-networking-infoblox-d2819f908d7d2b54.yaml new file mode 100644 index 000000000..2fb77a185 --- /dev/null +++ b/releasenotes/notes/remove-networking-infoblox-d2819f908d7d2b54.yaml @@ -0,0 +1,4 @@ +--- +upgrade: + - | + The ``neutron-infoblox-ipam-agent`` image has been removed. diff --git a/releasenotes/notes/remove-prometheus-ovn-exporter-c5f5005b4d1a4b12.yaml b/releasenotes/notes/remove-prometheus-ovn-exporter-c5f5005b4d1a4b12.yaml index 6bac39901..04382375e 100644 --- a/releasenotes/notes/remove-prometheus-ovn-exporter-c5f5005b4d1a4b12.yaml +++ b/releasenotes/notes/remove-prometheus-ovn-exporter-c5f5005b4d1a4b12.yaml @@ -1,5 +1,5 @@ --- -deprecations: +upgrade: - | - The OVN exporter has been removed with immediate effect since 1) it isn't - used in Kolla Ansible and 2) the source repo was archived in Dec 2024. + Removes the ``prometheus-ovn-exporter`` image because it is unused by + Kolla Ansible and the upstream repository was archived in December 2024. diff --git a/releasenotes/notes/removing-build-date-d01ddd01b9182a7f.yaml b/releasenotes/notes/removing-build-date-d01ddd01b9182a7f.yaml new file mode 100644 index 000000000..916a63eea --- /dev/null +++ b/releasenotes/notes/removing-build-date-d01ddd01b9182a7f.yaml @@ -0,0 +1,6 @@ +--- +upgrade: + - | + ``build-date`` LABEL has been moved from Dockerfile templates to docker + runtime build arguments, in order to not invalidate cache on each calendar + day. Users overriding LABELs should remove build-date from their overrides. diff --git a/releasenotes/notes/repos-yaml-rpm-support-01ff7f5fc3b9ecf2.yaml b/releasenotes/notes/repos-yaml-rpm-support-01ff7f5fc3b9ecf2.yaml new file mode 100644 index 000000000..b3815928f --- /dev/null +++ b/releasenotes/notes/repos-yaml-rpm-support-01ff7f5fc3b9ecf2.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + Adds support for configuring RPM distributions repositories + using ``repos.yaml`` functionality. diff --git a/releasenotes/notes/rocky-10-4111fa0160be14ab.yaml b/releasenotes/notes/rocky-10-4111fa0160be14ab.yaml new file mode 100644 index 000000000..98ef21f28 --- /dev/null +++ b/releasenotes/notes/rocky-10-4111fa0160be14ab.yaml @@ -0,0 +1,12 @@ +--- +features: + - | + Adds support for Rocky Linux 10 as a base container image. From the 2025.2 + release onward, Rocky Linux 10 is the only supported Rocky Linux major version. +upgrade: + - | + Rocky Linux 9 is no longer supported as a base container image, so + deployments using Rocky Linux should migrate to Rocky Linux 10. + - | + The ``telegraf`` image relied on Rocky Linux 9-only packages and is therefore + unavailable for Rocky Linux-based builds. diff --git a/releasenotes/notes/rocky-kerbside-spice-copr-9a3f4d7c2b1e8a50.yaml b/releasenotes/notes/rocky-kerbside-spice-copr-9a3f4d7c2b1e8a50.yaml new file mode 100644 index 000000000..2bb5307ff --- /dev/null +++ b/releasenotes/notes/rocky-kerbside-spice-copr-9a3f4d7c2b1e8a50.yaml @@ -0,0 +1,24 @@ +--- +features: + - | + Kolla now builds two ``nova-libvirt`` containers: ``nova-libvirt`` + and ``nova-libvirt-spice``. This second container is used by + ``kolla-ansible`` deployments which set ``enable_kerbside: true`` + in their ``globals.yml``. The two containers are identical, except + on Rocky Linux where the community-maintained + `ligenix/enterprise-qemu-spice + <https://copr.fedorainfracloud.org/coprs/ligenix/enterprise-qemu-spice/>`__ + COPR repository which rebuilds ``qemu-kvm`` with SPICE support + re-enabled is used. The COPR is a third-party rebuild with no vendor + support contract and is recommended only for proof-of-concept + deployments. +issues: + - | + The ligenix/enterprise-qemu-spice COPR builds ship qemu-kvm without + the ``usb-audio`` device. Guests configured with + ``hw_sound_model=usb`` (the recommended default in the Kerbside + ``hw:sound_model`` documentation) will fail to start on Rocky with + ``unsupported configuration: usb-audio controller is not supported + by this QEMU binary``. Use a different model such as ``ich9`` or + ``ac97`` on Rocky deployments until the COPR rebuild ships + usb-audio. diff --git a/releasenotes/notes/rocky-ovn-26.03-006064cd2ea0a432.yaml b/releasenotes/notes/rocky-ovn-26.03-006064cd2ea0a432.yaml new file mode 100644 index 000000000..ea4ac2b29 --- /dev/null +++ b/releasenotes/notes/rocky-ovn-26.03-006064cd2ea0a432.yaml @@ -0,0 +1,4 @@ +--- +features: + - | + Updates OVN to version 26.03 on Rocky Linux 10. diff --git a/releasenotes/notes/set-configs-create-directories-a1b2c3d4e5f6a7b8.yaml b/releasenotes/notes/set-configs-create-directories-a1b2c3d4e5f6a7b8.yaml new file mode 100644 index 000000000..4ffba3b10 --- /dev/null +++ b/releasenotes/notes/set-configs-create-directories-a1b2c3d4e5f6a7b8.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + Adds support for a ``directories`` section in ``config.json`` processed by + ``kolla_set_configs``. diff --git a/releasenotes/notes/switch-mtail-repo-e2fce586bf7b02a8.yaml b/releasenotes/notes/switch-mtail-repo-e2fce586bf7b02a8.yaml new file mode 100644 index 000000000..a842e960d --- /dev/null +++ b/releasenotes/notes/switch-mtail-repo-e2fce586bf7b02a8.yaml @@ -0,0 +1,5 @@ +--- +upgrade: + - | + Switch ``prometheus-mtail`` repository to ``github.com/jaqx0r/mtail`` + which is the new active fork of ``google/mtail``. diff --git a/releasenotes/notes/switch-proxysql3-base-to-almalinux10-d64c97ba1a894a34.yaml b/releasenotes/notes/switch-proxysql3-base-to-almalinux10-d64c97ba1a894a34.yaml new file mode 100644 index 000000000..bb2a0f526 --- /dev/null +++ b/releasenotes/notes/switch-proxysql3-base-to-almalinux10-d64c97ba1a894a34.yaml @@ -0,0 +1,5 @@ +--- +upgrade: + - | + Bumped ProxySQL 3.0.x repository to Almalinux 10 for Redhat family + distributions. diff --git a/releasenotes/notes/switch-to-yaml-configs-32802ccb894c0295.yaml b/releasenotes/notes/switch-to-yaml-configs-32802ccb894c0295.yaml new file mode 100644 index 000000000..bfc798906 --- /dev/null +++ b/releasenotes/notes/switch-to-yaml-configs-32802ccb894c0295.yaml @@ -0,0 +1,7 @@ +--- +features: + - | + The ``kolla_set_configs`` tool now supports YAML as a native + configuration format. It can now load ``config.yaml`` files in + addition to the legacy ``config.json``. Existing JSON + configurations remain fully supported. diff --git a/releasenotes/notes/update-external-components-419631c0a728a61e.yaml b/releasenotes/notes/update-external-components-419631c0a728a61e.yaml new file mode 100644 index 000000000..baff1d3e6 --- /dev/null +++ b/releasenotes/notes/update-external-components-419631c0a728a61e.yaml @@ -0,0 +1,7 @@ +--- +upgrade: + - | + ``prometheus-mtail`` has been updated from ``3.4.13`` to ``3.4.14``. + - | + ``prometheus-valkey-exporter`` has been updated from ``1.92.0`` to + ``1.92.1``. diff --git a/releasenotes/notes/update-external-components-55c57492253a6d19.yaml b/releasenotes/notes/update-external-components-55c57492253a6d19.yaml new file mode 100644 index 000000000..e78d660cc --- /dev/null +++ b/releasenotes/notes/update-external-components-55c57492253a6d19.yaml @@ -0,0 +1,16 @@ +--- +upgrade: + - | + ``etcd`` has been updated from ``3.6.14`` to ``3.6.15``. + - | + ``prometheus-alertmanager`` has been updated from ``0.34.0`` to ``0.34.1``. + - | + ``prometheus-cadvisor`` has been updated from ``0.60.5`` to ``0.60.6``. + - | + ``prometheus-libvirt-exporter`` has been updated from ``2.5.0`` to + ``2.6.0``. + - | + ``prometheus-mtail`` has been updated from ``3.4.12`` to ``3.4.13``. + - | + ``prometheus-valkey-exporter`` has been updated from ``1.91.1`` to + ``1.92.0``. diff --git a/releasenotes/notes/update-external-components-625902310f4f5536.yaml b/releasenotes/notes/update-external-components-625902310f4f5536.yaml new file mode 100644 index 000000000..bf69959f5 --- /dev/null +++ b/releasenotes/notes/update-external-components-625902310f4f5536.yaml @@ -0,0 +1,9 @@ +--- +upgrade: + - | + ``letsencrypt-lego`` has been updated from ``5.4.0`` to ``5.4.1``. + - | + ``prometheus-mtail`` has been updated from ``3.4.9`` to ``3.4.10``. + - | + ``prometheus-valkey-exporter`` has been updated from ``1.89.0`` to + ``1.90.0``. diff --git a/releasenotes/notes/update-external-components-7ad94672447b4901.yaml b/releasenotes/notes/update-external-components-7ad94672447b4901.yaml new file mode 100644 index 000000000..c6bace2f9 --- /dev/null +++ b/releasenotes/notes/update-external-components-7ad94672447b4901.yaml @@ -0,0 +1,35 @@ +--- +upgrade: + - | + ``etcd`` has been updated from ``3.6.5`` to ``3.6.14``. + - | + ``letsencrypt-lego`` has been updated from ``4.27.0`` to ``5.4.0``. + - | + ``magnum-conductor-plugin-helm`` has been updated from ``3.19.0`` to + ``4.2.4``. + - | + ``prometheus-alertmanager`` has been updated from ``0.31.1`` to ``0.34.0``. + - | + ``prometheus-cadvisor`` has been updated from ``0.56.2`` to ``0.60.5``. + - | + ``prometheus-elasticsearch-exporter`` has been updated from ``1.10.0`` to + ``1.11.0``. + - | + ``prometheus-libvirt-exporter`` has been updated from ``2.3.1`` to + ``2.5.0``. + - | + ``prometheus-memcached-exporter`` has been updated from ``0.15.5`` to + ``0.17.0``. + - | + ``prometheus-mtail`` has been updated from ``3.4.0`` to ``3.4.9``. + - | + ``prometheus-mysqld-exporter`` has been updated from ``0.18.0`` to + ``0.20.0``. + - | + ``prometheus-node-exporter`` has been updated from ``1.10.2`` to + ``1.12.1``. + - | + ``prometheus-server`` has been updated from ``3.5.4`` to ``3.5.5``. + - | + ``prometheus-valkey-exporter`` has been updated from ``1.82.0`` to + ``1.89.0``. diff --git a/releasenotes/notes/update-external-components-94f3c485be382c8e.yaml b/releasenotes/notes/update-external-components-94f3c485be382c8e.yaml new file mode 100644 index 000000000..e72f54e25 --- /dev/null +++ b/releasenotes/notes/update-external-components-94f3c485be382c8e.yaml @@ -0,0 +1,7 @@ +--- +upgrade: + - | + ``prometheus-mtail`` has been updated from ``3.4.10`` to ``3.4.11``. + - | + ``prometheus-openstack-network-exporter`` has been updated from ``0.2.0`` + to ``0.3.0``. diff --git a/releasenotes/notes/update-external-components-97b947c8fdb88ac9.yaml b/releasenotes/notes/update-external-components-97b947c8fdb88ac9.yaml new file mode 100644 index 000000000..d758f9412 --- /dev/null +++ b/releasenotes/notes/update-external-components-97b947c8fdb88ac9.yaml @@ -0,0 +1,7 @@ +--- +upgrade: + - | + ``prometheus-server`` has been updated from ``3.13.2`` to ``3.13.3``. + - | + ``prometheus-valkey-exporter`` has been updated from ``1.90.0`` to + ``1.91.1``. diff --git a/releasenotes/notes/update-magnum-conductor-plugin-helm-6afa6c8dc5a98d5a.yaml b/releasenotes/notes/update-magnum-conductor-plugin-helm-6afa6c8dc5a98d5a.yaml new file mode 100644 index 000000000..122ee7c67 --- /dev/null +++ b/releasenotes/notes/update-magnum-conductor-plugin-helm-6afa6c8dc5a98d5a.yaml @@ -0,0 +1,5 @@ +--- +upgrade: + - | + ``magnum-conductor-plugin-helm`` has been updated from ``4.2.4`` to + ``4.3.0``. diff --git a/releasenotes/notes/update-packages-071d1863639fe3e3.yaml b/releasenotes/notes/update-packages-071d1863639fe3e3.yaml index 8f30730d0..efe10a960 100644 --- a/releasenotes/notes/update-packages-071d1863639fe3e3.yaml +++ b/releasenotes/notes/update-packages-071d1863639fe3e3.yaml @@ -1,11 +1,13 @@ --- upgrade: - | - Update monitoring and key infrastructure components to their latest versions. - This upgrade includes several prometheus-related services, as well as Etcd and Lego. + Updates monitoring and key infrastructure components to their latest + supported versions. This covers several Prometheus exporters as well as + ``etcd``, ``helm``, and ``letsencrypt-lego``. - * etcd: 3.5.16 -> 3.6.4 - * letsencrypt-lego: 4.20.4 -> 4.25.2 + * etcd: 3.5.16 -> 3.6.5 + * helm: 3.16.3 -> 3.19.0 + * letsencrypt-lego: 4.20.4 -> 4.27.0 * prometheus-blackbox-exporter: 0.25.0 -> 0.27.0 * prometheus-cadvisor: 0.49.2 -> 0.53.0 * prometheus-elasticsearch-exporter: 1.8.0 -> 1.9.0 @@ -14,5 +16,5 @@ upgrade: * prometheus-node-exporter: 1.8.2 -> 1.9.1 * prometheus-server: 3.2.1 -> 3.5.0 (LTS) - Additionally, Prometheus-server has been switched to its Long-Term Support (LTS) - version to ensure greater stability and extended support. + Additionally, ``prometheus-server`` now tracks the Long-Term Support (LTS) + channel to provide longer maintenance windows. diff --git a/releasenotes/notes/update-prometheus-mtail-4d73dd09f088a408.yaml b/releasenotes/notes/update-prometheus-mtail-4d73dd09f088a408.yaml new file mode 100644 index 000000000..a9c6e7ed8 --- /dev/null +++ b/releasenotes/notes/update-prometheus-mtail-4d73dd09f088a408.yaml @@ -0,0 +1,4 @@ +--- +upgrade: + - | + ``prometheus-mtail`` has been updated from ``3.4.11`` to ``3.4.12``. diff --git a/releasenotes/notes/update-prometheus-server-3.5.3-89627b5d4e0ad4fb.yaml b/releasenotes/notes/update-prometheus-server-3.5.3-89627b5d4e0ad4fb.yaml new file mode 100644 index 000000000..5e2accea7 --- /dev/null +++ b/releasenotes/notes/update-prometheus-server-3.5.3-89627b5d4e0ad4fb.yaml @@ -0,0 +1,4 @@ +--- +features: + - | + Updates Prometheus to version 3.5.3. diff --git a/releasenotes/notes/update-prometheus-server-3.5.4-70f6b76854015b51.yaml b/releasenotes/notes/update-prometheus-server-3.5.4-70f6b76854015b51.yaml new file mode 100644 index 000000000..80bbb5091 --- /dev/null +++ b/releasenotes/notes/update-prometheus-server-3.5.4-70f6b76854015b51.yaml @@ -0,0 +1,4 @@ +--- +features: + - | + Updates Prometheus to version 3.5.4. diff --git a/releasenotes/notes/update-prometheus-services-98085e2ccf13d1fb.yaml b/releasenotes/notes/update-prometheus-services-98085e2ccf13d1fb.yaml new file mode 100644 index 000000000..f894ffef7 --- /dev/null +++ b/releasenotes/notes/update-prometheus-services-98085e2ccf13d1fb.yaml @@ -0,0 +1,16 @@ +--- +upgrade: + - | + Update Prometheus Alertmanager and exporters to the latest releases: + + * prometheus-alertmanager: 0.28.1 -> 0.31.1 + * prometheus-blackbox-exporter: 0.27.0 -> 0.28.0 + * prometheus-cadvisor: 0.53.0 -> 0.56.2 + * prometheus-elasticsearch-exporter: 1.9.0 -> 1.10.0 + * prometheus-libvirt-exporter: 2.2.0 -> 2.3.1 + * prometheus-memcached-exporter: 0.15.3 -> 0.15.5 + * prometheus-mysqld-exporter: 0.17.2 -> 0.18.0 + * prometheus-node-exporter: 1.9.1 -> 1.10.2 + + prometheus-mtail and prometheus-openstack-exporter were not updated as + there are no later stable releases. diff --git a/releasenotes/source/2024.1.rst b/releasenotes/source/2024.1.rst index 4977a4f1a..6896656be 100644 --- a/releasenotes/source/2024.1.rst +++ b/releasenotes/source/2024.1.rst @@ -3,4 +3,4 @@ =========================== .. release-notes:: - :branch: stable/2024.1 + :branch: unmaintained/2024.1 diff --git a/releasenotes/source/2025.2.rst b/releasenotes/source/2025.2.rst new file mode 100644 index 000000000..4dae18d86 --- /dev/null +++ b/releasenotes/source/2025.2.rst @@ -0,0 +1,6 @@ +=========================== +2025.2 Series Release Notes +=========================== + +.. release-notes:: + :branch: stable/2025.2 diff --git a/releasenotes/source/2026.1.rst b/releasenotes/source/2026.1.rst new file mode 100644 index 000000000..3d2861580 --- /dev/null +++ b/releasenotes/source/2026.1.rst @@ -0,0 +1,6 @@ +=========================== +2026.1 Series Release Notes +=========================== + +.. release-notes:: + :branch: stable/2026.1 diff --git a/releasenotes/source/index.rst b/releasenotes/source/index.rst index 30aeae854..f49536313 100644 --- a/releasenotes/source/index.rst +++ b/releasenotes/source/index.rst @@ -9,6 +9,8 @@ Contents :maxdepth: 2 unreleased + 2026.1 + 2025.2 2025.1 2024.2 2024.1 diff --git a/roles/kolla-build-config/defaults/main.yml b/roles/kolla-build-config/defaults/main.yml index e8c6f7841..ced1ac659 100644 --- a/roles/kolla-build-config/defaults/main.yml +++ b/roles/kolla-build-config/defaults/main.yml @@ -11,72 +11,70 @@ kolla_build_config: {} # Dict mapping project names to sections in kolla-build.conf. kolla_build_sources: - openstack/requirements: openstack-base - + gnocchixyz/gnocchi: gnocchi-base openstack/aodh: aodh-base openstack/barbican: barbican-base openstack/bifrost: bifrost-base openstack/blazar: blazar-base + openstack/blazar-dashboard: horizon-plugin-blazar-dashboard openstack/blazar-nova: nova-base-plugin-blazar openstack/ceilometer: ceilometer-base openstack/cinder: cinder-base openstack/cloudkitty: cloudkitty-base + openstack/cloudkitty-dashboard: horizon-plugin-cloudkitty-dashboard + openstack/cyborg: cyborg-base openstack/designate: designate-base + openstack/designate-dashboard: horizon-plugin-designate-dashboard openstack/glance: glance-base - openstack/gnocchi: gnocchi-base openstack/heat: heat-base + openstack/heat-dashboard: horizon-plugin-heat-dashboard + openstack/horizon: horizon openstack/ironic: ironic-base + openstack/ironic-prometheus-exporter: ironic-conductor-plugin-prometheus-exporter + openstack/ironic-ui: horizon-plugin-ironic-ui openstack/keystone: keystone-base - openstack/kuryr: kuryr-base - openstack/kuryr-libnetwork: kuryr-libnetwork openstack/magnum: magnum-base + openstack/magnum-ui: horizon-plugin-magnum-ui openstack/manila: manila-base + openstack/manila-ui: horizon-plugin-manila-ui + openstack/masakari: masakari-base + openstack/masakari-dashboard: horizon-plugin-masakari-dashboard + openstack/masakari-monitors: masakari-monitors openstack/mistral: mistral-base - openstack/monasca-agent: monasca-agent - openstack/monasca-api: monasca-api - openstack/monasca-notification: monasca-notification - openstack/monasca-persister: monasca-persister - openstack/monasca-statsd: monasca-statsd - openstack/monasca-common: monasca-thresh-additions-monasca-common - openstack/neutron: neutron-base + openstack/mistral-dashboard: horizon-plugin-mistral-dashboard openstack/networking-baremetal: neutron-base-plugin-networking-baremetal - openstack/neutron-dynamic-routing: - - neutron-bgp-dragent - - neutron-server-plugin-neutron-dynamic-routing - openstack/networking-infoblox: neutron-server-plugin-networking-infoblox openstack/networking-generic-switch: neutron-base-plugin-networking-generic-switch openstack/networking-sfc: - neutron-base-plugin-networking-sfc - tacker-base-plugin-networking-sfc + openstack/neutron: neutron-base + openstack/neutron-dynamic-routing: + - neutron-bgp-dragent + - neutron-server-plugin-neutron-dynamic-routing + openstack/neutron-fwaas: neutron-base-plugin-neutron-fwaas + openstack/neutron-fwaas-dashboard: horizon-plugin-fwaas-dashboard openstack/neutron-vpnaas: - neutron-vpnaas-agent - neutron-base-plugin-vpnaas-agent + openstack/neutron-vpnaas-dashboard: horizon-plugin-neutron-vpnaas-dashboard openstack/nova: nova-base openstack/octavia: octavia-base - openstack/skyline: skyline-base + openstack/octavia-dashboard: horizon-plugin-octavia-dashboard + openstack/ovn-octavia-provider: + - octavia-api-plugin-ovn-octavia-provider + - octavia-driver-agent-plugin-ovn-octavia-provider + openstack/placement: placement-base + openstack/requirements: + - openstack-base + - kolla-toolbox + openstack/skyline-apiserver: skyline-apiserver + openstack/skyline-console: skyline-console openstack/tacker: - tacker-base - mistral-base-plugin-tacker - openstack/trove: trove-base - openstack/venus: venus-base - openstack/watcher: watcher-base - openstack/zun: zun-base - - # Horizon and its plugins - openstack/horizon: horizon - openstack/blazar-dashboard: horizon-plugin-blazar-dashboard - openstack/cloudkitty-dashboard: horizon-plugin-cloudkitty-dashboard - openstack/designate-dashboard: horizon-plugin-designate-dashboard - openstack/heat-dashboard: horizon-plugin-heat-dashboard - openstack/ironic-ui: horizon-plugin-ironic-ui - openstack/magnum-ui: horizon-plugin-magnum-ui - openstack/manila-ui: horizon-plugin-manila-ui - openstack/mistral-dashboard: horizon-plugin-mistral-dashboard - openstack/monasca-ui: horizon-plugin-monasca-ui - openstack/neutron-vpnaas-dashboard: horizon-plugin-neutron-vpnaas-dashboard - openstack/octavia-dashboard: horizon-plugin-octavia-dashboard openstack/tacker-horizon: horizon-plugin-tacker-dashboard + openstack/tap-as-a-service: neutron-base-plugin-tap-as-a-service + openstack/trove: trove-base openstack/trove-dashboard: horizon-plugin-trove-dashboard - openstack/venus-dashboard: horizon-plugin-venus-dashboard + openstack/watcher: watcher-base openstack/watcher-dashboard: horizon-plugin-watcher-dashboard - openstack/zun-ui: horizon-plugin-zun-ui diff --git a/roles/kolla-build-config/templates/kolla-build.conf.j2 b/roles/kolla-build-config/templates/kolla-build.conf.j2 index bfc5dd426..07a50baae 100644 --- a/roles/kolla-build-config/templates/kolla-build.conf.j2 +++ b/roles/kolla-build-config/templates/kolla-build.conf.j2 @@ -7,20 +7,21 @@ {% endfor %} {% endfor %} -{# Generate a section for every build source for which there is a Zuul change. #} +{# Generate a section for every build source Zuul has a checkout for, + whether it's a required-project or a Depends-On. #} -{% for zuul_item in zuul['items'] %} -{% if zuul_item.project.name in kolla_build_sources %} -{% set source_names = kolla_build_sources[zuul_item.project.name] %} +{% for canonical_name, project in zuul['projects'].items() %} +{% if project.name in kolla_build_sources %} +{% set source_names = kolla_build_sources[project.name] %} {% if source_names is string %} [{{ source_names }}] type = local -location = {{ ansible_env.PWD ~ '/' ~ zuul_item.project.src_dir }} +location = {{ ansible_env.PWD ~ '/' ~ project.src_dir }} {% else %} {% for source_name in source_names %} [{{ source_name }}] type = local -location = {{ ansible_env.PWD ~ '/' ~ zuul_item.project.src_dir }} +location = {{ ansible_env.PWD ~ '/' ~ project.src_dir }} {% endfor %} {% endif %} {% endif %} diff --git a/roles/kolla-build-deps/tasks/main.yml b/roles/kolla-build-deps/tasks/main.yml index 490f13edf..399aa4380 100644 --- a/roles/kolla-build-deps/tasks/main.yml +++ b/roles/kolla-build-deps/tasks/main.yml @@ -51,6 +51,12 @@ ansible.builtin.include_role: name: "{{ container_engine }}_sdk" +- name: Install docker-buildx-plugin + ansible.builtin.package: + name: docker-buildx-plugin + become: true + when: container_engine == 'docker' + - name: Ensure container engine socket is world-writable ansible.builtin.file: path: "{{ '/run/docker.sock' if container_engine == 'docker' else '/run/podman/podman.sock' }}" diff --git a/roles/kolla-build/defaults/main.yml b/roles/kolla-build/defaults/main.yml index fe7c33a33..98051c97b 100644 --- a/roles/kolla-build/defaults/main.yml +++ b/roles/kolla-build/defaults/main.yml @@ -1,4 +1,5 @@ --- kolla_build_logs_dir: "{{ zuul_output_dir }}/logs/kolla/build" +kolla_build_repos_yaml_path: "" kolla_build_template_overrides_path: "" kolla_build_venv_path: "/tmp/kolla-virtualenv" diff --git a/roles/kolla-build/tasks/main.yml b/roles/kolla-build/tasks/main.yml index e5529f381..927bb1309 100644 --- a/roles/kolla-build/tasks/main.yml +++ b/roles/kolla-build/tasks/main.yml @@ -1,4 +1,13 @@ --- +- name: Template repos.yaml + ansible.builtin.template: + src: "{{ kolla_build_repos_yaml_path }}" + dest: /etc/kolla/repos.yaml + mode: "0660" + owner: zuul + group: zuul + when: kolla_build_repos_yaml_path | length > 0 + - name: Template template_overrides.j2 ansible.builtin.template: src: "{{ kolla_build_template_overrides_path }}" @@ -1,44 +1,2 @@ [metadata] name = kolla -summary = Kolla OpenStack Deployment -description_file = - README.rst -author = OpenStack -author_email = openstack-discuss@lists.openstack.org -home_page = https://docs.openstack.org/kolla/latest/ -python_requires = >=3.8 -license = Apache License, Version 2.0 -classifier = - Environment :: OpenStack - Intended Audience :: Information Technology - Intended Audience :: System Administrators - License :: OSI Approved :: Apache Software License - Operating System :: POSIX :: Linux - Programming Language :: Python - Programming Language :: Python :: Implementation :: CPython - Programming Language :: Python :: 3 :: Only - Programming Language :: Python :: 3 - Programming Language :: Python :: 3.8 - Programming Language :: Python :: 3.9 - Programming Language :: Python :: 3.10 - Programming Language :: Python :: 3.11 - Programming Language :: Python :: 3.12 - -[files] -packages = - kolla -data_files = - share/kolla/docker = docker/* - share/kolla/tools = tools/validate-docker-execute.sh - share/kolla/tools = tools/cleanup-images - share/kolla/tools = tools/start-registry - share/kolla/doc = doc/* - share/kolla/etc_examples = etc/* - share/kolla/contrib = contrib/* - share/kolla = setup.cfg - -[entry_points] -console_scripts = - kolla-build = kolla.cmd.build:main -oslo.config.opts = - kolla = kolla.opts:list_opts diff --git a/test-requirements.txt b/test-requirements.txt index 30c980fb3..21459ec95 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,5 +1,4 @@ -ansible-core>=2.17,<2.19 # GPLv3 -ansible-lint<26 # MIT +ansible-core>=2.20,<2.22; python_version >= '3.12' # GPLv3 bandit!=1.6.0,>=1.1.0 # Apache-2.0 bashate>=0.5.1 # Apache-2.0 coverage!=4.4,>=4.0 # Apache-2.0 diff --git a/tests/files/process_build_logs.py b/tests/files/process_build_logs.py index 0db5228d9..248acf954 100755 --- a/tests/files/process_build_logs.py +++ b/tests/files/process_build_logs.py @@ -30,7 +30,7 @@ parser.add_argument('-b', '--base', required=True) args = vars(parser.parse_args()) -if args['base'] not in ['rocky', 'centos']: +if args['base'] != 'rocky': print("Non rpm-based distros are not yet supported.") sys.exit() diff --git a/tests/playbooks/copr-erlang-update.yml b/tests/playbooks/copr-erlang-update.yml index f3b230231..c917a72b0 100644 --- a/tests/playbooks/copr-erlang-update.yml +++ b/tests/playbooks/copr-erlang-update.yml @@ -2,17 +2,14 @@ - name: COPR Erlang update hosts: all tasks: - - name: Ensure webhook URLs are defined + - name: Trigger COPR build via webhooks for erlang-27 + ansible.builtin.uri: + url: "https://copr.fedorainfracloud.org/webhooks/custom/{{ kolla_copr_erlang27.id }}/{{ kolla_copr_erlang27.uuid }}/erlang" + method: POST no_log: true - ansible.builtin.assert: - that: - - kolla_copr_webhooks.urls is defined - - kolla_copr_webhooks.urls | length > 0 - fail_msg: "Missing Zuul secret 'kolla_copr_webhooks.urls' (list of webhook URLs)." - - name: Trigger COPR builds via webhooks - no_log: true + - name: Trigger COPR build via webhooks for erlang-26 ansible.builtin.uri: - url: "{{ item | trim }}" + url: "https://copr.fedorainfracloud.org/webhooks/custom/{{ kolla_copr_erlang26.id }}/{{ kolla_copr_erlang26.uuid }}/erlang" method: POST - loop: "{{ kolla_copr_webhooks.urls }}" + no_log: true diff --git a/tests/playbooks/publish.yml b/tests/playbooks/publish.yml index 7c217fa37..5ba00bce4 100644 --- a/tests/playbooks/publish.yml +++ b/tests/playbooks/publish.yml @@ -31,13 +31,3 @@ register: push_status until: push_status.failed is false retries: 5 - - - name: Ensure repository visibility is public - ansible.builtin.uri: - url: "https://quay.io/api/v1/repository/{{ item.RepoTags.0 }}/changevisibility" - method: POST - headers: - Authorization: "Bearer {{ kolla_quay_io_api.token | trim }}" - body: '{"visibility": "public"}' - body_format: json - loop: "{{ docker_host_info.images }}" diff --git a/tests/playbooks/run.yml b/tests/playbooks/run.yml index ad3c80075..47cfba466 100644 --- a/tests/playbooks/run.yml +++ b/tests/playbooks/run.yml @@ -62,6 +62,25 @@ when: - not publisher + - name: Set pip mirror config + vars: + kolla_pip_mirror_config: + DEFAULT: + pip_index_url: "{{ nodepool_pypi_mirror }}" + pip_trusted_host: "{{ nodepool_mirror_host }}" + ansible.builtin.set_fact: + kolla_build_config: "{{ kolla_build_config | combine(kolla_pip_mirror_config, recursive=True) }}" + + - name: Set up base repo overrides + vars: + kolla_repos_yaml_config: + DEFAULT: + repos_yaml: /etc/kolla/repos.yaml + ansible.builtin.set_fact: + kolla_build_config: "{{ kolla_build_config | combine(kolla_repos_yaml_config, recursive=True) }}" + kolla_build_repos_yaml_path: "{{ zuul.executor.work_root }}/{{ zuul.projects['opendev.org/openstack/kolla'].src_dir }}/tests/templates/repos.yaml.j2" + when: base_distro in ['debian', 'rocky', 'ubuntu'] + - name: Import kolla-build-config role import_role: name: kolla-build-config diff --git a/tests/templates/repos.yaml.j2 b/tests/templates/repos.yaml.j2 new file mode 100644 index 000000000..573173d95 --- /dev/null +++ b/tests/templates/repos.yaml.j2 @@ -0,0 +1,78 @@ +--- +{% if base_distro == 'debian' %} +debian: + debian: + build_only: true + component: "main" + gpg_key: "/usr/share/keyrings/debian-archive-keyring.gpg" + suite: "trixie trixie-updates trixie-backports" + trusted: True + url: "http://{{ nodepool_mirror_host }}/debian" + debian-security: + build_only: true + component: "main" + gpg_key: "/usr/share/keyrings/debian-archive-keyring.gpg" + suite: "trixie-security" + trusted: True + url: "http://{{ nodepool_mirror_host }}/debian-security" +{% elif base_distro == 'rocky' %} +rocky: + appstream: + baseurl: "http://dl.rockylinux.org/$contentdir/$releasever/AppStream/$basearch/os/" + build_only: true + gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-10" + name: "appstream" + baseos: + baseurl: "http://dl.rockylinux.org/$contentdir/$releasever/BaseOS/$basearch/os/" + build_only: true + gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-10" + name: "baseos" + crb: + baseurl: "http://dl.rockylinux.org/$contentdir/$releasever/CRB/$basearch/os/" + build_only: true + gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-10" + name: "crb" + openvswitch: + baseurl: "http://centos-stream.mirrorservice.org/SIGs/$releasever-stream/nfv/$basearch/openvswitch-2/" + build_only: true + gpgkey: "https://www.centos.org/keys/RPM-GPG-KEY-CentOS-SIG-NFV" + name: "centos-nfv-openvswitch" +{% elif base_distro == 'ubuntu' %} +ubuntu: + ubuntu: + build_only: true + component: "main universe" + gpg_key: "/usr/share/keyrings/ubuntu-archive-keyring.gpg" + suite: "noble noble-updates noble-backports" + trusted: True + url: "http://{{ nodepool_mirror_host }}/ubuntu/" + ubuntu-security: + build_only: true + component: "main universe" + gpg_key: "/usr/share/keyrings/ubuntu-archive-keyring.gpg" + suite: "noble-security" + trusted: True + url: "http://{{ nodepool_mirror_host }}/ubuntu/" + ubuntu-cloud-archive: + build_only: true + component: "main" + gpg_key: "/usr/share/keyrings/ubuntu-cloud-keyring.gpg" + suite: "noble-updates/gazpacho" + trusted: True + url: "http://{{ nodepool_mirror_host }}/ubuntu-cloud-archive" +ubuntu-aarch64: + ubuntu: + build_only: true + component: "main universe" + gpg_key: "/usr/share/keyrings/ubuntu-archive-keyring.gpg" + suite: "noble noble-updates noble-backports" + trusted: True + url: "http://{{ nodepool_mirror_host }}/ubuntu-ports/" + ubuntu-security: + build_only: true + component: "main universe" + gpg_key: "/usr/share/keyrings/ubuntu-archive-keyring.gpg" + suite: "noble-security" + trusted: True + url: "http://{{ nodepool_mirror_host }}/ubuntu-ports/" +{% endif %} diff --git a/tests/templates/template_overrides.j2 b/tests/templates/template_overrides.j2 index 8dfc6a9ff..64b3d0f6e 100644 --- a/tests/templates/template_overrides.j2 +++ b/tests/templates/template_overrides.j2 @@ -1,106 +1,3 @@ {% raw %} {% extends parent_template %} - -{% block base_pip_conf %} -{% endraw %} - -ENV PIP_INDEX_URL {{ nodepool_pypi_mirror }} -ENV PIP_TRUSTED_HOST {{ nodepool_mirror_host }} -{% if use_infra_wheels_mirror | default(true) %} -ENV PIP_EXTRA_INDEX_URL {{ nodepool_wheel_mirror }} -{% endif %} - -RUN echo registry={{ nodepool_npmjs_proxy }} > /etc/npmrc \ - && mkdir -p /usr/etc \ - && ln -s /etc/npmrc /usr/etc/npmrc - -{% raw %} -{% endblock %} -{% endraw %} - -{% if base_distro == 'rocky' %} -{# -NOTE(hrw): Rocky is not mirrored but it uses CentOS repos which are - #} -{% raw %} -{% block base_centos_repo_overrides_post_copy %} -{% endraw %} - -COPY ci-rocky.repo /etc/yum.repos.d/ -RUN cd /etc/yum.repos.d/ && mkdir not-for-ci/ \ - && sed -i -e "s/MIRROR/{{ nodepool_mirror_host }}/g" /etc/yum.repos.d/ci-rocky.repo - -{% raw %} -{% endblock %} -{% endraw %} - -{% raw %} - -{% block base_centos_repo_overrides_post_yum -%} -{%- endraw -%} - && cd /etc/yum.repos.d/ && mv CentOS*.repo epel*.repo not-for-ci/ -{%- raw -%} -{% endblock %} -{% endraw %} -{% endif %} - -{% raw %} -{% block base_debian_after_sources_list %} -{% endraw %} -{% if base_distro == "debian" %} - -RUN sed -i -e "s|http://deb.debian.org|[trusted=yes] http://{{ nodepool_mirror_host }}|" \ - -e "s|http://security.debian.org|[trusted=yes] http://{{ nodepool_mirror_host }}|" \ - /etc/apt/sources.list - -{% elif base_distro == "ubuntu" %} - -RUN sed -i -e "s|mirror://mirrors.ubuntu.com/mirrors.txt|[trusted=yes] http://{{ nodepool_mirror_host }}/ubuntu/|" \ - -e "s|http://ports.ubuntu.com|[trusted=yes] http://{{ nodepool_mirror_host }}/ubuntu-ports|" \ - -e "s|http://ubuntu-cloud.archive.canonical.com/ubuntu|[trusted=yes] http://{{ nodepool_mirror_host }}/ubuntu-cloud-archive|" \ - /etc/apt/sources.list - -{% endif %} -{% raw %} -{% endblock %} - -{# Revert to upstream mirrors after build is complete #} - -{% block footer %} -{% endraw %} - -ENV PIP_INDEX_URL= -ENV PIP_TRUSTED_HOST= -{% if use_infra_wheels_mirror | default(true) %} -ENV PIP_EXTRA_INDEX_URL= -{% endif %} - -RUN if [ -f /usr/etc/npmrc ]; then \ - unlink /usr/etc/npmrc; \ - fi \ - && rm -f /etc/npmrc - -{% if base_distro in ['centos', 'rocky'] %} -{# NOTE(hrw): Some images have two footer blocks. - For example neutron-infobox-ipam-agent being - child of neutron-server. -#} -RUN if [ -d /etc/yum.repos.d/not-for-ci/ ]; then \ - cd /etc/yum.repos.d/ && \ - rm ci-{{ base_distro }}.repo && \ - mv not-for-ci/*.repo . && \ - rm -rf not-for-ci; \ - fi; -{% elif base_distro == "debian" %} -RUN sed -i -e "s|\[trusted=yes\] http://{{ nodepool_mirror_host }}|http://deb.debian.org|" \ - -e "s|\[trusted=yes\] http://{{ nodepool_mirror_host }}|http://security.debian.org|" \ - /etc/apt/sources.list -{% elif base_distro == "ubuntu" %} -RUN sed -i -e "s|\[trusted=yes\] http://{{ nodepool_mirror_host }}/ubuntu/|mirror://mirrors.ubuntu.com/mirrors.txt|" \ - -e "s|\[trusted=yes\] http://{{ nodepool_mirror_host }}/ubuntu-cloud-archive|http://ubuntu-cloud.archive.canonical.com/ubuntu|" \ - -e "s|\[trusted=yes\] http://{{ nodepool_mirror_host }}/ubuntu-ports|http://ports.ubuntu.com|" \ - /etc/apt/sources.list -{% endif %} -{% raw %} -{% endblock %} {% endraw %} diff --git a/tests/test_set_config.py b/tests/test_set_config.py index f29650504..831850b0a 100644 --- a/tests/test_set_config.py +++ b/tests/test_set_config.py @@ -32,7 +32,7 @@ def load_module(name, path): # nasty: to import set_config (not a part of the kolla package) this_dir = os.path.dirname(sys.modules[__name__].__file__) set_configs_file = os.path.abspath( - os.path.join(this_dir, '..', + os.path.join(this_dir, '..', 'kolla', 'docker', 'base', 'set_configs.py')) set_configs = load_module('set_configs', set_configs_file) @@ -75,6 +75,67 @@ class LoadFromFile(base.BaseTestCase): self.assertEqual(calls, mo.mock_calls) + @mock.patch('os.path.exists', return_value=True) + def test_load_yaml_ok(self, mock_exists): + in_config = ( + 'command: /bin/true\n' + 'config_files: {}\n' + ) + + mo = mock.mock_open(read_data=in_config) + with mock.patch.object(set_configs, 'open', mo): + config = set_configs.load_config() + self.assertEqual(config['command'], '/bin/true') + + mock_exists.assert_called_with( + '/var/lib/kolla/config_files/config.yaml') + + @mock.patch('os.path.exists', return_value=True) + def test_load_yaml_invalid(self, mock_exists): + in_config = '{' + + mo = mock.mock_open(read_data=in_config) + with mock.patch.object(set_configs, 'open', mo): + self.assertRaises(set_configs.InvalidConfig, + set_configs.load_config) + + @mock.patch('os.path.exists', return_value=False) + def test_load_json_when_no_yaml(self, mock_exists): + in_config = json.dumps({'command': '/bin/true', + 'config_files': {}}) + + mo = mock.mock_open(read_data=in_config) + with mock.patch.object(set_configs, 'open', mo): + config = set_configs.load_config() + self.assertEqual(config['command'], '/bin/true') + + mock_exists.assert_called_with( + '/var/lib/kolla/config_files/config.yaml') + + @mock.patch('os.path.exists', return_value=True) + def test_load_yaml_full_config(self, mock_exists): + in_config = ( + 'command: kolla_toolbox\n' + 'config_files:\n' + '- dest: /etc/rabbitmq/rabbitmq-env.conf\n' + ' source: /var/lib/kolla/config_files/rabbitmq-env.conf\n' + ' owner: rabbitmq\n' + ' perm: \'0600\'\n' + 'permissions:\n' + '- path: /var/log/kolla/ansible.log\n' + ' owner: ansible:kolla\n' + ' perm: \'0664\'\n' + ) + + mo = mock.mock_open(read_data=in_config) + with mock.patch.object(set_configs, 'open', mo): + config = set_configs.load_config() + + self.assertEqual(config['command'], 'kolla_toolbox') + self.assertEqual(len(config['config_files']), 1) + self.assertEqual(config['config_files'][0]['owner'], 'rabbitmq') + self.assertEqual(config['permissions'][0]['perm'], '0664') + FAKE_CONFIG_FILES = [ set_configs.ConfigFile( @@ -894,6 +955,294 @@ class ConfigFileTest(base.BaseTestCase): mock_set_defaults_state.assert_called_once_with(expected_state) +class ValidateConfigDirectoriesTest(base.BaseTestCase): + + def test_validate_config_directories_missing_path(self): + config = { + 'command': '/bin/true', + 'directories': [{'owner': 'myuser', 'perm': '0755'}] + } + self.assertRaises(set_configs.InvalidConfig, + set_configs.validate_config, config) + + def test_validate_config_directories_missing_owner(self): + config = { + 'command': '/bin/true', + 'directories': [{'path': '/var/log/foo', 'perm': '0755'}] + } + self.assertRaises(set_configs.InvalidConfig, + set_configs.validate_config, config) + + def test_validate_config_directories_missing_perm(self): + config = { + 'command': '/bin/true', + 'directories': [{'path': '/var/log/foo', 'owner': 'myuser'}] + } + self.assertRaises(set_configs.InvalidConfig, + set_configs.validate_config, config) + + def test_validate_config_directories_valid(self): + config = { + 'command': '/bin/true', + 'directories': [ + {'path': '/var/log/foo', 'owner': 'myuser', 'perm': '0755'} + ] + } + set_configs.validate_config(config) + + def test_validate_config_directories_glob_rejected(self): + config = { + 'command': '/bin/true', + 'directories': [{'path': '/var/log/*', + 'owner': 'myuser', + 'perm': '0755'}] + } + self.assertRaisesRegex( + set_configs.InvalidConfig, + 'directories config does not support glob paths', + set_configs.validate_config, + config) + + +class CreateDirectoriesTest(base.BaseTestCase): + + @mock.patch.object(set_configs, 'handle_permissions') + @mock.patch('os.makedirs') + @mock.patch('os.path.exists', return_value=False) + def test_create_directory_not_exists(self, mock_exists, mock_makedirs, + mock_handle_permissions): + config = { + 'directories': [ + {'path': '/var/log/foo', 'owner': 'myuser', 'perm': '0755'} + ] + } + set_configs.create_directories(config) + + mock_makedirs.assert_called_once_with('/var/log/foo', exist_ok=True) + mock_handle_permissions.assert_called_once_with( + {'permissions': [ + {'path': '/var/log/foo', 'owner': 'myuser', 'perm': '0755'} + ]} + ) + + @mock.patch.object(set_configs, 'handle_permissions') + @mock.patch('os.makedirs') + @mock.patch('os.path.exists', return_value=True) + def test_create_directory_already_exists(self, mock_exists, mock_makedirs, + mock_handle_permissions): + config = { + 'directories': [ + {'path': '/var/log/foo', 'owner': 'myuser', 'perm': '0755'} + ] + } + set_configs.create_directories(config) + + mock_makedirs.assert_called_once_with('/var/log/foo', exist_ok=True) + mock_handle_permissions.assert_called_once_with( + {'permissions': [ + {'path': '/var/log/foo', 'owner': 'myuser', 'perm': '0755'} + ]} + ) + + @mock.patch.object(set_configs, 'handle_permissions') + @mock.patch('os.makedirs') + @mock.patch('os.path.exists', return_value=False) + def test_create_directories_no_directories_key( + self, mock_exists, mock_makedirs, mock_handle_permissions): + config = {'command': '/bin/true'} + set_configs.create_directories(config) + + mock_exists.assert_not_called() + mock_makedirs.assert_not_called() + mock_handle_permissions.assert_not_called() + + @mock.patch.object(set_configs, 'handle_permissions') + @mock.patch('os.makedirs') + @mock.patch('os.path.exists', return_value=False) + def test_create_multiple_directories(self, mock_exists, mock_makedirs, + mock_handle_permissions): + config = { + 'directories': [ + {'path': '/var/log/foo', 'owner': 'user1', 'perm': '0755'}, + {'path': '/var/log/bar', 'owner': 'user2', 'perm': '0750'}, + ] + } + set_configs.create_directories(config) + + self.assertEqual(mock_makedirs.call_args_list, + [mock.call('/var/log/foo', exist_ok=True), + mock.call('/var/log/bar', exist_ok=True)]) + self.assertEqual(mock_handle_permissions.call_count, 2) + + +class ValidateConfigFilesTest(base.BaseTestCase): + + def test_validate_config_files_missing_path(self): + config = { + 'command': '/bin/true', + 'files': [{'owner': 'myuser', 'perm': '0644'}] + } + self.assertRaisesRegex( + set_configs.InvalidConfig, + 'files config is missing required keys', + set_configs.validate_config, + config) + + def test_validate_config_files_glob_rejected(self): + config = { + 'command': '/bin/true', + 'files': [{'path': '/var/log/*.log', + 'owner': 'myuser', 'perm': '0644'}] + } + self.assertRaisesRegex( + set_configs.InvalidConfig, + 'files config does not support glob paths', + set_configs.validate_config, + config) + + def test_validate_config_files_valid(self): + config = { + 'command': '/bin/true', + 'files': [ + {'path': '/var/log/foo.log', + 'owner': 'myuser', 'perm': '0644'} + ] + } + set_configs.validate_config(config) + + def test_validate_config_files_null_path_rejected(self): + config = { + 'command': '/bin/true', + 'files': [{'path': None, + 'owner': 'myuser', + 'perm': '0644'}] + } + self.assertRaisesRegex( + set_configs.InvalidConfig, + 'files config key "path" must not be null', + set_configs.validate_config, + config) + + +class CreateFilesTest(base.BaseTestCase): + + @mock.patch.object(set_configs, 'handle_permissions') + @mock.patch('builtins.open', new_callable=mock.mock_open) + @mock.patch('os.path.exists', return_value=False) + @mock.patch('os.path.isdir', side_effect=[False, True]) + @mock.patch('os.path.islink', return_value=False) + def test_create_file(self, mock_islink, mock_isdir, mock_exists, + mock_open, mock_handle_permissions): + config = { + 'files': [ + {'path': '/var/log/foo.log', + 'owner': 'myuser', 'perm': '0644'} + ] + } + set_configs.create_files(config) + + mock_open.assert_called_once_with('/var/log/foo.log', 'a') + mock_handle_permissions.assert_called_once_with( + {'permissions': [ + {'path': '/var/log/foo.log', + 'owner': 'myuser', 'perm': '0644'} + ]} + ) + + @mock.patch.object(set_configs, 'handle_permissions') + @mock.patch('builtins.open', new_callable=mock.mock_open) + @mock.patch('os.path.exists', return_value=True) + @mock.patch('os.path.isdir', side_effect=[False, True]) + @mock.patch('os.path.islink', return_value=False) + def test_create_file_already_exists(self, mock_islink, mock_isdir, + mock_exists, mock_open, + mock_handle_permissions): + config = { + 'files': [ + {'path': '/var/log/foo.log', + 'owner': 'myuser', 'perm': '0644'} + ] + } + + set_configs.create_files(config) + + mock_open.assert_not_called() + mock_handle_permissions.assert_called_once_with( + {'permissions': [ + {'path': '/var/log/foo.log', + 'owner': 'myuser', 'perm': '0644'} + ]} + ) + + @mock.patch('os.path.islink', return_value=True) + def test_create_file_rejects_symlink(self, mock_islink): + + config = { + 'files': [ + {'path': '/var/log/foo.log', + 'owner': 'myuser', + 'perm': '0644'} + ] + } + + self.assertRaisesRegex( + OSError, + 'Path is a symbolic link', + set_configs.create_files, + config) + + @mock.patch('os.path.isdir', return_value=True) + @mock.patch('os.path.islink', return_value=False) + def test_create_file_rejects_directory(self, mock_islink, mock_isdir): + + config = { + 'files': [ + {'path': '/var/log/somefile', + 'owner': 'myuser', + 'perm': '0644'} + ] + } + + self.assertRaisesRegex( + OSError, + 'Path is a directory', + set_configs.create_files, + config) + + @mock.patch('os.path.isdir', side_effect=[False, False]) + @mock.patch('os.path.islink', return_value=False) + def test_create_file_rejects_missing_parent(self, mock_islink, + mock_isdir): + config = { + 'files': [ + {'path': '/var/log/foo.log', + 'owner': 'myuser', + 'perm': '0644'} + ] + } + + self.assertRaisesRegex( + OSError, + 'Parent directory does not exist', + set_configs.create_files, + config) + + @mock.patch.object(set_configs, 'handle_permissions') + @mock.patch('os.path.exists') + @mock.patch('os.path.isdir') + @mock.patch('os.path.islink') + def test_create_files_no_files_key(self, mock_islink, mock_isdir, + mock_exists, + mock_handle_permissions): + config = {'command': '/bin/true'} + set_configs.create_files(config) + + mock_islink.assert_not_called() + mock_isdir.assert_not_called() + mock_exists.assert_not_called() + mock_handle_permissions.assert_not_called() + + class ExecuteConfigCheckStateMismatchTest(base.BaseTestCase): @mock.patch.object(set_configs, 'get_defaults_state') @@ -936,3 +1285,63 @@ class ExecuteConfigCheckStateMismatchTest(base.BaseTestCase): self.assertRaises(set_configs.StateMismatch, set_configs.execute_config_check, config) + + +class HandlePermissionsPermParsingTest(base.BaseTestCase): + + def _assert_permission(self, input_perm, expected_perm, is_dir=False): + path = '/var/log/kolla/glance' + config = { + 'permissions': [ + { + 'path': path, + 'owner': 'glance:glance', + 'perm': input_perm, + } + ] + } + + with mock.patch('pwd.getpwnam') as mock_getpwnam, \ + mock.patch('grp.getgrnam') as mock_getgrnam, \ + mock.patch('glob.glob', return_value=[path]) as mock_glob, \ + mock.patch('os.path.exists', + return_value=True) as mock_exists, \ + mock.patch('os.path.isdir', + return_value=is_dir) as mock_isdir, \ + mock.patch('os.chown') as mock_chown, \ + mock.patch('os.chmod') as mock_chmod: + mock_getpwnam.return_value.pw_uid = 4242 + mock_getgrnam.return_value.gr_gid = 4243 + + set_configs.handle_permissions(config) + + mock_getpwnam.assert_called_once_with('glance') + mock_getgrnam.assert_called_once_with('glance') + mock_glob.assert_called_once_with(path) + mock_exists.assert_called_once_with(path) + mock_isdir.assert_called_once_with(path) + mock_chown.assert_called_once_with(path, 4242, 4243) + mock_chmod.assert_called_once_with(path, expected_perm) + + def test_handle_permissions_accepts_valid_permission_notations(self): + """Test valid permission notations.""" + permissions = ( + ('644', 0o644), + ('755', 0o755), + ('0644', 0o644), + ('0755', 0o755), + ('0o644', 0o644), + ('0o755', 0o755), + ('1777', 0o1777), + ('2775', 0o2775), + ('0o2775', 0o2775), + ('4755', 0o4755), + ) + + for input_perm, expected_perm in permissions: + with self.subTest(input_perm=input_perm): + self._assert_permission(input_perm, expected_perm) + + def test_handle_permissions_adds_execute_bits_for_directories(self): + """Test execute bits are added to readable directories.""" + self._assert_permission('0644', 0o755, is_dir=True) diff --git a/tests/vars/zuul.yml b/tests/vars/zuul.yml index dbcc01d19..b2962b85b 100644 --- a/tests/vars/zuul.yml +++ b/tests/vars/zuul.yml @@ -3,7 +3,6 @@ nodepool_rdo_proxy: "http://{{ zuul_site_mirror_fqdn }}:8080/rdo" nodepool_pypi_mirror: "http://{{ zuul_site_mirror_fqdn }}:8080/pypi/simple" nodepool_mirror_host: "{{ zuul_site_mirror_fqdn }}" nodepool_npmjs_proxy: "http://{{ zuul_site_mirror_fqdn }}:8080/registry.npmjs/" -nodepool_cbs_centos_proxy: "http://{{ zuul_site_mirror_fqdn }}:8080/cbs.centos" nodepool_docker_proxy: "http://{{ zuul_site_mirror_fqdn }}:8080/docker" # NOTE(hrw): wheel cache goes over 80/443 not on 8080 diff --git a/tools/check_sources.py b/tools/check_sources.py new file mode 100644 index 000000000..38fc03acc --- /dev/null +++ b/tools/check_sources.py @@ -0,0 +1,371 @@ +# 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. + +import argparse +import os +import re +import shutil +import subprocess # nosec +import sys +import textwrap + +import requests +import yaml + + +def github_headers(): + """Return auth headers if GITHUB_TOKEN is set, otherwise empty dict.""" + token = os.environ.get('GITHUB_TOKEN') + if token: + return {'Authorization': f'Bearer {token}'} + return {} + + +def check_github_rate_limit(): + """Warn if GitHub API rate limit is exhausted or nearly so.""" + try: + response = requests.get( + "https://api.github.com/rate_limit", + headers=github_headers(), timeout=10) + if response.status_code != 200: + return + data = response.json()['rate'] + remaining = data['remaining'] + limit = data['limit'] + if remaining == 0: + print(f"ERROR: GitHub API rate limit exhausted " + f"(0/{limit}). Set GITHUB_TOKEN to raise the limit.") + sys.exit(1) + if remaining < 10: + print(f"WARNING: GitHub API rate limit low " + f"({remaining}/{limit} remaining).") + except Exception: + print("ERROR: Could not check GitHub rate limits") + raise + + +_PRERELEASE_RE = re.compile(r'alpha|beta|rc', re.IGNORECASE) + + +def is_prerelease(tag, release_data=None): + if release_data and release_data.get('prerelease'): + return True + return bool(_PRERELEASE_RE.search(tag)) + + +def get_github_details(location): + """Extracts user and repo from GitHub URL.""" + match = re.search(r'github\.com/([^/]+)/([^/]+)', location) + if not match: + return None, None + user, repo = match.groups() + repo = repo.replace('.git', '').split('/')[0] + return user, repo + + +def get_latest_release_info(user, repo, arch_map, lts_branch=None): + """Fetch latest tag and find sha256 checksums from assets. + + :param user: GitHub username + :param repo: GitHub repository name + :param arch_map: dict of {kolla_arch: github_arch_string} + :param lts_branch: if set (e.g. '3.5'), only consider releases in that + major.minor series + :returns: tuple (tag, hashes_dict) + """ + url = f"https://api.github.com/repos/{user}/{repo}/releases/latest" + if lts_branch: + url = (f"https://api.github.com/repos/{user}/{repo}/releases?" + f"per_page=100") + try: + response = requests.get(url, headers=github_headers(), timeout=10) + if response.status_code not in (200, 404): + return None, {} + + if lts_branch and response.status_code == 200: + releases = [ + r for r in response.json() + if not is_prerelease(r['tag_name'].lstrip('v'), r) + and r['tag_name'].lstrip('v').startswith(lts_branch + '.') + ] + if not releases: + return None, {} + data = releases[0] + elif response.status_code == 404: + tag_resp = requests.get( + f"https://api.github.com/repos/{user}/{repo}/tags", + headers=github_headers(), timeout=10) + if tag_resp.status_code == 200 and tag_resp.json(): + stable_tags = [t for t in tag_resp.json() + if not is_prerelease(t['name'].lstrip('v'))] + if stable_tags: + tag = stable_tags[0]['name'].lstrip('v') + return tag, {} + return None, {} + + else: + data = response.json() + tag = data['tag_name'].lstrip('v') + + if is_prerelease(tag, data): + rel_resp = requests.get( + f"https://api.github.com/repos/{user}/{repo}/releases", + headers=github_headers(), timeout=10) + if rel_resp.status_code != 200: + return None, {} + stable = next((r for r in rel_resp.json() + if not is_prerelease(r['tag_name'].lstrip('v'), r)), + None) + if not stable: + return None, {} + tag = stable['tag_name'].lstrip('v') + data = stable + + hashes = {} + + # Try reading sha256 from the digest field on each asset directly. + # Skip supplementary files (sbom, sig, etc.) + skip_suffixes = ('.sbom.json', '.sig', '.pem', '.crt', '.asc') + for asset in data['assets']: + digest = asset.get('digest', '') + if not digest.startswith('sha256:'): + continue + if any(asset['name'].endswith(s) for s in skip_suffixes): + continue + sha = digest.split(':', 1)[1] + for kolla_arch, github_arch in arch_map.items(): + # Match flexibly: split on - or _ and check each part is there. + # This handles both linux-amd64 and linux_amd64 naming styles. + parts = re.split(r'[-_]', github_arch) + if all(p in asset['name'] for p in parts): + hashes[kolla_arch] = sha + + # Fall back to a separate checksum file if digests weren't found + if len(hashes) < len(arch_map): + checksum_asset = next( + (a for a in data['assets'] if "checksum" in a['name'].lower() + or "sha256" in a['name'].lower()), None + ) + + if checksum_asset: + sum_resp = requests.get( + checksum_asset['browser_download_url'], timeout=10) + if sum_resp.status_code == 200: + content = sum_resp.text + for kolla_arch, github_arch in arch_map.items(): + if kolla_arch not in hashes: + # Accept both - and _ as separators in filenames + flexible = github_arch.replace('-', '[-_]') + pattern = rf"([a-fA-F0-9]{{64}})\s+.*{flexible}.*" + match = re.search(pattern, content) + if match: + hashes[kolla_arch] = match.group(1) + + return tag, hashes + except Exception: + return None, {} + + +def get_helm_sh_hashes(version, arch_map): + """Fetch sha256 checksums from get.helm.sh for a given Helm version. + + :param version: version string (with or without leading 'v') + :param arch_map: dict of {kolla_arch: github_arch_string} + :returns: dict of {kolla_arch: sha256_hex} + """ + hashes = {} + version = version.lstrip('v') + for kolla_arch, github_arch in arch_map.items(): + url = (f"https://get.helm.sh/helm-v{version}" + f"-{github_arch}.tar.gz.sha256sum") + try: + resp = requests.get(url, timeout=10) + if resp.status_code == 200: + sha = resp.text.split()[0] + if re.match(r'^[a-fA-F0-9]{64}$', sha): + hashes[kolla_arch] = sha + except Exception: + print("ERROR: GitHub connection failed") + raise + return hashes + + +def apply_update(name, info, new_v, new_hashes, sources_path): + """Update version and sha256 entries for one source in sources.yaml.""" + with open(sources_path) as f: + content = f.read() + + version_key = 'reference' if info.get('type') == 'git' else 'version' + old_v = info.get(version_key, '') + if old_v: + new_v_str = ('v' + new_v) if old_v.startswith('v') else new_v + content = content.replace( + f'{version_key}: "{old_v}"', + f'{version_key}: "{new_v_str}"', 1) + + for arch, new_sha in new_hashes.items(): + old_sha = info.get('sha256', {}).get(arch, '') + if old_sha and old_sha != new_sha: + content = content.replace(old_sha, new_sha) + + with open(sources_path, 'w') as f: + f.write(content) + + +def create_releasenote(changes, repo_root): + """Create a reno release note listing all updated components. + + :param changes: list of (name, old_version, new_version) tuples + :param repo_root: root of the kolla repository checkout + """ + if len(changes) == 1: + slug = f"update-{changes[0][0]}" + else: + slug = "update-external-components" + + result = subprocess.run( # nosec + ['reno', 'new', slug, repo_root], + capture_output=True, text=True) + + if result.returncode != 0: + print(f"ERROR: reno failed: {result.stderr.strip()}") + return + + # reno prints: "Created new notes file in <path>" + note_path = result.stdout.strip().split()[-1] + + lines = ["---", "upgrade:"] + for name, old_v, new_v in changes: + lines.append(" - |") + text = (f"``{name}`` has been updated from " + f"``{old_v.lstrip('v')}`` to ``{new_v.lstrip('v')}``.") + lines.append(textwrap.fill( + text, width=79, initial_indent=' ', + subsequent_indent=' ')) + + with open(note_path, 'w') as f: + f.write('\n'.join(lines) + '\n') + + print(f"Created release note: {note_path}") + + +def check_versions(sources, sources_path, repo_root, update=False): + """Monitor Kolla architectures and compare with latest releases. + + :param sources: the kolla.common.sources.SOURCES dict + :param sources_path: path to the sources.yaml file to update + :param repo_root: root of the kolla repository checkout + """ + check_github_rate_limit() + arch_map = {'amd64': 'linux-amd64', 'arm64': 'linux-arm64'} + version_changes = [] + + header = (f"{'COMPONENT':<40} | {'CURR VER':<10} | " + f"{'LATEST':<15} | {'ARCH':<7} | {'NEW SHA256'}") + print(header) + print("-" * 110) + + for name, info in sources.items(): + current_v = info.get('version') or info.get('reference', '') + if not re.match(r'^v?\d+[\.\d]+', current_v or ''): + current_v = None + location = info.get('location', '') + github = info.get('github', '') + + if current_v and ('github.com' in location or github): + if github: + user, repo = github.split('/', 1) + else: + user, repo = get_github_details(location) + if not user: + continue + + latest_v, new_hashes = get_latest_release_info( + user, repo, arch_map, + lts_branch=info.get('lts_branch') + ) + + if latest_v and len(new_hashes) < len(arch_map): + if 'get.helm.sh' in location: + new_hashes.update(get_helm_sh_hashes(latest_v, arch_map)) + + if latest_v: + status_v = "UPDATE" if latest_v != current_v.lstrip('v') \ + else "OK" + + lines_to_print = [] + for arch in arch_map.keys(): + new_sha = new_hashes.get(arch, 'Not Found') + current_sha = info.get('sha256', {}).get(arch) + + line = (f"{name:<40} | {current_v:<10} | " + f"{latest_v:<15} | {arch:<7} | {new_sha}") + + if status_v == "UPDATE" or (new_sha != 'Not Found' + and new_sha != current_sha): + lines_to_print.append(line) + + for line in lines_to_print: + print(line) + + if update and lines_to_print: + apply_update(name, info, latest_v, new_hashes, + sources_path) + if status_v == "UPDATE": + version_changes.append( + (name, current_v, latest_v)) + + if update and version_changes: + create_releasenote(version_changes, repo_root) + + +def parse_args(): + parser = argparse.ArgumentParser( + description='Check and optionally update Kolla source versions.') + parser.add_argument('--repo', default=None, + help='Path to the kolla repository checkout ' + '(default: the checkout this script lives in, ' + 'if any, otherwise the current directory)') + parser.add_argument('--update', action='store_true', + help='Update kolla/common/sources.yaml in place') + return parser.parse_args() + + +def default_repo_root(): + """Guess the repo root when run in-tree from <repo>/tools/.""" + in_tree = os.path.normpath( + os.path.join(os.path.dirname(os.path.abspath(__file__)), '..')) + if os.path.isfile( + os.path.join(in_tree, 'kolla', 'common', 'sources.yaml')): + return in_tree + return os.getcwd() + + +if __name__ == "__main__": + args = parse_args() + if args.update and not shutil.which('reno'): + print("ERROR: 'reno' is not installed or not in PATH. " + "Install it with: pip install reno") + sys.exit(1) + + repo_root = os.path.abspath(args.repo or default_repo_root()) + sources_path = os.path.join( + repo_root, 'kolla', 'common', 'sources.yaml') + if not os.path.isfile(sources_path): + print(f"ERROR: {sources_path} not found. Pass --repo pointing at " + "a kolla repository checkout.") + sys.exit(1) + + with open(sources_path) as f: + SOURCES = yaml.safe_load(f) + + check_versions(SOURCES, sources_path, repo_root, update=args.update) diff --git a/tools/validate-all-file.py b/tools/validate-all-file.py index 67f03218a..12a50a70c 100755 --- a/tools/validate-all-file.py +++ b/tools/validate-all-file.py @@ -21,6 +21,7 @@ import re import sys import jinja2 +import jinja2.sandbox PROJECT_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) @@ -75,7 +76,7 @@ def check_json_j2(): return collections.defaultdict(hostvars) def validate_json_j2(root, filename): - env = jinja2.Environment( # nosec: not used to render HTML + env = jinja2.sandbox.SandboxedEnvironment( loader=jinja2.FileSystemLoader(root)) env.filters['bool'] = bool_filter template = env.get_template(filename) diff --git a/tools/validate-build-sources-overrides.py b/tools/validate-build-sources-overrides.py new file mode 100644 index 000000000..5d9db62f5 --- /dev/null +++ b/tools/validate-build-sources-overrides.py @@ -0,0 +1,175 @@ +#!/usr/bin/env python3 + +# 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. + +"""Check that every buildable-from-source entry in kolla/common/sources.yaml +has a matching CI override in +roles/kolla-build-config/defaults/main.yml (kolla_build_sources), that +each such project is declared in the kolla-base job's required-projects +in zuul.d/base.yaml, and that any pinned git reference in sources.yaml +matches the override-checkout used to fetch it in CI. This ensures CI +builds every source from a Zuul-cached git checkout instead of +downloading a tarball from tarballs.opendev.org. +""" + +import os +import sys + +import yaml + +PROJECT_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) +sys.path.append(PROJECT_ROOT) + +from kolla.common.sources import SOURCES # noqa: E402 + +BUILD_SOURCES_PATH = os.path.join( + PROJECT_ROOT, 'roles', 'kolla-build-config', 'defaults', 'main.yml') +ZUUL_BASE_PATH = os.path.join(PROJECT_ROOT, 'zuul.d', 'base.yaml') + +# Sources deliberately not covered by kolla_build_sources, with the +# reason a git-checkout override doesn't apply to them. +EXCLUDED_SOURCES = { + # Binary releases downloaded from GitHub, not built from a source + # checkout. + 'etcd', + 'letsencrypt-lego', + 'magnum-conductor-plugin-helm', + # GitHub projects that are not registered with the OpenStack Zuul + # tenant (unlike gnocchixyz/gnocchi), so they can't be required-projects. + 'kerbside-base', + 'mariadb-server-plugin-mariadb-docker', +} + + +def is_excluded(name): + return name in EXCLUDED_SOURCES or name.startswith('prometheus-') + + +def as_list(section_names): + if isinstance(section_names, str): + return [section_names] + return list(section_names) + + +def load_kolla_build_sources(): + with open(BUILD_SOURCES_PATH) as f: + return yaml.safe_load(f)['kolla_build_sources'] + + +def load_required_projects(): + """Parse the kolla-base job's required-projects in zuul.d/base.yaml. + + Returns (all project names, {project: override-checkout}). + """ + with open(ZUUL_BASE_PATH) as f: + docs = yaml.safe_load(f) + + job = next(doc['job'] for doc in docs + if 'job' in doc and doc['job']['name'] == 'kolla-base') + + all_projects = set() + checkouts = {} + for entry in job.get('required-projects', []): + if isinstance(entry, str): + all_projects.add(entry) + else: + all_projects.add(entry['name']) + if 'override-checkout' in entry: + checkouts[entry['name']] = entry['override-checkout'] + return all_projects, checkouts + + +def main(): + kolla_build_sources = load_kolla_build_sources() + required_projects, override_checkouts = load_required_projects() + + covered = set() + for section_names in kolla_build_sources.values(): + covered.update(as_list(section_names)) + + buildable = {name for name in SOURCES if not is_excluded(name)} + + missing = sorted(buildable - covered) + stale = sorted(covered - set(SOURCES)) + redundant_exclusions = sorted( + name for name in EXCLUDED_SOURCES if name not in SOURCES) + not_required = sorted(set(kolla_build_sources) - required_projects) + + ref_errors = [] + for project, section_names in sorted(kolla_build_sources.items()): + for section in as_list(section_names): + info = SOURCES.get(section) + if not info or info.get('type') != 'git': + continue + expected_ref = info.get('reference') + actual = override_checkouts.get(project) + if actual is None: + ref_errors.append( + f"{project} ({section}) is pinned to reference " + f"'{expected_ref}' in sources.yaml but has no " + "override-checkout in zuul.d/base.yaml " + "required-projects") + elif actual != expected_ref: + ref_errors.append( + f"{project} ({section}): sources.yaml reference " + f"'{expected_ref}' != required-projects " + f"override-checkout '{actual}'") + + for project, checkout in sorted(override_checkouts.items()): + section_names = kolla_build_sources.get(project) + if section_names is None: + continue + git_sections = [s for s in as_list(section_names) + if SOURCES.get(s, {}).get('type') == 'git'] + if not git_sections: + ref_errors.append( + f"{project} has override-checkout '{checkout}' in " + "required-projects but none of its kolla_build_sources " + "sections are type 'git' in sources.yaml") + + if missing: + print("ERROR: sources.yaml entries missing a kolla_build_sources " + "override in roles/kolla-build-config/defaults/main.yml:") + for name in missing: + print(f" {name}") + + if stale: + print("ERROR: kolla_build_sources overrides referencing sections " + "that no longer exist in kolla/common/sources.yaml:") + for name in stale: + print(f" {name}") + + if redundant_exclusions: + print("ERROR: EXCLUDED_SOURCES entries referencing sections that " + "no longer exist in kolla/common/sources.yaml, remove them:") + for name in redundant_exclusions: + print(f" {name}") + + if not_required: + print("ERROR: kolla_build_sources projects missing from the " + "kolla-base job's required-projects in zuul.d/base.yaml:") + for name in not_required: + print(f" {name}") + + if ref_errors: + print("ERROR: git reference mismatches between sources.yaml and " + "zuul.d/base.yaml required-projects:") + for msg in ref_errors: + print(f" {msg}") + + return 1 if (missing or stale or redundant_exclusions or not_required + or ref_errors) else 0 + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/tools/version-check.py b/tools/version-check.py index 245503302..d2b04daea 100755 --- a/tools/version-check.py +++ b/tools/version-check.py @@ -41,7 +41,6 @@ TARGET = '.releases' SKIP_PROJECTS = { 'gnocchi-base': 'Gnocchi is not managed by openstack/releases project', - 'monasca-thresh': 'Package not published in tarballs.openstack.org', } # NOTE(hrw): those projects we take as they are they may have just one old @@ -52,7 +51,6 @@ ALWAYS_USE_VERSION_PROJECTS = { # NOTE(hrw): those projects have different names for release tarballs (first # column) and other for branch tarballs RENAME_PROJECTS = { - 'kuryr-lib': 'kuryr', 'openstack-cyborg': 'cyborg', 'openstack-heat': 'heat', 'openstack-placement': 'placement', @@ -1,10 +1,8 @@ [tox] minversion = 3.18 envlist = pep8,py310-{docker,podman} -ignore_basepython_conflict = True [testenv] -basepython = python3 usedevelop = True allowlist_externals = find rm @@ -44,7 +42,9 @@ commands = [testenv:pep8] deps = - {[testenv]deps} + -r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt + -r{toxinidir}/lint-requirements.txt codespell allowlist_externals = bash commands = @@ -52,8 +52,9 @@ commands = flake8 {posargs} bash {toxinidir}/tools/validate-all-dockerfiles.sh python {toxinidir}/tools/validate-all-file.py + python {toxinidir}/tools/validate-build-sources-overrides.py bandit -r docker kolla tests tools - codespell -I {toxinidir}/.codespell-ignore + codespell -I {toxinidir}/.codespell-ignore -x zuul.d/secrets.yaml ansible-galaxy collection install -r test-requirements.yml ansible-lint @@ -96,6 +97,15 @@ commands = doc8 -e '.yaml' releasenotes/notes/ sphinx-build -a -E -W -d releasenotes/build/doctrees --keep-going -b html releasenotes/source releasenotes/build/html +[doc8] +ignore-path = releasenotes/notes/bug-2111620-e40e1dec6fed309f.yaml, + releasenotes/notes/bug-2112140-41a1924c260e531c.yaml, + releasenotes/notes/debian-trixie-23987480043dc662.yaml, + releasenotes/notes/flamingo-prelude-b72f2599ed9d25d5.yaml, + releasenotes/notes/handle-deprecated-rabbitmq-package-archive-47548e7a41baa68b.yaml, + releasenotes/notes/image-purpose-1884e00f993e09d0.yaml, + releasenotes/notes/rocky-10-4111fa0160be14ab.yaml + [flake8] show-source = True enable-extensions = H203,H106 diff --git a/zuul.d/base.yaml b/zuul.d/base.yaml new file mode 100644 index 000000000..21cc98371 --- /dev/null +++ b/zuul.d/base.yaml @@ -0,0 +1,110 @@ +--- +- job: + name: kolla-base + parent: base + timeout: 10800 + post-timeout: 10800 + pre-run: tests/playbooks/pre.yml + run: tests/playbooks/run.yml + post-run: tests/playbooks/post.yml + attempts: 5 + roles: + - zuul: openstack/ansible-collection-kolla + required-projects: + - name: gnocchixyz/gnocchi + override-checkout: 4.7.0 + - openstack/aodh + - openstack/barbican + - openstack/bifrost + - openstack/blazar + - openstack/blazar-dashboard + - openstack/blazar-nova + - openstack/ceilometer + - openstack/cinder + - openstack/cloudkitty + - openstack/cloudkitty-dashboard + - openstack/cyborg + - openstack/designate + - openstack/designate-dashboard + - openstack/glance + - openstack/heat + - openstack/heat-dashboard + - openstack/horizon + - openstack/ironic + - openstack/ironic-prometheus-exporter + - openstack/ironic-ui + - openstack/keystone + - openstack/magnum + - openstack/magnum-ui + - openstack/manila + - openstack/manila-ui + - openstack/masakari + - openstack/masakari-dashboard + - openstack/masakari-monitors + - openstack/mistral + - openstack/mistral-dashboard + - openstack/networking-baremetal + - openstack/networking-generic-switch + - openstack/networking-sfc + - openstack/neutron + - openstack/neutron-dynamic-routing + - openstack/neutron-fwaas + - openstack/neutron-fwaas-dashboard + - openstack/neutron-vpnaas + - openstack/neutron-vpnaas-dashboard + - openstack/nova + - openstack/octavia + - openstack/octavia-dashboard + - openstack/ovn-octavia-provider + - openstack/placement + - openstack/requirements + - openstack/skyline-apiserver + - openstack/skyline-console + - openstack/tacker + - openstack/tacker-horizon + - openstack/tap-as-a-service + - openstack/trove + - openstack/trove-dashboard + - openstack/watcher + - openstack/watcher-dashboard + irrelevant-files: + - ^.*\.md$ + - ^.*\.rst$ + - ^\..+ + - ^contrib/ + - ^doc/.* + - ^etc/.* + - ^LICENSE$ + - ^lint-requirements.txt$ + - ^releasenotes/.*$ + - ^specs/.*$ + - ^test-requirements.txt$ + - ^tests/playbooks/copr-erlang-update.yml$ + - ^tox\.ini$ + - ^zuul\.d/ + vars: + base_arch: "{{ 'aarch64' if 'arm64' in zuul.job else 'x86_64' }}" + base_distro: "{{ zuul.job.split('-').2 }}" + base_distro_version: "{{ zuul.job.split('-').3 }}" + publisher: false + container_engine: "docker" + extra-vars: + kolla_logs_dir: "{{ zuul_output_dir }}/logs/kolla" + kolla_build_logs_dir: "{{ kolla_logs_dir }}/build" + virtualenv_path: "/tmp/kolla-virtualenv" + kolla_build_template_overrides_path: "{{ zuul.executor.work_root }}/\ + {{ zuul.projects['opendev.org/openstack/kolla'].src_dir }}\ + /tests/templates/template_overrides.j2" + +- job: + name: kolla-base-podman + parent: kolla-base + vars: + container_engine: "podman" + configure_ephemeral_mountpoint: "/var/lib/containers" + +- job: + name: kolla-build-no-infra-wheels-base + parent: kolla-base + vars: + use_infra_wheels_mirror: false diff --git a/zuul.d/debian.yaml b/zuul.d/debian.yaml new file mode 100644 index 000000000..1e7cda822 --- /dev/null +++ b/zuul.d/debian.yaml @@ -0,0 +1,70 @@ +--- +- job: + name: kolla-build-debian-trixie + parent: kolla-base + nodeset: kolla-debian-trixie-8GB + +- job: + name: kolla-build-debian-trixie-podman + parent: kolla-base-podman + nodeset: kolla-debian-trixie-8GB + +- job: + name: kolla-build-debian-trixie-arm64 + parent: kolla-build-debian-trixie + nodeset: kolla-debian-trixie-arm64-8GB + voting: false + +- job: + name: kolla-publish-debian-trixie-quay + parent: kolla-build-debian-trixie + post-run: tests/playbooks/publish.yml + vars: + publisher: true + kolla_registry: quay.io + kolla_namespace: openstack.kolla + secrets: + - name: kolla_quay_io_creds + secret: kolla_quay_io_creds_jan_2026 + +- job: + name: kolla-publish-debian-trixie-arm64-quay + parent: kolla-build-debian-trixie-arm64 + post-run: tests/playbooks/publish.yml + vars: + publisher: true + kolla_registry: quay.io + kolla_namespace: openstack.kolla + secrets: + - name: kolla_quay_io_creds + secret: kolla_quay_io_creds_jan_2026 + +- job: + name: kolla-build-debian-trixie-no-infra-wheels + parent: kolla-build-no-infra-wheels-base + nodeset: kolla-debian-trixie-8GB + +- project-template: + name: kolla-build-debian + description: | + Runs Kolla Debian build jobs. + check: + jobs: + - kolla-build-debian-trixie + - kolla-build-debian-trixie-podman + check-arm64: + jobs: + - kolla-build-debian-trixie-arm64 + gate: + jobs: + - kolla-build-debian-trixie + - kolla-build-debian-trixie-podman + experimental: + jobs: + - kolla-build-debian-trixie-no-infra-wheels + periodic: + jobs: + - kolla-publish-debian-trixie-quay + periodic-weekly: + jobs: + - kolla-publish-debian-trixie-arm64-quay diff --git a/zuul.d/nodesets.yaml b/zuul.d/nodesets.yaml new file mode 100644 index 000000000..ccb3513f0 --- /dev/null +++ b/zuul.d/nodesets.yaml @@ -0,0 +1,47 @@ +--- +- nodeset: + name: kolla-debian-bookworm-8GB + nodes: + - name: primary + label: debian-bookworm-8GB +- nodeset: + name: kolla-debian-bookworm-arm64-8GB + nodes: + - name: primary + label: debian-bookworm-arm64-8GB + +- nodeset: + name: kolla-debian-trixie-8GB + nodes: + - name: primary + label: debian-trixie-8GB + +- nodeset: + name: kolla-debian-trixie-arm64-8GB + nodes: + - name: primary + label: debian-trixie-arm64-8GB + +- nodeset: + name: kolla-rocky-10-8GB + nodes: + - name: primary + label: rockylinux-10-8GB + +- nodeset: + name: kolla-rocky-10-arm64-8GB + nodes: + - name: primary + label: rockylinux-10-arm64-8GB + +- nodeset: + name: kolla-ubuntu-noble-8GB + nodes: + - name: primary + label: ubuntu-noble-8GB + +- nodeset: + name: kolla-ubuntu-noble-arm64-8GB + nodes: + - name: primary + label: ubuntu-noble-arm64-8GB diff --git a/zuul.d/periodics/copr.yaml b/zuul.d/periodics/copr.yaml new file mode 100644 index 000000000..7d1cf1651 --- /dev/null +++ b/zuul.d/periodics/copr.yaml @@ -0,0 +1,21 @@ +--- +- job: + name: kolla-copr-erlang-update + parent: base + branches: master + nodeset: kolla-ubuntu-noble-8GB + timeout: 3600 + run: tests/playbooks/copr-erlang-update.yml + secrets: + - name: kolla_copr_erlang26 + secret: kolla_copr_erlang26_jul_2026 + - name: kolla_copr_erlang27 + secret: kolla_copr_erlang27_jul_2026 + +- project-template: + name: kolla-periodic-copr + description: | + Runs Kolla COPR repository refresh periodic jobs. + periodic: + jobs: + - kolla-copr-erlang-update diff --git a/zuul.d/project.yaml b/zuul.d/project.yaml new file mode 100644 index 000000000..782a5c640 --- /dev/null +++ b/zuul.d/project.yaml @@ -0,0 +1,30 @@ +--- +- project: + queue: kolla + +- project: + templates: + - check-requirements + - kolla-build-debian + - kolla-build-rocky + - kolla-build-ubuntu + - kolla-periodic-copr + - kolla-scenario-aio + - kolla-scenario-bifrost + - kolla-scenario-cells + - kolla-scenario-cephadm + - kolla-scenario-ironic + - kolla-scenario-lets-encrypt + - kolla-scenario-mariadb + - kolla-scenario-masakari + - kolla-scenario-octavia + - kolla-scenario-ovn + - kolla-scenario-prometheus-opensearch + - kolla-scenario-telemetry + - kolla-tox-genconfig + - openstack-python3-jobs + - openstack-python3-jobs-arm64 + - openstack-cover-jobs + - periodic-stable-jobs + - publish-openstack-docs-pti + - release-notes-jobs-python3 diff --git a/zuul.d/rocky.yaml b/zuul.d/rocky.yaml new file mode 100644 index 000000000..45c37793e --- /dev/null +++ b/zuul.d/rocky.yaml @@ -0,0 +1,70 @@ +--- +- job: + name: kolla-build-rocky-10 + parent: kolla-base + nodeset: kolla-rocky-10-8GB + +- job: + name: kolla-build-rocky-10-podman + parent: kolla-base-podman + nodeset: kolla-rocky-10-8GB + +- job: + name: kolla-build-rocky-10-arm64 + parent: kolla-build-rocky-10 + nodeset: kolla-rocky-10-arm64-8GB + voting: false + +- job: + name: kolla-build-rocky-10-no-infra-wheels + parent: kolla-build-no-infra-wheels-base + nodeset: kolla-rocky-10-8GB + +- job: + name: kolla-publish-rocky-10-quay + parent: kolla-build-rocky-10 + post-run: tests/playbooks/publish.yml + vars: + publisher: true + kolla_registry: quay.io + kolla_namespace: openstack.kolla + secrets: + - name: kolla_quay_io_creds + secret: kolla_quay_io_creds_jan_2026 + +- job: + name: kolla-publish-rocky-10-arm64-quay + parent: kolla-build-rocky-10-arm64 + post-run: tests/playbooks/publish.yml + vars: + publisher: true + kolla_registry: quay.io + kolla_namespace: openstack.kolla + secrets: + - name: kolla_quay_io_creds + secret: kolla_quay_io_creds_jan_2026 + +- project-template: + name: kolla-build-rocky + description: | + Runs Kolla Rocky Linux build jobs. + check: + jobs: + - kolla-build-rocky-10 + - kolla-build-rocky-10-podman + check-arm64: + jobs: + - kolla-build-rocky-10-arm64 + experimental: + jobs: + - kolla-build-rocky-10-no-infra-wheels + gate: + jobs: + - kolla-build-rocky-10 + - kolla-build-rocky-10-podman + periodic: + jobs: + - kolla-publish-rocky-10-quay + periodic-weekly: + jobs: + - kolla-publish-rocky-10-arm64-quay diff --git a/zuul.d/scenarios/aio.yaml b/zuul.d/scenarios/aio.yaml new file mode 100644 index 000000000..0d2258848 --- /dev/null +++ b/zuul.d/scenarios/aio.yaml @@ -0,0 +1,27 @@ +--- +- project-template: + name: kolla-scenario-aio + description: | + Runs Kolla-Ansible AIO jobs on all Kolla changes. + check: + jobs: + - kolla-ansible-debian-trixie: &files + files: + - ^kolla/common/sources.yaml + - ^kolla/docker/ + - kolla-ansible-debian-trixie-upgrade: *files + - kolla-ansible-rocky-10: *files + - kolla-ansible-rocky-10-upgrade: *files + - kolla-ansible-ubuntu-noble: *files + - kolla-ansible-ubuntu-noble-upgrade: *files + check-arm64: + jobs: + - kolla-ansible-debian-trixie-aarch64: *files + gate: + jobs: + - kolla-ansible-debian-trixie: *files + - kolla-ansible-debian-trixie-upgrade: *files + - kolla-ansible-rocky-10: *files + - kolla-ansible-rocky-10-upgrade: *files + - kolla-ansible-ubuntu-noble: *files + - kolla-ansible-ubuntu-noble-upgrade: *files diff --git a/zuul.d/scenarios/bifrost.yaml b/zuul.d/scenarios/bifrost.yaml new file mode 100644 index 000000000..a8eeb4154 --- /dev/null +++ b/zuul.d/scenarios/bifrost.yaml @@ -0,0 +1,11 @@ +--- +- project-template: + name: kolla-scenario-bifrost + description: | + Runs Kolla-Ansible Bifrost scenario jobs on particular Kolla changes. + check: + jobs: + - kolla-ansible-debian-trixie-bifrost: &files + files: ^kolla/docker/bifrost/ + - kolla-ansible-rocky-10-bifrost: *files + - kolla-ansible-ubuntu-noble-bifrost: *files diff --git a/zuul.d/scenarios/cells.yaml b/zuul.d/scenarios/cells.yaml new file mode 100644 index 000000000..ed0ad5f7a --- /dev/null +++ b/zuul.d/scenarios/cells.yaml @@ -0,0 +1,11 @@ +--- +- project-template: + name: kolla-scenario-cells + description: | + Runs Kolla-Ansible Nova Cells scenario jobs on particular Kolla changes. + check: + jobs: + - kolla-ansible-debian-trixie-cells: &files + files: ^docker/docker/proxysql/ + - kolla-ansible-rocky-10-cells: *files + - kolla-ansible-ubuntu-noble-cells: *files diff --git a/zuul.d/scenarios/cephadm.yaml b/zuul.d/scenarios/cephadm.yaml new file mode 100644 index 000000000..06f48209b --- /dev/null +++ b/zuul.d/scenarios/cephadm.yaml @@ -0,0 +1,14 @@ +--- +- project-template: + name: kolla-scenario-cephadm + description: | + Runs Kolla-Ansible CephAdm scenario jobs on particular Kolla changes. + check: + jobs: + - kolla-ansible-debian-trixie-cephadm: &files + files: ^kolla/docker\/(base|cinder|glance|mariadb-server|openstack-base|rabbitmq)\/.* + - kolla-ansible-debian-bookworm-cephadm-upgrade: *files + - kolla-ansible-rocky-10-cephadm: *files + - kolla-ansible-rocky-10-cephadm-upgrade: *files + - kolla-ansible-ubuntu-noble-cephadm: *files + - kolla-ansible-ubuntu-noble-cephadm-upgrade: *files diff --git a/zuul.d/scenarios/ironic.yaml b/zuul.d/scenarios/ironic.yaml new file mode 100644 index 000000000..72a9bf66e --- /dev/null +++ b/zuul.d/scenarios/ironic.yaml @@ -0,0 +1,11 @@ +--- +- project-template: + name: kolla-scenario-ironic + description: | + Runs Kolla-Ansible Ironic scenario jobs on particular Kolla changes. + check: + jobs: + - kolla-ansible-debian-trixie-ironic: &files + files: ^kolla/docker\/(base|dnsmasq|ironic|iscsid|openstack-base)\/.* + - kolla-ansible-rocky-10-ironic: *files + - kolla-ansible-ubuntu-noble-ironic: *files diff --git a/zuul.d/scenarios/lets-encrypt.yaml b/zuul.d/scenarios/lets-encrypt.yaml new file mode 100644 index 000000000..9649d4ea6 --- /dev/null +++ b/zuul.d/scenarios/lets-encrypt.yaml @@ -0,0 +1,12 @@ +--- +- project-template: + name: kolla-scenario-lets-encrypt + description: | + Runs Kolla-Ansible Let's Encrypt scenario jobs. + check: + jobs: + - kolla-ansible-debian-trixie-lets-encrypt: &files + files: + - ^kolla/common/sources.yaml + - ^kolla/docker/(haproxy|httpd|letsencrypt)/ + - kolla-ansible-ubuntu-noble-lets-encrypt: *files diff --git a/zuul.d/scenarios/mariadb.yaml b/zuul.d/scenarios/mariadb.yaml new file mode 100644 index 000000000..c53a27fca --- /dev/null +++ b/zuul.d/scenarios/mariadb.yaml @@ -0,0 +1,13 @@ +--- +- project-template: + name: kolla-scenario-mariadb + description: | + Runs Kolla-Ansible MariaDB scenario jobs on particular Kolla changes. + check: + jobs: + - kolla-ansible-debian-trixie-mariadb: &files + files: + - ^kolla/common/sources.yaml + - ^kolla/docker/(base|mariadb-server)/ + - kolla-ansible-rocky-10-mariadb: *files + - kolla-ansible-ubuntu-noble-mariadb: *files diff --git a/zuul.d/scenarios/masakari.yaml b/zuul.d/scenarios/masakari.yaml new file mode 100644 index 000000000..1a6d355e9 --- /dev/null +++ b/zuul.d/scenarios/masakari.yaml @@ -0,0 +1,11 @@ +--- +- project-template: + name: kolla-scenario-masakari + description: | + Runs Kolla-Ansible Masakari scenario jobs on particular Kolla changes. + check: + jobs: + - kolla-ansible-debian-trixie-masakari: &files + files: ^kolla/docker/(base|masakari|openstack-base)/ + - kolla-ansible-rocky-10-masakari: *files + - kolla-ansible-ubuntu-noble-masakari: *files diff --git a/zuul.d/scenarios/octavia.yaml b/zuul.d/scenarios/octavia.yaml new file mode 100644 index 000000000..c899cc93f --- /dev/null +++ b/zuul.d/scenarios/octavia.yaml @@ -0,0 +1,10 @@ +--- +- project-template: + name: kolla-scenario-octavia + description: | + Runs Kolla-Ansible Octavia scenario jobs on particular Kolla changes. + check: + jobs: + - kolla-ansible-debian-trixie-octavia: &files + files: ^kolla/docker/(base|neutron|octavia|openstack-base|openvswitch|ovn)/ + - kolla-ansible-ubuntu-noble-octavia: *files diff --git a/zuul.d/scenarios/ovn.yaml b/zuul.d/scenarios/ovn.yaml new file mode 100644 index 000000000..dee5480c5 --- /dev/null +++ b/zuul.d/scenarios/ovn.yaml @@ -0,0 +1,11 @@ +--- +- project-template: + name: kolla-scenario-ovn + description: | + Runs Kolla-Ansible OVN scenario jobs on particular Kolla changes. + check: + jobs: + - kolla-ansible-debian-trixie-ovn: &files + files: ^kolla/docker/(base|neutron|openstack-base|openvswitch|ovn|prometheus/prometheus-openstack-network-exporter)/ + - kolla-ansible-rocky-10-ovn: *files + - kolla-ansible-ubuntu-noble-ovn: *files diff --git a/zuul.d/scenarios/prometheus-opensearch.yaml b/zuul.d/scenarios/prometheus-opensearch.yaml new file mode 100644 index 000000000..c1a5778de --- /dev/null +++ b/zuul.d/scenarios/prometheus-opensearch.yaml @@ -0,0 +1,14 @@ +--- +- project-template: + name: kolla-scenario-prometheus-opensearch + check: + jobs: + - kolla-ansible-debian-trixie-prometheus-opensearch: &files + files: + - ^kolla/common/sources.yaml + - ^kolla/docker/(base|fluentd|grafana|opensearch|prometheus)/ + - kolla-ansible-debian-trixie-prometheus-opensearch-upgrade: *files + - kolla-ansible-rocky-10-prometheus-opensearch: *files + - kolla-ansible-rocky-10-prometheus-opensearch-upgrade: *files + - kolla-ansible-ubuntu-noble-prometheus-opensearch: *files + - kolla-ansible-ubuntu-noble-prometheus-opensearch-upgrade: *files diff --git a/zuul.d/scenarios/telemetry.yaml b/zuul.d/scenarios/telemetry.yaml new file mode 100644 index 000000000..04ab2b0f8 --- /dev/null +++ b/zuul.d/scenarios/telemetry.yaml @@ -0,0 +1,11 @@ +--- +- project-template: + name: kolla-scenario-telemetry + description: | + Runs Kolla-Ansible Telemetry scenario jobs on particular Kolla changes. + check: + jobs: + - kolla-ansible-debian-trixie-telemetry: &files + files: ^kolla/docker\/(base|aodh|ceilometer|gnocchi|valkey|openstack-base)\/.* + - kolla-ansible-rocky-10-telemetry: *files + - kolla-ansible-ubuntu-noble-telemetry: *files diff --git a/zuul.d/secrets.yaml b/zuul.d/secrets.yaml new file mode 100644 index 000000000..60760700e --- /dev/null +++ b/zuul.d/secrets.yaml @@ -0,0 +1,58 @@ +--- +- secret: + name: kolla_quay_io_creds_jan_2026 + data: + username: !encrypted/pkcs1-oaep + - ErjFWydLer2Pxmg9lZi+Ru2y26IT1BtfdKtueWwNM6UFb52vlbN0KTlDLMqBT9gb60KHw + pp+bUnlj0mG+LNVH9Sa93Ux7+g2j+2sh7JovPYLf4N67U+J6DgYeEqavU8KVYo/5eSr5x + ZP+YtfEg/pjhROJQW+I7FA+q3YkOHCcvX9GdiszjWhgQdGAXxPhzFsfrwZ2p7yXWoY6If + uro0SyPAFvfs9aq8s5rU4YFhCk2ToUwXz2UyJpOI6OmJCNYFZkRwi7Ot0uBBJXnKl2uSl + mq5PmliG5qWkjGCB5W+IJrlnHBQGJFuIL2mbWSASL8HdCg/X/sc6DcVjFYylAYm/nfHr8 + mM2wz9fs7mFGNcpdYnHmcJXkDV7iIOO1zNJASykR2TTSEljGI5ImlgSD2t/3ZfNExtw8o + bOZYcnHjfTjmwAymQ0mBerc8d5SaHgm3JOZ/YKrQJllR7SDRMIMnIwTzMNGbqoJ3Or9ir + v6J3u3h6AWSZhkdOYc5dnTic5VBiFgbhmyVv0j3W9CpORZMrnzpbFMaCVbgvyMZ3OYBGa + 112khOQOA7xazMTfoTOB+MSl5QeHvHJKbHYsphmPYPtjVCBAAs4PxaSAAFGLoGvG268rx + rXb2FFYk1Yb4PdYzxOByEL/1PwWTFPtjSHhYSlKQfGF45T8LvWJmgYlqTgK1c8= + password: !encrypted/pkcs1-oaep + - bDvuushT06Xz//YFxAaIM1AWRm8oPNGTm12kRhmuXnpvb7cANH7IjO/z5C2OvSpvNEOhl + 5IkBNcnWMI5hhS/uI41l4dBmue5QI9/SlLIIQ9XJrZFqGwbYmbvTioIBkBcvwCDU23dy6 + pr8n8xBoO6eNvRUDjN0wnFyiq5+vgD+fdsXtQAUHdh67q6WwYIkIbKSSVJAc8C9b1Fx52 + JhTGlhMFLP+8KwufwBUs1udHuGxIKdqQ2nj+3S+a7codZg20rtEqImmhecSHZ3XzxlNSE + hSMwfgrAULHtWX3lqn09n841wejnSx6R6gG2tJ3QrUr8NuZMMMlffwc/95imPtYliIvOC + MmYcBO5jDz5mvbZpl4DAGzs3Q8LcBVrsIhoVeMXW5Z/DH4cDldcXzagUR8TbWB16My9GR + jm54zuxDX0tIO1tHa+s3SftQf32fEbJSqjEszQYw81DQEoqpNauOugfP+j/5YfWTEv7im + Z8WKIkgxv7dnxOxpu6d5DfmarUHIIDyA7Pd3UprQWVPXnTpff9x8zcGhiRYfBWefhCFIM + D+ujFoYgbSO9PguPuGFMwHtt2GHSd/gkqoypz/9mLYeY83dcW6YsrpnEQRIJYyeGr54ko + 0obnRaoKKlJ9O6am06D01lNhiiG8NhreNONZTbY7h8nvJXyMfYTo0zqHTJhHiY= + +- secret: + name: kolla_copr_erlang27_jul_2026 + data: + id: 194310 + uuid: !encrypted/pkcs1-oaep + - WDO1kbMR9/sXKWrSJbItE5/LoecLkR4OfNgCogOtPSHe1b4AQW7FO6Tki5JJ/Zmk79A4I + KRR14H61mO5OnrZy2xL0VqOMXvw7sJEtIX7V6uqnWSpTT+gDb6TVWVMqiZbBY3F11WJIn + o4o8emWuM2tsotwgwj3PF88WK54KTx5tHOVje7kUttuShNQ0Tr0c0PlyIeroiYRvM6b4r + bdVaTcsdLgCBgGBqFe5b2k8MJf9pIydK6MksZZGZ4J9fWKTztSNvM06VOwmE8tymKBRWo + JwhSL7cKA3d6cpUClTwGBkk0OFWYGVRrYLchbafrTFvBxojg4TdH+P4/MVmtf3/Z0EHSz + rWDG2UcsgjXH3N9BzLP440f5UXhSQRP6zW0Z9e98Zu5mD7iFDsRT/wQ1xRIjZo0/E55fE + e3o43XR7EiktTkr9g9u8+JpN+IpWNaA5NnXYawFfP/DtB9Td68a2kXK2ECpPpGCSqUhqb + v/DtJZ0H25tF+WJkGqnCEjAAyYsu88VKJyQ8Eb1i4Gg58l8pNqWf+N/v0PdDtln9yfk8N + BTpBeWvTZCI5qG0fctwv8eHdK5FLYQuiFUxSBpjUu5HhI9UqqdPCh0WYDJYMFSsg04g0D + Nw32vw/94bSsplYM1lUZiaozHJqpXMeTMMh4EHoD8a0uFV5McpVDiU33y6Gavs= + +- secret: + name: kolla_copr_erlang26_jul_2026 + data: + id: 194311 + uuid: !encrypted/pkcs1-oaep + - EZRQi8t4WbIOpBQX4woHJNU3Vx3WTu+s697lq/AEi32GHn2JXXsQdgWYUnJCzIQyonlbi + zt60ead4MLxXXQ/o5CnadQjYMlnKfBOXE6MhnV9ebw/rYgvO663L9BxR1O6iYMFtrMDDT + H4xVOydMlS/qWJifTNcYh9eaFoMfMVSmoC/xMKtO1iOAE07ruXhl89E+mP6eYJPURqOwh + G24WpT/HPaXWZL6xr229gna7dAnC4n7Fpm4SA0kaFjCtSxcn74VcKuRy+WVFSbNyVuMqF + DbztoEFBgtwN+yb/5ob7eZFPsy/CILFT2Qzj/8Ade/fAc1XiScO/HD72UTCMS/5J/qJVJ + o0PnaKxsWcd55pp1XN/Y6d3SrscFmXFwjr1r6vynLqpHLlo9gGALrtH+0plXYu2Z8pObQ + Df/aiVpMMZgZ5UeqWyAHXQJlrG68F9WWka5kwNQdcD8nIbeO5PBrB9+qyZxJjvf1SejJO + d93FJQOeZCxcf4hxqywy4SaczJ4PFSFY6qoRroA2864w4DC31Cn66i3zgxMAryOfB66YQ + l54hdTZsosYT9G/erId6EgicQOOB6VrPrfvNUlPUSMAkT0oLk2YPccD9ZLAsc5QHkVcuv + aynwoeE3+FStFn0103NHyld2j6XyWPLMtG76hkmwwQGBMmzi5oH/2vQriIXP4g= diff --git a/zuul.d/tox.yaml b/zuul.d/tox.yaml new file mode 100644 index 000000000..a818ff411 --- /dev/null +++ b/zuul.d/tox.yaml @@ -0,0 +1,23 @@ +--- +- job: + name: kolla-tox-genconfig + parent: openstack-tox + timeout: 2400 + description: | + + Run genconfig + + Uses tox with the ``genconfig`` environment. + vars: + tox_envlist: genconfig + +- project-template: + name: kolla-tox-genconfig + description: | + Runs tox with ``genconfig`` environment. + check: + jobs: + - kolla-tox-genconfig + gate: + jobs: + - kolla-tox-genconfig diff --git a/zuul.d/ubuntu.yaml b/zuul.d/ubuntu.yaml new file mode 100644 index 000000000..301c1f3ce --- /dev/null +++ b/zuul.d/ubuntu.yaml @@ -0,0 +1,70 @@ +--- +- job: + name: kolla-build-ubuntu-noble + parent: kolla-base + nodeset: kolla-ubuntu-noble-8GB + +- job: + name: kolla-build-ubuntu-noble-podman + parent: kolla-base-podman + nodeset: kolla-ubuntu-noble-8GB + +- job: + name: kolla-build-ubuntu-noble-arm64 + parent: kolla-build-ubuntu-noble + nodeset: kolla-ubuntu-noble-arm64-8GB + voting: false + +- job: + name: kolla-publish-ubuntu-noble-quay + parent: kolla-build-ubuntu-noble + post-run: tests/playbooks/publish.yml + vars: + publisher: true + kolla_registry: quay.io + kolla_namespace: openstack.kolla + secrets: + - name: kolla_quay_io_creds + secret: kolla_quay_io_creds_jan_2026 + +- job: + name: kolla-publish-ubuntu-noble-arm64-quay + parent: kolla-build-ubuntu-noble-arm64 + post-run: tests/playbooks/publish.yml + vars: + publisher: true + kolla_registry: quay.io + kolla_namespace: openstack.kolla + secrets: + - name: kolla_quay_io_creds + secret: kolla_quay_io_creds_jan_2026 + +- job: + name: kolla-build-ubuntu-noble-no-infra-wheels + parent: kolla-build-no-infra-wheels-base + nodeset: kolla-ubuntu-noble-8GB + +- project-template: + name: kolla-build-ubuntu + description: | + Runs Kolla Ubuntu build jobs. + check: + jobs: + - kolla-build-ubuntu-noble + - kolla-build-ubuntu-noble-podman + check-arm64: + jobs: + - kolla-build-ubuntu-noble-arm64 + gate: + jobs: + - kolla-build-ubuntu-noble + - kolla-build-ubuntu-noble-podman + experimental: + jobs: + - kolla-build-ubuntu-noble-no-infra-wheels + periodic: + jobs: + - kolla-publish-ubuntu-noble-quay + periodic-weekly: + jobs: + - kolla-publish-ubuntu-noble-arm64-quay |
