Pulp Infrastructure Setup
Overview
Section titled “Overview”This document describes the step-by-step to setup a Pulp environment (similarly, you can also use it as a reference when redeploying Pulp on an existing environment).
This guide relies on the current automation and Infrastructure-as-Code (IaC) which are currently used to deploy Pulp. Thus, it won’t go into details about each components or explain infrastructre architect. This is rather a glue between the existing automation and remaining manual steps we need to do to deploy Pulp.
Instruction
Section titled “Instruction”-
Terraform setup: Create a new file in
environments/<env>/pulp.tfin theconfig-mgmtrepository and adapt the values. You can refer toenvironments/ops/pulp.tfas an example. Apply the new environment via a MR. -
Create a new database user:
- Access the new CloudSQL instance created by Terraform on the GCP Console
- Go to
Users - Create a new user named
pulp - Note down the password for the next step
-
Vault setup: A Pulp setup requires 4 Vault items in the location
k8s/<env>-gitlab-gke/pulp/:-
memorystore: MemoryStore connection details. It is created by Terraform. Nothing to do here. -
gpg: Create a keyprivate_keywith the value is a valid private key used for GPG -
admin-password: Create a keypasswordwith the value is a random string used as Pulp’s admin password -
db: Add the folllwing JSON value, in which you only need to update POSTGRES_PASSWORD from the password created in the previous step:{"POSTGRES_DB_NAME": "pulp","POSTGRES_HOST": "pulp-sql-proxy","POSTGRES_PASSWORD": "CHANGEME","POSTGRES_PORT": "5432","POSTGRES_SSLMODE": "prefer","POSTGRES_USERNAME": "pulp"}
-
-
Helm setup:
- Open the
gitlab-helmfilesrepository - Copy the
pulpblock frombases/environments/ops.yamltobases/environments/<env>.yaml - Go to
releases/pulp/values-secrets/. Cloneops.yaml.gotmplto<env>.yaml.gotmpl. Adapt the Vault secret versions in the new file - Go to
releases/pulp/values-sql-proxy. Cloneops.yaml.gotmplto<env>.yaml.gotmpl. Replace theinstancevalue with the CloudSQL instance name created by Terraform in the previous step - Go to
releases/pulp/. Cloneops.yaml.gotmplto<env>.yaml.gotmpl. Replace the following values:fqdn: the full domain name to access the Pulp instanceloadBalancerIP: Go to the GCP’s IP address page, choose the right project, and then filter bypulp-gke-ingress-. You should find only one result. This is the IP address created by Terraform. Use the IP address forloadBalancerIPpulpCert.issuerRef.name: Depend on the domain name, choose the right SSL certificate issuer. As a rule of thumb:*.gitlab.net: Usegitlab-combined*.gitlab.com: Usecloudflare-issuer
- Apply via an MR
- Open the
Testing the setup
Section titled “Testing the setup”Performing the following simple tests to validate if the setup is accessible:
-
Access the Pulp instance’s domain name
-
Create a test repository:
Terminal window export PULP_ADMIN_PASSWORD=$(kubectl get secret pulp-custom-admin-password -o jsonpath='{.data.password}' | base64 -d)export PULP_DOMAIN=<pulp-domain>pulp config create --base-url "https://${PULP_DOMAIN}" --api-root "/pulp/" --verify-ssl --format json --force --username admin --password "${PULP_ADMIN_PASSWORD}" --timeout 0 --overwritepulp deb repository create --name=variant-1-bookworm