Code Monkey home page Code Monkey logo

operator-nxrm3's Introduction

Sonatype NXRM 3 Certified Operator

Red Hat certified OpenShift Operator for installing Sonatype Nexus Repository Manager 3 to an OpenShift cluster.

Building from Source for Local Development and Testing

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.

  1. Install Red Hat OpenShift Local (formerly known as CodeReady Containers) for a local Openshift 4 environment.

  2. Ensure you have a personal quay.io account.

  3. 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

  4. Build and deploy the operator image to your personal quay.io repository:

    1. docker build . -f build/Dockerfile --tag quay.io/<username>/nxrm-operator-certified:[operator-version]
    2. docker login quay.io
    3. docker push quay.io/<username>/nxrm-operator-certified:[operator-version]
  5. 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.

  6. 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}

  7. Install all the descriptors for the operator to your OpenShift cluster:

    1. ./scripts/install.sh

    2. By executing kubectl get pods you should see a pod running in Openshift:

      example-nexusrepo-sonatype-nexus-{id}

  8. Expose the new Nexus Repo outside the cluster:

    1. Create a Route in OpenShift UI to the new service, port 8081.

    2. Create a Route in OpenShift UI to the new service, using:

      Port: 8081 -> 8081.

      Service: example-nexusrepo-sonatype-nexus-service

  9. Visit the new URL shown on the Route page in OpenShift UI.

  10. Default credentials are admin/admin123.

Uninstall NXRM 3 from a Local Test Cluster

  1. Remove the route in the console.
  2. Uninstall all the descriptors for the operator: ./scripts/uninstall.sh

operator-nxrm3's People

Contributors

adrianpowell avatar amoreno-sonatype avatar bobotimi avatar eduard-tita avatar fblancosona avatar hectorhuol avatar jflinchbaugh avatar mpuglin avatar scherzhaft avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

operator-nxrm3's Issues

Is it possible to specify NodeSelector in Nexus Repo (Instance, not Operator)?

I want to use NodeSelctor to specify the Node on which the Nexus Repo (instance) will run.
I checked Yaml on the screen of the created instance and specified NodeSelector in spec.nexus, but the pod of the instance does not start. (When I deleted the description in spec.nexus that I added, it started successfully.)

  • Is it possible to specify NodeSelector in Nexus Repo (Instance, not Operator)?

  • If possible, could you please tell me how to set it up?

HTTPS Connector Configuration Exception on OpenShift 4.7.7

OpenShift 4.7.7,
SonaType Nexus Operator v3.32.0-1

Steps:

  1. Create Docker repository.
  2. Under Repository Connectors, Select HTTPS w/ any port. I tried 5001 .. 5005
  3. Click Save.
  4. Check Pod logs for errors

org.sonatype.nexus.repository.manager.internal.RepositoryManagerImpl - Creating repository: demo-docker -> OrientConfiguration{repositoryName='demo-docker', recipeName='docker-hosted', attributes={docker={httpsPort=5003.0, forceBasicAuth=true, v1Enabled=false}, storage={blobStoreName=default, strictContentTypeValidation=true, writePolicy=ALLOW, latestPolicy=false}, component={proprietaryComponents=false}}} 2021-08-13 01:53:34,889+0000 WARN [qtp931670639-89] admin org.sonatype.nexus.repository.docker.internal.DockerConnectorFacetImpl - Could not configure HTTPS connector on port 5003 for docker repository demo-docker org.sonatype.nexus.bootstrap.jetty.UnsupportedHttpSchemeException: Unsupported HTTP Scheme: https at org.sonatype.nexus.internal.jetty.ConnectorRegistrarImpl.validate(ConnectorRegistrarImpl.java:128) at org.sonatype.nexus.internal.jetty.ConnectorRegistrarImpl.addConnector(ConnectorRegistrarImpl.java:84) at org.sonatype.nexus.repository.docker.internal.DockerConnectorFacetImpl.doStart(DockerConnectorFacetImpl.java:121)

Pod is not coming up

Getting below errors..I used the operator.yaml file as is

kubectl logs example-nexusrepo-sonatype-nexus-659bf8b554-9bff6
mkdir: cannot create directory '../sonatype-work/nexus3/log': Permission denied
mkdir: cannot create directory '../sonatype-work/nexus3/tmp': Permission denied
OpenJDK 64-Bit Server VM warning: Cannot open file ../sonatype-work/nexus3/log/jvm.log due to No such file or directory

Warning: Cannot open log file: ../sonatype-work/nexus3/log/jvm.log
Warning: Forcing option -XX:LogFile=/tmp/jvm.log
java.io.FileNotFoundException: ../sonatype-work/nexus3/tmp/i4j_ZTDnGON8hezynsMX2ZCYAVDtQog=.lock (No such file or directory)
at java.io.RandomAccessFile.open0(Native Method)
at java.io.RandomAccessFile.open(RandomAccessFile.java:316)
at java.io.RandomAccessFile.(RandomAccessFile.java:243)
at com.install4j.runtime.launcher.util.SingleInstance.check(SingleInstance.java:72)
at com.install4j.runtime.launcher.util.SingleInstance.checkForCurrentLauncher(SingleInstance.java:31)
at com.install4j.runtime.launcher.UnixLauncher.checkSingleInstance(UnixLauncher.java:88)
at com.install4j.runtime.launcher.UnixLauncher.main(UnixLauncher.java:67)
java.io.FileNotFoundException: /nexus-data/karaf.pid (Permission denied)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(FileOutputStream.java:270)
at java.io.FileOutputStream.(FileOutputStream.java:213)
at java.io.FileOutputStream.(FileOutputStream.java:101)
at org.apache.karaf.main.InstanceHelper.writePid(InstanceHelper.java:126)
at org.apache.karaf.main.Main.launch(Main.java:278)
at org.sonatype.nexus.karaf.NexusMain.launch(NexusMain.java:113)
at org.sonatype.nexus.karaf.NexusMain.main(NexusMain.java:52)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.exe4j.runtime.LauncherEngine.launch(LauncherEngine.java:85)
at com.install4j.runtime.launcher.UnixLauncher.main(UnixLauncher.java:69)
java.lang.RuntimeException: /nexus-data/log/karaf.log (No such file or directory)
at org.apache.karaf.main.util.BootstrapLogManager.getDefaultHandlerInternal(BootstrapLogManager.java:102)
at org.apache.karaf.main.util.BootstrapLogManager.getDefaultHandlersInternal(BootstrapLogManager.java:137)
at org.apache.karaf.main.util.BootstrapLogManager.getDefaultHandlers(BootstrapLogManager.java:70)
at org.apache.karaf.main.util.BootstrapLogManager.configureLogger(BootstrapLogManager.java:75)
at org.apache.karaf.main.Main.launch(Main.java:279)
at org.sonatype.nexus.karaf.NexusMain.launch(NexusMain.java:113)
at org.sonatype.nexus.karaf.NexusMain.main(NexusMain.java:52)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.exe4j.runtime.LauncherEngine.launch(LauncherEngine.java:85)
at com.install4j.runtime.launcher.UnixLauncher.main(UnixLauncher.java:69)
Caused by: java.io.FileNotFoundException: /nexus-data/log/karaf.log (No such file or directory)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(FileOutputStream.java:270)
at java.io.FileOutputStream.(FileOutputStream.java:213)
at org.apache.karaf.main.util.BootstrapLogManager$SimpleFileHandler.open(BootstrapLogManager.java:193)
at org.apache.karaf.main.util.BootstrapLogManager$SimpleFileHandler.(BootstrapLogManager.java:182)
at org.apache.karaf.main.util.BootstrapLogManager.getDefaultHandlerInternal(BootstrapLogManager.java:100)
... 12 more
Error creating bundle cache.

after upgrade to 3.58.0-1 operator crashes with ImagePullBackOff

repository registry.connect.redhat.com/sonatype/nexus-repository-manager not found: name unknown: Image not found
Failed to pull image "registry.connect.redhat.com/sonatype/nexus-repositor
eac96a0815cb0920aa9b": rpc error: code = Unknown desc = reading manifest sha256:4965872d251958699b762a0107fa89ad484636bb2ef4eac96a0815cb0920aa9b in r
name unknown: Image not found
Is it possible to rollback the operator
Screenshot_87

Issue with securityContext on Openshift

Setting nexus.securityContext to {} has no effect. The deployment still gets created with fsGroup: 200. The deployment resource doesn't specify a ServiceAccount to run the pods as so my only option at the moment is to add a new SCC to the default ServiceAccount which is not great.

I installed the operator through the web console by the way.

Thanks

need way to specify arbitrary number of ports to expose for multiple docker registries

issue

Currently there is only two ports hard coded in the Deployment, (

) and http and a docker port. The problem is what if I have mutliple docker instances and need multiple docker ports. The most common scneario for this is if using OSS version, you need to push to a different repostiory then you pull form, assuming you set up a group to pull from. This is currently impossible to set up with the operator as it is now.

request

make the ports in the Deployment an array that can be ajusted by the NexusRepo CR. One solution maybe to use the existing service parameter and automatically add any targetport in the service to the Deployment port list.

No Role & RoleBindings founds for Statefulsets

When I'm trying to create an instance for Nexus Repo Manager, and enable statefulset with true value. A warning message appear saying that the default serviceaccount (that the operator create) has no permission to manipulate statefulset objets.

After creating the proper role and rolebinding objets to support statefulsets objets and recreate the Nexus Repo Manager instance, I can bypass the problem. Please, check that. Regards!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.