Hello, world!

Once you've got your Concourse all set up, you'll want to download the Fly CLI from your instance via the web UI. You can find the download links by browsing to the main page:

If you're on Linux or OS X, you will have to chmod +x the downloaded binary and put it in your $PATH. This can be done in one fell swoop with install path/to/fly /usr/local/bin/fly

Throughout this page we'll assume you've spun up the concourse/lite Vagrant box, but if you've set up Concourse in some other way, everything still applies; just use your URL instead of http://192.168.100.4:8080.

Once you have fly, you'll want to target your local VirtualBox like so:

$ fly -t lite login -c http://192.168.100.4:8080

This will save the target as lite, which we'll use for all later commands that we want to run against the local box by using the same -t flag.

Out of the box, Concourse doesn't have any Pipelines configured. That's boring. Here, have this YAML!

hello.yml

jobs:
- name: hello-world
  plan:
  - task: say-hello
    config:
      platform: linux
      image_resource:
        type: docker-image
        source: {repository: ubuntu}
      run:
        path: echo
        args: ["Hello, world!"]

Dump that into a file called hello.yml, and run the following:

$ fly -t lite set-pipeline -p hello-world -c hello.yml

If you refresh the main page, you should now see the world's tiniest pipeline!

Newly configured pipelines are paused by default (indicated by the blue bar along top of the page), to prevent them from running freely when you're not sure what they do yet. To unpause it, you can either reveal the pipelines sidebar via the button in the top left and press , or run:

$ fly -t lite unpause-pipeline -p hello-world

You can always fetch the current configuration of a pipeline by running:

$ fly -t lite get-pipeline -p hello-world

This pipeline configuration so far describes a single job, whose plan has a single task. There are no resources for this job to automatically trigger so we'll have to give it a helping hand. Click the job and then press the button in the top right. The task boots up, prints Hello, world!, and completes successfully:

Let's spice things up a bit. A pipeline with a single job with no resources isn't very interesting, so let's add a simple resource in the form of a timed trigger, using the Time resource.

navi-pipeline.yml

resources:
- name: every-1m
  type: time
  source: {interval: 1m}

jobs:
- name: navi
  plan:
  - get: every-1m
    trigger: true
  - task: annoy
    config:
      platform: linux
      image_resource:
        type: docker-image
        source: {repository: ubuntu}
      run:
        path: echo
        args: ["Hey! Listen!"]

Run the following to reconfigure the existing pipeline:

$ fly -t lite set-pipeline -p hello-world -c navi-pipeline.yml

Your pipeline should now look like this:

Every minute, the every-1m resource will yield a new version. This resource is used in a get step in the navi job, which sets trigger to true, so as a result the job will run every minute.

Now may be a good time to start learning about the different types of resources or start looking at Tutorials.