Setup with Helm
Overview
You can deploy XSK via Helm chart in a Kubernetes cluster.
Prerequisites
- Install the Helm CLI.
- Make sure you have access to a Kubernetes Cluster.
Setup
-
Add the XSK Helm repository:
helm repo add xsk https://www.xsk.io helm repo update -
Verify XSK Helm charts:
From key server
helm pull xsk/xsk --prov gpg --keyserver keys.openpgp.org --recv-key 734B0E32368A2283290E0B966010F454D1819484 gpg --export > ~/.gnupg/pubring.gpg helm verify xsk-<version>.tgzFrom github
Note
Use command
wgetfor download public key instead ofcurlhelm pull xsk/xsk --prov wget https://sap.github.io/xsk/charts/pubring.gpg -O ~/.gnupg/pubring.gpg helm verify xsk-<version>.tgz -
Deployment
To deploy XSK, you can use the following instructions:
helm install xsk xsk/xskAccessing the XSK Instance
Running this command will install XSK
DeploymentandServicewithClusterIPonly. To access the XSK instance, execute the command that was printed in the console.Example:
export POD_NAME=$(kubectl get pods --namespace default -l "app.kubernetes.io/name=xsk,app.kubernetes.io/instance=xsk" -o jsonpath="{.items[0].metadata.name}") echo "Visit http://127.0.0.1:8080 to use your application" kubectl --namespace default port-forward $POD_NAME 8080:8080- Navigate to: http://127.0.0.1:8080
- Log in with these username and password:
dirigible/dirigible
helm install xsk xsk/xsk \ --set kyma.enabled=true \ --set kyma.host=<kyma-host>This will install additionally an
ApiRuleand XSUAAServiceInstanceandServiceBindingwith SAP BTP Service Operator. The appropriate roles should be assigned to the user.helm install xsk xsk/xsk \ --set hana.enabled=true \ --set hana.url=<hana-url> \ --set hana.username=<hana-username> \ --set hana.password=<hana-password> \ --set kyma.enabled=true \ --set kyma.host=<kyma-apirule-host>This will install additionally an
ApiRule, XSUAAServiceInstance,ServiceBindingwith SAP BTP Service Operator and HANA instance. The appropriate roles should be assigned to the user.helm install xsk xsk/xsk \ --set kyma.enabled=true \ --set kyma.host=<kyma-apirule-host> \ --set kyma.addRoles=true \ --set kyma.roles={"<new-role>"\,"<new-role>"}This will install additionally an
ApiRuleand XSUAAServiceInstanceandServiceBindingwith SAP BTP Service Operator with default rolesDeveloperandOperatorand will add your new roles. The appropriate roles should be assigned to the user.Configuration Options
Name Description Default replicaCountNumber of replicas 1deployment.strategyTypeDeployment strategy type Recreatedeployment.readinessProbePeriodSecondsReadiness probe period seconds 10deployment.readinessProbeInitialDelaySecondsReadiness probe initial delay 5deployment.readinessProbeHttpGetPortReadiness probe http get port 8080deployment.LivenessProbePeriodSecondsLiveness probe period seconds 60deployment.LivenessProbeInitialDelaySecondsLiveness probe initial delay 60deployment.LivenessProbeHttpGetPortLiveness probe http get port 8080deployment.volumeMountsNameVolume mount name xsk-volumedeployment.volumeMountsMountPathVolume mounts mount Path /usr/local/tomcat/target/dirigible/repositorydeployment.volumesNameVolume name xsk-volumedeployment.volumespersistentVolumeClaimClaimNameVolume spersistent volume claim xsk-claimpersistentVolumeClaim.enabledPersistent volume claim enable truepersistentVolumeClaim.NamePersistent volume claim name xsk-claimpersistentVolumeClaim.accessModesPersistent volume claim access modes ReadWriteOncepersistentVolumeClaim.resourcesStoragePersistent volume claim resources storage 1GiserviceAccount.createCreate service account falseserviceAccount.annotationsAdd annotations to sa `` serviceAccount.nameService account name `` securityContext.allowPrivilegeEscalationAllow privileged escalation falsesecurityContext.seccompProfile.typeEnable seccomp profile RuntimeDefaultsecurityContext.runAsUserDeployment security context run as user 65532securityContext.runAsGroupDeployment security context run as group 65532podSecurityContext.fsGroup | Pod Security Context |65532`service.typeType of service ClusterIPservice.portPort of service 8080nameOverrideName override `` fullNameOverrideFull name override `` kyma.enabledEnable Kyma `` kyma.secretCreate Kyma secret truekyma.hostKyma host `` kyma.serverMaxHttpHeaderSizeTomcat max http header size 48000kyma.addRolesEnable add new roles `` kyma.rolesName for new roles `` kyma.roleCollections.descriptionSet role collections description XSK Developer,XSK Operatorkyma.roleCollections.nameSet role collections name XSK-<your-release-name>-Developer,XSK-<your-release-name>-Operatorkyma.roleCollections.role-template-referencesSet role collections role template $XSAPPNAME.Developer,$XSAPPNAME.Operatorkyma.roleTemplates.descriptionSet role templates description Developer related roles,Operator related roleskyma.roleTemplates.nameSet role templates name Developer,Operatorkyma.roleTemplates.scopeReferencesSet role templates scope references $XSAPPNAME.Developer,$XSAPPNAME.Operatorkyma.scopes.descriptionSet scopes description Developer scope,Operator scopekyma.scopes.nameSet scopes name $XSAPPNAME.Developer,$XSAPPNAME.Operatorapplication.imageApplication image `` application.homeUrlHome url for XSK `` application.imagePullPolicyImage pull policy Alwaysapplication.privateDockerRegistryParamater to enable docker registry `` application.privateDockerRegistrySecretParamater to skip creating secret trueapplication.dockerSecretNameSecret name for docker registry docker-registry-secretapplication.dockerServerParameter to set Docker server https://index.docker.io/v1/application.dockerUsernameUser name for docker registry `` application.dockerPasswordPassword for docker registry `` application.dockerEmailEmail for docker registry `` hana.enabledHana enable option `` hana.secretNameHana secret name hana-secrethana.urlHana url instance `` hana.usernameHana username `` hana.passwordHana password `` -
Uninstall
If you want to uninstall Helm, run:
helm uninstall xskNote
If you created namespace with
helm install --create-namespace namespace <your-namespace>. If you want the namespace to be deleted you need to delete you namespace manuallykubectl delete namespace <your-namespace>.
Setup - Kpack
You can choose to build and package your XSK application from source with Helm and Kpack by following these instructions:
-
Add the XSK kpack Helm repository:
helm repo add xsk https://www.xsk.io helm repo update -
Deployment
Prerequisites
Install kpack.
helm install xsk-image xsk/xsk-kpack \ --set install.all=true \ --set docker.server=https://index.docker.io/v1/ \ --set docker.username=<your-docker-username> \ --set docker.password=<your-docker-password> \ --set docker.email=<your-email> \ --set image.repository=<your-repository-for-your-OCI-image> \ --set imageBuilder.repository=<builder-image> \ --set image.source=<your-application-source>This will build and package an OCI image for your application.
helm install xsk-cluster-builder xsk/xsk-kpack \ --set install.clusterBuilder=true \ --set docker.server=https://index.docker.io/v1/ \ --set docker.username=<your-docker-username> \ --set docker.password=<your-docker-password> \ --set docker.email=<your-email> \This will install a kpack
ClusterStoreandClusterStackresources.helm install xsk-image-builder xsk/xsk-kpack \ --set install.imageBuilder=true \ --set imageBuilder.repository=<builder-image>This will install a kpack
Builderresource.helm install xsk-image xsk/xsk-kpack \ --set create.image=true \ --set image.repository=<your-repository-for-your-OCI-image> \ --set image.source=<your-application-source>This will build and package an OCI image for your application.
Note
Due to synchronization issues the
All in Onesetup could fail. To overcome this issue you could execute theCluster Builder (Only),Image Builder (Only)andImage (Only)steps.Tip
You can tail the logs for your image that is currently building using the Kpack CLI.
kp build logs xsk-image -n defaultYou can check your image with:
kubectl -n default get image xsk-imageTo download and run the newly created OCI image, execute:
docker run -p 8080:8080 <latest-image-with-digest>The application image that was built could be used as well in the installation of XSK with Helm, Kyma and Cloud Foundry.
Note
You can use for build Kyma (which is default), local and Cloud Foundry.
- For ClusterStack build image you can use
--set clusterBuilder.buildImageand choose one of this:
dirigiblelabs/buildpacks-stack-build-xsk-kyma - Kyma dirigiblelabs/buildpacks-stack-build-xsk-cf - Cloud Foundry dirigiblelabs/buildpacks-stack-build-xsk - Local-
For ClusterStack run image you can use
--set clusterBuilder.runImageand choose one of this:dirigiblelabs/buildpacks-stack-run-xsk-kyma - Kyma dirigiblelabs/buildpacks-stack-run-xsk-cf - Cloud Foundry dirigiblelabs/buildpacks-stack-run-xsk - Local -
For Builder image you can use
--set imageBuilder.buildpackand choose one of this:--set imageBuilder.buildpack=dirigiblelabs/buildpacks-xsk-kyma - Kyma --set imageBuilder.buildpack=dirigiblelabs/buildpacks-xsk-cf - Cloud Foundry --set imageBuilder.buildpack=dirigiblelabs/buildpacks-xsk - Local
Configuration Options
Name Description Default install.clusterBuilderKpack cluster store and stack falseinstall.imageBuilderKpack builder falseinstall.allInOneOption to build all falsecreate.imageKpack create OCI image falsecreate.namespaceCreate namespace defaultdocker.serverDocker server url `` docker.usernameDocker username `` docker.passwordDocker password `` docker.emailDocker email `` docker.secretNameDocker secret name docker-registry-secretdocker.serviceAccountNameDocker service account name docker-registry-service-accountimageBuilder.repositoryDocker service account name `` imageBuilder.buildpackDocker service account name dirigiblelabs/buildpacks-xskimage.repositoryDocker service account name `` image.sourceDocker service account name `` image.serviceAccountNameDocker service account name docker-registry-service-accountclusterBuilder.buildImageDocker service account name dirigiblelabs/buildpacks-stack-build-xsk-kyma:latestclusterBuilder.runImageDocker service account name dirigiblelabs/buildpacks-stack-run-xskyma:latestclusterBuilder.serviceAccountNameDocker service account name docker-registry-service-account - For ClusterStack build image you can use
-
Uninstall
If you want to uninstall the Helm kpack chart, run:
helm uninstall xsk-kpack