Skip to content

Commit 350ef29

Browse files
authored
Merge pull request #94 from stackhpc/merge-stackhpc-wallaby
Merge stackhpc/wallaby into stackhpc/xena
2 parents e8c8113 + 03d2624 commit 350ef29

File tree

17 files changed

+417
-34
lines changed

17 files changed

+417
-34
lines changed

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ ci-aio
230230
Prerequisites
231231
^^^^^^^^^^^^^
232232

233-
* a CentOS Stream 8 host
233+
* a CentOS Stream 8 or Ubuntu Focal 20.04 host
234234
* access to the local Pulp server
235235

236236
Setup
@@ -329,7 +329,7 @@ service, and pushed there once built.
329329
Prerequisites
330330
^^^^^^^^^^^^^
331331

332-
* a CentOS Stream 8 host
332+
* a CentOS Stream 8 or Ubuntu Focal 20.04 host
333333
* access to the local Pulp server
334334

335335
Setup

etc/kayobe/ansible/pulp-repo-promote-production.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@
66
- import_role:
77
name: stackhpc.pulp.pulp_distribution
88
vars:
9-
pulp_distribution_rpm: "{{ stackhpc_pulp_distribution_rpm_production }}"
9+
pulp_distribution_deb: "{{ stackhpc_pulp_distribution_deb_production | selectattr('required') }}"
10+
pulp_distribution_rpm: "{{ stackhpc_pulp_distribution_rpm_production | selectattr('required') }}"

etc/kayobe/ansible/pulp-repo-publish.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@
77
name: stackhpc.pulp.pulp_publication
88
# NOTE: use intermediate variable to avoid publishing containers.
99
vars:
10-
pulp_publication_rpm: "{{ stackhpc_pulp_publication_rpm_development }}"
10+
pulp_publication_deb: "{{ stackhpc_pulp_publication_deb_development | selectattr('required') }}"
11+
pulp_publication_rpm: "{{ stackhpc_pulp_publication_rpm_development | selectattr('required') }}"
1112

1213
- import_role:
1314
name: stackhpc.pulp.pulp_distribution
1415
vars:
15-
pulp_distribution_rpm: "{{ stackhpc_pulp_distribution_rpm_development }}"
16+
pulp_distribution_deb: "{{ stackhpc_pulp_distribution_deb_development | selectattr('required') }}"
17+
pulp_distribution_rpm: "{{ stackhpc_pulp_distribution_rpm_development | selectattr('required') }}"

etc/kayobe/ansible/pulp-repo-sync.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@
77
name: stackhpc.pulp.pulp_repository
88
# NOTE: use intermediate variable to avoid syncing containers.
99
vars:
10-
pulp_repository_rpm_repos: "{{ stackhpc_pulp_repository_rpm_repos }}"
10+
pulp_repository_deb_repos: "{{ stackhpc_pulp_repository_deb_repos | selectattr('required') }}"
11+
pulp_repository_rpm_repos: "{{ stackhpc_pulp_repository_rpm_repos | selectattr('required') }}"
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
# Currently the pulp_deb plugin in Pulp does not support certain types of
3+
# content, including i18n files and command-not-found indices. This breaks APT
4+
# when the command-not-found is installed. This playbook can be used to
5+
# uninstall the package, prior to running any other APT commands. It may be
6+
# installed as a hook to the 'host configure' commands.
7+
# See https://github.com/pulp/pulp_deb/issues/419
8+
# FIXME: If used as a hook, this playbook matches all hosts, so will run
9+
# against the seed, even when running 'overcloud host configure'. Depending on
10+
# the stage of deployment, some hosts may be unreachable. This could be fixed
11+
# by implementing this playbook separately for each group.
12+
- name: Purge command-not-found package
13+
hosts: seed-hypervisor:seed:overcloud:infra-vms
14+
gather_facts: false
15+
vars:
16+
ansible_user: "{{ bootstrap_user }}"
17+
# We can't assume that a virtualenv exists at this point, so use the system
18+
# python interpreter.
19+
ansible_python_interpreter: /usr/bin/python3
20+
# Work around no known_hosts entry on first boot.
21+
ansible_ssh_common_args: "-o StrictHostKeyChecking=no"
22+
tasks:
23+
- name: Purge command-not-found package
24+
package:
25+
name:
26+
- command-not-found
27+
- python3-command-not-found
28+
purge: true
29+
state: absent
30+
become: true
31+
failed_when: false
32+
ignore_unreachable: true
33+
when: ansible_facts.os_family == "Debian"

