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
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
Let's check inside blobs
ls /opt/sonatype-work/nexus3/blobs
- Name - The blob store's name as displayed in repository administration.
- 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.
- 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.
- Blob Count - The number of blobs currently stored in a blob store.
- Total Size - The blob store's total size in bytes.
- Available Space - A blob store's remaining storage capacity.
Create a new blob store
Steps
- Click on create blob store
- Select the type of blob ( S3 or File )
- Provide name to the blob ( my-blob )
- 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
- Click on save
You can see a new blob store name my-blob get created
Check in the blobs directory
ls /opt/sonatype-work/nexus3/blobs
Things to keep in mind
- The blob store can not be modified once they created
- 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
ย