MinIO S3 Artifact Repo Setup¶
Steps to set up a MinIO server¶
Object storage is an abstraction layer above the file system that provides an API to interact with data. MinIO is an easy way to start working with object storage. It is compatible with S3, easy to deploy, manage locally, and scale if needed.
Follow the steps below to set up a MinIO server:
-
Copy the contents of the
example-get-started
directory to a separate directory outside the cmf repository. -
Check whether cmf is initialized.
If cmf is not initialized, the following message will appear on the screen:cmf init show
'cmf' is not configured. Execute the 'cmf init' command.
-
Execute the following command to initialize the MinIO S3 bucket as a CMF artifact repository:
cmf init minioS3 --url s3://dvc-art --endpoint-url http://x.x.x.x:9000 \ --access-key-id minioadmin --secret-key minioadmin \ --git-remote-url https://github.com/user/experiment-repo.git \ --cmf-server-url http://x.x.x.x:8080 --neo4j-user neo4j \ --neo4j-password password --neo4j-uri bolt://localhost:7687
Here, "dvc-art" is provided as an example bucket name. However, users can change it as needed. If the user chooses to change it, they will need to update the Dockerfile for minioS3 accordingly.
-
Execute
cmf init show
to check the CMF configuration. The sample output looks as follows:remote.minio.url=s3://bucket-name remote.minio.endpointurl=http://localhost:9000 remote.minio.access_key_id=minioadmin remote.minio.secret_access_key=minioadmin core.remote=minio
-
Build a MinIO server using a Docker container. The
docker-compose.yml
available in theexample-get-started
directory provides two services:minio
andaws-cli
. The user will initialize the repository with the bucket name, storage URL, and credentials to access MinIO. -
Execute the following command to start the Docker container. The MYIP variable is the IP address of the machine on which you are executing the following command. The following command requires root privileges.
orMYIP=XX.XX.XXX.XXX docker-compose up
You should see output confirming that MinIO is up and running.MYIP=XX.XX.XXX.XXX docker compose up
Also, you can adjust
$MYIP
inexamples/example-get-started/docker-compose.yml
to specify the server IP and run thedocker compose
command without specifying MYIP above. -
Login into
remote.minio.endpointurl
(in the above example - http://localhost:9000) using the access-key and the secret-key defined in thecmf init
command. -
The following image is a snapshot of this example using a MinIO server and a bucket named 'dvc-art'.