Skip to content

Commit 1be311a

Browse files
authored
Merge pull request #342 from stackhpc/local-container-builds
Local kolla container image builds
2 parents 005d7a6 + b3a81ac commit 1be311a

File tree

5 files changed

+265
-1
lines changed

5 files changed

+265
-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: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,7 @@
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 %}
8+

etc/kayobe/pulp.yml

Lines changed: 242 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,128 @@ 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+
remote_username: "{{ stackhpc_release_pulp_username }}"
329+
remote_password: "{{ stackhpc_release_pulp_password }}"
330+
client_cert: ""
331+
client_key: ""
332+
policy: on_demand
333+
sync_policy: mirror_complete
334+
state: present
335+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
336+
337+
- name: CentOS Stream 8 - Advanced Virtualization
338+
url: "{{ stackhpc_release_pulp_content_url }}/centos/8-stream/virt/x86_64/advancedvirt-common/{{ stackhpc_pulp_repo_centos_stream_8_advanced_virtualization_version }}"
339+
remote_username: "{{ stackhpc_release_pulp_username }}"
340+
remote_password: "{{ stackhpc_release_pulp_password }}"
341+
client_cert: ""
342+
client_key: ""
343+
policy: on_demand
344+
sync_policy: mirror_complete
345+
state: present
346+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
347+
348+
- name: CentOS Stream 8 - NFV OpenvSwitch
349+
url: "{{ stackhpc_release_pulp_content_url }}/centos/8-stream/nfv/x86_64/openvswitch-2/{{ stackhpc_pulp_repo_centos_stream_8_nfv_openvswitch_version }}"
350+
remote_username: "{{ stackhpc_release_pulp_username }}"
351+
remote_password: "{{ stackhpc_release_pulp_password }}"
352+
client_cert: ""
353+
client_key: ""
354+
policy: on_demand
355+
sync_policy: mirror_complete
356+
state: present
357+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
358+
359+
- name: CentOS Stream 8 - PowerTools
360+
url: "{{ stackhpc_release_pulp_content_url }}/centos/8-stream/PowerTools/x86_64/os/{{ stackhpc_pulp_repo_centos_stream_8_powertools_version }}"
361+
remote_username: "{{ stackhpc_release_pulp_username }}"
362+
remote_password: "{{ stackhpc_release_pulp_password }}"
363+
client_cert: ""
364+
client_key: ""
365+
policy: on_demand
366+
sync_policy: mirror_complete
367+
state: present
368+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
369+
370+
- name: CentOS 8 - OpsTools - collectd
371+
url: "{{ stackhpc_release_pulp_content_url }}/centos/8-stream/opstools/x86_64/collectd-5/{{ stackhpc_pulp_repo_centos_stream_8_opstools_version }}"
372+
remote_username: "{{ stackhpc_release_pulp_username }}"
373+
remote_password: "{{ stackhpc_release_pulp_password }}"
374+
client_cert: ""
375+
client_key: ""
376+
policy: on_demand
377+
sync_policy: mirror_complete
378+
state: present
379+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
380+
381+
- name: CentOS Stream 8 - Ceph Pacific
382+
url: "{{ stackhpc_release_pulp_content_url }}/centos/8-stream/storage/x86_64/ceph-pacific/{{ stackhpc_pulp_repo_centos_stream_8_storage_ceph_pacific_version }}"
383+
remote_username: "{{ stackhpc_release_pulp_username }}"
384+
remote_password: "{{ stackhpc_release_pulp_password }}"
385+
client_cert: ""
386+
client_key: ""
387+
policy: on_demand
388+
sync_policy: mirror_complete
389+
state: present
390+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
391+
392+
- name: ELK repository for 7.x packages
393+
url: "{{ stackhpc_release_pulp_content_url }}/elasticsearch/oss-7.x/{{ stackhpc_pulp_repo_elasticsearch_logstash_kibana_7_x_version }}"
394+
remote_username: "{{ stackhpc_release_pulp_username }}"
395+
remote_password: "{{ stackhpc_release_pulp_password }}"
396+
client_cert: ""
397+
client_key: ""
398+
policy: on_demand
399+
sync_policy: mirror_complete
400+
state: present
401+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
402+
403+
- name: Grafana
404+
url: "{{ stackhpc_release_pulp_content_url }}/grafana/oss/rpm/{{ stackhpc_pulp_repo_grafana_version }}"
405+
remote_username: "{{ stackhpc_release_pulp_username }}"
406+
remote_password: "{{ stackhpc_release_pulp_password }}"
407+
client_cert: ""
408+
client_key: ""
409+
policy: on_demand
410+
sync_policy: mirror_complete
411+
state: present
412+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
413+
414+
- name: RabbitMQ - Erlang
415+
url: "{{ stackhpc_release_pulp_content_url }}/rabbitmq/erlang/el/8/x86_64/{{ stackhpc_pulp_repo_rabbitmq_erlang_version }}"
416+
remote_username: "{{ stackhpc_release_pulp_username }}"
417+
remote_password: "{{ stackhpc_release_pulp_password }}"
418+
client_cert: ""
419+
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+
425+
- name: RabbitMQ - Server
426+
url: "{{ stackhpc_release_pulp_content_url }}/rabbitmq/rabbitmq-server/el/8/x86_64/{{ stackhpc_pulp_repo_rabbitmq_server_version }}"
427+
remote_username: "{{ stackhpc_release_pulp_username }}"
428+
remote_password: "{{ stackhpc_release_pulp_password }}"
429+
client_cert: ""
430+
client_key: ""
431+
policy: on_demand
432+
sync_policy: mirror_complete
433+
state: present
434+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
435+
436+
- name: TreasureData 4
437+
url: "{{ stackhpc_release_pulp_content_url }}/treasuredata/4/redhat/8/x86_64/{{ stackhpc_pulp_repo_treasuredata_4_version }}"
438+
remote_username: "{{ stackhpc_release_pulp_username }}"
439+
remote_password: "{{ stackhpc_release_pulp_password }}"
440+
client_cert: ""
441+
client_key: ""
442+
policy: on_demand
443+
sync_policy: mirror_complete
444+
state: present
445+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
446+
320447
# Publication format is a subset of distribution.
321448
stackhpc_pulp_publication_rpm_development: "{{ stackhpc_pulp_distribution_rpm_development }}"
322449

