Git Product home page Git Product logo

twistlock-example's Introduction

twistlock-example

An example of a container description for the twistlock system.

Requisites

  1. A description file
  2. Container control script

Description file

A yaml file with the following properties:

  1. A fully qualified name field.
  2. A provided services map of service names and the ports at which the services are offered.
  3. A consumed services map of service names and the ports at which the services are expected.
  4. A resources map of resource names and their expected mount points.

Example:

name: blog
provided_services:
    website:
        port: 80
        description: The blog interface served over http.
consumed_services:
    mysql:
        port: 3306
        description: An SQL server for storing entries and comments.
resources:
    logs:
        path: /data/logs
        description: blog application server logs

Container control script

There are 4 functions that the script must implement.

  1. Build. In this function the container should be prepared. In case of a docker container it could be the invocation of docker build.
  2. Run. In this function the container should be ran. It should read a series of parameters in over stdin. In the case of docker it would then invoke docker run with those parameters. It should return a container identifier.
  3. Link. Connect a port of a container to an external service.
  4. Stop. Stop a container.

twistlock-example's People

Contributors

tinco avatar

Watchers

 avatar James Cloos avatar

Forkers

nagyistge

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.