Set up a local Concourse using Docker Compose ### What? [Concourse](https://concourse-ci.org/) is a VMware-sponsored, pipeline-based, continuous integration and deployment (CI/CD) system. The "pipelines" are a collection of three core concepts: [jobs](https://concourse-ci.org/jobs.html), [tasks](https://concourse-ci.org/tasks.html), and [resources](https://concourse-ci.org/resources.html). You'll learn more about these in upcoming stories. While CI may call to mind test automation, Tanzu teams use it for so much more than that. Take a stroll around the office and check out the jobs up on the CI screens to get a general idea of how broadly we use it to automate all that is automate-able. In this story, we're going to use a tool called [Docker Compose](https://docs.docker.com/compose/overview/) to set up Concourse in local docker containers. (Most engineering teams at tANU use BOSH and [concourse-bosh-deployment](https://github.com/concourse/concourse-bosh-deployment) to set up their Concourse for CI. However, it's a much longer process and we'd rather jump straight to some cool Concourse concepts.) ### How? Our friends at Stark & Wayne actually have a pretty good Concourse tutorial. We'll start by using their documentation for setting up your local Concourse. Open https://concoursetutorial.com/#getting-started in your browser and start there. Just in case you wanna know the outline, here's what youre going to do: 1. Install Docker and Docker Compose: ``` brew cask install docker brew install docker-compose ``` 2. Create a dedicated directory for storing all of the files you will need to download during your time here with us. For example: ``` mkdir my-onboarding-stuff cd my-onboarding-stuff ``` 3. Download the Stark & Wayne's pre-packaged Docker Compose YAML configuration: ``` wget https://raw.githubusercontent.com/starkandwayne/concourse-tutorial/master/docker-compose.yml ``` 4. Use Docker Compose to start up your local Concourse in docker containers: ``` docker-compose up -d ``` **Note:** If `docker-compose` fails to run, make sure you started `docker` and that you typed `docker-compose` and not `docker compose`. **Open Concourse in your browser** Now that you've got everything set up, navigate to `http://127.0.0.1:8080` in your browser. ### Expected Result  ### Resources [Concourse Architecture Overview](https://concourse-ci.org/concepts.html) [All About Concourse for Continuous Integration (video)](https://tanzu.vmware.com/content/blog/all-about-concourse-for-continuous-integration) [YAML Validator](http://codebeautify.org/yaml-validator) ### Relevant Repos and Teams **Concourse:** [concourse/concourse](https://github.com/concourse/concourse) L: concourse --- Download and hook up your Concourse CLI ### What? Now that you have Concourse set up, the first thing you'll want to do is download the `fly` CLI and authenticate with your target. This is done with the `fly login` command. The login command serves double duty: it authenticates with a given endpoint and saves it under a more convenient name. The name and token are stored in `~/.flyrc` (though you shouldn't really edit the file manually). ### How? 1. Download the `fly` CLI by clicking the button in the **cli:** section on the bottom bar that corresponds to your OS or by running `brew cask install fly` on MacOS (if you have homebrew installed). 1. Move it to your computer's $PATH and make it executable. 1. Run `fly login --help` for instructions to login to Concourse and save a new target (**hint:** you should have seen the URL you'll need for this in a previous story). Our concourse is configured to allow users to login without any credentials (take a look at the `docker-compose.yml` and you should see how that was achieved). ### Expected Result The CLI prints "target saved" and you can run `fly -t ...` with other commands. **Note:** If your system prevents `fly` from running, try going to System Preferences -> Security and Privacy and see if you can figure out how to appease Mac and allow `fly`. ### Resources [Fly login documentation](https://concourse-ci.org/fly.html#fly-login) ### Relevant Repos and Teams [concourse/fly](https://github.com/concourse/fly) L: concourse, onboarding-lite --- Learn you some Concourse ### What? There's a lot of ground to cover when it comes to learning Concourse. One of the best resources you can use is the [tutorial developed by the folks at Stark & Wayne](https://concoursetutorial.com). To get started, we're gonna recommend that you dig into the following topics _at the very least_: - [Hello world](https://concoursetutorial.com/basics/task-hello-world.html) - [Task Inputs](https://concoursetutorial.com/basics/task-inputs.html) - [Task Scripts](https://concoursetutorial.com/basics/task-scripts.html) - [Basic Pipeline](https://concoursetutorial.com/basics/basic-pipeline.html) - [Pipeline Resources](https://concoursetutorial.com/basics/pipeline-resources.html) Don't let this list stop you from trying out other parts of the tutorial. There's a lot you can dig in to here, so let this be one of those choose-your-own-adventure moments. ### Resources [Configuring a Job](https://concourse-ci.org/jobs.html) [Pipeline Mechanics](https://concourse-ci.org/pipelines.html) [Build Plans](https://concourse-ci.org/jobs.html#job-plan) L: concourse, onboarding-lite --- [RELEASE] Concourse ⇧