Skip to content

Commit df3c774

Browse files
committed
Add Pulp config to sync all repos
1 parent 251b4c5 commit df3c774

File tree

5 files changed

+241
-1
lines changed

5 files changed

+241
-1
lines changed

etc/kayobe/containers/pulp/post.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,13 @@
1717
register: pulp_manager_result
1818
failed_when:
1919
- "'Successfully set password' not in pulp_manager_result.stdout"
20+
21+
- name: Manage Pulp content checksums
22+
become: true
23+
command: >-
24+
docker exec -u root pulp
25+
bash -c
26+
'pulpcore-manager handle-artifact-checksums'
27+
when:
28+
- stackhpc_pulp_sync_for_local_container_build | bool
29+
- pulp_settings.changed

etc/kayobe/containers/pulp/pre.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@
1919
dest: /opt/kayobe/containers/pulp/settings.py
2020
mode: 0644
2121
become: true
22+
register: pulp_settings

etc/kayobe/containers/pulp/settings.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@
22
ANSIBLE_API_HOSTNAME='{{ pulp_url }}'
33
ANSIBLE_CONTENT_HOSTNAME='{{ pulp_url }}/pulp/content'
44
TOKEN_AUTH_DISABLED=True
5+
{% if stackhpc_pulp_sync_for_local_container_build | bool %}
6+
ALLOWED_CONTENT_CHECKSUMS = ["sha1", "sha224", "sha256", "sha384", "sha512"]
7+
{% endif %}

etc/kayobe/pulp.yml

Lines changed: 220 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,18 @@ pulp_proxy_url: "{{ omit }}"
1919
# Base URL of the StackHPC Pulp service.
2020
stackhpc_release_pulp_url: "https://ark.stackhpc.com"
2121

22-
# Credentials used to access the StackHPC Ark pulp server.
22+
# Credentials used to access the StackHPC Pulp service.
2323
stackhpc_release_pulp_username:
2424
stackhpc_release_pulp_password:
2525

2626
# Content URL of the StackHPC Pulp service.
2727
stackhpc_release_pulp_content_url: "{{ stackhpc_release_pulp_url }}/pulp/content"
2828

29+
# Sync all repositories required for building Kolla images from the
30+
# StackHPC Ark Pulp service to local Pulp.
31+
# NOTE: Only RPM repositories are supported.
32+
stackhpc_pulp_sync_for_local_container_build: false
33+
2934
###############################################################################
3035
# Debs
3136

@@ -317,6 +322,106 @@ stackhpc_pulp_repository_rpm_repos:
317322
state: present
318323
required: "{{ stackhpc_pulp_sync_el_8 }}"
319324

