Skip to content

Demonstrates the usage of the Quarkus Helm Chart and orchestrated using OpenShift Pipelines / Tekton

Notifications You must be signed in to change notification settings

sabre1041/quarkus-tekton-helm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

quarkus-tekton-helm

Demonstrates the usage of the Quarkus Helm Chart and orchestrated using OpenShift Pipelines / Tekton

Prerequisites

The following are required in order to execute the contents of this repository

  1. Command Line tools
    1. OpenShift
    2. Tekton (tkn)
    3. Helm (optional)
  2. OpenShift Pipelines or Tekton with the git-clone and buildah ClusterTask installed
  3. An image repository and rights to push to the associated image registry

Configuration

Install resources

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

Image Registry Authentication

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 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:

  1. The name of the Pipeline
  2. The Service Account Used to execute the pipeline using the -s parameter
  3. The image repository that will be used to store the resulting image
  4. A Volume Claim Template that will dynamically allocate a PersistentVolume for use by the pipeline

Verify 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}'

About

Demonstrates the usage of the Quarkus Helm Chart and orchestrated using OpenShift Pipelines / Tekton

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published