-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #100 from lsst-sqre/u/jsickcodes/deploy-2-0
Prepare Kubernetes deployment for v2
- Loading branch information
Showing
15 changed files
with
151 additions
and
346 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
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 |
---|---|---|
@@ -1,13 +1,14 @@ | ||
#!/bin/bash | ||
|
||
# Determine the tag for Docker images. Takes the Git ref as its only | ||
# argument. | ||
# Determine the tag for Docker images based on GitHub Actions environment | ||
# variables. | ||
|
||
set -eo pipefail | ||
|
||
if [ -z "$1" ]; then | ||
echo 'Usage: scripts/docker-tag.sh $GITHUB_REF' >&2 | ||
exit 1 | ||
if [ -n "$GITHUB_HEAD_REF" ]; then | ||
# For pull requests | ||
echo ${GITHUB_HEAD_REF} | sed -E 's,/,-,g' | ||
else | ||
# For push events | ||
echo ${GITHUB_REF} | sed -E 's,refs/(heads|tags)/,,' | sed -E 's,/,-,g' | ||
fi | ||
|
||
echo "$1" | sed -E 's,refs/(heads|tags)/,,' | sed -E 's,/,-,g' |
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,11 @@ | ||
#!/bin/bash | ||
|
||
set -eu | ||
|
||
echo $PATH | ||
pwd | ||
ls migrations | ||
|
||
flask createdb migrations/alembic.ini | ||
flask init | ||
uwsgi uwsgi.ini |
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,19 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: ltd-keeper | ||
data: | ||
LTD_KEEPER_PROFILE: 'production' | ||
LTD_KEEPER_URL_SCHEME: 'https' | ||
LTD_KEEPER_BOOTSTRAP_USER: 'admin' | ||
LTD_KEEPER_DB_URL: '' | ||
REDIS_URL: '' | ||
LTD_KEEPER_ENABLE_V1: '1' | ||
LTD_KEEPER_ENABLE_V2: '1' | ||
LTD_KEEPER_PROXY_FIX: '0' | ||
LTD_KEEPER_X_FOR: '1' | ||
LTD_KEEPER_X_PROTO: '1' | ||
LTD_KEEPER_X_HOST: '1' | ||
LTD_KEEPER_X_PORT: '0' | ||
LTD_KEEPER_X_PREFIX: '0' | ||
LTD_KEEPER_ENABLE_TASKS: '0' |
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,51 @@ | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: ltd-keeper-api | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
name: ltd-keeper-api | ||
template: | ||
metadata: | ||
labels: | ||
name: ltd-keeper-api | ||
spec: | ||
containers: | ||
- name: app | ||
imagePullPolicy: 'Always' | ||
image: 'ghcr.io/lsst-sqre/ltd-keeper:latest' | ||
ports: | ||
- containerPort: 3031 | ||
name: api | ||
envFrom: | ||
- configMapRef: | ||
name: ltd-keeper | ||
|
||
--- | ||
# Deployment of celery workers for keeper | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: ltd-keeper-worker | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
name: ltd-keeper-worker | ||
template: | ||
metadata: | ||
labels: | ||
name: ltd-keeper-worker | ||
spec: | ||
containers: | ||
- name: app | ||
imagePullPolicy: 'Always' | ||
image: 'ghcr.io/lsst-sqre/ltd-keeper:latest' | ||
command: ['/bin/bash'] | ||
args: ['-c', '/home/appuser/run-celery-worker.bash'] | ||
envFrom: | ||
- configMapRef: | ||
name: ltd-keeper |
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,14 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: ltd-keeper | ||
labels: | ||
name: ltd-keeper | ||
spec: | ||
ports: | ||
- name: ltd-keeper-http | ||
protocol: TCP | ||
port: 8080 | ||
targetPort: api | ||
selector: | ||
name: ltd-keeper-api |
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.