Name: nexus-blobstore-google-cloud
Owner: Sonatype Community
Description: null
Created: 2018-05-08 14:40:19.0
Updated: 2018-05-17 18:09:12.0
Pushed: 2018-05-17 18:09:14.0
Homepage: null
Size: 93
Language: Java
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
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.
Go read our contribution guidelines to get a bit more familiar with how we would like things to flow.
Also, there is a good amount of information available at Bundle Development Overview
To build the project and generate the bundle use Maven:
mvn clean install
After you have built the project, copy the jar and feature into the nexus install (rooted at NEXUS_HOME
with NEXUS_VERSION
being 3.6.0 or later):
r -p ${NEXUS_HOME}/system/org/sonatype/nexus/plugins/nexus-blobstore-google-cloud/0.2.0-SNAPSHOT
/target/feature/feature.xml \
NEXUS_HOME}/system/org/sonatype/nexus/plugins/nexus-blobstore-google-cloud/0.2.0-SNAPSHOT/nexus-blobstore-google-cloud-0.2.0-SNAPSHOT-features.xml
/target/nexus-blobstore-google-cloud-0.2.0-SNAPSHOT.jar \
NEXUS_HOME}/system/org/sonatype/nexus/plugins/nexus-blobstore-google-cloud/0.2.0-SNAPSHOT/
Edit ${NEXUS_HOME}/etc/karaf/org.ops4j.pax.url.mvn.cfg
and change the last line so it can fetch dependencies from central:
ops4j.pax.url.mvn.repositories=https://repo1.maven.org/maven2@id=central
Edit ${NEXUS_HOME}/etc/karaf/org.apache.karaf.features.cfg
and add this entry to the end of the comma-separated list labeled featuresRepositories
:
org.sonatype.nexus.plugins/nexus-blobstore-google-cloud/0.2.0-SNAPSHOT/xml/features
Edit ${NEXUS_HOME}/system/org/sonatype/nexus/assemblies/nexus-core-feature/${NEXUS_VERSION}/nexus-core-feature-${NEXUS_VERSION}-features.xml
:
ture version="0.2.0-SNAPSHOT" prerequisite="false" dependency="false">nexus-blobstore-google-cloud</feature>
That line should be added at about line 14, directly after:
ture version="3.11.0" prerequisite="false" dependency="false">nexus-task-log-cleanup</feature>
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:
storage.objects.*
storage.buckets.get
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.
Per the Google Cloud documentation:
GOOGLE_APPLICATION_CREDENTIALS
environment variable for the user running Nexus:rt GOOGLE_APPLICATION_CREDENTIALS=/path/to/my/key.json
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.
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:
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!
Looking to contribute to our code but need some help? There's a few ways to get information: