Skip to content

Commit 3b329aa

Browse files
committed
Automate pulp deployment
1 parent 54286ae commit 3b329aa

File tree

4 files changed

+17
-10
lines changed

4 files changed

+17
-10
lines changed

README.rst

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ Generate Terraform variables:
107107
108108
seed_vm_flavor = "general.v1.small"
109109
seed_disk_size = 100
110+
deploy_pulp = false
110111
111112
multinode_flavor = "general.v1.medium"
112113
multinode_image = "Rocky9-lvm"
@@ -255,16 +256,7 @@ This script will go through the process of performing the following tasks
255256
256257
You may also need to comment out many of the other config overrides in ``stackhpc-ci.yml`` such as ``stackhpc_repo_mirror_url`` plus all of the ``stackhpc_repo_*`` and ``stackhpc_docker_registry*`` variables which only apply to local pulp.
257258

258-
To create the local pulp as part of the automated deployment, add the following commands to the ``deploy-openstack.sh`` script in between ``kayobe seed service deploy`` and ``kayobe overcloud host configure``:
259-
260-
.. code-block:: console
261-
262-
kayobe seed service deploy --tags seed-deploy-containers --kolla-tags none -e deploy_containers_registry_attempt_login=false
263-
kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp-repo-sync.yml
264-
kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp-repo-publish.yml
265-
kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp-container-sync.yml
266-
kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp-container-publish.yml
267-
259+
To create the local Pulp as part of the automated deployment, set ``deploy_pulp`` to ``true`` in your ``terraform.tfvars`` file.
268260

269261
Accessing OpenStack
270262
-------------------

outputs.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ resource "local_file" "deploy_openstack" {
6868
seed_addr = openstack_compute_instance_v2.seed.access_ip_v4,
6969
ssh_user = var.ssh_user,
7070
deploy_wazuh = var.deploy_wazuh
71+
deploy_pulp = var.deploy_pulp
7172
controller_hostname = openstack_compute_instance_v2.controller.*.name
7273
}
7374
)

templates/deploy-openstack.tpl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,14 @@ fi
5151
# Configure hosts
5252
kayobe control host bootstrap
5353
kayobe seed host configure
54+
%{ if deploy_pulp }
55+
# Deploy Pulp
56+
kayobe seed service deploy --tags seed-deploy-containers --kolla-tags none -e deploy_containers_registry_attempt_login=false
57+
kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp-repo-sync.yml
58+
kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp-repo-publish.yml
59+
kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp-container-sync.yml
60+
kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp-container-publish.yml
61+
%{ endif }
5462
kayobe overcloud host configure
5563
%{ if deploy_wazuh }kayobe infra vm host configure%{ endif }
5664

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,3 +102,9 @@ variable "deploy_wazuh" {
102102
type = bool
103103
default = false
104104
}
105+
106+
variable "deploy_pulp" {
107+
description = "Bool, whether or not to deploy Pulp."
108+
type = bool
109+
default = false
110+
}

0 commit comments

Comments
 (0)