Sep 29, 2023 4 min read

How to Install Concourse CI on Ubuntu 18.04

Install Concourse CI on Ubuntu 18.04 with our step-by-step tutorial. An open-source CI/CD system with many integrations and resource types.

Install Concourse CI on Ubuntu 18.04
Table of Contents

Choose a different version or distribution

Introduction

Before we begin talking about how to install Concourse CI on Ubuntu 18.04, let’s briefly understand - What is Concourse CI?

The Concourse is an open-source CI/CD system with approximately 100 integrations and resource types to the outside world. Concourse reduces the risk of switching to and from Concourse, by encouraging practices that decouple the project from the CI's little details and keep all configuration in declarative files that can be checked into version control.

In this tutorial, you will install Concourse CI on Ubuntu 18.04. We will also address a few FAQs related to the Concourse CI installation on Ubuntu 18.04.

Advantages of Concourse CI

  1. Automation: Concourse CI enables automatic build, test, and deployment workflows, streamlining development processes.
  2. Scalability: It allows horizontal scaling with distributed workers, accommodating projects of any size.
  3. Containerized: Concourse CI runs tasks within isolated containers, ensuring clean and reproducible builds.
  4. Visibility: Its web UI provides comprehensive visibility into pipeline status, making it easy to track and debug builds.
  5. Flexibility: Concourse CI supports a wide range of platforms and integrates well with popular tools for seamless workflow integration.

Prerequisites

You'll have to make sure to install the following in order to successfully complete this tutorial:

  • Install Docker
  • Install Docker Compose (if not included in the Docker installation)

Step 1 - Install dependencies

Install docker and docker-compose.

sudo apt install docker.io docker-compose -y

Step 2 - Deploy Concourse using Docker

sudo su

wget https://raw.githubusercontent.com/starkandwayne/concourse-tutorial/master/docker-compose.yml

docker-compose up -d
💡
You can change the CONCOURSE_EXTERNAL_URL value inside docker-compose.yml file to set use your public IP address.

You may come across the following issues for Windows AMD. Follow the given steps to resolve it.

Right click Docker instance -> Go to Settings -> Daemon -> Advanced -> Set the "experimental": true -> Restart Docker -> Switch to Linux container and restart the docker.

Step 3 - Test Setup

1) You then need to open http://127.0.0.1:8080/ in your browser:

Concourse Welcome Page

2) To download the fly CLI, click on the operating system you are using, or just use curl to download it:

curl -o fly "http://0.0.0.0:8080/api/v1/cli?arch=amd64&platform=linux"

3) Then, copy fly binary into your path ($PATH), such as /usr/local/bin or ~/bin. Make sure to make it executable. For instance:

sudo mkdir -p /usr/local/bin
sudo mv fly /usr/local/bin
sudo chmod 0755 /usr/local/bin/fly

Step 4 - Target Concourse

You need to specify the target API for every fly request so that you get the same result every time.

1) Replace tutorial with a name of your choice:

fly --target tutorial login --concourse-url http://127.0.0.1:8080 -u admin -p admin
fly --target tutorial sync

2) You can then see the saved target Concourse API in a local file:

cat ~/.flyrc

3) Then you'll see a YAML file with the API, credentials etc:

targets:
  tutorial:
    api: http://127.0.0.1:8080
    team: main
    token:
      type: Bearer
      value: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJjc3JmIjoiYjE3ZDgxZmMwMWIxNDE1Mjk2OWIyZDc4NWViZmVjM2EzM2IyY2MxYWZjZjU3Njc1ZWYwYzY0MTM3MWMzNzI3OSIsImV4cCI6MTUyMjcwMjUwMCwiaXNBZG1pbiI6dHJ1ZSwidGVhbU5hbWUiOiJtYWluIn0.JNutBGQJMKyFzow5eQOTXAw3tOeM8wmDGMtZ-GCsAVoB7D1WHv-nHIb3Rf1zWw166FuCrFqyLYnMroTlQHyPQUTJFDTiMEGnc5AY8wjPjgpwjsjyJ465ZX-70v1J4CWcTHjRGrB1XCfSs652s8GJQlDf0x2hi5K0xxvAxsb0svv6MRs8aw1ZPumguFOUmj-rBlum5k8vnV-2SW6LjYJAnRwoj8VmcGLfFJ5PXGHeunSlMdMNBgHEQgmMKf7bFBPKtRuEAglZWBSw9ryBopej7Sr3VHPZEck37CPLDfwqfKErXy_KhBA_ntmZ87H1v3fakyBSzxaTDjbpuOFZ9yDkGA

The fly command will target this Concourse API using fly --target tutorial. This makes reusing commands from shell history much less harmful.

Destroy Concourse

Once you're done with the local Concourse, deployed with the help of docker-compose up, you can use docker-compose down to destroy it.

docker-compose down

FAQs to Install Concourse CI on Ubuntu 18.04

What are the system requirements for installing Concourse CI? 

The system requirements for Concourse CI depend on the deployment method. It typically requires a Linux, macOS, or Windows machine with sufficient resources and a supported container runtime if using Docker.

Is Concourse CI compatible with cloud platforms like AWS or GCP? 

Yes, Concourse CI can be deployed on cloud platforms like AWS or GCP. It can utilize cloud resources and services for efficient CI/CD pipelines.

Can I install Concourse CI on my own infrastructure? 

Yes, Concourse CI can be installed on your own infrastructure, such as physical or virtual machines. This allows complete control over the installation and configuration process.

How can I secure my Concourse CI installation? 

Concourse CI supports various security features, such as TLS encryption and authentication mechanisms, allowing you to secure your installation and control access to pipelines and resources.

Can I integrate Concourse CI with my existing tools and services? 

Yes, Concourse CI offers extensive integration capabilities with popular tools and services like Git, Docker, Slack, and more. It allows for seamless automation and coordination within your existing development ecosystem.

Is Concourse CI scalable for large projects or increased workflows? 

Yes, Concourse CI is highly scalable. It supports the use of distributed workers, allowing horizontal scaling to accommodate large projects and increased workflows.

Why does Concourse give a Max Containers Error?

Concourse can garbage-collect the containers tracked in the database. Sometimes, it's possible for containers or volumes to be created on the worker, but database assumes that the creation has failed. It leads to the piling up of untracked containers which causes the 'max containers reached' error.

Conclusion

We hope this detailed guide helped you understand and install Concourse CI on your system. To learn more about Concourse CI, check out the official Concourse documentation.

If you have any queries, please leave a comment below, and we’ll be happy to respond to them for sure.

Great! You’ve successfully signed up.
Welcome back! You've successfully signed in.
You've successfully subscribed to DevOps Tutorials - VegaStack.
Your link has expired.
Success! Check your email for magic link to sign-in.
Success! Your billing info has been updated.
Your billing was not updated.