Skip to content

Instantly share code, notes, and snippets.

@clementohNZ
Forked from kevin-smets/concourse.md
Created July 12, 2018 22:29
Show Gist options
  • Save clementohNZ/ce72b16f076ca2c152131f820911a658 to your computer and use it in GitHub Desktop.
Save clementohNZ/ce72b16f076ca2c152131f820911a658 to your computer and use it in GitHub Desktop.

Revisions

  1. @kevin-smets kevin-smets revised this gist Dec 9, 2016. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions concourse.md
    Original file line number Diff line number Diff line change
    @@ -6,11 +6,11 @@

    ## Concourse

    curl -Lo concourse https://github.com/concourse/concourse/releases/download/v2.3.1/concourse_darwin_amd64 && chmod +x concourse && mv concourse /usr/local/bin
    curl -Lo concourse https://github.com/concourse/concourse/releases/download/v2.5.0/concourse_darwin_amd64 && chmod +x concourse && mv concourse /usr/local/bin

    ## Fly

    curl -Lo fly https://github.com/concourse/concourse/releases/download/v2.3.1/fly_darwin_amd64 && chmod +x fly && mv fly /usr/local/bin/
    curl -Lo fly https://github.com/concourse/concourse/releases/download/v2.5.0/fly_darwin_amd64 && chmod +x fly && mv fly /usr/local/bin/

    ## Postgres

  2. @kevin-smets kevin-smets revised this gist Oct 22, 2016. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions concourse.md
    Original file line number Diff line number Diff line change
    @@ -6,11 +6,11 @@

    ## Concourse

    curl -Lo concourse https://github.com/concourse/concourse/releases/download/v2.2.1/concourse_darwin_amd64 && chmod +x concourse && sudo mv concourse /usr/local/bin
    curl -Lo concourse https://github.com/concourse/concourse/releases/download/v2.3.1/concourse_darwin_amd64 && chmod +x concourse && mv concourse /usr/local/bin

    ## Fly

    curl -Lo concourse https://github.com/concourse/concourse/releases/download/v2.2.1/fly_darwin_amd64 && chmod +x fly && sudo mv fly /usr/local/bin/
    curl -Lo fly https://github.com/concourse/concourse/releases/download/v2.3.1/fly_darwin_amd64 && chmod +x fly && mv fly /usr/local/bin/

    ## Postgres

    @@ -101,4 +101,4 @@ Spin up a worker:

    That's it! Check the result at http://127.0.0.1:8080/teams/main/pipelines/hello-world/jobs/hello-world

    While the job has been setup, it won't run automatically, click the plus icon to execute it. For furter usage (auto triggering jobs), check https://concourse.ci/hello-world.html at the bottom.
    While the job has been setup, it won't run automatically, click the plus icon to execute it. For further usage (auto triggering jobs), check https://concourse.ci/hello-world.html at the bottom.
  3. @kevin-smets kevin-smets revised this gist Sep 30, 2016. No changes.
  4. @kevin-smets kevin-smets revised this gist Sep 30, 2016. 1 changed file with 0 additions and 2 deletions.
    2 changes: 0 additions & 2 deletions concourse.md
    Original file line number Diff line number Diff line change
    @@ -47,11 +47,9 @@

    ## Setup the necessary users, roles and dbs

    psql -h localhost -U postgres
    createdb atc;
    createdb concourse;
    createuser concourse --pwprompt; # You will be prompted for a password.
    \q

    ## Generate the necessary keys for Concourse

  5. @kevin-smets kevin-smets revised this gist Sep 29, 2016. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions concourse.md
    Original file line number Diff line number Diff line change
    @@ -91,6 +91,8 @@ By default, the pipeline will be paused, unpause it:

    This can also be done in the web UI, but you know, meh :p.

    # Now the final step, work it!

    Spin up a worker:

    sudo concourse worker \
  6. @kevin-smets kevin-smets revised this gist Sep 29, 2016. No changes.
  7. @kevin-smets kevin-smets revised this gist Sep 29, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion concourse.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    # Prerequisites

    - (Homebrew)[http://brew.sh/]
    - [Homebrew](http://brew.sh/)

    # Installs

  8. @kevin-smets kevin-smets revised this gist Sep 29, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion concourse.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    # Prerequisites

    - Homebrew
    - (Homebrew)[http://brew.sh/]

    # Installs

  9. @kevin-smets kevin-smets revised this gist Sep 29, 2016. 2 changed files with 44 additions and 2 deletions.
    37 changes: 35 additions & 2 deletions concourse.md
    Original file line number Diff line number Diff line change
    @@ -18,7 +18,8 @@

    ## Check if everything is OK

    concourse -v
    concourse --version
    fly --version

    # Server version
    pg_config --version
    @@ -68,4 +69,36 @@ Do this in an empty folder somewhere, you'll need to launch Concourse from this
    --basic-auth-password the_password_you_gave_earlier \
    --session-signing-key session_signing_key \
    --tsa-host-key host_key \
    --tsa-authorized-keys authorized_worker_keys
    --tsa-authorized-keys authorized_worker_keys
    If all went well, you should see the web interface @ http://localhost:8080

    # Plumb those pipelines

    Download hello.yml, then run the following:

    fly -t lite login -c http://127.0.0.1:8080

    You will be prompted for username and password, concourse and the_password_you_gave_earlier.

    Add the hello-world pipeline:

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

    By default, the pipeline will be paused, unpause it:

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

    This can also be done in the web UI, but you know, meh :p.

    Spin up a worker:

    sudo concourse worker \
    --work-dir /opt/concourse/worker \
    --tsa-host 127.0.0.1 \
    --tsa-public-key host_key.pub \
    --tsa-worker-private-key worker_key

    That's it! Check the result at http://127.0.0.1:8080/teams/main/pipelines/hello-world/jobs/hello-world

    While the job has been setup, it won't run automatically, click the plus icon to execute it. For furter usage (auto triggering jobs), check https://concourse.ci/hello-world.html at the bottom.
    9 changes: 9 additions & 0 deletions hello.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    jobs:
    - name: hello-world
    plan:
    - task: say-hello
    config:
    platform: darwin
    run:
    path: echo
    args: ["Hello, world!"]
  10. @kevin-smets kevin-smets revised this gist Sep 29, 2016. 1 changed file with 9 additions and 7 deletions.
    16 changes: 9 additions & 7 deletions concourse.md
    Original file line number Diff line number Diff line change
    @@ -7,6 +7,10 @@
    ## Concourse

    curl -Lo concourse https://github.com/concourse/concourse/releases/download/v2.2.1/concourse_darwin_amd64 && chmod +x concourse && sudo mv concourse /usr/local/bin

    ## Fly

    curl -Lo concourse https://github.com/concourse/concourse/releases/download/v2.2.1/fly_darwin_amd64 && chmod +x fly && sudo mv fly /usr/local/bin/

    ## Postgres

    @@ -43,10 +47,9 @@
    ## Setup the necessary users, roles and dbs

    psql -h localhost -U postgres
    CREATE ROLE concourse superuser;
    CREATE DATABASE atc;
    CREATE DATABASE concourse;
    ALTER USER concourse WITH PASSWORD 'concourse';
    createdb atc;
    createdb concourse;
    createuser concourse --pwprompt; # You will be prompted for a password.
    \q

    ## Generate the necessary keys for Concourse
    @@ -62,8 +65,7 @@ Do this in an empty folder somewhere, you'll need to launch Concourse from this

    concourse web \
    --basic-auth-username concourse \
    --basic-auth-password concourse \
    --basic-auth-password the_password_you_gave_earlier \
    --session-signing-key session_signing_key \
    --tsa-host-key host_key \
    --tsa-authorized-keys authorized_worker_keys \
    --external-url http://my-ci.example.com
    --tsa-authorized-keys authorized_worker_keys
  11. @kevin-smets kevin-smets revised this gist Sep 29, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion concourse.md
    Original file line number Diff line number Diff line change
    @@ -28,7 +28,7 @@

    initdb /usr/local/var/postgres

    # Start the PostgreSQL server
    ## Start the PostgreSQL server

    pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start

  12. @kevin-smets kevin-smets revised this gist Sep 29, 2016. 1 changed file with 19 additions and 11 deletions.
    30 changes: 19 additions & 11 deletions concourse.md
    Original file line number Diff line number Diff line change
    @@ -2,15 +2,17 @@

    - Homebrew

    # Install Concourse
    # Installs

    ## Concourse

    curl -Lo concourse https://github.com/concourse/concourse/releases/download/v2.2.1/concourse_darwin_amd64 && chmod +x concourse && sudo mv concourse /usr/local/bin

    # Install Postgres
    ## Postgres

    brew install postgres

    # Check if everything is OK
    ## Check if everything is OK

    concourse -v

    @@ -20,21 +22,25 @@
    # Client version
    psql --version

    # Init the db
    # Setup

    ## Init the db

    initdb /usr/local/var/postgres

    # Optional: launch Postgres automatically at login
    # Start the PostgreSQL server

    pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start

    ### Optional: launch Postgres automatically at login

    mkdir -p ~/Library/LaunchAgents
    cp /usr/local/Cellar/postgresql/9.5.4_1/homebrew.mxcl.postgresql.plist ~/Library/LaunchAgents/
    launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist

    # Start the PostgreSQL server manually

    pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
    # Config

    # Setup the necessary users, roles and dbs
    ## Setup the necessary users, roles and dbs

    psql -h localhost -U postgres
    CREATE ROLE concourse superuser;
    @@ -43,14 +49,16 @@
    ALTER USER concourse WITH PASSWORD 'concourse';
    \q

    # Generate the necessary keys for Concourse
    ## Generate the necessary keys for Concourse

    Do this in an empty folder somewhere, you'll need to launch Concourse from this location. The commands are copied from https://concourse.ci/binaries.html

    ssh-keygen -t rsa -f host_key -N '' && ssh-keygen -t rsa -f worker_key -N '' && ssh-keygen -t rsa -f session_signing_key -N ''
    cp worker_key.pub authorized_worker_keys

    # Start the web overview
    # Start

    ## Web overview

    concourse web \
    --basic-auth-username concourse \
  13. @kevin-smets kevin-smets revised this gist Sep 29, 2016. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions concourse.md
    Original file line number Diff line number Diff line change
    @@ -12,6 +12,8 @@

    # Check if everything is OK

    concourse -v

    # Server version
    pg_config --version

  14. @kevin-smets kevin-smets revised this gist Sep 29, 2016. 1 changed file with 8 additions and 0 deletions.
    8 changes: 8 additions & 0 deletions concourse.md
    Original file line number Diff line number Diff line change
    @@ -9,6 +9,14 @@
    # Install Postgres

    brew install postgres

    # Check if everything is OK

    # Server version
    pg_config --version

    # Client version
    psql --version

    # Init the db

  15. @kevin-smets kevin-smets renamed this gist Sep 29, 2016. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  16. @kevin-smets kevin-smets revised this gist Sep 29, 2016. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion Concourse.md
    Original file line number Diff line number Diff line change
    @@ -30,6 +30,7 @@
    CREATE ROLE concourse superuser;
    CREATE DATABASE atc;
    CREATE DATABASE concourse;
    ALTER USER concourse WITH PASSWORD 'concourse';
    \q

    # Generate the necessary keys for Concourse
    @@ -43,7 +44,7 @@ Do this in an empty folder somewhere, you'll need to launch Concourse from this

    concourse web \
    --basic-auth-username concourse \
    --basic-auth-password mypass \
    --basic-auth-password concourse \
    --session-signing-key session_signing_key \
    --tsa-host-key host_key \
    --tsa-authorized-keys authorized_worker_keys \
  17. @kevin-smets kevin-smets revised this gist Sep 29, 2016. 1 changed file with 44 additions and 5 deletions.
    49 changes: 44 additions & 5 deletions Concourse.md
    Original file line number Diff line number Diff line change
    @@ -1,11 +1,50 @@
    Prerequisites: Homebrew
    # Prerequisites

    Install Concourse
    - Homebrew

    # Install Concourse

    curl -Lo concourse https://github.com/concourse/concourse/releases/download/v2.2.1/concourse_darwin_amd64 && chmod +x concourse && sudo mv concourse /usr/local/bin

    Install Postgres
    # Install Postgres

    brew install postgres

    # Init the db

    initdb /usr/local/var/postgres

    # Optional: launch Postgres automatically at login

    mkdir -p ~/Library/LaunchAgents
    cp /usr/local/Cellar/postgresql/9.5.4_1/homebrew.mxcl.postgresql.plist ~/Library/LaunchAgents/
    launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist

    # Start the PostgreSQL server manually

    pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start

    # Setup the necessary users, roles and dbs

    psql -h localhost -U postgres
    CREATE ROLE concourse superuser;
    CREATE DATABASE atc;
    CREATE DATABASE concourse;
    \q

    # Generate the necessary keys for Concourse

    Do this in an empty folder somewhere, you'll need to launch Concourse from this location. The commands are copied from https://concourse.ci/binaries.html

    ssh-keygen -t rsa -f host_key -N '' && ssh-keygen -t rsa -f worker_key -N '' && ssh-keygen -t rsa -f session_signing_key -N ''
    cp worker_key.pub authorized_worker_keys

    brew cask install postgres
    # Start the web overview

    Add `/Applications/Postgres.app/Contents/Versions/latest/bin` to your $PATH
    concourse web \
    --basic-auth-username concourse \
    --basic-auth-password mypass \
    --session-signing-key session_signing_key \
    --tsa-host-key host_key \
    --tsa-authorized-keys authorized_worker_keys \
    --external-url http://my-ci.example.com
  18. @kevin-smets kevin-smets revised this gist Sep 29, 2016. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions Concourse.md
    Original file line number Diff line number Diff line change
    @@ -8,3 +8,4 @@ Install Postgres

    brew cask install postgres

    Add `/Applications/Postgres.app/Contents/Versions/latest/bin` to your $PATH
  19. @kevin-smets kevin-smets revised this gist Sep 29, 2016. No changes.
  20. @kevin-smets kevin-smets created this gist Sep 29, 2016.
    10 changes: 10 additions & 0 deletions Concourse.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    Prerequisites: Homebrew

    Install Concourse

    curl -Lo concourse https://github.com/concourse/concourse/releases/download/v2.2.1/concourse_darwin_amd64 && chmod +x concourse && sudo mv concourse /usr/local/bin

    Install Postgres

    brew cask install postgres