etc/kayobe/apt.yml

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,23 @@
1717
# * filename: name of a file in /etc/apt/apt.conf.d/ in which to write the
1818
# configuration
1919
# Default is an empty list.
20-
#apt_config:
20+
apt_config:
21+
# NOTE: Currently the Pulp verbatim publisher does not sync translation
22+
# files, which results in apt update failing. Disable translations until this
23+
# is resolved.
24+
- content: |
25+
Acquire::Languages "none";
26+
filename: 99no-languages
2127
2228
# List of apt keys. Each item is a dict containing the following keys:
2329
# * url: URL of key
24-
# * filename: Name of a file in which to store the downloaded key. The
25-
# extension should be '.asc' for ASCII-armoured keys, or '.gpg' otherwise.
30+
# * filename: Name of a file in which to store the downloaded key
2631
# Default is an empty list.
27-
#apt_keys:
32+
apt_keys:
33+
- url: "https://download.docker.com/linux/ubuntu/gpg"
34+
filename: docker.asc
2835

29-
# A list of Apt repositories. Each item is a dict with the following keys:
36+
# A list of Apt repositories.
3037
# * types: whitespace-separated list of repository types, e.g. deb or deb-src
3138
# (optional, default is 'deb')
3239
# * url: URL of the repository
@@ -39,12 +46,22 @@
3946
# * architecture: whitespace-separated list of architectures that will be used
4047
# (optional, default is unset)
4148
# Default is an empty list.
42-
#apt_repositories:
49+
apt_repositories:
50+
- url: "{{ stackhpc_repo_ubuntu_focal_url }}"
51+
suites: "{{ ansible_facts.distribution_release }} {{ ansible_facts.distribution_release }}-updates {{ ansible_facts.distribution_release }}-backports"
52+
components: main restricted universe multiverse
53+
- url: "{{ stackhpc_repo_ubuntu_focal_security_url }}"
54+
suites: "{{ ansible_facts.distribution_release }}-security"
55+
components: main restricted universe multiverse
56+
- url: "{{ stackhpc_repo_docker_ce_ubuntu_url }}"
57+
suites: "{{ ansible_facts.distribution_release }}"
58+
components: stable
59+
signed_by: docker.asc
4360

4461
# Whether to disable repositories in /etc/apt/sources.list. This may be used
4562
# when replacing the distribution repositories via apt_repositories.
4663
# Default is false.
47-
#apt_disable_sources_list:
64+
apt_disable_sources_list: true
4865

4966
###############################################################################
5067
# Dummy variable to allow Ansible to accept this file.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
- name: Ensure /srv/docker/squid directory exists
3+
file:
4+
path: /srv/docker/squid
5+
state: directory
6+
mode: 0755
7+
become: true
8+
9+
- name: Copy modified squid.conf
10+
copy:
11+
src: "{{ kayobe_config_path }}/containers/squid_proxy/squid.conf"
12+
dest: /srv/docker/squid/
13+
mode: 0644
14+
become: true
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
#
2+
# Recommended minimum configuration:
3+
#
4+
5+
# Example rule allowing access from your local networks.
6+
# Adapt to list your (internal) IP networks from where browsing
7+
# should be allowed
8+
acl localnet src 10.0.0.0/8 # RFC1918 possible internal network
9+
acl localnet src 172.16.0.0/12 # RFC1918 possible internal network
10+
acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
11+
acl localnet src fc00::/7 # RFC 4193 local private network range
12+
acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines
13+
14+
acl SSL_ports port 443
15+
acl Safe_ports port 80 # http
16+
acl Safe_ports port 21 # ftp
17+
acl Safe_ports port 443 # https
18+
acl Safe_ports port 70 # gopher
19+
acl Safe_ports port 210 # wais
20+
acl Safe_ports port 1025-65535 # unregistered ports
21+
acl Safe_ports port 280 # http-mgmt
22+
acl Safe_ports port 488 # gss-http
23+
acl Safe_ports port 591 # filemaker
24+
acl Safe_ports port 777 # multiling http
25+
acl CONNECT method CONNECT
26+
27+
#
28+
# Recommended minimum Access Permission configuration:
29+
#
30+
# Deny requests to certain unsafe ports
31+
http_access deny !Safe_ports
32+
33+
# Deny CONNECT to other than secure SSL ports
34+
http_access deny CONNECT !SSL_ports
35+
36+
# Only allow cachemgr access from localhost
37+
http_access allow localhost manager
38+
http_access deny manager
39+
40+
# We strongly recommend the following be uncommented to protect innocent
41+
# web applications running on the proxy server who think the only
42+
# one who can access services on "localhost" is a local user
43+
#http_access deny to_localhost
44+
45+
#
46+
# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
47+
#
48+
49+
# Example rule allowing access from your local networks.
50+
# Adapt localnet in the ACL section to list your (internal) IP networks
51+
# from where browsing should be allowed
52+
http_access allow localnet
53+
http_access allow localhost
54+
55+
# And finally deny all other access to this proxy
56+
http_access deny all
57+
58+
# Squid normally listens to port 3128
59+
http_port 3128
60+
61+
# Uncomment and adjust the following to add a disk cache directory.
62+
cache_dir ufs /var/spool/squid 4096 16 256
63+
cache_mem 768 MB
64+
maximum_object_size_in_memory 64 MB
65+
66+
# Leave coredumps in the first cache dir
67+
coredump_dir /var/spool/squid
68+
69+
#
70+
# Add any of your own refresh_pattern entries above these.
71+
#
72+
refresh_pattern ^ftp: 1440 20% 10080
73+
refresh_pattern ^gopher: 1440 0% 1440
74+
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
75+
refresh_pattern . 0 20% 4320

