ARE-Nexus

Last modified by Simon Bortnik on 2022/03/09 07:32

Purpose

This software stack provides Nexus, a comprehensive Artifact Repository (ARE) with universal indexing and protocol support for popular artifact and repository formats.

Properties

 Stack-Description  Nexus Artifact Repository (ARE)    
 Stack-Image        docker.msg.team/ps/docker-stack-are-nexus   
 Stack-Version      3.66.0 
 Stack-Release      20240322 
 Product-Name  Nexus OSS 
 Product-Vendor  Sonatype 
 Product-Contact  https://www.sonatype.com/nexus-repository-oss 
 Product-Model  Open Source 
 Product-License  AGPL 
 Product-Limits  none 
Implementation Base  Java
Execution Base  JVM
Initial Start Time  00:01:40
Documentation  https://help.sonatype.com/repomanager3

Topology

The stack consists of one single container.

Configuration

Variable Name       Default Meaning  
CFG_NEXUS_ADMIN_PASSWORDadmin  
CFG_NEXUS_PROPERTIES   

First Steps

To configure additional Nexus configurations to the nexus.properties files set the following stack parameter:

docker-stack configure params are-nexus CFG_NEXUS_PROPERTIES="<name>=<value>;<name>=<value>"

Example

docker-stack configure params are-nexus CFG_NEXUS_PROPERTIES="nexus.scripts.allowCreation=true"

When accesing the Web-UI for the first time click the Sign in button on the top right. Then log in as admin with the initial password admin.

A setup wizard will then start. Simply press Next on the wizard's first screen.

  • In the second screen you have to choose and confirm a new password for the admin account.
    lightbulb Should you get an error telling that Nexus could not store the setting check the Nexus logs with docker logs are-nexus and the free space on your filesystem - if there is insufficient space available Nexus places its database in read-only mode. In case you have to extend your filesystem look at the howto section for advice.)
  • The third screen asks whether you want to allow and configure anonymous access (checkbox). You have to decide on your own whether this is necessary in your context, for a typical project setup it is usually not.
  • The last screen simply informs about the completion of the setup, press Finish here.

Nexus stores artifacts in repositories. A few of them are already predefined, you see them when clicking on the Browse icon in the navigation bar on the left side:

image-20191204153438-1.png

If none of them fits your needs the next step is to setup one or more artifact repositories. Nexus uses so-called Blob Stores as underlying storage abstraction. They are relevant if your repository grows very fast and you soon will have the need to distribute it over several physical storage devices (instead of simply extending your filesystem once it fills up). Otherwise you can stay with the predefined single Blob Stre named default. See more on these considerations here.

To create a new repository in the "default" blob store proceed as follows:

  • Press the cogwheel icon in the top row of the Nexus web UI.
  • Select Repositories.
  • Press button Create Repository.
  • Select the type of repository you want to create. Beside others this determines the network protocol Nexus offers to access the repository. E.g. if you select docker (hosted) you create a local repository which can be accessed by Docker installations as a regular Docker registry.
  • An entry screen displays. Fill in the relevant fields an consult the Nexus documentation for more help. See the specific howto when you plan to set up a Docker registry.
  • Click Create repository/.

Administration Commands

Command Arguments Function  
docker-stack exec are-nexus passwd  

Testing

After setting up the stack:

  1. Sign in as Admin
  2. Click the Cog icon --> Repositories --> Create new repository
  3. Create a new repository: Raw (hosted)
  4. Click the box icon --> Upload 
  5. Select the newly created repository and upload something

Related Documents

Failed to execute the [velocity] macro. Cause: [The execution of the [velocity] script macro is not allowed. Check the rights of its last author or the parameters if it's rendered from another script.]. Click on this message for details.
Tags:
Created by Christian Reiber on 2019/08/03 20:22

Navigation