Giter Site home page Giter Site logo

dockercd's Introduction

dockercd

Continuous Delivery pipeline for Nomad using Docker Hub

Continuous delivery for Docker container in Nomad, no Jenkins required

This is a very alpha stage project, but it works. This is a AWS Lambda function that is triggered by AWS API Gateway through a Docker Hub webhook. It scans the PUT request in the webhook to pull out the container organization, name, and tag and then pulls a job specification out of your specified S3 bucket, mutates it to use the container that was just pushed to Docker Hub, and then posts the job to Nomad.

This should work with any implementation of Docker Hub as a container repository, as the action is triggered by a push to Docker Hub, not from the Continuous Integration / builder of the container.

Prerequisites

  • AWS Lambda function with network access to your Nomad API
  • API Gateway configured to trigger a Lambda function

Installation

First, you must upload a JSON job specification to a S3 bucket, and grant IAM permissions to the Lambda function to read from it.

Then, zip this all up into a Lambda function and then upload it to AWS, supplying required environment variables.

From there, you set up API Gateway to triger the Lambda function, and supply the invocation URL as a webhook under the appropriate container in Docker Hub.

I advise using Terraform to automate this process. In the future, a terraform module will be provided to automate the whole process besides setting the Docker Hub webhook.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.