Skip to content

Reduce duplication in pulp.yml #580

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 15, 2023
Merged

Conversation

m-bull
Copy link
Contributor

@m-bull m-bull commented Aug 15, 2023

Uses the same approach as stackhpc-release-train for generating Pulp repository and distribution lists.

@m-bull m-bull requested a review from a team as a code owner August 15, 2023 06:19
@m-bull
Copy link
Contributor Author

m-bull commented Aug 15, 2023

Interacts with: #578

@markgoddard
Copy link
Contributor

FWIW, I had some help in reviewing this:

source venvs/kayobe/bin/activate
pip install .
source ./kayobe-env --environment ci-aio
export KAYOBE_VAULT_PASSWORD=$(cat vault-pw)
kayobe configuration dump -l localhost --var-name stackhpc_pulp_repository_deb_repos > deb-repos-after

Annoyingly this didn't work, and barfed at some inline vault stuff. A small hand edit of venvs/kayobe/share/kayobe/ansible/dump-config.yml did the trick:

    try:
        return yaml.safe_load(content)
    except yaml.YAMLError as e:
        print("Failed to decode config dump YAML file %s: %s" %
              (path, repr(e)))
+        print(content)

@markgoddard
Copy link
Contributor

FWIW, I had some help in reviewing this:

source venvs/kayobe/bin/activate
pip install .
source ./kayobe-env --environment ci-aio
export KAYOBE_VAULT_PASSWORD=$(cat vault-pw)
kayobe configuration dump -l localhost --var-name stackhpc_pulp_repository_deb_repos > deb-repos-after

Annoyingly this didn't work, and barfed at some inline vault stuff. A small hand edit of venvs/kayobe/share/kayobe/ansible/dump-config.yml did the trick:

    try:
        return yaml.safe_load(content)
    except yaml.YAMLError as e:
        print("Failed to decode config dump YAML file %s: %s" %
              (path, repr(e)))
+        print(content)

Hold on, you don't need the workaround when using --var-name.

@m-bull m-bull force-pushed the feat/simplify-pulp-yml branch from c80fa5c to 976a602 Compare August 15, 2023 09:01
Comment on lines 176 to 177
{%- set name = repo.distribution_name ~ 'development' -%}
{%- set base_path = repo.base_path ~ 'development' -%}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{%- set name = repo.distribution_name ~ 'development' -%}
{%- set base_path = repo.base_path ~ 'development' -%}
{%- set name = repo.distribution_name ~ 'production' -%}
{%- set base_path = repo.base_path ~ 'production' -%}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@m-bull m-bull force-pushed the feat/simplify-pulp-yml branch from 976a602 to 283cc79 Compare August 15, 2023 10:04
Copy link
Contributor

@markgoddard markgoddard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noice

@markgoddard markgoddard merged commit e606186 into stackhpc/yoga Aug 15, 2023
@markgoddard markgoddard deleted the feat/simplify-pulp-yml branch August 15, 2023 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants