Skip to content

OpenShift Development | Build components

installer

Clone the repository:

cd ${GOHOME}/go/src/github.com/openshift/
git clone --recursive https://github.com/openshift/installer
cd installer

Build:

$(which time) -v hack/build.sh

Save it in your custom bin path:

cp -v bin/openshift-install ${MY_BIN}/openshift-install-$(git branch |grep ^'*' |awk '{print$2}')

machine-config-operator

Clone the repository:

cd ${GOHOME}/go/src/github.com/openshift/
git clone --recursive https://github.com/openshift/machine-config-operator
cd machine-config-operator

Build and push:

podman build -f Dockerfile.rhel7 -t quay.io/${QUAY_USER}/machine-config-operator:latest && \
    podman push quay.io/${QUAY_USER}/machine-config-operator:latest

cluster-config-operator

Clone the repository:

cd ${GOHOME}/go/src/github.com/openshift/
git clone --recursive https://github.com/openshift/cluster-config-operator
cd cluster-config-operator

Build and push:

podman build -f Dockerfile.rhel7 -t quay.io/${QUAY_USER}/cluster-config-operator:latest && \
    podman push quay.io/${QUAY_USER}/cluster-config-operator:latest

cluster-kube-apiserver-operator

Clone the repository:

cd ${GOHOME}/go/src/github.com/openshift/
git clone --recursive https://github.com/openshift/cluster-kube-apiserver-operator
cd cluster-kube-apiserver-operator

Build and push:

REPO_NAME=cluster-kube-apiserver-operator
podman build \
    --authfile ${PULL_SECRET} \
    -f Dockerfile.rhel7 \
    -t quay.io/${QUAY_USER}/${REPO_NAME}:latest \
    && podman push quay.io/${QUAY_USER}/${REPO_NAME}:latest

origin

Container build

  1. Get CI credentials and concat to pull secret
  2. Connect to VPN: the rhel container will fallback to local repo when building locally, which depends on private net
  3. Run the build:

`bash podman build \ --authfile ~/.openshift/pull-secret-latest.json \ -t quay.io/${QUAY_USER}/openshift-tests:latest \ -f images/tests/Dockerfile.rhel .'