Skip to content

OCP Installer Development | Getting credentials with CI

The credentials used by installer is commonly called pull-secret.

You can otain the pull-secret for free on Red Hat Portal using your RHNID.

Getting credentials (basic)

Visit the portal and get the credentials: openshift.com/try

Getting credentials with CI Registry

'CI registry' is a image registry that holds the most recent images from CI builds.

If you want to test a recent release you that was not yet delivered, you may want to run those steps.

Those steps will be restrict only for OpenShift developers.

References:

Steps:

  1. Set env vars
TS="$(date +%Y%m%d%H%M)"
BASE_DIR="${HOME}/.openshift"
export PULL_SECRET_BKP="${BASE_DIR}/pull-secret-${TS}-bkp.json"
export PULL_SECRET_CI="${BASE_DIR}/pull-secret-${TS}-ci.json"
export PULL_SECRET="${BASE_DIR}/pull-secret-${TS}.json"
mkdir -p ${BASE_DIR}
  1. Download the pull secret from portal and save it on ${PULL_SECRET_BKP}

https://console.redhat.com/openshift/install/aws/installer-provisioned

  1. Login to CI Cluster to retrieve a token

  2. Login on CLI using the token provided

oc login --token=<my token> --server=https://api.ci.l2s4.p1.openshiftapps.com:6443
  1. Get CI Credentials
cp ${PULL_SECRET_BKP} ${PULL_SECRET_CI}
oc registry login --to=${PULL_SECRET_CI}
  1. Merge CI credentials
cat ${PULL_SECRET_CI} |awk -v ORS= -v OFS= '{$1=$1}1' > ${PULL_SECRET}
  1. Check your credentials

  2. Inspect

    jq . ${PULL_SECRET}
    

  3. Use the credentials bundle on installer configuration:

cat ${PULL_SECRET}
Back to top