Giter Site home page Giter Site logo

soyuka / brigade Goto Github PK

View Code? Open in Web Editor NEW

This project forked from brigadecore/brigade

1.0 3.0 0.0 4.12 MB

Event-based Scripting for Kubernetes.

License: MIT License

JavaScript 7.11% Makefile 2.33% Go 46.95% Shell 2.09% TypeScript 40.92% Smarty 0.60%

brigade's Introduction

Brigade: Event-based Scripting for Kubernetes

Script simple and complex workflows using JavaScript. Chain together containers, running them in parallel or serially. Fire scripts based on times, GitHub events, Docker pushes, or any other trigger. Brigade is the tool for creating pipelines for Kubernetes.

  • JavaScript scripting
  • Project-based management
  • Configurable event hooks
  • Easy construction of pipelines
  • Check out the docs to get started.

asciicast

The Brigade Technology Stack

  • Brigade ❤️ JavaScript: Writing Brigade pipelines is as easy as writing a few lines of JavaScript.
  • Brigade ❤️ Kubernetes: Brigade is Kubernetes-native. Your builds are translated into pods, secrets, and services
  • Brigade ❤️ Docker: No need for special plugins or elaborate extensions. Brigade uses off-the-shelf Docker images to run your jobs. And Brigade also supports DockerHub webhooks.
  • Brigade ❤️ GitHub: Brigade comes with built-in support for GitHub, DockerHub, and other popular web services. And it can be easily extended to support your own services.

The design introduction introduces Brigade concepts and architecture.

Quickstart

  1. Install Brigade
  2. Create a Brigade project
  3. Write a Brigade script
  4. Execute the script

The easiest way to install Brigade into your Kubernetes cluster is to install it using Helm.

$ helm repo add brigade https://azure.github.io/brigade
$ helm install -n brigade brigade/brigade

You will now have Brigade installed.

To create new projects, use the brigade-project Helm chart. While inside the Git repository cloned above, run these commands:

$ helm inspect values brigade/brigade-project > myvalues.yaml
$ # edit myvalues.yaml

When editing myvalues.yaml, follow the instructions in that file for configuring your new project. Once you have customized that file, you can install the project based on your new configuration by passing it with -f myvalues.yaml.

$ helm install --name my-project brigade/brigade-project -f myvalues.yaml

Now creating your first brigade.js is as easy as this:

const { events } = require('brigadier')

events.on("exec", (brigadeEvent, project) => {
  console.log("Hello world!")
})

Check out the tutorial for more on creating scripts.

In the future, Brigade will provide prebuilt brig binaries. But currently you need to build your own. Take a look at the Developer's Guide to learn more.

Assuming you named your project deis/empty-testbed, you can run a brigade.js file like this:

$ brig run -f brigade.js deis/empty-testbed

This will show you the detailed output of running your brigade.js script's exec hook.

(To see the names of your projects, run brig project list.)

Brigade ❤️ Developers

To get started head to the developer's guide

Brigade is well-tested on Minikube and Azure Container Services.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

brigade's People

Contributors

technosophos avatar adamreese avatar omgjlk avatar alexandair avatar lukepatrick avatar fibonacci1729 avatar mazzus avatar seanknox avatar arschles avatar hemanthmalla avatar spheromak avatar aranair avatar

Stargazers

 avatar

Watchers

James Cloos avatar Antoine Bluchet avatar  avatar

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.