Skip to content

Commit 6c3868b

Browse files
author
Alan Christie
committed
- Adds a simple deploy script
- Dynamic naming and initContainer in Job definition
1 parent 5394195 commit 6c3868b

File tree

2 files changed

+21
-7
lines changed

2 files changed

+21
-7
lines changed

deploy.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/bin/env bash
2+
3+
# A simple deployment script for OpenShift.
4+
# It is assumed that your OpenShift Squonk application has been deployed
5+
# and that you are running this from the Squonk project/namespace
6+
# and have logged in as an appropriate user.
7+
8+
set -e pipefail
9+
10+
oc create -f post-service-descriptors.yaml
11+
12+
echo "Squonk pipeline deployment is underway..."

post-service-descriptors.yaml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,24 @@
11
---
22

3-
# The OpenShift Job definition for the Pipelines SD-Loader image.
3+
# The OpenShift Job definition for the Squonk Pipelines SD-Loader image.
44
# With Squonk running you can execute this in the Squonk project namespace
55
# to enable the defined pipelines.
66
#
77
# oc create -f post-service-descriptors.yaml
8-
# oc delete job/pipelines-sdposter
98

109
kind: Job
1110
apiVersion: batch/v1
1211
metadata:
13-
name: pipelines-sd-poster
12+
generateName: pipelines-sd-poster-
1413
spec:
1514
template:
16-
metadata:
17-
name: pipelines-sd-poster
1815
spec:
16+
initContainers:
17+
- image: yauritux/busybox-curl
18+
name: wait-for-core-before-pipelines-post
19+
command: ['sh', '-c',
20+
'until (( curl http://coreservices:8080/rest/ping --connect-timeout 5 )); do sleep 2; done']
1921
containers:
20-
- name: pipelines-sd-poster
21-
image: squonk/rdkit-pipelines-sdposter:latest
22+
- image: squonk/rdkit-pipelines-sdposter:latest
23+
name: pipelines-sd-poster
2224
restartPolicy: Never

0 commit comments

Comments
 (0)