All Projects → andreschaffer → one-click-microservice

andreschaffer / one-click-microservice

Licence: other
A starting point for automating the creation of microservices and all its Ops costs with a single click.

Programming Languages

groovy
2714 projects
shell
77523 projects
Makefile
30231 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to one-click-microservice

community-edition
Zebrunner is a Test Automation Management Tool
Stars: ✭ 171 (+533.33%)
Mutual labels:  jenkins, pipelines-as-code, continuous-delivery
Jenkins
Jenkins automation server
Stars: ✭ 18,225 (+67400%)
Mutual labels:  jenkins, pipelines-as-code, continuous-delivery
Jenkins Pipeline
📈 Learn how to implement container technologies with your Jenkins CI/CD workflows to make them easier to manage in this tutorial.
Stars: ✭ 83 (+207.41%)
Mutual labels:  jenkins, continuous-delivery
Docker For All
Docker applied in development, devops, testing, product management etc.
Stars: ✭ 88 (+225.93%)
Mutual labels:  jenkins, continuous-delivery
Cdeasy
Continuous Delivery made Easy ;)
Stars: ✭ 143 (+429.63%)
Mutual labels:  jenkins, continuous-delivery
Ccmenu
CCMenu is a Mac application to monitor continuous integration servers.
Stars: ✭ 306 (+1033.33%)
Mutual labels:  jenkins, continuous-delivery
Bzppx Codepub
暴走皮皮虾之代码发布系统,是现代的持续集成发布系统,由后台管理系统和agent两部分组成,一个运行着的agent就是一个节点,本系统并不是造轮子,是"鸟枪"到"大炮"的创新,对"前朝遗老"的革命.
Stars: ✭ 471 (+1644.44%)
Mutual labels:  jenkins, continuous-delivery
Delivery Pipeline Plugin
Jenkins plugin for pipeline visualisation, perfect for Continuous Delivery
Stars: ✭ 122 (+351.85%)
Mutual labels:  jenkins, continuous-delivery
jenkins-pipeline-shared-library-template
Project template for developing shared Jenkins pipeline libraries.
Stars: ✭ 46 (+70.37%)
Mutual labels:  jenkins, continuous-delivery
Jenkinsfiles
Examples for jenkins pipelines, comparing scripted and declarative syntax
Stars: ✭ 187 (+592.59%)
Mutual labels:  jenkins, continuous-delivery
Nevergreen
🐤 A build monitor with attitude
Stars: ✭ 170 (+529.63%)
Mutual labels:  jenkins, continuous-delivery
ebook-continuous-delivery-with-kubernetes-and-jenkins
Continuous Delivery for Java Apps: Build a CD Pipeline Step by Step Using Kubernetes, Docker, Vagrant, Jenkins, Spring, Maven and Artifactory
Stars: ✭ 39 (+44.44%)
Mutual labels:  jenkins, continuous-delivery
solutions-terraform-jenkins-gitops
Demonstrates the use of Jenkins and Terraform to manage Infrastructure as Code using GitOps practices
Stars: ✭ 49 (+81.48%)
Mutual labels:  jenkins, infrastructure-as-code
updatebot
a simple bot for updating dependencies in source code
Stars: ✭ 30 (+11.11%)
Mutual labels:  jenkins, continuous-delivery
cloud-s4-sdk-pipeline-docker
The Cloud SDK continuous delivery infrastructure makes heavy use of docker images. This are the docker sources of these images.
Stars: ✭ 13 (-51.85%)
Mutual labels:  jenkins, continuous-delivery
Fabric8 Platform
Generates the distribution of the fabric8 microservices platform
Stars: ✭ 105 (+288.89%)
Mutual labels:  jenkins, continuous-delivery
pipelines-as-code
Pipelines as Code
Stars: ✭ 37 (+37.04%)
Mutual labels:  pipelines-as-code, continuous-delivery
terraform-aws-concourse
Terraform Module for a distributed concourse cluster on AWS
Stars: ✭ 12 (-55.56%)
Mutual labels:  continuous-delivery, infrastructure-as-code
Fabric8
fabric8 is an open source microservices platform based on Docker, Kubernetes and Jenkins
Stars: ✭ 1,783 (+6503.7%)
Mutual labels:  jenkins, continuous-delivery
artifact-promotion-plugin
A simple Jenkins plugin to promote artifacts.
Stars: ✭ 29 (+7.41%)
Mutual labels:  jenkins, continuous-delivery

