An demo for tekton on OCP 4.x.
The demo is installed with Helm.
The chart is located in the bookstore-chart
folder.
- Create a new OpenShift project:
oc new-project bookstore-pipeline-demo
- Install Tekton Operator (Optional if not installed)
oc apply -f pipelines-operator.yaml
- Test the chart with a dry run (just to be sure that everyrhing is formally fine):
helm install --generate-name --dry-run bookstore-chart
- Go to the project source root and install the chart:
helm install --generate-name bookstore-chart
- At the end of installation in the "Post install Front End setup for demo" the chart will output a command to update the frontend deployment environment variables with urls of the two ReST services: copy the command and run it (you need to be logged in your openshift). The command is something like:
oc patch deployment/bookstore-chart-1605264575-fe -p "{\"spec\":{\"template\":{\"spec\":{\"containers\":[{\"env\":[{\"name\":\"BOOKSAPIURL\",\"value\":\"http://$(oc get route bookstore-books-api -o jsonpath='{.status.ingress[0].host}' --namespace bookstore-demo)\"},{\"name\":\"BOOKSTOCKAPIURL\",\"value\":\"http://$(oc get route bookstore-stock-api -o jsonpath='{.status.ingress[0].host}' --namespace bookstore-demo)\"}],\"name\":\"bookstore-chart-fe\"}]}}}}" --namespace bookstore-demo
-
Start the Tekton pipelines
oc apply -f pipelineruns/
Alternatively Login into web console and run the three pipelines:
front-end-pipeline
(run the pipeline with the pvcfe-pipeline-pvc
)books-api-pipeline
(run the pipeline with the pvcbooks-api-pipeline-pvc
)stock-api-pipeline
(run the pipeline with the pvcstock-api-pipeline-pvc
)
At the end you will have the three applications running.
This is a nodejs front end app that uses the ReST services to compose the page.
This is a java spring-boot ReST service. Is the list of books available.
To test it from browser you can point to
This is a dotnet ReST service. Is the number of books available for online store.