Skip to content

Commit

Permalink
Merge pull request #3339 from uselagoon/local-backup-downloads
Browse files Browse the repository at this point in the history
  • Loading branch information
tobybellwood authored Nov 21, 2022
2 parents d282141 + fae17b9 commit ca242c6
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ wait-for-keycloak:
grep -m 1 "Config of Keycloak done." <(docker-compose -p $(CI_BUILD_TAG) --compatibility logs -f keycloak 2>&1)

# Define a list of which Lagoon Services are needed for running any deployment testing
main-test-services = actions-handler broker logs2notifications api api-db api-redis keycloak keycloak-db ssh auth-server local-git local-api-data-watcher-pusher local-minio
main-test-services = actions-handler broker logs2notifications api api-db api-redis keycloak keycloak-db ssh auth-server local-git local-api-data-watcher-pusher local-minio local-minio-upload

# List of Lagoon Services needed for webhook endpoint testing
webhooks-test-services = webhook-handler webhooks2tasks backup-handler
Expand Down Expand Up @@ -436,7 +436,7 @@ api-development: build/api build/api-db build/local-api-data-watcher-pusher buil

.PHONY: ui-logs-development
ui-logs-development: build/actions-handler build/api build/api-db build/local-api-data-watcher-pusher build/keycloak build/keycloak-db build/broker-single build/api-redis build/logs2notifications build/local-minio
IMAGE_REPO=$(CI_BUILD_TAG) docker-compose -p $(CI_BUILD_TAG) --compatibility up -d api api-db actions-handler local-api-data-watcher-pusher ui keycloak keycloak-db broker api-redis logs2notifications local-minio
IMAGE_REPO=$(CI_BUILD_TAG) docker-compose -p $(CI_BUILD_TAG) --compatibility up -d api api-db actions-handler local-api-data-watcher-pusher ui keycloak keycloak-db broker api-redis logs2notifications local-minio local-minio-upload

## CI targets

Expand Down
16 changes: 15 additions & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ services:
- CI=${CI:-true}
- REGISTRY=harbor.172.17.0.1.nip.io:18080 # Docker network bridge and forwarded port for harbor-nginx
- S3_FILES_HOST=http://172.17.0.1:9000
- S3_BAAS_ACCESS_KEY_ID=minio
- S3_BAAS_SECRET_ACCESS_KEY=minio123
- CONSOLE_LOGGING_LEVEL=trace
depends_on:
- api-init
Expand Down Expand Up @@ -217,13 +219,25 @@ services:
local-minio:
image: minio/minio
entrypoint: sh
command: -c 'mkdir -p /export/lagoon-files && mkdir -p /export/harbor-images && minio server /export --console-address ":9001" '
command: -c 'mkdir -p /export/restores && mkdir -p /export/lagoon-files && mkdir -p /export/harbor-images && minio server /export --console-address ":9001" '
ports:
- '9000:9000'
- '9001:9001'
environment:
- MINIO_ACCESS_KEY=minio
- MINIO_SECRET_KEY=minio123
local-minio-upload:
image: minio/mc
entrypoint: sh
command: -c 'mc alias set localminio $${MINIO_SERVER_URL} $${MINIO_ACCESS_KEY} $${MINIO_SECRET_KEY}; mc ls localminio; mc cp /restores/files.tar.gz localminio/restores/high-cotton-master-files.tar.gz'
volumes:
- ./local-dev/restores:/restores
environment:
- MINIO_SERVER_URL=http://172.17.0.1:9000
- MINIO_ACCESS_KEY=minio
- MINIO_SECRET_KEY=minio123
depends_on:
- local-minio
local-registry:
image: ${IMAGE_REPO:-lagoon}/local-registry
ports:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ mutation PopulateApi {
input: {
backupId: "e2e1d31b4a7dfc1687f469b6673f6bf2c0aabee0cc6b3f1bdbde710a9bc6280f"
status: SUCCESSFUL
restoreLocation: "/restore/e2e1d31b4a7dfc1687f469b6673f6bf2c0aabee0cc6b3f1bdbde710a9bc6280f/files.gz"
restoreLocation: "http://172.17.0.1:9000/restores/high-cotton-master-files.tar.gz"
execute: false
}
) {
Expand Down
Binary file added local-dev/restores/files.tar.gz
Binary file not shown.

0 comments on commit ca242c6

Please sign in to comment.