Red Hat certified OpenShift Operator for installing Sonatype Nexus Repository Manager 3 to an OpenShift cluster.
To develop and test locally, you'll use CodeReady Containers on your workstation and push your operator image to quay.io to make it available for installation.
-
Install Red Hat OpenShift Local (formerly known as CodeReady Containers) for a local Openshift 4 environment.
-
Ensure you have a personal quay.io account.
-
Generate a new version of the operator image using the templates under test:
./scripts/new_version.sh image <new-operator-version> <cert-app-image-version>
Get the certified app version from NXRM in the Red Hat Catalog.
Example:
./scripts/new_version.sh image 3.41.1-1 3.41.1-ubi-1
-
Build and deploy the operator image to your personal quay.io repository:
docker build . -f build/Dockerfile --tag quay.io/<username>/nxrm-operator-certified:[operator-version]
docker login quay.io
docker push quay.io/<username>/nxrm-operator-certified:[operator-version]
-
Make sure the new image on quay.io is public, so that the OpenShift cluster can pull it. You should have nxrm-operator-certified repository with public visibility.
-
Update the bundle files for the new image:
./scripts/new_version.sh bundle <new-operator-version> <operator-image-id> <certified-app-image-id>
Get the certified app ID URL from NXRM in the Red Hat Catalog.
Example:
./scripts/new_version.sh bundle 3.41.1-1 quay.io/{quay.io-account}/nxrm-operator-certified:3.41.1-1 registry.connect.redhat.com/sonatype/nexus-repository-manager@sha256:{sha256}
-
Install all the descriptors for the operator to your OpenShift cluster:
-
./scripts/install.sh
-
By executing
kubectl get pods
you should see a pod running in Openshift:example-nexusrepo-sonatype-nexus-{id}
-
-
Expose the new Nexus Repo outside the cluster:
-
Create a Route in OpenShift UI to the new service, port 8081.
-
Create a Route in OpenShift UI to the new service, using:
Port: 8081 -> 8081.
Service: example-nexusrepo-sonatype-nexus-service
-
-
Visit the new URL shown on the Route page in OpenShift UI.
-
Default credentials are
admin/admin123
.
- Remove the route in the console.
- Uninstall all the descriptors for the operator:
./scripts/uninstall.sh