Custom Remote Deploy Pipeline
It is possible to define an own custom pipeline template that is able to deploy your service project to a another remote cluster (even where IBM Industry Solutions Workbench is not installed). It is required that the cluster where IBM Industry Solutions Workbench is installed has a valid connection to the remote cluster. You can define one custom pipeline template per namespace (deployment target) per remote cluster. To be able to run and deploy service projects in the remote cluster the used namespace needs to be prepared and configured manually, see Setup deployment targets manually
TechPreview Feature: Please note that this feature is a techpreview. That means the feature may not be fully supported, functionally complete and may introduce breaking changes with the next version.
First you need to create a new pipeline template for a remote deployment to another cluster, see also Custom pipelines.
For example:
apiVersion: tekton.dev/v1
kind: Pipeline
metadata:
annotations:
k5-display-name: Remote Deploy Pipeline to Cluster XYZ
k5-supported-stacks: java
name: k5-template-java-deploy-remote
namespace: isw-namespace
labels:
k5-pipeline-template: 'true'
k5-pipeline-type: custom
spec:
params:
- description: Defines the repository url
name: repo-url
type: string
- description: Defines the revision of the git repository
name: revision
type: string
- default: JAVA
description: Defines the stack
name: stack
type: string
- default: 'false'
description: Defines if unit tests should be executed
name: unittestfeature
type: string
- default: 'false'
description: Defines whether it needs to be a unique pre-release
name: prereleaseuniqueness
type: string
- default: 'false'
description: Defines where uniqueness needs to be enforced
name: enforceuniqueness
type: string
- default: 'false'
description: Defines if the artifacts should be published
name: publish
type: string
- description: Defines the solution acronym
name: solutionacronym
type: string
- default: 'false'
description: Defines whether a unique semVer check is executed
name: uniquesemvercheck
type: string
- default: k5project-remote-login-secret
description: Defines the secret name used for the oc login to a remote cluster
name: oc-remote-login-secret
type: string
- default: |
environment:
host: k5-deployment-target.apps.openshift.xyz.cloud
description: Defines the values.yaml that is used for the helm deployment
name: deployment-values-yaml
type: string
- default: k5-deployment-target
description: Defines in which deployment target (k5project) the service should be deployed in your remote cluster
name: remote-k5project
type: string
tasks:
- name: k5-git-clone
params:
- name: repo-url
value: $(params.repo-url)
- name: revision
value: $(params.revision)
taskRef:
kind: Task
name: k5-git-clone
workspaces:
- name: output
workspace: source
- name: basic-auth
workspace: basic-auth
- name: k5-validate
params:
- name: solutionacronym
value: $(params.solutionacronym)
- name: stack
value: $(params.stack)
- name: prereleaseuniqueness
value: $(params.prereleaseuniqueness)
- name: uniquesemvercheck
value: $(params.uniquesemvercheck)
- name: enforceuniqueness
value: $(params.enforceuniqueness)
runAfter:
- k5-git-clone
taskRef:
kind: Task
name: k5-validate
workspaces:
- name: source
workspace: source
- name: k5-generate-code-java
params:
- name: solutionacronym
value: $(params.solutionacronym)
- name: stack
value: $(params.stack)
runAfter:
- k5-validate
taskRef:
kind: Task
name: k5-generate-code-java
workspaces:
- name: source
workspace: source
- name: k5-build-application-java
params:
- name: solutionacronym
value: $(params.solutionacronym)
- name: stack
value: $(params.stack)
- name: unittestfeature
value: $(params.unittestfeature)
runAfter:
- k5-generate-code-java
taskRef:
kind: Task
name: k5-build-application-java
workspaces:
- name: source
workspace: source
- name: k5-build-publish-image-java
params:
- name: solutionacronym
value: $(params.solutionacronym)
- name: stack
value: $(params.stack)
runAfter:
- k5-build-application-java
taskRef:
kind: Task
name: k5-build-publish-image-java
workspaces:
- name: source
workspace: source
- name: k5-build-publish-chart-java
params:
- name: solutionacronym
value: $(params.solutionacronym)
- name: publish
value: $(params.publish)
- name: stack
value: $(params.stack)
runAfter:
- k5-build-publish-image-java
taskRef:
kind: Task
name: k5-build-publish-chart-java
workspaces:
- name: source
workspace: source
- name: k5-deploy-remote
params:
- name: solutionacronym
value: $(params.solutionacronym)
- name: remote-k5project
value: $(params.remote-k5project)
- name: deployment-values-yaml
value: $(params.deployment-values-yaml)
- name: oc-remote-login-secret
value: $(params.oc-remote-login-secret)
runAfter:
- k5-build-publish-chart-java
taskRef:
kind: Task
name: k5-deploy-remote
workspaces:
- name: source
workspace: source
workspaces:
- name: source
- name: basic-auth!!!note Especially check and adjust the default values of the following 3 pipeline parameters (params):
deployment-values-yaml: Defines the values.yaml that is used for the helm deploymentoc-remote-login-secret: Defines the secret name used for the oc login to a remote clusterremote-k5project: Defines in which deployment target (k5project) the service should be deployed in your remote cluster
Then create the needed secret for the openshift login into the remote cluster, e.g.:
kind: Secret apiVersion: v1 metadata: name: k5project-remote-login-secret namespace: isw-namespace data: token: <token of k5-admin-sa of k5-deployment-target namespace from remote cluster xyz> -> e.g.: https://console-openshift-console.apps.openshift.xyz.cloud/k8s/ns/k5-deployment-target/secrets/k5-admin-sa-token-br6lx url: https://api.penshift.xyz.cloud:6443 type: Opaque
Now you will be able to create and open a Java SpringBoot Project and create a new custom pipeline of type Remote Deploy Pipeline to Cluster XYZ
Deployment Pipeline for IBM Power Server (ppc64le)
Additionally, the already described Custom Remote Deploy Pipeline can be configured in a way to build a ppc64le architecture image (instead of amd64 architecture) and helm chart for your Java SpringBoot Stack 2.0 service projects and deploy them to a remote cluster (runtime) on an IBM Power Server.
TechPreview Feature: Please note that this feature is a techpreview and only available for Java SpringBoot Stack 2.0 service projects. That means the feature may not be fully supported, functionally complete and may introduce breaking changes with the next version.
To configure you Custom Remote Deploy Pipeline to be able to build and deploy to a IBM Power Server (ppc64le architecture) you
need to add the following pipeline parameter (spec.params) to your Custom Remote Deploy Pipeline template.
apiVersion: tekton.dev/v1
kind: Pipeline
metadata:
annotations:
k5-display-name: Remote Deploy Pipeline to IBM Power Cluster XYZ
k5-supported-stacks: java
name: k5-template-java-deploy-remote-ppc64le
namespace: isw-namespace
labels:
k5-pipeline-template: 'true'
k5-pipeline-type: custom
spec:
params:
- description: Defines the repository url
name: repo-url
type: string
- description: Defines the revision of the git repository
name: revision
type: string
- default: JAVA
description: Defines the stack
name: stack
type: string
- default: 'false'
description: Defines if unit tests should be executed
name: unittestfeature
type: string
- default: 'false'
description: Defines whether it needs to be a unique pre-release
name: prereleaseuniqueness
type: string
- default: 'false'
description: Defines where uniqueness needs to be enforced
name: enforceuniqueness
type: string
- default: 'false'
description: Defines if the artifacts should be published
name: publish
type: string
- description: Defines the solution acronym
name: solutionacronym
type: string
- default: 'false'
description: Defines whether a unique semVer check is executed
name: uniquesemvercheck
type: string
- default: k5project-remote-login-secret
description: Defines the secret name used for the oc login to a remote cluster
name: oc-remote-login-secret
type: string
- default: |
environment:
host: k5-deployment-target.apps.openshift.xyz.cloud
description: Defines the values.yaml that is used for the helm deployment
name: deployment-values-yaml
type: string
- default: k5-deployment-target
description: Defines in which deployment target (k5project) the service should be deployed in your remote cluster
name: remote-k5project
type: string
- default: ppc64le
description: Defines the platform/architecture for the built container image
name: platform
type: string
tasks:
- name: k5-git-clone
params:
- name: repo-url
value: $(params.repo-url)
- name: revision
value: $(params.revision)
taskRef:
kind: Task
name: k5-git-clone
workspaces:
- name: output
workspace: source
- name: basic-auth
workspace: basic-auth
- name: k5-validate
params:
- name: solutionacronym
value: $(params.solutionacronym)
- name: stack
value: $(params.stack)
- name: prereleaseuniqueness
value: $(params.prereleaseuniqueness)
- name: uniquesemvercheck
value: $(params.uniquesemvercheck)
- name: enforceuniqueness
value: $(params.enforceuniqueness)
runAfter:
- k5-git-clone
taskRef:
kind: Task
name: k5-validate
workspaces:
- name: source
workspace: source
- name: k5-generate-code-java
params:
- name: solutionacronym
value: $(params.solutionacronym)
- name: stack
value: $(params.stack)
runAfter:
- k5-validate
taskRef:
kind: Task
name: k5-generate-code-java
workspaces:
- name: source
workspace: source
- name: k5-build-application-java
params:
- name: solutionacronym
value: $(params.solutionacronym)
- name: stack
value: $(params.stack)
- name: unittestfeature
value: $(params.unittestfeature)
runAfter:
- k5-generate-code-java
taskRef:
kind: Task
name: k5-build-application-java
workspaces:
- name: source
workspace: source
- name: k5-build-publish-image-java-ppc64le
params:
- name: solutionacronym
value: $(params.solutionacronym)
- name: stack
value: $(params.stack)
- name: platform
value: $(params.platform)
runAfter:
- k5-build-application-java
taskRef:
kind: Task
name: k5-build-publish-image-java-ppc64le
workspaces:
- name: source
workspace: source
- name: k5-build-publish-chart-java
params:
- name: solutionacronym
value: $(params.solutionacronym)
- name: publish
value: $(params.publish)
- name: stack
value: $(params.stack)
- name: platform
value: $(params.platform)
runAfter:
- k5-build-publish-image-java
taskRef:
kind: Task
name: k5-build-publish-chart-java
workspaces:
- name: source
workspace: source
- name: k5-deploy-remote
params:
- name: solutionacronym
value: $(params.solutionacronym)
- name: remote-k5project
value: $(params.remote-k5project)
- name: deployment-values-yaml
value: $(params.deployment-values-yaml)
- name: oc-remote-login-secret
value: $(params.oc-remote-login-secret)
runAfter:
- k5-build-publish-chart-java
taskRef:
kind: Task
name: k5-deploy-remote
workspaces:
- name: source
workspace: source
workspaces:
- name: source
- name: basic-authNow you will be able to create and open a Java SpringBoot Project and create a new custom pipeline of type Remote Deploy Pipeline to IBM Power Cluster XYZ