- Virtualbox & Vagrant
- Ansible
- Leiningen
Choose your favorite Clojure IDE. We provide run configurations for Cursive, making it easiest to start with that.
This part has to be done only once.
- Clone this repo.
- Copy
provision/private_vars/env.yml.sample
toprovision/private_vars/env.yml
and fill out the placeholders:JIRA_TEMPO
,JIRA_BASE_URL
andJIRA_CONSUMER_PRIVATE_KEY
can be provided by your colleaguesDATOMIC_USER
andDATOMIC_PASSWORD
: Create an account at Datomic and copyusername
andpassword
from Datomic account pageDATOMIC_POSTGRES_PASSWORD
,APP_HOSTNAME
,JWS_TOKEN_SECRET
: you can leave them as they are.DATOMIC_LICENSE_KEY
: the license key received after Datomic registrationCCARTUSER
: Artifactory UsernameCCARTPASS
: Encrypted Artifactory Password, you can get it under your Artifactory SettingsJIRA_ACCESS_TOKEN
: See next section.
To access Jira data, the dashboard-server uses OAuth. Jira access tokens are bound to a specific user and cannot be shared across multiple installations. On the plus side you need to get a token only once as it is valid for a long time, however, to get a token you need to perform these steps:
Requirement: your user needs to be in the jira-developers
group to be able to perform all required queries. Check with your Jira admin.
- Start the VM:
vagrant up
, start the server:docker-compose up
oru
, connect your IDE to the server: for Cursive use thevagrant REPL
run-configuration. - In the REPL switch to the
ccdashboard.oauth.core
namespace:(ns ccdashboard.oauth.core)
. - Invoke the
request-token
function and store the result:(def rt (request-token))
- The function returns a map containing an
:authorize-url
key. Copy that URL and open it in the browser. You will be prompted to log-in. After logging-in the browser displays a verifier string. Copy that string. - Invoke the
access-token
function using the request-token and verifier string:(access-token rt <paste copied verifier string here>)
. - The function returns the Jira access token which you should paste into
provision/private_vars/env.yml
. - Important: run
vagrant provision
afterwards to make sure the VM picks up the access token.
Note: Make sure that you completed the env.yml
setup before. If you missed something and noticed it after running vagrant up
, run vagrant provision
so that the environment variables inside the Vagrant VM are updated.
- Run
vagrant up
inside the top-level folder. - Run
vagrant ssh
to connect to the VM. - Run
docker-compose up
(aliased tou
). This builds all the docker images for postgres, datomic, the datomic console and the app itself, and then starts the entire stack. For development, it starts a REPL. - When adding dependencies to
project.clj
, stop docker-compose and rundocker-compose build
(aliased tob
) to rebuild the repl image. - Connect to the vagrant REPL by using the IntelliJ run configuration or connect yourself on port 35001
- Inside the connected REPL you start in workspace
user
. Run(go)
to start the server. - The ClojureScript-client is compiled incrementally by Figwheel and instantly reloaded on code changes. To start it use the
figwheel
run-configuration which uses the approach described here. - The app is hosted at https://localhost:9090. (https only)