Build Status

One Click Microservice

Presentation at JFokus 2017

image alt text

Motivation

Having a way of rapidly creating and deploying microservices is a prerequisite if you want to do serious microservices. It should be easy, so that we can focus on business, the thing that makes us unique.
This project serves as a starting point for automating all the operational setup cost associated to creating new microservices with a single click.

How it works

The central pieces of this solution are Docker, Jenkins, the Jenkins Job-DSL plugin and Gogs (it should be easy for you to adapt it to work with any other Git Server though, like GitHub or BitBucket).

We use Docker to run Jenkins and Gogs. Jenkins itself has access to Docker in a Docker-outside-of-Docker approach, i.e. we map the host's Docker socket, so that containers started by Jenkins will be siblings.

We have prepared two repositories into Gogs (our Git server):

  • microservice_code_generator, which is responsible for the generation of the microservices' skeleton.
    In our case, we are creating a simple Python Flask application as our microservice but you can simply adjust it to your needs (being the code skeleton relevant for your context and with your programming language of choice).
  • jenkins_seed, where we have our pipelines as code via Jenkins Job-DSL definitions.

One of the pipelines is the create_microservice pipeline that fulfills the promise of creating microservices with one click. What it does:

  • it creates a new repository in Gogs with the microservice's skeleton code generated by the microservice_code_generator.
  • it creates and adds the microservice's pipeline to the jenkins_seed.

The microservice's pipeline anatomy:

  • it runs the tests and builds a docker image for it.
  • it deploys it as a docker container in the host machine.

Both the create_microservice pipeline and the microservice's pipeline again are easy for you to adapt and extend to your needs.
Good examples of extending the create_microservice pipeline are adding steps to create metrics dashboards and monitoring alerts for your new microservice.
An obvious example of adapting the microservice's pipeline is changing how / where it deploys the service.

Let's get hands on next!

Prerequisites

Action

  • Clone this repository

  • Run ./run.sh (the first time it might take a couple of minutes since it needs to build the Jenkins docker image)

  • Now you got Jenkins and Gogs running (the repositories on Gogs can be explored at http://localhost:3000/explore/repos if you'd like)

  • Browse to Jenkins at http://localhost:8080

  • Run the seed job (the first time it might take a few seconds because it downloads libs and runs tests before effectively updating the jobs)
    alt text

  • Go to the all_pipelines view (or create_microservice view, but all_pipelines is especially good because you can see everything that will happen) alt text

  • Run the create_microservice pipeline (provide a service name, i.e. good_service and the port that it shall listen to, e.g. 8000) alt text

  • Wait for the pipeline to finish and for the seed job to run again

  • Voilà! You have a brand new pipeline for your microservice. Trigger it to get your microservice up and running alt text

  • After the deployment is done, you can check your microservice echo Hello World! (e.g. http://localhost:8000) alt text

  • Enjoy and maybe create some more microservices :)

Going forward

Now that you have a solution for easily creating microservices, one thing will happen: you WILL create lots of microservices. And in order to be able to maintain them, you'll need the proper mindset. A few tips:

That's it! We hope you enjoyed it!

Note there is quite some Inception here, so just remember to carry your totem with you and have fun! :)

Contributing

If you would like to help making this project better, see the CONTRIBUTING.md.

Maintainers

Send any other comments, flowers and suggestions to André Schaffer and Tommy Tynjä.

License

This project is distributed under the MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].