Skip to content

Instantly share code, notes, and snippets.

@mikedep333
Last active January 5, 2023 20:47
Show Gist options
  • Select an option

  • Save mikedep333/7ace9690bba6a70875e1bfd5af608234 to your computer and use it in GitHub Desktop.

Select an option

Save mikedep333/7ace9690bba6a70875e1bfd5af608234 to your computer and use it in GitHub Desktop.
Creating an HCaaS Ephemeral Environment

Prerequisites

pip install --upgrade pulp-cli

Login and namespace

bonfire namespace reserve --duration 8h
  • NOTE: Your namespace will be a "namespace pool" with a bunch of kubernetes objects already in it. These can be safely ignored for now.

  • Set the namespace

oc config set-context --current --namespace=ephemeral-abcdef
  • Modify pulp-template.yaml. Replace:
  namespace: openshift

with:

  namespace: ephemeral-abcdef

Deploy Pulp

  • Deploy the template
oc apply -f pulp-template.yaml
  • Deploy an instance of Pulp:
oc new-app pulp-example -p DOMAIN=apps.c-rh-c-eph.8p0c.p1.openshiftapps.com -p PULP_ADMIN_PASSWORD=orangej321

Create the minio S3 storage bucket

  • Get the hostname for the minio route.
oc get route | grep minio
  • Specify that hostname in this command:
mc config host add s3 http://minio-abcde.apps.c-rh-c-eph.8p0c.p1.openshiftapps.com AKIAIT2Z5TDYPX3ARJBA fqRvjWaPU5o0fCqQuUWbj9Fainj2pVZtBCiDiieS --api S3v4
  • This next command only ever needs to be run once.
mc config host rm local
  • Now create the bucket
mc mb s3/pulp3 --region us-east-1

Configure pulp-cli (Optional)

  • Get the hostname for all of the pulp application routes
oc get route | grep example-pulp-api-v3
  • Specify that hostname in this command to configure the pulp-cli:
pulp config create --username admin --password orangej321 --base-url https://pulp-abcde.apps.c-rh-c-eph.8p0c.p1.openshiftapps.com   --no-verify-ssl --overwrite
  • Specify that hostname as you append to ~/.netrc:
machine pulp-abcde.apps.c-rh-c-eph.8p0c.p1.openshiftapps.com
login admin
password orangej321

You can now run the pulp CLI commands on the pulp-rpm docs for example.

Need help?

We're on pulp-deployments on matrix.org

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment