This repository has been archived by the owner on Jan 30, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Story: ansible-pulp CI needs to test micro updates to Pulp 3
Implementation includes: 1. 2 new scenarios default-upgrade & source-upgrade, which pull pre-built (from current state of ansible-pulp master branch & molecule), pulpcore 3.0.0 with pulp_file 0.1.0 images. 2. Fixing a long-standing bug whereby the source scenario was run on top of the default scenario. Thereby essentially testing 3.0.0 -> 3.1.0dev upgrades. Fixes: #5892 ansible-pulp CI needs to test micro updates to Pulp 3 https://pulp.plan.io/issues/5892
- Loading branch information
1 parent
0c0f33f
commit ee5c255
Showing
20 changed files
with
232 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../.ansible-lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../scenario_resources/debian-redis-server.service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
pulp_default_admin_password: password | ||
pulp_upgrade: true | ||
pulp_install_plugins: | ||
pulp-file: | ||
upgrade: true | ||
pulp_settings: | ||
secret_key: secret | ||
content_origin: "http://{{ ansible_fqdn }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
--- | ||
dependency: | ||
name: galaxy | ||
role-file: requirements.yml | ||
driver: | ||
name: docker | ||
lint: | ||
name: yamllint | ||
# This is ignored by molecule, but can be reused in yaml | ||
.platform_base: &platform_base | ||
privileged: False | ||
volumes: | ||
- /sys/fs/cgroup:/sys/fs/cgroup:ro | ||
tmpfs: | ||
- /tmp | ||
- /run | ||
- /run/lock | ||
capabilities: | ||
- NET_ADMIN | ||
- NET_RAW | ||
platforms: | ||
- <<: *platform_base | ||
name: centos-7 | ||
# molecule often fails to pull, so we pull all images in .travis.yml | ||
image: quay.io/pulp/pulp-ci-c7:3.0.0 | ||
command: /sbin/init | ||
pre_build_image: true | ||
- <<: *platform_base | ||
name: debian-10 | ||
image: quay.io/pulp/pulp-ci-dbuster:3.0.0 | ||
command: /sbin/init | ||
pre_build_image: true | ||
- <<: *platform_base | ||
name: fedora-31 | ||
image: quay.io/pulp/pulp-ci-f31:3.0.0 | ||
command: /usr/sbin/init | ||
pre_build_image: true | ||
provisioner: | ||
name: ansible | ||
inventory: | ||
links: | ||
host_vars: ../scenario_resources/host_vars/ | ||
lint: | ||
name: ansible-lint | ||
scenario: | ||
name: default-upgrade | ||
verifier: | ||
name: inspec | ||
lint: | ||
name: rubocop | ||
enabled: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../example-use/playbook.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
- hosts: all | ||
tasks: | ||
- name: Hot patch redis-server service for docker operation (Debian) | ||
copy: | ||
src: debian-redis-server.service | ||
dest: /etc/systemd/system/redis-server.service | ||
when: ansible_distribution == "Debian" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../requirements.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../roles |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../.ansible-lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../scenario_resources/Dockerfile.j2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
pulp_default_admin_password: password | ||
pulp_source_dir: '/var/lib/pulp/devel/pulpcore' | ||
pulp_install_plugins: | ||
pulp-file: | ||
source_dir: "/var/lib/pulp/devel/pulp_file" | ||
developer_user_home: /var/lib/pulp | ||
developer_user: pulp | ||
pulp_settings: | ||
secret_key: secret | ||
content_origin: "http://{{ ansible_fqdn }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../scenario_resources/debian-redis-server.service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
pulp_default_admin_password: password | ||
pulp_source_dir: '/var/lib/pulp/devel/pulpcore' | ||
pulp_upgrade: true | ||
# Needed to determine whether or not pulpcore was actually upgraded, to | ||
# trigger the handler. | ||
pulp_pip_editable: false | ||
pulp_install_plugins: | ||
pulp-file: | ||
upgrade: true | ||
source_dir: "/var/lib/pulp/devel/pulp_file" | ||
developer_user_home: /var/lib/pulp | ||
developer_user: pulp | ||
pulp_settings: | ||
secret_key: secret | ||
content_origin: "http://{{ ansible_fqdn }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
--- | ||
dependency: | ||
name: galaxy | ||
role-file: requirements.yml | ||
driver: | ||
name: docker | ||
lint: | ||
name: yamllint | ||
# This is ignored by molecule, but can be reused in yaml | ||
.platform_base: &platform_base | ||
privileged: False | ||
volumes: | ||
- /sys/fs/cgroup:/sys/fs/cgroup:ro | ||
tmpfs: | ||
- /tmp | ||
- /run | ||
- /run/lock | ||
capabilities: | ||
- NET_ADMIN | ||
- NET_RAW | ||
platforms: | ||
- <<: *platform_base | ||
name: debian-10 | ||
# molecule often fails to pull, so we pull all images in .travis.yml | ||
image: quay.io/pulp/pulp-ci-dbuster:3.0.0 | ||
command: /sbin/init | ||
pre_build_image: true | ||
- <<: *platform_base | ||
name: fedora-31 | ||
image: quay.io/pulp/pulp-ci-f31:3.0.0 | ||
command: /usr/sbin/init | ||
pre_build_image: true | ||
provisioner: | ||
name: ansible | ||
inventory: | ||
links: | ||
host_vars: ../scenario_resources/host_vars/ | ||
lint: | ||
name: ansible-lint | ||
scenario: | ||
name: source-upgrade | ||
playbooks: | ||
prepare: prepare.yml | ||
verifier: | ||
name: inspec | ||
lint: | ||
name: rubocop | ||
enabled: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../example-source/playbook.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
- hosts: | ||
- all | ||
tasks: | ||
- name: Install required packages | ||
package: | ||
name: | ||
- git | ||
state: present | ||
|
||
- name: Create user {{ developer_user }} | ||
user: | ||
name: '{{ developer_user }}' | ||
home: '{{ developer_user_home }}' | ||
when: developer_user is defined | ||
|
||
- name: Clone pulp repository | ||
git: | ||
repo: 'https://github.com/pulp/pulpcore.git' | ||
dest: '{{ pulp_source_dir }}' | ||
update: yes | ||
|
||
- name: Clone pulp_file repository | ||
git: | ||
repo: 'https://github.com/pulp/pulp_file.git' | ||
dest: '{{ item.value.source_dir }}' | ||
update: yes | ||
with_dict: '{{ pulp_install_plugins }}' | ||
|
||
- name: Make devel directory world-writable | ||
file: | ||
path: /var/lib/pulp/ | ||
state: directory | ||
mode: 0777 | ||
recurse: true | ||
become: true | ||
|
||
- name: Hot patch redis-server service for docker operation (Debian) | ||
copy: | ||
src: debian-redis-server.service | ||
dest: /etc/systemd/system/redis-server.service | ||
when: ansible_distribution == "Debian" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../requirements.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../roles |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters