This repository has been archived by the owner on Mar 22, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
S3 backup for Waiter Service logs on K8s
- Loading branch information
Showing
13 changed files
with
327 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
.cache | ||
__pycache__ | ||
kitchen.log | ||
|
||
/latest | ||
/r[0-9] | ||
/.r[0-9].index.json | ||
/.waiter-container-runs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
# Install AWS CLI (for s3api commands) via pip | ||
# We use this to handle S3 authentication for bucket creation | ||
# https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-install.html | ||
pip install awscli --upgrade --user | ||
|
||
# Run cloudserver (S3 compatible test server) via docker | ||
# The API server endpoint is accessible via localhost:8888 | ||
# https://hub.docker.com/r/scality/s3server | ||
echo Starting S3 server docker container | ||
docker run --name s3server --detach --rm --publish=8888:8000 scality/s3server:6018536a | ||
echo -n Waiting for S3 server | ||
while ! curl localhost:8888 &>/dev/null; do | ||
echo -n . | ||
sleep 1 | ||
done | ||
echo | ||
|
||
# Create a public RW bucket for waiter app logs, using the default cloudserver credentials | ||
# https://github.com/scality/cloudserver#run-it-with-a-file-backend | ||
AWS_ACCESS_KEY_ID=accessKey1 AWS_SECRET_ACCESS_KEY=verySecretKey1 \ | ||
aws s3api create-bucket --endpoint-url=http://localhost:8888 \ | ||
--acl=public-read-write --bucket=waiter-service-logs --output=table |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.