Skip to content

Latest commit

 

History

History
115 lines (81 loc) · 5.29 KB

README.md

File metadata and controls

115 lines (81 loc) · 5.29 KB

Plankton: A Lightweight Pipeline Orchestration Tool

Plankton's logo

Plankton is an open-source pipeline orchestration tool that leverages the power of containers to run each job within its own isolated environment.

With Plankton, you can define a pipeline configuration using a plankton.yaml file and execute it using a docker run command. Once the pipeline is running, you can track its progress using either the terminal or a web interface in your browser.

Example Pipeline and Usage

Here's an example of a plankton.yaml file:

jobs:

  test:
    image: alpine
    volumes:
      - ./:/usr/src/app
    working_dir: /usr/src/app
    entrypoint:
      - for i in $(seq 1 5); do
      -   echo "Testing..."
      -   sleep 1
      - done

  build:
    depends_on: test
    image: alpine
    volumes:
      - ./:/usr/src/app
    working_dir: /usr/src/app
    entrypoint:
      - for i in $(seq 1 7); do
      -   echo "Building..."
      -   sleep 1
      - done

  deploy:
    depends_on: build
    image: alpine
    volumes:
      - ./:/usr/src/app
    working_dir: /usr/src/app
    entrypoint:
      - for i in $(seq 1 3); do
      -   echo "Deploying..."
      -   sleep 1
      - done
  • image: specifies the container image that the job should run on.
  • volumes: mounts a local directory ./ as /usr/src/app within the container.
  • working_dir: sets the working directory within the container to /usr/src/app.
  • entrypoint: specifies the commands to run within the container.
  • depends_on: used to indicate that a job depends on the successful completion of the previous job in the pipeline.

View all job properties in the Plankton Pipeline Configuration Reference.

Run Your Pipeline with Docker

To run the pipeline, execute the following command:

docker run -it -v /var/run/docker.sock:/var/run/docker.sock -v $PWD:/usr/src/app -w /usr/src/app -p 1329:1329 adarlan/plankton
  • -v /var/run/docker.sock:/var/run/docker.sock: This option mounts the Docker socket file on the host machine inside the container, allowing the container to communicate with the Docker engine running on the host. This is necessary for running Docker commands from within the container. If you are concerned (and rightly so) with running third-party containers with access to your Docker host, you can try Plankton using Play-with-Docker.
  • -v $PWD:/usr/src/app: This option mounts the current directory ($PWD) on the host machine as a volume inside the container at /usr/src/app. This allows the container to access the files in the current directory, which is where the plankton.yaml file is located.
  • -w /usr/src/app: This option sets the working directory for the container to /usr/src/app. This means that when the container starts, it will start in the directory where the plankton.yaml file is located.
  • -p 1329:1329: This option maps port 1329 on the host machine to port 1329 inside the container. This allows you to access the Plankton web interface from your host machine's web browser.

Web-Based User Interface

You can track the progress of your pipeline in your browser by opening http://localhost:1329.

Web-based user interface

Display Pipeline Logs on Terminal

You can view real-time logs of your pipeline jobs in your terminal.

Pipeline logs on terminal

Built on the Compose Specification

You may have noticed that the plankton.yaml file is configured similarly to a Docker Compose file, but instead of defining services, in the Plankton file you define jobs.

This configuration format is defined by the Compose Specification, which establishes a standard for the definition of multi-container systems.

By using the Compose Specification, Plankton can benefit from a well-defined specification that is known to many people and maintained by a global community.

Dogfooding: Plankton Uses Itself!

In the Plankton repository there is a plankton.yaml file, where is configured a pipeline to build, test and deploy the Plankton itself.

See how it looks in the web interface:

Plankton using itself

Learn More About Plankton

Check out the following resources to find out more about Plankton:

Contribute to Plankton

I welcome contributions from anyone interested in improving Plankton. If you have any ideas, suggestions, or bug reports, please feel free to create an issue on the GitHub repository. If you'd like to contribute code, please fork the repository, create a new branch, and submit a pull request with your changes. I appreciate all contributions and will do my best to review them as quickly as possible.