This project is the result of quite a bit of experimentation trying to get Concourse running locally on a Windows PC, to support some hobby projects I wanted to work on. Presumably this would also work on other platforms that support a VirtualBox provider, although its considerably easier to get Concourse working on Mac OS X and Linux just by using Docker directly.
-
Set the environment variable
CONCOURSE_ADD_LOCAL_USER
to a string that looks likeuser:pass
. On Windows, you can do this from acmd
prompt that is running as Adminstrator with:C:\> setx -m CONCOURSE_ADD_LOCAL_USER "myuser:mypassword"
You will be able to log into the Concourse UI with this username and password.
-
Same deal, but for
VAULT_ADMIN_USERPASS
, which is a username/password you can use for logging into the Vault instance this spins up. -
Clone this repository into a subdirectory of your Windows home directory. I put it at
C:\Users\Jon\Documents\src\concourse
. -
Make sure you have the native Windows version of Vagrant installed, as well as VirtualBox (I had VirtualBox installed as part of installing Docker Toolbox on Windows Home edition).
-
vagrant plugin install vagrant-disksize
. This allows us to modify the size of the disk that gets configured; the default 10GB disk can run out of space quickly. -
vagrant up
. This must also be run from acmd
prompt that is running as Administrator so that the permissions and symlinks work properly.
I eventually settled on this after exhausting a few other possibilities trying to get this run from the Windows Subsystem for Linux (WSL):
- Concourse had trouble launching containers for build when trying to run this on Docker Toolbox directly.
- Vagrant wouldn't successfully come up if I tried to launch from a
WSL directory (like my WSL
~
) or if I tried to run the Linux version of Vagrant from WSL.
A few notes on the configuration:
-
Because I am just using this locally, the shared keys generated by
vault init
are stored locally on the box! This is really not how Vault is intended to be used, and is arguably not at all secure, but I wanted something convenient for local dev and I was already used to Vault as a credential manager for Concourse. However, ports are forwarded properly so you should be able tovault login
againsthttp://127.0.0.1:8200
from a WSL bash prompt (yay!). -
Everything should restart if you
vagrant halt
andvagrant up
. -
You can use the default
http://127.0.0.1:8080/
Concourse URL. -
Two directories will be created on the host (Windows) machine in this directory:
concourse-data
andvault-data
. These are, respectively, where the data for the Concourse Postgres database and the Vault instance are ultimately mounted.concourse-data
is mounted via SMB so that symlinks work properly; this will require you to enter your Windows credentials when the VM is booting.The main advantages of having these filesystems external to the VM are:
- Not running out of disk space as easily.
- Being able to
vagrant destroy
andvagrant up
without losing your configured pipelines or stored credentials.