33set -eof pipefail
44
55cleanup () {
6- kill-containers " ${MINIO_JOB } " " ${PG_JOB} "
6+ kill-containers " ${STORAGE_JOB } " " ${PG_JOB} "
77}
88trap cleanup EXIT
99
@@ -16,46 +16,46 @@ CURRENT_DIR=$(cd "$(dirname "$0")"; pwd)
1616
1717create-postgres-creds
1818
19- puts-step " creating fake minio credentials"
19+ puts-step " creating fake storage credentials"
2020
2121s3Accesskey=" 1234567890123456789012345678901234567890"
2222s3Secretkey=" 1234567890123456789012345678901234567890"
23- # boot minio
23+ # boot storage
2424mkdir -p " ${CURRENT_DIR} " /tmp/bin
2525echo " ls /data/database/*/basebackups_005" > " ${CURRENT_DIR} " /tmp/bin/backups.sh
26- MINIO_JOB =$( docker run -d \
27- -e DRYCC_MINIO_ACCESSKEY =$s3Accesskey \
28- -e DRYCC_MINIO_SECRETKEY =$s3Secretkey \
26+ STORAGE_JOB =$( docker run -d \
27+ -e DRYCC_STORAGE_ACCESSKEY =$s3Accesskey \
28+ -e DRYCC_STORAGE_SECRETKEY =$s3Secretkey \
2929 -v " ${CURRENT_DIR} " /tmp/bin:/tmp/bin \
30- " ${DEV_REGISTRY} " /drycc/minio :canary server /data/)
30+ " ${DEV_REGISTRY} " /drycc/storage :canary server /data/)
3131
32- puts-step " minio starting, wait 30s."
32+ puts-step " storage starting, wait 30s."
3333sleep 30
3434
35- # boot postgres, linking the minio container and setting DRYCC_MINIO_ENDPOINT
36- MINIO_IP =$( docker inspect --format " {{ .NetworkSettings.IPAddress }}" " ${MINIO_JOB } " )
35+ # boot postgres, linking the storage container and setting DRYCC_STORAGE_ENDPOINT
36+ STORAGE_IP =$( docker inspect --format " {{ .NetworkSettings.IPAddress }}" " ${STORAGE_JOB } " )
3737PG_CMD=" docker run -d \
38- --add-host minio .local:${MINIO_IP } \
38+ --add-host storage .local:${STORAGE_IP } \
3939 -e PGCTLTIMEOUT=1200 \
4040 -e BACKUP_FREQUENCY=1s \
41- -e DATABASE_STORAGE=minio \
42- -e DRYCC_MINIO_LOOKUP =path \
43- -e DRYCC_MINIO_BUCKET =database \
44- -e DRYCC_MINIO_ENDPOINT =http://minio .local:9000 \
45- -e DRYCC_MINIO_ACCESSKEY =$s3Accesskey \
46- -e DRYCC_MINIO_SECRETKEY =$s3Secretkey $1 "
41+ -e DATABASE_STORAGE=storage \
42+ -e DRYCC_STORAGE_LOOKUP =path \
43+ -e DRYCC_STORAGE_BUCKET =database \
44+ -e DRYCC_STORAGE_ENDPOINT =http://storage .local:9000 \
45+ -e DRYCC_STORAGE_ACCESSKEY =$s3Accesskey \
46+ -e DRYCC_STORAGE_SECRETKEY =$s3Secretkey $1 "
4747
4848start-postgres " ${PG_CMD} "
4949
5050# display logs for debugging purposes
51- puts-step " displaying minio logs"
52- docker logs " ${MINIO_JOB } "
51+ puts-step " displaying storage logs"
52+ docker logs " ${STORAGE_JOB } "
5353
5454check-postgres " ${PG_JOB} "
5555
56- # check if minio has the 5 backups
57- puts-step " checking if minio has 5 backups"
58- BACKUPS=" $( docker exec " ${MINIO_JOB } " sh /tmp/bin/backups.sh | grep json) "
56+ # check if storage has the 5 backups
57+ puts-step " checking if storage has 5 backups"
58+ BACKUPS=" $( docker exec " ${STORAGE_JOB } " sh /tmp/bin/backups.sh | grep json) "
5959
6060NUM_BACKUPS=" $( echo " ${BACKUPS} " | wc -w) "
6161# NOTE (bacongobbler): the BACKUP_FREQUENCY is only 1 second, so we could technically be checking
0 commit comments