etc/kayobe/environments/ci-aio/stackhpc-ci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ stackhpc_repo_mariadb_10_5_centos8_version: "{{ stackhpc_pulp_repo_mariadb_10_5_
4444
stackhpc_repo_rabbitmq_erlang_version: "{{ stackhpc_pulp_repo_rabbitmq_erlang_version }}"
4545
stackhpc_repo_rabbitmq_server_version: "{{ stackhpc_pulp_repo_rabbitmq_server_version }}"
4646
stackhpc_repo_treasuredata_4_version: "{{ stackhpc_pulp_repo_treasuredata_4_version }}"
47+
stackhpc_repo_ubuntu_cloud_archive_version: "{{ stackhpc_pulp_repo_ubuntu_cloud_archive_version }}"
48+
stackhpc_repo_ubuntu_focal_version: "{{ stackhpc_pulp_repo_ubuntu_focal_version }}"
49+
stackhpc_repo_ubuntu_focal_security_version: "{{ stackhpc_pulp_repo_ubuntu_focal_security_version }}"
50+
stackhpc_repo_docker_ce_ubuntu_version: "{{ stackhpc_pulp_repo_docker_ce_ubuntu_version }}"
51+
4752

4853
# Host and port of container registry.
4954
# Push built images to the development Pulp service registry.

etc/kayobe/environments/ci-builder/stackhpc-ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ stackhpc_repo_mariadb_10_5_centos8_version: "{{ stackhpc_pulp_repo_mariadb_10_5_
6363
stackhpc_repo_rabbitmq_erlang_version: "{{ stackhpc_pulp_repo_rabbitmq_erlang_version }}"
6464
stackhpc_repo_rabbitmq_server_version: "{{ stackhpc_pulp_repo_rabbitmq_server_version }}"
6565
stackhpc_repo_treasuredata_4_version: "{{ stackhpc_pulp_repo_treasuredata_4_version }}"
66+
stackhpc_repo_ubuntu_cloud_archive_version: "{{ stackhpc_pulp_repo_ubuntu_cloud_archive_version }}"
67+
stackhpc_repo_ubuntu_focal_version: "{{ stackhpc_pulp_repo_ubuntu_focal_version }}"
68+
stackhpc_repo_ubuntu_focal_security_version: "{{ stackhpc_pulp_repo_ubuntu_focal_security_version }}"
69+
stackhpc_repo_docker_ce_ubuntu_version: "{{ stackhpc_pulp_repo_docker_ce_ubuntu_version }}"
6670

6771
# Host and port of container registry.
6872
# Push built images to the Ark registry.

etc/kayobe/kolla.yml

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -192,17 +192,26 @@ stackhpc_third_party_repos:
192192
- url: "{{ stackhpc_repo_treasuredata_4_url }}"
193193
file: "td.repo"
194194

