Demonstrates the usage of the Quarkus Helm Chart and orchestrated using OpenShift Pipelines / Tekton
The following are required in order to execute the contents of this repository
- Command Line tools
- OpenShift
- Tekton (tkn)
- Helm (optional)
- OpenShift Pipelines or Tekton with the git-clone and buildah ClusterTask installed
- An image repository and rights to push to the associated image registry
First, clone the repository and change into the cloned directory:
$ git clone https://github.com/sabre1041/quarkus-tekton-helm.git
$ cd quarkus-tekton-helm
Execute the following command in order to create a new namespace and populate it with resources
$ oc apply -k resources
Once the resources have been applied, change into the newly created project
$ oc project quarkus-tekton-helm
The pipeline creates and pushes a container image to a remote registry. In most cases, the pipeline will require credentials in order to successfully push the image to the remote registry. Follow the Tekton Authentication Documentation to configure the credentials into a Secret and associate it with the quarkus-tekton-helm Service Account used to execute the pipeline.
Run the pipeline by executing the following command (Be sure to replace the image_repository parameter with the location of your image repository that will be used to push the image)
$ tkn pipeline start quarkus-helm-pipeline -s quarkus-tekton-helm -p image_repository=quay.io/user/quarkus-getting-started --workspace name=shared-workspace,volumeClaimTemplateFile=resources/volumeclaimtemplates/pvc.yaml
The above command specifies the following:
- The name of the Pipeline
- The Service Account Used to execute the pipeline using the
-s
parameter - The image repository that will be used to store the resulting image
- A Volume Claim Template that will dynamically allocate a PersistentVolume for use by the pipeline
Once the pipeline has been started, it will print out a command that you can use to view the logs from the pipeline run.
After the pipeline completes successfully, using the Helm CLI, confirm the release of the Quarkus Helm Chart.
$ helm ls
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
quarkus-getting-started quarkus-tekton-helm 1 2021-01-17 17:23:26.570627435 +0000 UTC deployed quarkus-0.0.3
View the running pod associated with the application
$ oc get pods -l=app.kubernetes.io/name=quarkus-getting-started
NAME READY STATUS RESTARTS AGE
quarkus-getting-started-785584688d-9kpgz 1/1 Running 0 89s
Finally, attempt to view the deployed application in a web browser:
Locate the url of the Route
$ oc get routes quarkus-getting-started -o jsonpath='https://{ .spec.host}'