Skip to content

Commit aa9ada1

Browse files
authored
repo sync
2 parents 4a74e0b + 78fd8d7 commit aa9ada1

File tree

3 files changed

+135
-1
lines changed

3 files changed

+135
-1
lines changed

content/admin/packages/configuring-third-party-storage-for-packages.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ versions:
1313

1414
{% data variables.product.prodname_registry %} on {% data variables.product.prodname_ghe_server %} uses external blob storage to store your packages. The amount of storage required depends on your usage of {% data variables.product.prodname_registry %}.
1515

16-
At this time, {% data variables.product.prodname_registry %} supports blob storage with Amazon Web Services (AWS) S3. MinIO is also supported, but configuration is not currently implemented in the {% data variables.product.product_name %} interface. You can use MinIO for storage by following the instructions for AWS S3, entering the analogous information for your MinIO configuration.
16+
At this time, {% data variables.product.prodname_registry %} supports blob storage with Amazon Web Services (AWS) S3. MinIO is also supported, but configuration is not currently implemented in the {% data variables.product.product_name %} interface. You can use MinIO for storage by following the instructions for AWS S3, entering the analogous information for your MinIO configuration. Before configuring third-party storage for {% data variables.product.prodname_registry %} on {% data variables.product.prodname_dotcom %}, you must set up a bucket with your third-party storage provider. For more information on installing and running a MinIO bucket to use with {% data variables.product.prodname_registry %}, see the "[Quickstart for configuring MinIO storage](/admin/packages/quickstart-for-configuring-minio-storage)."
1717

1818
For the best experience, we recommend using a dedicated bucket for {% data variables.product.prodname_registry %}, separate from the bucket you use for {% data variables.product.prodname_actions %} storage.
1919

content/admin/packages/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@ versions:
1010
{% data reusables.package_registry.packages-ghes-release-stage %}
1111

1212
{% link_with_intro /enabling-github-packages-for-your-enterprise %}
13+
{% link_with_intro /quickstart-for-configuring-minio-storage %}
1314
{% link_with_intro /configuring-packages-support-for-your-enterprise %}
1415
{% link_with_intro /configuring-third-party-storage-for-packages %}
Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
---
2+
title: Quickstart for configuring MinIO storage
3+
intro: 'Set up MinIO as a storage provider for using {% data variables.product.prodname_registry %} on your enterprise.'
4+
versions:
5+
enterprise-server: '>=2.22'
6+
---
7+
8+
{% data reusables.package_registry.packages-ghes-release-stage %}
9+
10+
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.
11+
12+
MinIO offers object storage with support for the S3 API and {% data variables.product.prodname_registry %} on your enterprise.
13+
14+
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](https://docs.min.io/).
15+
16+
### 1. Choose a MinIO mode for your needs
17+
18+
| MinIO mode | Optimized for | Storage infrastructure required |
19+
|----|----|----|
20+
| Standalone MinIO (on a single host) | Fast setup | N/A |
21+
| MinIO as a NAS gateway | NAS (Network-attached storage)| NAS devices |
22+
| Clustered MinIO (also called Distributed MinIO)| Data security | Storage servers running in a cluster |
23+
24+
For more information about your options, see the official [MinIO docs](https://docs.min.io/).
25+
26+
### 2. Install, run, and sign in to MinIO
27+
28+
1. Set up your preferred environment variables for MinIO.
29+
30+
These examples use `MINIO_DIR`:
31+
```shell
32+
$ export MINIO_DIR=$(pwd)/minio
33+
$ mkdir -p $MINIO_DIR
34+
```
35+
36+
2. Install MinIO.
37+
38+
```shell
39+
$ docker pull minio/minio
40+
```
41+
For more information, see the official "[MinIO Quickstart Guide](https://docs.min.io/docs/minio-quickstart-guide)."
42+
43+
3. Sign in to MinIO using your MinIO access key and secret.
44+
45+
{% linux %}
46+
```shell
47+
$ export MINIO_ACCESS_KEY=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
48+
# this one is actually a secret, so careful
49+
$ export MINIO_SECRET_KEY=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
50+
```
51+
{% endlinux %}
52+
53+
{% mac %}
54+
```shell
55+
$ export MINIO_ACCESS_KEY=$(cat /dev/urandom | LC_CTYPE=C tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
56+
# this one is actually a secret, so careful
57+
$ export MINIO_SECRET_KEY=$(cat /dev/urandom | LC_CTYPE=C tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
58+
```
59+
{% endmac %}
60+
61+
You can access your MinIO keys using the environment variables:
62+
63+
```shell
64+
$ echo $MINIO_ACCESS_KEY
65+
$ echo $MINIO_SECRET_KEY
66+
```
67+
68+
4. Run MinIO in your chosen mode.
69+
70+
* Run MinIO using Docker on a single host:
71+
72+
```shell
73+
$ docker run -p 9000:9000 \
74+
-v $MINIO_DIR:/data \
75+
-e "MINIO_ACCESS_KEY=$MINIO_ACCESS_KEY" \
76+
-e "MINIO_SECRET_KEY=$MINIO_SECRET_KEY" \
77+
minio/minio server /data
78+
```
79+
80+
For more information, see "[MinIO Docker Quickstart guide](https://docs.min.io/docs/minio-docker-quickstart-guide.html)."
81+
82+
* Run MinIO using Docker as a NAS gateway:
83+
84+
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 %}.
85+
86+
```shell
87+
$ docker run -p 9000:9000 \
88+
-v $MINIO_DIR:/data \
89+
-e "MINIO_ACCESS_KEY=$MINIO_ACCESS_KEY" \
90+
-e "MINIO_SECRET_KEY=$MINIO_SECRET_KEY" \
91+
minio/minio gateway nas /data
92+
```
93+
94+
For more information, see "[MinIO Gateway for NAS](https://docs.min.io/docs/minio-gateway-for-nas.html)."
95+
96+
* 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](https://docs.min.io/docs/distributed-minio-quickstart-guide.html).
97+
98+
### 3. Create your MinIO bucket for {% data variables.product.prodname_registry %}
99+
100+
1. Install the MinIO client.
101+
102+
```shell
103+
$ docker pull minio/mc
104+
```
105+
106+
2. Create a bucket with a host URL that {% data variables.product.prodname_ghe_server %} can access.
107+
108+
* Local deployments example:
109+
110+
```shell
111+
$ export MC_HOST_minio="http://${MINIO_ACCESS_KEY}:${MINIO_SECRET_KEY} @localhost:9000"
112+
$ docker run minio/mc <em>BUCKET-NAME</em>
113+
```
114+
115+
This example can be used for MinIO standalone or MinIO as a NAS gateway.
116+
117+
* Clustered deployments example:
118+
119+
```shell
120+
$ export MC_HOST_minio="http://${MINIO_ACCESS_KEY}:${MINIO_SECRET_KEY} @minioclustername.example.com:9000"
121+
$ docker run minio/mc mb packages
122+
```
123+
124+
125+
### Next steps
126+
127+
To finish configuring storage for {% data variables.product.prodname_registry %}, you'll need to copy the MinIO storage URL:
128+
129+
```
130+
echo "http://${MINIO_ACCESS_KEY}:${MINIO_SECRET_KEY}@minioclustername.example.com:9000"
131+
```
132+
133+
For the next steps, see "[Configuring third-party storage for packages](/admin/packages/configuring-third-party-storage-for-packages)."

0 commit comments

Comments
 (0)