alexandreroman / cloud-native-pipelines

Cloud-native pipelines leveraging Concourse, Pivotal Build Service and Spinnaker to deploy apps

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cloud-native Pipelines

This project defines cloud-native pipelines to deploy your apps to Kubernetes and Pivotal Platform, leveraging Concourse, Pivotal Build Service, a container registry such as Harbor, and Spinnaker.

Prerequisites

These pipelines are built with modularization in mind: you can build your own pipeline depending on the modules you want to include. To build tailored pipelines, use the ytt CLI to add overlays to a base pipeline.

Building your pipeline

Deploying Java apps to Kubernetes

This pipeline would build a Java application using Pivotal Build Service. Unit tests are first executed, before an image is built with Java buildpacks. The resulting container image is deployed to a container registry, and then a Spinnaker pipeline is triggered to process this image. You may also add a job to run acceptance tests using Cypress.

Base:

Overlays:

Use k8s-java-app.yml.template to set pipeline parameters in a new file.

Deploy this pipeline to your Concourse instance using this command:

$ fly -t mytarget set-pipeline -p myapp -c k8s-java-pipeline.yml -l myapp.yml

To enable additional modules with pipeline overlays, use ytt:

$ ytt -f k8s-java-pipeline.yml -f acceptance-pipeline-overlay.yml -f k8s-spinnaker-pipeline-overlay.yml > myapp-pipeline.yml

Then reuse the same command to deploy this custom pipeline to Concourse:

fly -t mytarget set-pipeline -p myapp -c myapp-pipeline.yml -l myapp.yml

The Spinnaker pipeline is triggered using a webhook you must define in your configuration. This webhook must accept a reference to a container image as input parameters (previously built by Pivotal Build Service and deployed to your container registry.

Contribute

Contributions are always welcome!

Feel free to open issues & send PR.

License

Copyright © 2019 Pivotal Software, Inc.

This project is licensed under the Apache Software License version 2.0.

About

Cloud-native pipelines leveraging Concourse, Pivotal Build Service and Spinnaker to deploy apps

License:Apache License 2.0