Deployment
Yupiik chords is a simple Java application, it has several flavors but all are based on Java capabilities.
Standalone
It is a matter of creating the right java command: java -cp $classpath io.yupiik.fusion.framework.api.main.CliLauncher $args.
The classpath is composed of these dependencies:
-
io.yupiik.kubernetes.chords:core:1.0-SNAPSHOT -
io.yupiik.fusion:fusion-api:1.0.34-SNAPSHOT:jar -
io.yupiik.fusion:fusion-cli:1.0.34-SNAPSHOT:jar -
io.yupiik.fusion:fusion-httpclient:1.0.34-SNAPSHOT:jar -
io.yupiik.fusion:fusion-json:1.0.34-SNAPSHOT:jar -
io.yupiik.fusion:fusion-kubernetes-client:1.0.34-SNAPSHOT:jar -
io.yupiik.kubernetes:kubernetes-java-1.35.x:1.0.2-SNAPSHOT:jar:versionless -
io.yupiik.kubernetes.chords:api:1.0-SNAPSHOT:jar -
io.yupiik.logging:yupiik-logging-jul:1.0.8:jar
So it can look to:
java \
-cp "core-1.0-SNAPSHOT.jar::fusion-api-1.0.34-SNAPSHOT.jar:fusion-cli-1.0.34-SNAPSHOT.jar:fusion-httpclient-1.0.34-SNAPSHOT.jar:fusion-json-1.0.34-SNAPSHOT.jar:fusion-kubernetes-client-1.0.34-SNAPSHOT.jar:kubernetes-java-1.35.x-1.0.2-SNAPSHOT-versionless.jar:api-1.0-SNAPSHOT.jar:yupiik-logging-jul-1.0.8.jar" \
io.yupiik.fusion.framework.api.main.CliLauncher \
reconcile \
....
or if you put all libraries in lib/ folder: java -cp lib/*.jar io.yupiik.fusion.framework.api.main.CliLauncher $args.
|
TIP
|
all libraries are available on maven central . |
Kubernetes
It is recommended to configure the reconcile command
as a CronJob which can't be concurrent:
apiVersion: batch/v1
kind: CronJob
metadata:
name: chords-reconcilier
spec:
schedule: "*/5 * * * *"
concurrencyPolicy: Forbid
successfulJobsHistoryLimit: 20
failedJobsHistoryLimit: 20
jobTemplate:
spec:
backoffLimit: 1
template:
spec:
restartPolicy: Never
containers:
- name: reconcile
image: ossyupiik/chords:1.0-SNAPSHOT
imagePullPolicy: IfNotPresent
envFrom:
- configMapRef:
name: chords-reconcilier-config
volumeMounts:
- name: dags
mountPath: /opt/dags
readOnly: true
volumes:
- name: dags
configMap:
name: chords-reconcilier-dags
|
TIP
|
|
|
TIP
|
as explained in configuration
page, it is more convenient to put the descriptors in files cause easier to write than inline in the environment, in such a case you will mount another |
|
IMPORTANT
|
do not forget for production to harness your container ( |
BundleBee
Others
Similarly to Yupiik BundleBee, Helm and Kustomize are options to deploy Yupiik Chords.