CHORDS Setup and Control
CHORDS is packaged as a collection of Docker containers. Configuration and control of these containers are performed by running a python management script. The script shares the directory containing CHORDS configuration files.
Note: On systems where docker requires root, you may need to use sudo to run these commands.
Requirements:
- python 3 (Linux and MacOS have this by default; install on Windows)
- curl (Linux and MacOS have this by default; install on Windows)
- A running docker system
- OSX: Docker for Mac is fantastic on the Mac.
- W10 Pro: Docker for Windows
- W7: For us hapless Windows 7 users, we have to use the less elegant Docker Toolbox.
- Linux: See instructions for various flavors of this OS.
- Raspberry Pi: See the easy to follow instructions for bringing up a Docker enabled Raspberry Pi.
- Port 25 must be open. Port 3000 must be open for the Grafana visualization, but you can use CHORDs without this feature.
Installation:
Running:
Verifying:
- Point your browser at the CHORDS portal by entering the IP address of the system into the address bar. This may be
localhost if CHORDS is on the same machine as you browser. On W7 machines, get the IP from the output of:
docker-machine ip
- It can take quite a while for the initial page load to finish, as the server initializes its caches. A Raspberry Pi can take up to a couple of minutes.
- Sign in with admin@chordsrt.com (realtimedata). Immediately change this admin account password (under Users). You will probably also want to uncheck “Restrict viewing of data” (under Configure).
Shutting down:
- The CHORDS database will persist and be used the next time you run the CHORDS containers.
Updating:
Monitoring:
- You can watch the startup log for the chords application. It’s not critical, but can be useful for diagnosing problems, and for monitoring the tedious asset compilation process, which takes several minutes on the Raspberry Pi:
Visualization
Hit the Visualization button to open a tab pointing to the builtin Grafana server.
Login with admin
The Getting Started Guide is a good place to begin learning about Grafana. There is also a very useful tutorial for configuring the dashboard queries. Data Source parameters are:
Parameter | Value |
---|---|
Name | CHORDS |
Type | InfluxDB |
URL | http://localhost:8086 |
Access | direct |
Database | chords_ts_production |
User | guest:guest |
Tips
-
You reconfigure the portal using
python3 chords_control --config
. Backup copies of the configuration files are created in case you need to go back. Once you have set the CHORDS admin password and the secret key base, you should not change them. Otherwise, the Rails application will not be able to access the CHORDS databases. -
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
- More CHORDS Docker tips are available on the project wiki.
- The CHORDS docker images are served from Docker Hub repository.