You need to checkout the concourse project, atc will be picked up as a submodule. The develop branch is for active work:
$ git clone https://github.com/concourse/concourse git checkout develop git submodule update --init --recursive
Consourse is built with Go and Elm. You also need Node and few modules. Assuming you’re using a mac:
-
Install Elm 1.6 from http://install.elm-lang.org/Elm-Platform-0.17.1.pkg
-
Install homebrew from http://brew.sh/
Then use homebew to install the following:
brew install go brew install node brew install bzr brew install postgres
Finally use Node to install the javascript toos:
npm install uglify-js -g npm install -g less npm install -g less-plugin-clean-css
You need a running postgres database named atc. The application takes care of creating and upgrading the schema so it can be empty. If it’s the first time you’ve install postgress you need to run initdb
initdb /usr/local/var/postgres -E utf8
After that you can start the server and create the empty atc database:
postgres -D /usr/local/var/postgres/ createdb atc
To configure your GOPATH make sure you are in the root concourse checkout directory and run:
source .envrc
|
Note
|
You need to be in the correct directory. Don’t run source .envrc from a different location.
|
To build the web code:
cd src/github.com/concourse/atc/web make -B
Finally you can run the application:
cd .. go run cmd/atc/*.go -d
Concouse should be live at http://localhost:8080
If you try to use a realse version of fly you will get errors like this:
fly -t local ps targeting http://localhost:8080 error: strconv.ParseInt: parsing "0-dev": invalid syntax
To work around that you need to build a local copy and use that instead
cd ${concourse}/src/github.com/concourse/fly
go build -o fly main.go
alias fly=${concourse}/src/github.com/concourse/fly/fly