Skip to content

Running CHORDS on Windows 10

intRobyn edited this page Mar 10, 2017 · 4 revisions

Running a CHORDS Portal on Windows 10

Docker for Windows requires 64bit Windows 10 Pro, Enterprise and Education (1511 November update, Build 10586 or later) and Microsoft Hyper-V. Please see What to know before you install for a full list of prerequisites.

Pre-setup

If you have not used Docker before here are a few things you should know.

  • You can download Docker from this link which also comes with a tutorial on how to set up Docker.
  • Make sure you have the beta version of Docker-for-Windows
  • Recommended version 1.13.0-rc6 includes:
  • docker-machine 0.9.0-rc2
  • docker-compose 1.10.0-rc2
  • Kitematic 0.13.0-RC3
  • Boot2Docker ISO 1.13.0-rc6
  • VirtualBox 5.1.12
  • if you use docker-compose version 1.10.0-rc2 it is included in version 1.13.0-rc6

Note: For more information about these two versions visit

Once you have everything installed and set up, open up powershell.

Powershell does not support the Linux style of environment.

  • In docker-compose.yml make sure the ports are set to 8080:8080
ports:
        -"8080:8080"
  • Put the environment specs as an ".env" file (ex. Environment.env) in the same directory as the docker-compose.yml
  • When you create the ".env" file make sure it contains "CHORDS_DB_PW=chords_ec_demo" in the text editor of your choice (ex. sublime) and SAVE IT

Note Make sure to change these passwords. (Ones labeled PW)

CHORDS_ADMIN_PW=chords_ec_demo
CHORDS_GUEST_PW=guest
DOCKER_TAG=development
RAILS_ENV=development
DB_RETENTION=52W

Install The Docker recipe

  • Open a terminal window
  • Make sure to delete previous images before starting up CHORDS
docker rmi $(docker images -q)
  • Change to a convenient directory where the configuration file will live
cd <directory of choice>
  • Start up CHORDS
docker-compose -p chords up -d

Note: if you are using bash use:

### On Intel systems:
curl -kL https://github.com/NCAR/chords_portal/raw/docker/docker-compose.yml > docker-compose.yml
### On Raspberry pi systems:
curl -kL https://github.com/NCAR/chords_portal/raw/docker/rpi-docker-compose.yml > docker-compose.yml

####Download CHORDS Images

docker-compose pull

Note: if you can't get wget or curl to work copy docker-compose.yml from github(raw) into a file on W10

####Run the Chords Containers

  • Close Chords down and then pull it up again
docker-compose -p chords down
docker-compose -p chords up -d

Verify that the server is functional

Go to your browser and type in localhost:8080 and see if the app is running

localhost:8080

Tips

  • The CHORDS server has several security keys, including SECRET_KEY_BASE and CHORDS_DB_PW. These can be specified via environment variables, on the docker-compose command. CHORDS_DB_PW must be provided, as shown in the preceding instructions. SECRET_KEY_BASE will default to standard value, but it is highly recommended that you change this to a random sting of your choosing. Be sure to remember both values, as they will be needed for system restarts. We plan to devise a more straightforward method for managing security keys.

  • The Docker app has a menu entry for installing/running Kitematic(beta), which is a great tool for monitoring and controlling your docker images and containers.

  • If you sleep the machine that is running docker, the docker engine time can be wrong when the machine resumes, and so the container times will be wrong. The observable symptom is that the dashboard will not display correctly, since the data queries are made relative to the current system time. The only fix is to restart the docker engine. The clock sync problem is mentioned on the forums, with the claim that they are working on the issue.

  • Note:: If you find that localhost is not responding, try bringing CHORDS down and back up.

More Information

Clone this wiki locally