Continuous delivery helps development teams to deliver faster and safer. WSO2 Continuous delivery for Kubernetes provides the tools and pipelines required to continuously deliver WSO2 products to Kubernetes environments. Using tools like Jenkins, ELK, and Prometheus, WSO2 Kubernetes Pipeline is able to provide an end to end solution for development teams to deliver changes and WSO2 updates effortlessly.
This deck explores:
- Installing the Kubernetes pipeline chart with pre-configured pipelines using helm.
- Deploying development, staging and production environment.
- Deploying changes and WSO2 updates across environments.
- Centralized logging using ELK.
- Monitoring using Prometheus and Grafana.
2. Discussion Points
• Introduction to WSO2 Kubernetes pipeline
• Installing the Kubernetes pipeline chart with pre-configured pipelines using Helm
• Deploying development, staging, and production environment using Spinnaker
• Deploying changes and WSO2 updates across environments using Jenkins and
Spinnaker
• Centralized logging using ELK
• Monitoring using Prometheus and Grafana
3. What’s New
● Improvements to Helm charts
○ New Helm chart repository hosted at https://helm.wso2.com
○ Highly configurable Helm charts
○ Option to use GA or updated images
○ Configure with external Elasticsearch cluster
○ Export metrics for prometheus
4. What is a CICD Pipeline?
• CI(Continuous Integration) is the process of integrating all new code
changes into a shared repository
• CD(Continuous Deployment) is the process of automated deployment of
the integrated code from the development to the production stage
A CI/CD Pipeline is the process of taking code from version control and
making it readily available to users of your application in an automated
fashion
5. WSO2 Kubernetes Pipeline
WSO2 Pipeline enables running devops seamlessly for WSO2 products.
● Quick start with minimal default configurations
● Preconfigured pipeline with safe defaults
● Support for Multiple Environments
● Centralized Logging with ELK
● Out of the box Monitoring with Prometheus
○ Performance monitoring via JMX
○ JVM health monitoring
● Automated Devops driven by GitOps
● Embedded WUM for seamless updates
● Customizable to match user requirements
6. Tools Used in the Pipeline
• Jenkins - Continuous Integration
• Spinnaker - Continuous
Deployment
• Elastic Stack - Centralized Logging
• Prometheus Operator - Monitoring
and Visualization (Grafana)
7. Spinnaker
● A multi-cloud deployment tool.
○ Has native support for deploying into most cloud environments
○ Best practices for cloud deployments built-in.
○ Backed by a growing community.
● It has several features such as
○ Access-control configuration per application.
○ Support for ingesting events from Docker registries.
○ Cross-cluster orchestration.
○ and many more features you would have to build on top of
Kubernetes yourself.
9. Delivering Changes Through the Pipeline
For an environment to be created or updated, Spinnaker expects a new Helm
chart or Docker image. An update could be triggered by Spinnaker from any of
the following events:
• The Helm chart configurations are changed in the Github Chart source repository
• A cron job in Jenkins which pulls the base image (An image if a subscription is
available) to create a new image
• New artifacts are added to the Dockerfile in the Github Artifact source repository of
the relevant image
12. Install Pipeline Helm Chart
● Download the sample values.yaml
(https://raw.githubusercontent.com/wso2/kubernetes-pipeline/master/samples/valu
es-ei-pattern-1.yaml) file and replace the placeholders with their respective values
○ <REGISTRY_USERNAME>
○ <REGISTRY_PASSWORD>
○ <REGISTRY_EMAIL>
○ <EMAIL>
○ <GITHUB_USERNAME>
○ <GITHUB_PASSWORD>
● Add WSO2 Helm repo
● Deploy the chart using Helm
13. Access Deployment Pipelines
• Obtain the external IP (`EXTERNAL-IP`) of the Ingress resources by listing
down the Kubernetes Ingresses
• Add the above hosts as an entry in /etc/hosts as follows: <EXTERNAL_IP>
grafana kibana spinnaker jenkins
• Navigate to https://jenkins and trigger job ‘push-chart-to-spinnaker’.
• Navigate to https://spinnaker to view the deployment pipeline