diff --git a/README.rst b/README.rst index 8679284..8c9d5ee 100644 --- a/README.rst +++ b/README.rst @@ -107,6 +107,7 @@ Generate Terraform variables: seed_vm_flavor = "general.v1.small" seed_disk_size = 100 + deploy_pulp = false multinode_flavor = "general.v1.medium" multinode_image = "Rocky9-lvm" @@ -147,6 +148,16 @@ If `deploy_wazuh` is set to true, an infrastructure VM will be created that hosts the Wazuh manager. The Wazuh deployment playbooks will also be triggered automatically to deploy Wazuh agents to the overcloud hosts. +.. caution:: + + Local pulp deployment is a new feature and may not be stable + +If `deploy_pulp` is set to true, a local pulp container will be deployed on the +seed node. This is mandatory for any multinode not running on SMS. Pulp can +sync a lot of data, so it is recommended that you ensure `seed_disk_size` is +greater than 150 when using this option. Local pulp deployments require +additional configuration, which is detailed below. + Generate a plan: .. code-block:: console @@ -219,18 +230,41 @@ These playbooks are tagged so that they can be invoked or skipped as required. F ansible-playbook -i ansible/inventory.yml ansible/configure-hosts.yml --skip-tags fqdn +The Ansible Control host should now be accessible with the following command: + +.. code-block:: console + + ssh $(terraform output -raw ssh_user)@$(terraform output -raw ansible_control_access_ip_v4) + +Deploy Pulp +----------- + +.. caution:: + + Local pulp deployment is a new feature and may not be stable + +To set up a local pulp service on the seed, first obtain/generate a set of Ark credentials using `this workflow `_, then add the following configuration to ``~/src/kayobe-config/etc/kayobe/environments/ci-multinode/stackhpc-ci.yml``on the Ansible Control host. + +.. code-block:: yaml + + stackhpc_release_pulp_username: + stackhpc_release_pulp_password: !vault | + + + pulp_username: admin + pulp_password: + Deploy OpenStack ---------------- Once the Ansible control host has been configured with a Kayobe/OpenStack configuration you can then begin the process of deploying OpenStack. -This can be achieved by either manually running the various commands to configures the hosts and deploy the services or automated by using `deploy-openstack.sh`, +This can be achieved by either manually running the various commands to configure the hosts and deploy the services or automated by using `deploy-openstack.sh`, which should be available within the homedir on your Ansible control host provided you ran `deploy-openstack-config.yml` earlier. If you choose to opt for automated method you must first SSH into your Ansible control host and then run the `deploy-openstack.sh` script .. code-block:: console - ssh $(terraform output -raw ssh_user)@$(terraform output -raw ansible_control_access_ip_v4) ~/deploy-openstack.sh This script will go through the process of performing the following tasks diff --git a/outputs.tf b/outputs.tf index aaec76c..4e93c81 100644 --- a/outputs.tf +++ b/outputs.tf @@ -68,6 +68,7 @@ resource "local_file" "deploy_openstack" { seed_addr = openstack_compute_instance_v2.seed.access_ip_v4, ssh_user = var.ssh_user, deploy_wazuh = var.deploy_wazuh + deploy_pulp = var.deploy_pulp controller_hostname = openstack_compute_instance_v2.controller.*.name } ) diff --git a/templates/deploy-openstack.tpl b/templates/deploy-openstack.tpl index 9b7a59a..b713335 100644 --- a/templates/deploy-openstack.tpl +++ b/templates/deploy-openstack.tpl @@ -48,9 +48,20 @@ if $(which apt 2>/dev/null >/dev/null); then sudo apt -y install uuid-runtime fi +# Edit config when deploying a local pulp repository +%{ if deploy_pulp } sed -i -e 's/^resolv_/#resolv_/g' -e 's/^stackhpc_repo_/#stackhpc_repo_/g' -e 's/^stackhpc_include/#stackhpc_include/g' -e 's/^stackhpc_docker_registry:/#stackhpc_docker_registry:/g' $KAYOBE_CONFIG_PATH/environments/$KAYOBE_ENVIRONMENT/stackhpc-ci.yml %{ endif } + # Configure hosts kayobe control host bootstrap kayobe seed host configure +%{ if deploy_pulp } +# Deploy Pulp +kayobe seed service deploy --tags seed-deploy-containers --kolla-tags none -e deploy_containers_registry_attempt_login=false +kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp-repo-sync.yml +kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp-repo-publish.yml +kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp-container-sync.yml +kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp-container-publish.yml +%{ endif } kayobe overcloud host configure %{ if deploy_wazuh }kayobe infra vm host configure%{ endif } diff --git a/variables.tf b/variables.tf index 950c01c..0326edb 100644 --- a/variables.tf +++ b/variables.tf @@ -102,3 +102,9 @@ variable "deploy_wazuh" { type = bool default = false } + +variable "deploy_pulp" { + description = "Bool, whether or not to deploy Pulp." + type = bool + default = false +}