-
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 #9 from seqeralabs/groundswell-regex
fix: fixes a regex problem on groundswell manifest
- Loading branch information
Showing
3 changed files
with
277 additions
and
3 deletions.
There are no files selected for viewing
137 changes: 137 additions & 0 deletions
137
platform_versioned_docs/version-23.3/enterprise_templates/k8s/groundswell.yml
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,137 @@ | ||
--- | ||
kind: ConfigMap | ||
apiVersion: v1 | ||
metadata: | ||
name: tower-groundswell-cfg | ||
data: | ||
# Server settings | ||
SWELL_SERVER_HOST: "0.0.0.0" | ||
SWELL_SERVER_PORT: "8090" | ||
|
||
# API settings | ||
SWELL_API_TRAIN_TIMEOUT: "60" | ||
SWELL_API_TRAIN_BATCH_SIZE: "1000" | ||
SWELL_API_PREDICT_FRACTIONAL_CPUS: "false" | ||
|
||
# Database settings, different from the Tower DB credentials. | ||
# If using Amazon RDS or similar managed database services, `SWELL_DB_URL` will have the form | ||
# SWELL_DB_URL=mysql://db1.abcdefghijkl.us-east-1.rds.amazonaws.com:3306/swell or similar | ||
SWELL_DB_URL: mysql://<ANOTHER_DB_AND_PORT>/swell | ||
SWELL_DB_USER: swell | ||
SWELL_DB_PASSWORD: <YOUR GROUNDSWELL DATABASE PASSWORD> | ||
SWELL_DB_DIALECT: mysql | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: groundswell | ||
labels: | ||
app: groundswell | ||
spec: | ||
selector: | ||
app: groundswell | ||
ports: | ||
- name: http | ||
port: 8090 | ||
# targetPort must match with the SWELL_SERVER_PORT in the ConfigMap above. | ||
targetPort: 8090 | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: groundswell | ||
labels: | ||
app: groundswell | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: groundswell | ||
strategy: | ||
type: Recreate | ||
|
||
template: | ||
metadata: | ||
labels: | ||
app: groundswell | ||
spec: | ||
imagePullSecrets: | ||
- name: "cr.seqera.io" | ||
securityContext: | ||
fsGroup: 101 | ||
|
||
initContainers: | ||
- name: wait-for-tower-db | ||
image: "mysql:8.0" | ||
command: | ||
- 'bash' | ||
- '-c' | ||
- | | ||
echo "$(date): starting check for db $TOWER_DB_URL" | ||
# Strip initial Java connection string and options after '?' from URI | ||
until mysqlsh --uri "$(echo $TOWER_DB_URL |cut -d'?' -f1 |sed -e 's@jdbc:\(.*\)@\1@')" -u"$TOWER_DB_USER" -p"$TOWER_DB_PASSWORD" --sql -e "SELECT VERSION()"; do | ||
echo "$(date): see you in $SLEEP_PERIOD_SECONDS seconds" | ||
sleep $SLEEP_PERIOD_SECONDS | ||
done | ||
echo "$(date): db server ready" | ||
env: | ||
- name: SLEEP_PERIOD_SECONDS | ||
value: "5" | ||
envFrom: | ||
- configMapRef: | ||
name: tower-backend-cfg | ||
|
||
- name: wait-for-swell-db | ||
image: "mysql:8.0" | ||
command: | ||
- 'bash' | ||
- '-c' | ||
- | | ||
echo "$(date): starting check for db $SWELL_DB_URL" | ||
# Strip initial Java connection string and options after '?' from URI | ||
until mysqlsh --uri "$SWELL_DB_URL" -u"$SWELL_DB_USER" -p"$SWELL_DB_PASSWORD" --sql -e "SELECT VERSION()"; do | ||
echo "$(date): see you in $SLEEP_PERIOD_SECONDS seconds" | ||
sleep $SLEEP_PERIOD_SECONDS | ||
done | ||
echo "$(date): db server ready" | ||
env: | ||
- name: SLEEP_PERIOD_SECONDS | ||
value: "5" | ||
envFrom: | ||
- configMapRef: | ||
name: tower-groundswell-cfg | ||
|
||
- name: migrate-db | ||
image: "cr.seqera.io/private/nf-tower-enterprise/groundswell:0.4.0" | ||
command: ['/opt/groundswell/bin/migrate-db.sh'] | ||
envFrom: | ||
- configMapRef: | ||
name: tower-groundswell-cfg | ||
- configMapRef: | ||
name: tower-backend-cfg | ||
|
||
containers: | ||
- name: groundswell | ||
image: "cr.seqera.io/private/nf-tower-enterprise/groundswell:0.4.0" | ||
env: | ||
- name: MPLCONFIGDIR | ||
value: "/tmp" | ||
envFrom: | ||
- configMapRef: | ||
name: tower-backend-cfg | ||
- configMapRef: | ||
name: tower-groundswell-cfg | ||
volumeMounts: | ||
- name: tmp-volume | ||
mountPath: /tmp/ | ||
securityContext: | ||
capabilities: | ||
drop: | ||
- ALL | ||
readOnlyRootFilesystem: true | ||
runAsNonRoot: true | ||
runAsUser: 101 | ||
|
||
volumes: | ||
- name: tmp-volume | ||
emptyDir: | ||
sizeLimit: "1Gi" |
137 changes: 137 additions & 0 deletions
137
platform_versioned_docs/version-23.4/enterprise_templates/k8s/groundswell.yml
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,137 @@ | ||
--- | ||
kind: ConfigMap | ||
apiVersion: v1 | ||
metadata: | ||
name: tower-groundswell-cfg | ||
data: | ||
# Server settings | ||
SWELL_SERVER_HOST: "0.0.0.0" | ||
SWELL_SERVER_PORT: "8090" | ||
|
||
# API settings | ||
SWELL_API_TRAIN_TIMEOUT: "60" | ||
SWELL_API_TRAIN_BATCH_SIZE: "1000" | ||
SWELL_API_PREDICT_FRACTIONAL_CPUS: "false" | ||
|
||
# Database settings, different from the tower DB credentials. | ||
# If using Amazon RDS or similar managed database services, `SWELL_DB_URL` will have the form | ||
# SWELL_DB_URL=mysql://db1.abcdefghijkl.us-east-1.rds.amazonaws.com:3306/swell or similar | ||
SWELL_DB_URL: mysql://<DB_AND_PORT>/swell | ||
SWELL_DB_USER: swell | ||
SWELL_DB_PASSWORD: <YOUR DATABASE PASSWORD> | ||
SWELL_DB_DIALECT: mysql | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: groundswell | ||
labels: | ||
app: groundswell | ||
spec: | ||
selector: | ||
app: groundswell | ||
ports: | ||
- name: http | ||
port: 8090 | ||
# targetPort must match with the SWELL_SERVER_PORT in the ConfigMap above. | ||
targetPort: 8090 | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: groundswell | ||
labels: | ||
app: groundswell | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: groundswell | ||
strategy: | ||
type: Recreate | ||
|
||
template: | ||
metadata: | ||
labels: | ||
app: groundswell | ||
spec: | ||
imagePullSecrets: | ||
- name: "cr.seqera.io" | ||
securityContext: | ||
fsGroup: 101 | ||
|
||
initContainers: | ||
- name: wait-for-tower-db | ||
image: "mysql:8.0" | ||
command: | ||
- 'bash' | ||
- '-c' | ||
- | | ||
echo "$(date): starting check for db $TOWER_DB_URL" | ||
# Strip initial Java connection string and options after '?' from URI | ||
until mysqlsh --uri "$(echo $TOWER_DB_URL |cut -d'?' -f1 |sed -e 's@jdbc:\(.*\)@\1@')" -u"$TOWER_DB_USER" -p"$TOWER_DB_PASSWORD" --sql -e "SELECT VERSION()"; do | ||
echo "$(date): see you in $SLEEP_PERIOD_SECONDS seconds" | ||
sleep $SLEEP_PERIOD_SECONDS | ||
done | ||
echo "$(date): db server ready" | ||
env: | ||
- name: SLEEP_PERIOD_SECONDS | ||
value: "5" | ||
envFrom: | ||
- configMapRef: | ||
name: tower-backend-cfg | ||
|
||
- name: wait-for-swell-db | ||
image: "mysql:8.0" | ||
command: | ||
- 'bash' | ||
- '-c' | ||
- | | ||
echo "$(date): starting check for db $SWELL_DB_URL" | ||
# Strip initial Java connection string and options after '?' from URI | ||
until mysqlsh --uri "$SWELL_DB_URL" -u"$SWELL_DB_USER" -p"$SWELL_DB_PASSWORD" --sql -e "SELECT VERSION()"; do | ||
echo "$(date): see you in $SLEEP_PERIOD_SECONDS seconds" | ||
sleep $SLEEP_PERIOD_SECONDS | ||
done | ||
echo "$(date): db server ready" | ||
env: | ||
- name: SLEEP_PERIOD_SECONDS | ||
value: "5" | ||
envFrom: | ||
- configMapRef: | ||
name: tower-groundswell-cfg | ||
|
||
- name: migrate-db | ||
image: "cr.seqera.io/private/nf-tower-enterprise/groundswell:0.4.0" | ||
command: ['/opt/groundswell/bin/migrate-db.sh'] | ||
envFrom: | ||
- configMapRef: | ||
name: tower-groundswell-cfg | ||
- configMapRef: | ||
name: tower-backend-cfg | ||
|
||
containers: | ||
- name: groundswell | ||
image: "cr.seqera.io/private/nf-tower-enterprise/groundswell:0.4.0" | ||
env: | ||
- name: MPLCONFIGDIR | ||
value: "/tmp" | ||
envFrom: | ||
- configMapRef: | ||
name: tower-backend-cfg | ||
- configMapRef: | ||
name: tower-groundswell-cfg | ||
volumeMounts: | ||
- name: tmp-volume | ||
mountPath: /tmp/ | ||
securityContext: | ||
capabilities: | ||
drop: | ||
- ALL | ||
readOnlyRootFilesystem: true | ||
runAsNonRoot: true | ||
runAsUser: 101 | ||
|
||
volumes: | ||
- name: tmp-volume | ||
emptyDir: | ||
sizeLimit: "1Gi" |
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