Skip to content

Commit 18b220e

Browse files
committed
moved defaults to CI and updated docs
1 parent bc5e26e commit 18b220e

File tree

5 files changed

+21
-8
lines changed

5 files changed

+21
-8
lines changed

ansible/roles/pulp_site/defaults/main.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
pulp_site_url: "{{ appliances_pulp_url }}"
22
pulp_site_port: 8080
33
pulp_site_username: admin # shouldn't be changed
4+
pulp_site_password: "{{ vault_pulp_admin_password }}"
45
pulp_site_upstream_content_url: https://ark.stackhpc.com/pulp/content
5-
pulp_site_upstream_username: slurm-app-ci
6-
pulp_site_upstream_password: "{{ lookup('ansible.builtin.env', 'ARK_PASSWORD') }}"
76
_pulp_site_rocky_prefix: "{{ pulp_site_target_distribution }}/{{ pulp_site_target_distribution_version }}"
87
pulp_site_default_upstream_suffix: "{{ pulp_site_target_arch }}/os"
9-
pulp_site_password: "{{ vault_pulp_admin_password }}"
108
pulp_site_validate_certs: false
119
pulp_site_install_dir: '/home/rocky/pulp'
1210
pulp_site_selinux_suffix: "{{ ':Z' if ansible_selinux.status == 'enabled' else '' }}"

docs/experimental/pulp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ An existing Pulp server can be used to host Ark repos by overriding `pulp_site_p
1414

1515
## Syncing Pulp content with Ark
1616

17-
If the `pulp` group is added to the Packer build groups, the local Pulp server will be synced with Ark on build. You must supply your Ark credentials, either by overriding `pulp_site_upstream_password` or setting environment variable `ARK_PASSWORD`. Content can also be synced by running `ansible/adhoc/sync-pulp.yml`, optionally setting extravars for `pulp_site_target_arch`, `pulp_site_target_distribution`, `pulp_site_target_distribution_version` and `pulp_site_target_distribution_version`.
17+
If the `pulp` group is added to the Packer build groups, the local Pulp server will be synced with Ark on build. You must authenticate with Ark by overriding `pulp_site_upstream_username` and `pulp_site_upstream_password` with your vault encrypted Ark dev credentials. `dnf_repos_username` and `dnf_repos_password` must remain unset to access content from the local Pulp. Content can also be synced by running `ansible/adhoc/sync-pulp.yml`. By default this syncs repositories for Rocky 9.4 with x86_64 architecture, but can be overriden by setting extravars for `pulp_site_target_arch`, `pulp_site_target_distribution`, `pulp_site_target_distribution_version` and `pulp_site_target_distribution_version_major`.

docs/image-build.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ The fat images StackHPC builds and tests in CI are available from [GitHub releas
1717
To build either a site-specific fat image from scratch, or to extend an existing StackHPC fat image:
1818

1919
1. Ensure the current OpenStack credentials have sufficient authorisation to upload images (this may or may not require the `member` role for an application credential, depending on your OpenStack configuration).
20-
2. Create a Packer [variable definition file](https://developer.hashicorp.com/packer/docs/templates/hcl_templates/variables#assigning-values-to-input-variables) at e.g. `environments/<environment>/builder.pkrvars.hcl` containing at a minimum:
20+
2. The provided dev credentials for StackHPC's "Ark" Pulp server must be added to the target environments. This is done by overriding `dnf_repos_username` and `dnf_repos_password` with your vault encrypted credentials in `environments/<base_environment>/inventory/group_vars/all/pulp.yml`. See the [experimental docs](experimental/pulp.md) if you wish instead wish to use a local Pulp server.
21+
3. Create a Packer [variable definition file](https://developer.hashicorp.com/packer/docs/templates/hcl_templates/variables#assigning-values-to-input-variables) at e.g. `environments/<environment>/builder.pkrvars.hcl` containing at a minimum:
2122

2223
```hcl
2324
flavor = "general.v1.small" # VM flavor to use for builder VMs
@@ -35,9 +36,9 @@ To build either a site-specific fat image from scratch, or to extend an existing
3536
- `update,control,login,compute`: The resultant image has all packages in the source image updated, and then packages for all types of nodes in the cluster are added. When using a GenericCloud image for `source_image_name` this builds a site-specific fat image from scratch.
3637
- One or more specific groups which are not enabled in the appliance by default, e.g. `lustre`. When using a StackHPC fat image for `source_image_name` this extends the image with just this additional functionality.
3738
38-
3. Activate the venv and the relevant environment.
39+
4. Activate the venv and the relevant environment.
3940
40-
4. Build images using the relevant variable definition file, e.g.:
41+
5. Build images using the relevant variable definition file, e.g.:
4142
4243
cd packer/
4344
PACKER_LOG=1 /usr/bin/packer build -on-error=ask -var-file=$PKR_VAR_environment_root/builder.pkrvars.hcl openstack.pkr.hcl
@@ -52,7 +53,7 @@ To build either a site-specific fat image from scratch, or to extend an existing
5253
5354
then delete the failed volume, select cancelling the build when Packer queries, and then retry. This is [Openstack bug 1823445](https://bugs.launchpad.net/cinder/+bug/1823445).
5455
55-
5. The built image will be automatically uploaded to OpenStack with a name prefixed `openhpc` and including a timestamp and a shortened git hash.
56+
6. The built image will be automatically uploaded to OpenStack with a name prefixed `openhpc` and including a timestamp and a shortened git hash.
5657
5758
# Build Process
5859

environments/.stackhpc/inventory/group_vars/builder.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,7 @@
1313
# Alternatively, configure to use ark directly:
1414
dnf_repos_username: slurm-app-ci
1515
dnf_repos_password: "{{ lookup('env','ARK_PASSWORD') }}"
16+
17+
# Can be set regardless of approach above:
18+
pulp_site_upstream_username: slurm-app-ci
19+
pulp_site_upstream_password: "{{ lookup('ansible.builtin.env', 'ARK_PASSWORD') }}"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
11
pulp_site_port: 8080
2+
3+
# If using Ark directly (no local Pulp server), override the following with Ark creds
4+
5+
# dnf_repos_username:
6+
# dnf_repos_password:
7+
8+
# If instead using local Pulp server, override below with Ark creds
9+
10+
# pulp_site_upstream_username:
11+
# pulp_site_upstream_password:

0 commit comments

Comments
 (0)