Skip to content

auchanretailfrance/nexus-blobstore-google-cloud

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nexus Repository Google Cloud Storage Blobstore

Build Status Join the chat at https://gitter.im/sonatype/nexus-developers

This project adds Google Cloud Object Storage backed blobstores to Sonatype Nexus Repository 3. It allows Nexus Repository to store the components and assets in Google Cloud instead of a local filesystem.

Contribution Guidelines

Go read our contribution guidelines to get a bit more familiar with how we would like things to flow.

Requirements

Also, there is a good amount of information available at Bundle Development Overview

Building

To build the project and generate the bundle use Maven:

mvn clean install

Installing

After you have built the project, run the provided install script

sh ./install-plugin.sh path/to/your/nxrm3/install

Edit path/to/your/nxrm3/install/system/org/sonatype/nexus/assemblies/nexus-core-feature/${NEXUS_VERSION}/nexus-core-feature-${NEXUS_VERSION}-features.xml:

<feature version="0.3.0.SNAPSHOT" prerequisite="false" dependency="false">nexus-blobstore-google-cloud</feature>

That line should be added at about line 14, directly after:

<feature version="3.11.0" prerequisite="false" dependency="false">nexus-task-log-cleanup</feature>

Google Cloud Storage Permissions

Next, you will need to create an account with appropriate permissions.

Of the predefined account roles, Storage Admin will grant the plugin to create any Google Cloud Storage Buckets you require and administer all of the objects within, but it will also have access to manage any other Google Cloud Storage Buckets associated with the project.

If you are using custom roles, the account will need:

  1. (required) storage.objects.*
  2. (required) storage.buckets.get
  3. or storage.buckets.*.

If you only provide permissions 1 and 2, you will have to create any Google Cloud Storage Buckets in advance of assigning them to Nexus Repository Manager blob stores. The third option will allow the plugin to create buckets for you.

If you are creating the Google Cloud Storage Buckets in advance, you should use either the 'Multi-Regional' or 'Regional' storage class; 'Nearline' and 'Coldline' are not suitable for Nexus Repository Manager workloads. If you let the plugin create the bucket, it will use the 'Multi-Regional' storage class.

Google Cloud Storage Authentication

Per the Google Cloud documentation:

  1. Generate a JSON Service Account key
  2. Store this file on the filesystem with appropriate permissions for the user running Nexus to read it.
  3. (optional, but recommended) Set the GOOGLE_APPLICATION_CREDENTIALS environment variable for the user running Nexus:
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/my/key.json

Configuration

A restart of Nexus Repository Manager is required to complete the installation process.

Log in as admin and create a new blobstore, selecting 'Google Cloud Storage' as the type.

If you did not set the environment variable in Step 3 above, specify the absolute path to the JSON Service Account key file.

The Fine Print

It is worth noting that this is NOT SUPPORTED by Sonatype, and is a contribution of ours to the open source community (read: you!)

Remember:

  • Use this contribution at the risk tolerance that you have
  • Do NOT file Sonatype support tickets related to Google Cloud support
  • DO file issues here on GitHub, so that the community can pitch in

Phew, that was easier than I thought. Last but not least of all:

Have fun creating and using this plugin and the Nexus platform, we are glad to have you here!

Getting help

Looking to contribute to our code but need some help? There's a few ways to get information:

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 74.2%
  • Groovy 22.7%
  • Shell 3.1%