Skip to content

Commit 67ce24b

Browse files
committed
refactored pulp deploy and added pulp docs
1 parent c74360b commit 67ce24b

File tree

4 files changed

+25
-8
lines changed

4 files changed

+25
-8
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ It requires an OpenStack cloud, and an Ansible "deploy host" with access to that
3232
Before starting ensure that:
3333
- You have root access on the deploy host.
3434
- You can create instances using a Rocky 9 GenericCloud image (or an image based on that).
35-
- **NB**: In general it is recommended to use the [latest released image](https://github.com/stackhpc/ansible-slurm-appliance/releases) which already contains the required packages. This is built and tested in StackHPC's CI. However the appliance will install the necessary packages if a GenericCloud image is used.
35+
- **NB**: In general it is recommended to use the [latest released image](https://github.com/stackhpc/ansible-slurm-appliance/releases) which already contains the required packages. This is built and tested in StackHPC's CI.
3636
- You have a SSH keypair defined in OpenStack, with the private key available on the deploy host.
3737
- Created instances have access to internet (note proxies can be setup through the appliance if necessary).
3838
- Created instances have accurate/synchronised time (for VM instances this is usually provided by the hypervisor; if not or for bare metal instances it may be necessary to configure a time service via the appliance).

ansible/adhoc/deploy-pulp.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,10 @@
1818
tasks_from: install.yml
1919
public: true
2020

21-
- name: Add pulp host to environment
21+
- name: Print Pulp endpoint
2222
become: no
23-
delegate_to: localhost
24-
ansible.builtin.copy:
25-
dest: "{{ lookup('env', 'APPLIANCES_ENVIRONMENT_ROOT') }}/inventory/group_vars/all/pulp_server.yml"
26-
content: |
27-
# ansible managed
28-
appliances_pulp_url: "http://{{ pulp_server }}:{{ pulp_site_port }}"
23+
debug:
24+
msg: |
25+
Server configured, override 'appliances_pulp_url' with
26+
appliances_pulp_url: "http://{{ pulp_server }}:{{ pulp_site_port }}"
27+
in your environments

docs/experimental/pulp.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Pulp Server
2+
3+
In order to ensure reproducible builds, the appliance can build images using repository mirrors from StackHPC's Ark Pulp server. The appliance will sync relevant repositories to local Pulp server which will be used for image builds. Using a local server can be enabled by adding `pulp` to the build groups and overriding `dnf_repos_repolist` to point at content hosted on the local server.
4+
5+
## Deploying/configuring Pulp Server
6+
7+
### Deploying a Pulp server
8+
A playbook is provided to install and configure a Pulp server on a given host. Admin credentials for this server are automatically generated through the `ansible/adhoc/generate-passwords.yml' playbook. This can be run with
9+
`ansible-playbook ansible/adhoc/deploy-pulp.yml -e "pulp_server=<host_ip>"`
10+
This will print a Pulp endpoint which can be copied to your environments as appropriate. Ensure that the server is accessible on the specified port. Note that this server's content isn't authenticated so assumes the server is deployed behind a secure network.
11+
12+
### Using an existing Pulp server
13+
An existing Pulp server can be used to host Ark repos by overriding `pulp_site_password` and `appliances_pulp_url` in the target environment. Note that this assumes the same configuration as the appliance deployed pulp i.e no content authentication.
14+
15+
## Syncing Pulp content with Ark
16+
17+
By default, the appliance will sync repos for the targetted distribution during build (can be disabled by setting `appliances_sync_pulp_on_build` to `false`). 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`.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pulp_site_port: 8080

0 commit comments

Comments
 (0)