325+
# Additional repositories required to build Kolla containers from local Pulp service.
326+
- name: CentOS Stream 8 - OpenStack Wallaby
327+
url: "{{ stackhpc_release_pulp_content_url }}/centos/8-stream/cloud/x86_64/openstack-wallaby/{{ stackhpc_pulp_repo_centos_stream_8_openstack_wallaby_version }}"
328+
client_cert: "{{ stackhpc_release_pulp_client_cert }}"
329+
client_key: "{{ stackhpc_release_pulp_client_key }}"
330+
policy: on_demand
331+
sync_policy: mirror_complete
332+
state: present
333+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
334+
335+
- name: CentOS Stream 8 - Advanced Virtualization
336+
url: "{{ stackhpc_release_pulp_content_url }}/centos/8-stream/virt/x86_64/advancedvirt-common/{{ stackhpc_pulp_repo_centos_stream_8_advanced_virtualization_version }}"
337+
client_cert: "{{ stackhpc_release_pulp_client_cert }}"
338+
client_key: "{{ stackhpc_release_pulp_client_key }}"
339+
policy: on_demand
340+
sync_policy: mirror_complete
341+
state: present
342+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
343+
344+
- name: CentOS Stream 8 - NFV OpenvSwitch
345+
url: "{{ stackhpc_release_pulp_content_url }}/centos/8-stream/nfv/x86_64/openvswitch-2/{{ stackhpc_pulp_repo_centos_stream_8_nfv_openvswitch_version }}"
346+
client_cert: "{{ stackhpc_release_pulp_client_cert }}"
347+
client_key: "{{ stackhpc_release_pulp_client_key }}"
348+
policy: on_demand
349+
sync_policy: mirror_complete
350+
state: present
351+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
352+
353+
- name: CentOS Stream 8 - PowerTools
354+
url: "{{ stackhpc_release_pulp_content_url }}/centos/8-stream/PowerTools/x86_64/os/{{ stackhpc_pulp_repo_centos_stream_8_powertools_version }}"
355+
client_cert: "{{ stackhpc_release_pulp_client_cert }}"
356+
client_key: "{{ stackhpc_release_pulp_client_key }}"
357+
policy: on_demand
358+
sync_policy: mirror_complete
359+
state: present
360+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
361+
362+
- name: CentOS 8 - OpsTools - collectd
363+
url: "{{ stackhpc_release_pulp_content_url }}/centos/8-stream/opstools/x86_64/collectd-5/{{ stackhpc_pulp_repo_centos_stream_8_opstools_version }}"
364+
client_cert: "{{ stackhpc_release_pulp_client_cert }}"
365+
client_key: "{{ stackhpc_release_pulp_client_key }}"
366+
policy: on_demand
367+
sync_policy: mirror_complete
368+
state: present
369+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
370+
371+
- name: CentOS Stream 8 - Ceph Pacific
372+
url: "{{ stackhpc_release_pulp_content_url }}/centos/8-stream/storage/x86_64/ceph-pacific/{{ stackhpc_pulp_repo_centos_stream_8_storage_ceph_pacific_version }}"
373+
client_cert: "{{ stackhpc_release_pulp_client_cert }}"
374+
client_key: "{{ stackhpc_release_pulp_client_key }}"
375+
policy: on_demand
376+
sync_policy: mirror_complete
377+
state: present
378+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
379+
380+
- name: ELK repository for 7.x packages
381+
url: "{{ stackhpc_release_pulp_content_url }}/elasticsearch/oss-7.x/{{ stackhpc_pulp_repo_elasticsearch_logstash_kibana_7_x_version }}"
382+
client_cert: "{{ stackhpc_release_pulp_client_cert }}"
383+
client_key: "{{ stackhpc_release_pulp_client_key }}"
384+
policy: on_demand
385+
sync_policy: mirror_complete
386+
state: present
387+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
388+
389+
- name: Grafana
390+
url: "{{ stackhpc_release_pulp_content_url }}/grafana/oss/rpm/{{ stackhpc_pulp_repo_grafana_version }}"
391+
client_cert: "{{ stackhpc_release_pulp_client_cert }}"
392+
client_key: "{{ stackhpc_release_pulp_client_key }}"
393+
policy: on_demand
394+
sync_policy: mirror_complete
395+
state: present
396+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
397+
398+
- name: RabbitMQ - Erlang
399+
url: "{{ stackhpc_release_pulp_content_url }}/rabbitmq/erlang/el/8/x86_64/{{ stackhpc_pulp_repo_rabbitmq_erlang_version }}"
400+
client_cert: "{{ stackhpc_release_pulp_client_cert }}"
401+
client_key: "{{ stackhpc_release_pulp_client_key }}"
402+
policy: on_demand
403+
sync_policy: mirror_complete
404+
state: present
405+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
406+
407+
- name: RabbitMQ - Server
408+
url: "{{ stackhpc_release_pulp_content_url }}/rabbitmq/rabbitmq-server/el/8/x86_64/{{ stackhpc_pulp_repo_rabbitmq_server_version }}"
409+
client_cert: "{{ stackhpc_release_pulp_client_cert }}"
410+
client_key: "{{ stackhpc_release_pulp_client_key }}"
411+
policy: on_demand
412+
sync_policy: mirror_complete
413+
state: present
414+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
415+
416+
- name: TreasureData 4
417+
url: "{{ stackhpc_release_pulp_content_url }}/treasuredata/4/redhat/8/x86_64/{{ stackhpc_pulp_repo_treasuredata_4_version }}"
418+
client_cert: "{{ stackhpc_release_pulp_client_cert }}"
419+
client_key: "{{ stackhpc_release_pulp_client_key }}"
420+
policy: on_demand
421+
sync_policy: mirror_complete
422+
state: present
423+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
424+
320425
# Publication format is a subset of distribution.
321426
stackhpc_pulp_publication_rpm_development: "{{ stackhpc_pulp_distribution_rpm_development }}"
322427

@@ -388,6 +493,63 @@ stackhpc_pulp_distribution_rpm_development:
388493
state: present
389494
required: "{{ stackhpc_pulp_sync_el_8 | bool }}"
390495