195+
# List of repositories for Ubuntu focal.
196+
stackhpc_ubuntu_focal_repos:
197+
- "deb {{ stackhpc_repo_ubuntu_focal_url }} focal main universe"
198+
- "deb {{ stackhpc_repo_ubuntu_focal_url }} focal-updates main universe"
199+
- "deb {{ stackhpc_repo_ubuntu_focal_url }} focal-backports main universe"
200+
- "deb {{ stackhpc_repo_ubuntu_focal_security_url }} focal-security main universe"
201+
- "deb {{ stackhpc_repo_ubuntu_cloud_archive_url }} focal-updates/wallaby main"
202+
195203
# Dict mapping Jinja2 block names in kolla's Docker images to their contents.
196204
kolla_build_blocks:
197205
base_header: |
206+
{% if kolla_base_distro == 'centos' %}
198207
RUN \
199208
{% for repo in stackhpc_centos_stream_repos %}
200209
sed -i -e 's/^\(mirrorlist *=.*\)/#\1/g' \
201210
-e 's/^[# ]*\(baseurl *=.*\)/#\1/g' \
202211
-e '/#baseurl.*/a baseurl={{ repo.url }}' /etc/yum.repos.d/{{ repo.file }}{% if not loop.last %} && \
203212
{% endif %}
204213
{% endfor %}
205-
214+
{% endif %}
206215
base_centos_repo_overrides_post_yum: |
207216
{# fixme #}
208217
&& \
@@ -211,7 +220,13 @@ kolla_build_blocks:
211220
-e 's/^[# ]*\(baseurl *=.*\)/#\1/g' \
212221
-e '/#baseurl.*/a baseurl={{ repo.url }}' /etc/yum.repos.d/{{ repo.file }}{% if not loop.last %} &&{% endif %} \
213222
{% endfor %}
214-
223+
base_ubuntu_package_sources_list: |
224+
RUN \
225+
rm -f /etc/apt/sources.list && \
226+
{% for repo in stackhpc_ubuntu_focal_repos %}
227+
echo '{{ repo }}' >> /etc/apt/sources.list {% if not loop.last %} && \
228+
{% endif %}
229+
{% endfor %}
215230
grafana_plugins_install: |
216231
RUN grafana-cli plugins install vonage-status-panel
217232
ironic_inspector_header: |
@@ -240,11 +255,13 @@ kolla_build_blocks:
240255
# Hyphens in the image name must be replaced with underscores. The
241256
# customization is most commonly packages. The operation should be one of
242257
# override, append or remove. The value should be a list.
243-
kolla_build_customizations:
244-
base_yum_repo_files_remove:
245-
- proxysql.repo
258+
kolla_build_customizations_common:
246259
ironic_inspector_pip_packages_append:
247260
- /additions/*
261+
262+
kolla_build_customizations_centos:
263+
base_yum_repo_files_remove:
264+
- proxysql.repo
248265
ovn_base_packages_override:
249266
- ovn-2021-21.12.0
250267
ovn_controller_packages_override:
@@ -263,6 +280,16 @@ kolla_build_customizations:
263280
- python3-openvswitch2.16
264281
- tcpdump
265282

283+
kolla_build_customizations_ubuntu: {}
284+
285+
# Dict mapping image customization variable names to their values.
286+
# Each variable takes the form:
287+
# <image name>_<customization>_<operation>
288+
# Hyphens in the image name must be replaced with underscores. The
289+
# customization is most commonly packages. The operation should be one of
290+
# override, append or remove. The value should be a list.
291+
kolla_build_customizations: "{{ kolla_build_customizations_common | combine(kolla_build_customizations_centos if kolla_base_distro == 'centos' else kolla_build_customizations_ubuntu) }}"
292+
266293
###############################################################################
267294
# Kolla-ansible inventory configuration.
268295

etc/kayobe/kolla/globals.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# yamllint disable-file
12
---
3+
enable_docker_repo: "{% raw %}{{ ansible_facts.os_family == 'RedHat' }}{% endraw %}"
4+
25
docker_yum_baseurl: "{{ stackhpc_repo_docker_url }}"
36
docker_yum_gpgkey: "https://download.docker.com/linux/{% raw %}{{ ansible_facts.distribution | lower }}{% endraw %}/gpg"

etc/kayobe/pulp-repo-versions.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ stackhpc_pulp_repo_centos_stream_8_openstack_xena_version: 20220612T035123
1010
stackhpc_pulp_repo_centos_stream_8_opstools_version: 20220617T100837
1111
stackhpc_pulp_repo_centos_stream_8_powertools_version: 20220607T061247
1212
stackhpc_pulp_repo_centos_stream_8_storage_ceph_pacific_version: 20220525T030654
13+
stackhpc_pulp_repo_docker_ce_ubuntu_version: 20220708T132615
1314
stackhpc_pulp_repo_docker_version: 20220607T061247
1415
stackhpc_pulp_repo_elasticsearch_logstash_kibana_7_x_version: 20220525T030654
1516
stackhpc_pulp_repo_epel_modular_version: 20220604T032730
@@ -19,3 +20,6 @@ stackhpc_pulp_repo_mariadb_10_5_centos8_version: 20220609T110556
1920
stackhpc_pulp_repo_rabbitmq_erlang_version: 20220616T113902
2021
stackhpc_pulp_repo_rabbitmq_server_version: 20220602T033149
2122
stackhpc_pulp_repo_treasuredata_4_version: 20220429T160649
23+
stackhpc_pulp_repo_ubuntu_cloud_archive_version: 20220712T155732
24+
stackhpc_pulp_repo_ubuntu_focal_security_version: 20220708T132615
25+
stackhpc_pulp_repo_ubuntu_focal_version: 20220708T132615

0 commit comments

Comments
 (0)