Giter Club home page Giter Club logo

drone-runtime's Introduction

The drone runtime package implements the execution model for container-based pipelines. It is effectively a lightweight container orchestration engine optimized for pipelines.

Definition File

The runtime package accepts a pipeline definition file as input, which is a simple json file. This file is not intended to be read or written by humans. It is considered an intermediate representation, and should be generated by a computer program from more user-friendly formats such a yaml.

Example hello world definition file:

{
	"metadata": {
		"uid": "uid_AOTCIPBf3XdTFs2j",
		"namespace": "ns_JVzesGoyteu5koZK",
		"name": "test_hello_world"
	},
	"steps": [
		{
			"metadata": {
				"uid": "uid_8a7IJsL9zSJCCchd",
				"namespace": "ns_JVzesGoyteu5koZK",
				"name": "greetings"
			},
			"docker": {
				"args": [
					"-c",
					"echo hello world"
				],
				"command": [
					"/bin/sh"
				],
				"image": "alpine:3.6",
				"pull_policy": "default"
			}
		}
	],
	"docker": {}
}

Local Testing

The runtime package includes a simple command line utility allowing you to test pipeline execution locally. You should use this for local development and testing.

The runtime package includes sample definition files that you can safely execute on any machine with Docker installed. These sample files should be used for research and testing purposes.

Example commands:

drone-runtime samples/1_hello_world.json
drone-runtime samples/2_on_success.json
drone-runtime samples/3_on_failure.json
drone-runtime samples/4_volume_host.json
drone-runtime samples/5_volume_temp.json
drone-runtime samples/6_redis.json
drone-runtime samples/7_redis_multi.json
drone-runtime samples/8_postgres.json
drone-runtime samples/9_working_dir.json
drone-runtime samples/10_docker.json

Example command tests docker login:

drone-runtime --config=path/to/config.json samples/11_requires_auth.json

Kubernetes Engines

The default runtime engine targets Docker, however, there is an experimental runtime engine that targets Kubernetes. Pipeline containers are launched as Pods using the Kubernetes API.

drone-runtime \
  --kube-url=https://localhost:6443 \
  --kube-config=~/.kube/config \
  samples/kubernetes/1_hello_world.json

drone-runtime's People

Contributors

bogdangi avatar bradrydzewski avatar

Watchers

 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.