496+
# Additional repositories required to build Kolla containers from local Pulp service.
497+
- name: "centos-stream-8-openstack-wallaby-development"
498+
base_path: "centos/8-stream/cloud/x86_64/openstack-wallaby/development"
499+
repository: CentOS Stream 8 - OpenStack Wallaby
500+
state: present
501+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
502+
- name: "centos-stream-8-advanced-virtualization-development"
503+
base_path: "centos/8-stream/virt/x86_64/advancedvirt-common/development"
504+
repository: CentOS Stream 8 - Advanced Virtualization
505+
state: present
506+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
507+
- name: "centos-stream-8-nfv-openvswitch-development"
508+
base_path: "centos/8-stream/nfv/x86_64/network-extras/development"
509+
repository: CentOS Stream 8 - NFV OpenvSwitch
510+
state: present
511+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
512+
- name: "centos-stream-8-powertools-development"
513+
base_path: "centos/8-stream/PowerTools/x86_64/os/development"
514+
repository: CentOS Stream 8 - PowerTools
515+
state: present
516+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
517+
- name: "centos-8-opstools-collectd-development"
518+
base_path: "centos/8-stream/opstools/x86_64/collectd-5/development"
519+
repository: CentOS 8 - OpsTools - collectd
520+
state: present
521+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
522+
- name: "centos-stream-8-ceph-pacific-development"
523+
base_path: "centos/8-stream/storage/x86_64/ceph-pacific/development"
524+
repository: CentOS Stream 8 - Ceph Pacific
525+
state: present
526+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
527+
- name: "elasticsearch-logstash-kibana-7.x-development"
528+
base_path: "elasticsearch/oss-7.x/development"
529+
repository: ELK repository for 7.x packages
530+
state: present
531+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
532+
- name: "grafana-development"
533+
base_path: "grafana/oss/rpm/development"
534+
repository: Grafana
535+
state: present
536+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
537+
- name: "rabbitmq-erlang-development"
538+
base_path: "rabbitmq/erlang/el/8/x86_64/development"
539+
repository: RabbitMQ - Erlang
540+
state: present
541+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
542+
- name: "rabbitmq-server-development"
543+
base_path: "rabbitmq/rabbitmq-server/el/8/x86_64/development"
544+
repository: RabbitMQ - Server
545+
state: present
546+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
547+
- name: "treasuredata-4-development"
548+
base_path: "treasuredata/4/redhat/8/x86_64/development"
549+
repository: TreasureData 4
550+
state: present
551+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
552+
391553
# Development gets promoted to production.
392554
stackhpc_pulp_distribution_rpm_production:
393555
# Base CentOS 8 Stream repositories
@@ -453,6 +615,63 @@ stackhpc_pulp_distribution_rpm_production:
453615
state: present
454616
required: "{{ stackhpc_pulp_sync_el_8 | bool }}"
455617

618+
# Additional repositories required to build Kolla containers from local Pulp service.
619+
- name: "centos-stream-8-openstack-wallaby-production"
620+
base_path: "centos/8-stream/cloud/x86_64/openstack-wallaby/production"
621+
repository: CentOS Stream 8 - OpenStack Wallaby
622+
state: present
623+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
624+
- name: "centos-stream-8-advanced-virtualization-production"
625+
base_path: "centos/8-stream/virt/x86_64/advancedvirt-common/production"
626+
repository: CentOS Stream 8 - Advanced Virtualization
627+
state: present
628+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
629+
- name: "centos-stream-8-nfv-openvswitch-production"
630+
base_path: "centos/8-stream/nfv/x86_64/network-extras/production"
631+
repository: CentOS Stream 8 - NFV OpenvSwitch
632+
state: present
633+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
634+
- name: "centos-stream-8-powertools-production"
635+
base_path: "centos/8-stream/PowerTools/x86_64/os/production"
636+
repository: CentOS Stream 8 - PowerTools
637+
state: present
638+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
639+
- name: "centos-8-opstools-collectd-production"
640+
base_path: "centos/8-stream/opstools/x86_64/collectd-5/production"
641+
repository: CentOS 8 - OpsTools - collectd
642+
state: present
643+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
644+
- name: "centos-stream-8-ceph-pacific-production"
645+
base_path: "centos/8-stream/storage/x86_64/ceph-pacific/production"
646+
repository: CentOS Stream 8 - Ceph Pacific
647+
state: present
648+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
649+
- name: "elasticsearch-logstash-kibana-7.x-production"
650+
base_path: "elasticsearch/oss-7.x/production"
651+
repository: ELK repository for 7.x packages
652+
state: present
653+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
654+
- name: "grafana-production"
655+
base_path: "grafana/oss/rpm/production"
656+
repository: Grafana
657+
state: present
658+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
659+
- name: "rabbitmq-erlang-production"
660+
base_path: "rabbitmq/erlang/el/8/x86_64/production"
661+
repository: RabbitMQ - Erlang
662+
state: present
663+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
664+
- name: "rabbitmq-server-production"
665+
base_path: "rabbitmq/rabbitmq-server/el/8/x86_64/production"
666+
repository: RabbitMQ - Server
667+
state: present
668+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
669+
- name: "treasuredata-4-production"
670+
base_path: "treasuredata/4/redhat/8/x86_64/production"
671+
repository: TreasureData 4
672+
state: present
673+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
674+
456675
###############################################################################
457676
# Containers
458677

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
features:
3+
- |
4+
Adds a new variable ``stackhpc_pulp_sync_for_local_container_build`` which,
5+
when set to ``true``, configures the local Pulp server to sync all package
6+
repositories required for building kolla containers on a local kolla build
7+
host.

0 commit comments

Comments
 (0)