Introduction to Blob Storage in Nexus

Introduction to Blob Storage in Nexus

ยท

3 min read

What is Blob storage ?

  • When we upload our jar file, components, assets and meta data file to the Nexus repository, they all get stored in Blob store.
  • In simple words, Blob store is Nexus storage to store all the uploaded files.

NOTE : If you don't know what Nexus is and how to setup you can check out my blog here

How does Blob storage works ?

  • Blob store is internal mechanism to store all the binary parts of artifacts
  • Blob store can be on a local system or a cloud storage
  • Each Blob store can be used by multiple repositories or single repository or group of repositories

Blob store Interface

blob-storage.png

  • The above image shows that a blob storage name "default" is present in the repository

  • Check blob storage in your server

    ls /opt/sonatype-work/nexus3/
    
  • You can check the blob storage directory blob-storage.png

  • Let's check inside blobs

    ls /opt/sonatype-work/nexus3/blobs
    

    blob-storage.png

  1. Name - The blob store's name as displayed in repository administration.
  2. Type - The type of the blob store backend. The following options are available:
    • Azure Cloud Storage (PRO) - Stores blobs in Azure cloud storage.
    • File - Store blobs in file system-based storage.
    • Group (PRO) - Combines multiple blob stores into one.
    • S3 - Store blobs in AWS S3 cloud storage.
  3. State - The state of the blob store.
    • Started indicates it is running as expected.
    • Failed indicates that there is a configuration issue and, as a consequence, the blob store failed to initialize.
  4. Blob Count - The number of blobs currently stored in a blob store.
  5. Total Size - The blob store's total size in bytes.
  6. Available Space - A blob store's remaining storage capacity.

Create a new blob store

  • Steps

    1. Click on create blob store
    2. Select the type of blob ( S3 or File )
    3. Provide name to the blob ( my-blob )
    4. Provide the path or leave it default ( the path should be access by nexus user ) the default path will be /opt/sonatype-work/nexus3/blobs/my-blob
    5. Click on save blob-storage.png
  • You can see a new blob store name my-blob get created blob-storage.png

  • Check in the blobs directory

    ls /opt/sonatype-work/nexus3/blobs
    

    blob-storage.png

Things to keep in mind

  1. The blob store can not be modified once they created
  2. Blob store used by repository can't be deleted

Now , you can easily assign blob storage to any repository during creating one and once you assign a blob to a repository you can not change it. So, keep that in mind. Also, check out the Official Documentation of blob stores - Nexus Link to Official Documentation

ย