@@ -388,6 +515,63 @@ stackhpc_pulp_distribution_rpm_development:
388515
state: present
389516
required: "{{ stackhpc_pulp_sync_el_8 | bool }}"
390517

518+
# Additional repositories required to build Kolla containers from local Pulp service.
519+
- name: "centos-stream-8-openstack-wallaby-development"
520+
base_path: "centos/8-stream/cloud/x86_64/openstack-wallaby/development"
521+
repository: CentOS Stream 8 - OpenStack Wallaby
522+
state: present
523+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
524+
- name: "centos-stream-8-advanced-virtualization-development"
525+
base_path: "centos/8-stream/virt/x86_64/advancedvirt-common/development"
526+
repository: CentOS Stream 8 - Advanced Virtualization
527+
state: present
528+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
529+
- name: "centos-stream-8-nfv-openvswitch-development"
530+
base_path: "centos/8-stream/nfv/x86_64/openvswitch-2/development"
531+
repository: CentOS Stream 8 - NFV OpenvSwitch
532+
state: present
533+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
534+
- name: "centos-stream-8-powertools-development"
535+
base_path: "centos/8-stream/PowerTools/x86_64/os/development"
536+
repository: CentOS Stream 8 - PowerTools
537+
state: present
538+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
539+
- name: "centos-8-opstools-collectd-development"
540+
base_path: "centos/8-stream/opstools/x86_64/collectd-5/development"
541+
repository: CentOS 8 - OpsTools - collectd
542+
state: present
543+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
544+
- name: "centos-stream-8-ceph-pacific-development"
545+
base_path: "centos/8-stream/storage/x86_64/ceph-pacific/development"
546+
repository: CentOS Stream 8 - Ceph Pacific
547+
state: present
548+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
549+
- name: "elasticsearch-logstash-kibana-7.x-development"
550+
base_path: "elasticsearch/oss-7.x/development"
551+
repository: ELK repository for 7.x packages
552+
state: present
553+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
554+
- name: "grafana-development"
555+
base_path: "grafana/oss/rpm/development"
556+
repository: Grafana
557+
state: present
558+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
559+
- name: "rabbitmq-erlang-development"
560+
base_path: "rabbitmq/erlang/el/8/x86_64/development"
561+
repository: RabbitMQ - Erlang
562+
state: present
563+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
564+
- name: "rabbitmq-server-development"
565+
base_path: "rabbitmq/rabbitmq-server/el/8/x86_64/development"
566+
repository: RabbitMQ - Server
567+
state: present
568+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
569+
- name: "treasuredata-4-development"
570+
base_path: "treasuredata/4/redhat/8/x86_64/development"
571+
repository: TreasureData 4
572+
state: present
573+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
574+
391575
# Development gets promoted to production.
392576
stackhpc_pulp_distribution_rpm_production:
393577
# Base CentOS 8 Stream repositories
@@ -453,6 +637,63 @@ stackhpc_pulp_distribution_rpm_production:
453637
state: present
454638
required: "{{ stackhpc_pulp_sync_el_8 | bool }}"
455639

640+
# Additional repositories required to build Kolla containers from local Pulp service.
641+
- name: "centos-stream-8-openstack-wallaby-production"
642+
base_path: "centos/8-stream/cloud/x86_64/openstack-wallaby/production"
643+
repository: CentOS Stream 8 - OpenStack Wallaby
644+
state: present
645+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
646+
- name: "centos-stream-8-advanced-virtualization-production"
647+
base_path: "centos/8-stream/virt/x86_64/advancedvirt-common/production"
648+
repository: CentOS Stream 8 - Advanced Virtualization
649+
state: present
650+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
651+
- name: "centos-stream-8-nfv-openvswitch-production"
652+
base_path: "centos/8-stream/nfv/x86_64/openvswitch-2/production"
653+
repository: CentOS Stream 8 - NFV OpenvSwitch
654+
state: present
655+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
656+
- name: "centos-stream-8-powertools-production"
657+
base_path: "centos/8-stream/PowerTools/x86_64/os/production"
658+
repository: CentOS Stream 8 - PowerTools
659+
state: present
660+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
661+
- name: "centos-8-opstools-collectd-production"
662+
base_path: "centos/8-stream/opstools/x86_64/collectd-5/production"
663+
repository: CentOS 8 - OpsTools - collectd
664+
state: present
665+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
666+
- name: "centos-stream-8-ceph-pacific-production"
667+
base_path: "centos/8-stream/storage/x86_64/ceph-pacific/production"
668+
repository: CentOS Stream 8 - Ceph Pacific
669+
state: present
670+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
671+
- name: "elasticsearch-logstash-kibana-7.x-production"
672+
base_path: "elasticsearch/oss-7.x/production"
673+
repository: ELK repository for 7.x packages
674+
state: present
675+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
676+
- name: "grafana-production"
677+
base_path: "grafana/oss/rpm/production"
678+
repository: Grafana
679+
state: present
680+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
681+
- name: "rabbitmq-erlang-production"
682+
base_path: "rabbitmq/erlang/el/8/x86_64/production"
683+
repository: RabbitMQ - Erlang
684+
state: present
685+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
686+
- name: "rabbitmq-server-production"
687+
base_path: "rabbitmq/rabbitmq-server/el/8/x86_64/production"
688+
repository: RabbitMQ - Server
689+
state: present
690+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
691+
- name: "treasuredata-4-production"
692+
base_path: "treasuredata/4/redhat/8/x86_64/production"
693+
repository: TreasureData 4
694+
state: present
695+
required: "{{ stackhpc_pulp_sync_for_local_container_build | bool and stackhpc_pulp_sync_el_8 | bool }}"
696+
456697
###############################################################################
457698
# Containers
458699

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
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.
8+

0 commit comments

Comments
 (0)