Skip to content

Commit

Permalink
Added minio to infra samples
Browse files Browse the repository at this point in the history
  • Loading branch information
luisbelloch committed Feb 9, 2018
1 parent bb67d45 commit 67cbdf0
Show file tree
Hide file tree
Showing 8 changed files with 93 additions and 0 deletions.
17 changes: 17 additions & 0 deletions infra/minio/config/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"version": "8",
"hosts": {
"local": {
"url": "http://localhost:9000",
"accessKey": "JX6SNZEW2CLYM66UDHT7",
"secretKey": "NHtuFRcy8XnRuqbASsHTK65oxYMQ7sNvwTnA1oX0",
"api": "S3v4"
},
"minio": {
"url": "http://minio:9000",
"accessKey": "JX6SNZEW2CLYM66UDHT7",
"secretKey": "NHtuFRcy8XnRuqbASsHTK65oxYMQ7sNvwTnA1oX0",
"api": "s3v4"
}
}
}
29 changes: 29 additions & 0 deletions infra/minio/config/config.json.old
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"version": "8",
"hosts": {
"gcs": {
"url": "https://storage.googleapis.com",
"accessKey": "YOUR-ACCESS-KEY-HERE",
"secretKey": "YOUR-SECRET-KEY-HERE",
"api": "S3v2"
},
"local": {
"url": "http://localhost:9000",
"accessKey": "",
"secretKey": "",
"api": "S3v4"
},
"play": {
"url": "https://play.minio.io:9000",
"accessKey": "Q3AM3UQ867SPQQA43P2F",
"secretKey": "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG",
"api": "S3v4"
},
"s3": {
"url": "https://s3.amazonaws.com",
"accessKey": "YOUR-ACCESS-KEY-HERE",
"secretKey": "YOUR-SECRET-KEY-HERE",
"api": "S3v4"
}
}
}
4 changes: 4 additions & 0 deletions infra/minio/config/share/downloads.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"version": "1",
"shares": {}
}
4 changes: 4 additions & 0 deletions infra/minio/config/share/uploads.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"version": "1",
"shares": {}
}
1 change: 1 addition & 0 deletions infra/minio/data
20 changes: 20 additions & 0 deletions infra/minio/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: '3'
services:
minio:
image: minio/minio
command: server /data
volumes:
- minio1:/data
networks: [block]
ports:
- 9000:9000
environment:
MINIO_ACCESS_KEY: JX6SNZEW2CLYM66UDHT7
MINIO_SECRET_KEY: NHtuFRcy8XnRuqbASsHTK65oxYMQ7sNvwTnA1oX0

networks:
block:

volumes:
minio1:

12 changes: 12 additions & 0 deletions infra/minio/mc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
set -eou pipefail

readonly MC=(docker run -v "$(PWD)/data":/data -v "$(PWD)/config":/root/.mc --network="host" -ti minio/mc)

if [[ $# -lt 1 ]]; then
>&2 ${MC[@]}
exit 1
fi

${MC[@]} $@

6 changes: 6 additions & 0 deletions infra/minio/mirror.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash
set -eou pipefail
readonly BUCKET=local/data
./mc mb -p "${BUCKET}"
./mc mirror --remove data "${BUCKET}"

0 comments on commit 67cbdf0

Please sign in to comment.