How to Install Concourse on Ubuntu Server

Concourse is an open-source continuous integration and delivery system that is designed to be secure, fast, and scalable. In this tutorial, we will guide you on how to install Concourse on the latest version of Ubuntu Server.

Prerequisites

Before we install Concourse, you will need to have the following:

Step 1: Update the Ubuntu Server

  1. Log in to the Ubuntu Server with a user account that has sudo privileges.

  2. Update the package list by running the following command:

    sudo apt-get update
    
  3. Upgrade the installed packages to their latest version by running the following command:

    sudo apt-get upgrade
    

Step 2: Install Docker

  1. Install the Docker package by running the following command:

    sudo apt-get install docker.io
    
  2. Add the current user to the docker group to avoid running docker commands as sudo. Run the following command:

    sudo usermod -aG docker $(whoami)
    

    Note: Log out of the shell and log in again to activate the new docker group membership.

Step 3: Install Concourse

  1. Download the fly CLI tool by running the following command:

    sudo curl -L "https://concourse-ci.org/downloads.html" -o /usr/local/bin/fly
    
  2. Make the fly CLI tool executable by running the following command:

    sudo chmod +x /usr/local/bin/fly
    
  3. Generate the Concourse keys and certificates by running the following command:

    sudo mkdir /etc/concourse
    sudo ssh-keygen -t rsa -f /etc/concourse/tsa_host_key -N ''
    sudo ssh-keygen -t rsa -f /etc/concourse/worker_key -N ''
    sudo ssh-keygen -t rsa -f /etc/concourse/session_signing_key -N ''
    sudo cp /etc/concourse/worker_key.pub /etc/concourse/authorized_worker_keys
    
  4. Create the Concourse Docker Compose file by running the following command:

    sudo nano docker-compose.yml
    
  5. Paste the following Docker Compose configuration into the file:

    version: '3'
    services:
      web:
        image: concourse/concourse
        depends_on:
          - db
        ports:
          - "8080:8080"
        volumes:
          - /etc/concourse:/concourse-keys
        command: web
        environment:
          CONCOURSE_TSA_HOST_KEY: /concourse-keys/tsa_host_key
          CONCOURSE_TSA_PUBLIC_KEY: /concourse-keys/worker_key.pub
          CONCOURSE_SESSION_SIGNING_KEY: /concourse-keys/session_signing_key
          CONCOURSE_POSTGRES_DATA_SOURCE: |
            postgres://postgres:postgres@db/atc?sslmode=disable
      db:
        image: postgres
    
  6. Save and close the file by pressing CTRL+X, Y, and then ENTER.

  7. Start the Concourse container by running the following command:

    sudo docker-compose up -d
    
  8. To verify that the container is running, run the following command:

    sudo docker ps
    

    The output should list the Concourse container.

Step 4: Access Concourse

  1. Open a web browser and navigate to http://<ubuntu-server-ip-address>:8080.

  2. When prompted, enter test as the username and test as the password.

  3. You should now have access to the Concourse dashboard.

Conclusion

Congratulations! You have successfully installed Concourse on Ubuntu Server. You can now use Concourse to automate your CI/CD pipeline.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!