-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(cat-gateway): adds deployment #1422
Draft
jmgilman
wants to merge
46
commits into
main
Choose a base branch
from
gateway-deployment
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+323
−35
Draft
Changes from 10 commits
Commits
Show all changes
46 commits
Select commit
Hold shift + click to select a range
ea4a1db
feat(gateway): adds deployment
jmgilman 0b0fbb3
chore: bumps forge
jmgilman 3fe475b
wip: fixes spelling
jmgilman 3e3bcbf
wip: adds missing privilege
jmgilman 0734e50
build(update follower): dependency
cong-or 4c8af86
build(update follower): dependency
cong-or 2069116
feat(replication factor): env var
cong-or 5c0660d
chore: turn off debug logging and drop debug sleep
jmgilman bc47aff
wip: sets limit on gateway memory usage
jmgilman e3e34ab
Merge branch 'main' into gateway-deployment
jmgilman 697e187
chore: sets cpu limit to avoid defaulting
jmgilman f585267
Merge branch 'main' into gateway-deployment
stevenj 1179dfd
Merge branch 'main' into gateway-deployment
stevenj 39b8142
Create Ingress resources
benbooth493 4d8f828
Remove whitespace
benbooth493 94be18a
Change container port
benbooth493 1ca6ecc
Merge branch 'main' into gateway-deployment
benbooth493 4f944a1
Merge branch 'main' into gateway-deployment
cong-or aa47ae3
Merge branch 'main' into gateway-deployment
jmgilman 2e3ad22
wip: comments out test target
jmgilman c49bb75
chore: reduces resource requirements
jmgilman 3ffe4bc
Bump blueprint version and set servicePort value
benbooth493 f9e623f
Fix domain name and enable readiness healthcheck
benbooth493 121fdce
Enable readiness probe
benbooth493 1120dbe
Fix health endpoints
benbooth493 688307d
refactor(rm auth ): healthcheck
cong-or a0e990f
Merge branch 'main' into gateway-deployment
cong-or 040b614
refactor(rm auth ): healthcheck
cong-or 1ead5c9
rm schema version check
cong-or 061a5b8
Merge branch 'main' into gateway-deployment
cong-or d9744e1
rm schema version check
cong-or 584f46c
rm schema version check
cong-or f726dff
is live
cong-or 44f1bb4
is live
cong-or 58c6e9d
Merge branch 'main' into gateway-deployment
cong-or a3b0412
Merge branch 'main' into gateway-deployment
jmgilman 5383d33
chore: updates deployment to use new app model
jmgilman 04c3e79
wip: adds docker release for migrations container
jmgilman f1cc75e
chore: adds job for migrations
jmgilman 1918558
wip: fixes spelling
jmgilman b924153
Merge branch 'main' into gateway-deployment
jmgilman 2135a28
wip: fixing migrations build
jmgilman facbebb
wip: more migration fixes
jmgilman 5a58c2d
wip: fixes spelling
jmgilman 852a845
Merge branch 'main' into gateway-deployment
cong-or fb926e2
Merge branch 'main' into gateway-deployment
jmgilman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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,4 +1,3 @@ | ||
-- Create the namespace in the DB. | ||
-- Template. | ||
CREATE KEYSPACE IF NOT EXISTS {{keyspace}} | ||
With replication = {'class': 'NetworkTopologyStrategy','replication_factor': 1}; | ||
CREATE KEYSPACE IF NOT EXISTS {{keyspace}} WITH REPLICATION = {{options}}; |
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,20 +1,197 @@ | ||
version: "1.0.0" | ||
project: { | ||
name: "gateway" | ||
ci: { | ||
targets: { | ||
test: privileged: true | ||
} | ||
} | ||
deployment: { | ||
on: { | ||
always: {} | ||
} | ||
environment: "dev" | ||
modules: main: { | ||
container: "blueprint-deployment" | ||
version: "0.2.4" | ||
values: { | ||
app: { | ||
environment: "dev" | ||
|
||
image: { | ||
repository: "332405224602.dkr.ecr.eu-central-1.amazonaws.com/gateway" | ||
tag: _ @forge(name="GIT_HASH_OR_TAG") | ||
} | ||
|
||
containerPort: 8080 | ||
strategy: "Recreate" | ||
|
||
persistentVolumeClaims: [ | ||
{ | ||
name: "pvc" | ||
storageClassName: "ebs-io1" | ||
storage: "250Gi" | ||
}, | ||
] | ||
|
||
volumes: [ | ||
{ | ||
name: "data" | ||
persistentVolumeClaim: { | ||
claimName: "pvc" | ||
} | ||
}, | ||
] | ||
|
||
volumeMounts: [ | ||
{ | ||
name: "data" | ||
mountPath: "/root/.local/share/cat-gateway" | ||
readOnly: false | ||
}, | ||
] | ||
|
||
env: [ | ||
{ | ||
name: "RUST_LOG" | ||
value: "error,cat_gateway=info,cardano_chain_follower=info" | ||
}, | ||
{ | ||
name: "CASSANDRA_VOLATILE_URL" | ||
valueFrom: { | ||
secretKeyRef: { | ||
key: "cassandra-volatile-url" | ||
} | ||
} | ||
}, | ||
{ | ||
name: "CASSANDRA_VOLATILE_USERNAME" | ||
valueFrom: { | ||
secretKeyRef: { | ||
key: "cassandra-volatile-username" | ||
} | ||
} | ||
}, | ||
{ | ||
name: "CASSANDRA_VOLATILE_PASSWORD" | ||
valueFrom: { | ||
secretKeyRef: { | ||
key: "cassandra-volatile-password" | ||
} | ||
} | ||
}, | ||
|
||
{ | ||
name: "CASSANDRA_VOLATILE_DEPLOYMENT" | ||
valueFrom: { | ||
secretKeyRef: { | ||
key: "cassandra-volatile-deployment" | ||
} | ||
} | ||
}, | ||
{ | ||
name: "CASSANDRA_PERSISTENT_URL" | ||
valueFrom: { | ||
secretKeyRef: { | ||
key: "cassandra-persistent-url" | ||
} | ||
} | ||
}, | ||
{ | ||
name: "CASSANDRA_PERSISTENT_USERNAME" | ||
valueFrom: { | ||
secretKeyRef: { | ||
key: "cassandra-persistent-username" | ||
} | ||
} | ||
}, | ||
// TODO: Re-enable when we have SSL working | ||
// { | ||
// name: "CASSANDRA_VOLATILE_TLS_CERT" | ||
// value: "/tmp/keyspaces.crt" | ||
// }, | ||
// { | ||
// name: "CASSANDRA_PERSISTENT_TLS_CERT" | ||
// value: "/tmp/keyspaces.crt" | ||
// }, | ||
{ | ||
name: "CASSANDRA_PERSISTENT_PASSWORD" | ||
valueFrom: { | ||
secretKeyRef: { | ||
key: "cassandra-persistent-password" | ||
} | ||
} | ||
}, | ||
|
||
{ | ||
name: "CASSANDRA_PERSISTENT_DEPLOYMENT" | ||
valueFrom: { | ||
secretKeyRef: { | ||
key: "cassandra-persistent-deployment" | ||
} | ||
} | ||
}, | ||
] | ||
|
||
resources: { | ||
requests: { | ||
cpu: "1" | ||
memory: "16Gi" | ||
} | ||
limits: { | ||
memory: "20Gi" | ||
} | ||
} | ||
|
||
// TODO: Re-enable when deployment is working | ||
// readinessProbe: { | ||
// httpGet: { | ||
// path: "/v1/health/ready" | ||
// port: 8080 | ||
// } | ||
// } | ||
|
||
// livenessProbe: { | ||
// httpGet: { | ||
// path: "/v1/health/live" | ||
// port: 8080 | ||
// } | ||
// } | ||
|
||
nodeSelector: { | ||
"node-group": "catalyst-gateway" | ||
} | ||
|
||
tolerations: [ | ||
{ | ||
key: "app" | ||
operator: "Equal" | ||
value: "catalyst-gateway" | ||
effect: "NoSchedule" | ||
}, | ||
] | ||
|
||
serviceAccount: "catalyst-gateway" | ||
replicas: 1 | ||
|
||
externalSecret: { | ||
secretStore: "cluster-secret-store" | ||
refreshInterval: "30m" | ||
dataFrom: ["dev/gateway"] | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
release: { | ||
docker: { | ||
on: { | ||
merge: {} | ||
tag: {} | ||
always: {} | ||
} | ||
config: { | ||
tag: _ @forge(name="GIT_COMMIT_HASH") | ||
} | ||
} | ||
} | ||
ci: { | ||
targets: { | ||
test: privileged: true | ||
} | ||
} | ||
} |
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,20 @@ | ||
#!/usr/bin/env bash | ||
|
||
if [[ -n "${DEBUG_SLEEP}" ]]; then | ||
echo "Sleeping for ${DEBUG_SLEEP} seconds..." | ||
sleep "${DEBUG_SLEEP}" | ||
fi | ||
|
||
args+=() | ||
args+=("run" "--log-level" "debug") | ||
|
||
echo "Starting gateway node..." | ||
"/app/cat-gateway" "${args[@]}" | ||
exit_code=$? | ||
|
||
if [[ $exit_code -ne 0 && -n "${DEBUG_SLEEP_ERR}" ]]; then | ||
echo "Process exited with code $exit_code. Sleeping for ${DEBUG_SLEEP_ERR} seconds..." | ||
sleep "${DEBUG_SLEEP_ERR}" | ||
fi | ||
|
||
exit $exit_code |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need this cert anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't. We can remove that and clean up the volumes and mounts associated with it.
Yes we can ditch
:91