* Add the quickstart draft * Add context for new article/support * style tweaks * add link to toc * Small edits * Детали! * Add description * Staging is my friend * Apply suggestions from code review * All about that space * Formatting tweaks are almost there * Balance is key. * Last spacing attempts for now * Another spacing adjustment * Remove redirect * Apply suggestions from code review * Apply @lucascosti's stellar input Co-authored-by: Lucas Costi <lucascosti@users.noreply.github.com> * spacing dance & Merge branch 'minio-setup-3067' of github.com:github/docs-internal into minio-setup-3067 * Apply @lucascosti's stellar input Co-authored-by: Lucas Costi <lucascosti@users.noreply.github.com> * rewrite intro * Fix intro * Change order of intro * intro tweak * Apply suggestions from code review Co-authored-by: Kayla Ngan <kaylangan@github.com> * Apply URL example for next steps * Tighten up text Co-authored-by: Lucas Costi <lucascosti@users.noreply.github.com> Co-authored-by: Kayla Ngan <kaylangan@github.com>
4.9 KiB
title, intro, versions
| title | intro | versions | ||
|---|---|---|---|---|
| Quickstart for configuring MinIO storage | Set up MinIO as a storage provider for using {% data variables.product.prodname_registry %} on your enterprise. |
|
{% data reusables.package_registry.packages-ghes-release-stage %}
Before you can enable and configure {% data variables.product.prodname_registry %} on {% data variables.product.product_location_enterprise %}, you need to prepare your third-party storage solution.
MinIO offers object storage with support for the S3 API and {% data variables.product.prodname_registry %} on your enterprise.
This quickstart shows you how to set up MinIO using Docker for use with {% data variables.product.prodname_registry %} but you have other options for managing MinIO besides Docker. For more information about MinIO, see the official MinIO docs.
1. Choose a MinIO mode for your needs
| MinIO mode | Optimized for | Storage infrastructure required |
|---|---|---|
| Standalone MinIO (on a single host) | Fast setup | N/A |
| MinIO as a NAS gateway | NAS (Network-attached storage) | NAS devices |
| Clustered MinIO (also called Distributed MinIO) | Data security | Storage servers running in a cluster |
For more information about your options, see the official MinIO docs.
2. Install, run, and sign in to MinIO
-
Set up your preferred environment variables for MinIO.
These examples use
MINIO_DIR:$ export MINIO_DIR=$(pwd)/minio $ mkdir -p $MINIO_DIR -
Install MinIO.
$ docker pull minio/minioFor more information, see the official "MinIO Quickstart Guide."
-
Sign in to MinIO using your MinIO access key and secret.
{% linux %}
$ export MINIO_ACCESS_KEY=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) # this one is actually a secret, so careful $ export MINIO_SECRET_KEY=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1){% endlinux %}
{% mac %}
$ export MINIO_ACCESS_KEY=$(cat /dev/urandom | LC_CTYPE=C tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) # this one is actually a secret, so careful $ export MINIO_SECRET_KEY=$(cat /dev/urandom | LC_CTYPE=C tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1){% endmac %}
You can access your MinIO keys using the environment variables:
$ echo $MINIO_ACCESS_KEY $ echo $MINIO_SECRET_KEY -
Run MinIO in your chosen mode.
-
Run MinIO using Docker on a single host:
$ docker run -p 9000:9000 \ -v $MINIO_DIR:/data \ -e "MINIO_ACCESS_KEY=$MINIO_ACCESS_KEY" \ -e "MINIO_SECRET_KEY=$MINIO_SECRET_KEY" \ minio/minio server /dataFor more information, see "MinIO Docker Quickstart guide."
-
Run MinIO using Docker as a NAS gateway:
This setup is useful for deployments where there is already a NAS you want to use as the backup storage for {% data variables.product.prodname_registry %}.
$ docker run -p 9000:9000 \ -v $MINIO_DIR:/data \ -e "MINIO_ACCESS_KEY=$MINIO_ACCESS_KEY" \ -e "MINIO_SECRET_KEY=$MINIO_SECRET_KEY" \ minio/minio gateway nas /dataFor more information, see "MinIO Gateway for NAS."
-
Run MinIO using Docker as a cluster. This MinIO deployment uses several hosts and MinIO's erasure coding for the strongest data protection. To run MinIO in a cluster mode, see the "Distributed MinIO Quickstart Guide.
-
3. Create your MinIO bucket for {% data variables.product.prodname_registry %}
-
Install the MinIO client.
$ docker pull minio/mc -
Create a bucket with a host URL that {% data variables.product.prodname_ghe_server %} can access.
-
Local deployments example:
$ export MC_HOST_minio="http://${MINIO_ACCESS_KEY}:${MINIO_SECRET_KEY} @localhost:9000" $ docker run minio/mc <em>BUCKET-NAME</em>This example can be used for MinIO standalone or MinIO as a NAS gateway.
-
Clustered deployments example:
$ export MC_HOST_minio="http://${MINIO_ACCESS_KEY}:${MINIO_SECRET_KEY} @minioclustername.example.com:9000" $ docker run minio/mc mb packages
-
Next steps
To finish configuring storage for {% data variables.product.prodname_registry %}, you'll need to copy the MinIO storage URL:
echo "http://${MINIO_ACCESS_KEY}:${MINIO_SECRET_KEY}@minioclustername.example.com:9000"
For the next steps, see "Configuring third-party storage for packages."