You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2022/10/06 12:51:22 UTC

[GitHub] [camel-website] squakez commented on a diff in pull request #912: feat: cicd in Camel K

squakez commented on code in PR #912:
URL: https://github.com/apache/camel-website/pull/912#discussion_r989009299


##########
content/blog/2022/10/camel-k-cicd/index.md:
##########
@@ -0,0 +1,587 @@
+---
+title: "Camel K CICD"
+date: 2022-10-06
+draft: false
+authors: [squakez]
+categories: ["Howtos", "Camel K", "Devops"]
+preview: "Continuous Integration, Continuous Delivery and Continuous Deployment in Camel K"
+---
+
+In [Camel K version 10](/blog/2022/09/camel-k-release-1-10/), we've released the CLI [`promote` feature](/camel-k/1.10.x/running/promoting.html) that provides Camel K an opinionated way of promoting an Integration through the stages of software development. This feature unlock the possibility to combine Camel K with external tooling and let the user develop according to any automated release process. We always ear about CI/CD (Continuous Integration/Continuous Delivery and/or Deployment), and in this blog we're going to see how to make it for any Camel K integration.
+
+The application I'm building is a REST API backed by a PostgreSQL database. It will be realized with Camel K Integration via YAML DSL. The source code is stored in Github and the idea is to build a **Continuous Delivery** pipeline that can be manually triggered when we want to provide a release. The pipeline will:
+
+  1. checkout the code repository with the latest changes,
+  2. release the Integration in a development environment,
+  3. run a complete suite of automated test,
+  4. promote to production environment and
+  5. run some smoke test on the production endpoints as last check stage.
+
+It should sound quite a familiar development process. We may just need to implement the first 3 tasks as a basic **Continuous Integration**, but, given the presence of `kamel promote` we can easily extend it to a CD pipeline. But that's not all. As an additional feature we're finally reusing the CD to enable a **Continuous Deployment** process triggering the pipeline when any change is pushed to the repo. Your journey from code to production has never been that fast!!
+
+As a supporting pipeline application, I've chosen to use Tekton because it gives us the flexibility needed to run all the tasks required. However, you may adapt this example to any other pipeline application out there, the concepts are very generic.
+
+# Tekton installation
+
+Let's start installing Tekton. You can install Tekton pipelines operator following the [Tekton official installation guide](https://tekton.dev/docs/pipelines/install/#installing-tekton-pipelines-on-kubernetes).
+
+# Camel K operator installation
+
+We need now to prepare the Kubernetes namespaces that we're using to separate **development** and **production** environment.
+```
+kubectl create namespace development
+kubectl create namespace production
+kamel install -n development
+kamel install -n production -x camel-k-prod
+```
+NOTE: make sure development and production operators share the same container registry as required by `kamel promote`.
+
+# Application development
+
+You can find the source code in this [Camel K REST example github repository](https://github.com/squakez/camel-k-rest-cicd).
+
+## Camel K Integration
+
+We're programming through YAML DSL, but here you can put any Camel DSL you prefer:
+
+```

Review Comment:
   True... I forgot to wait for the preview before merging. Noted for next time, thanks!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org