Coder Social home page Coder Social logo

migu / ccpeople2 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gerrit-hntschl/ccpeople2

0.0 0.0 0.0 750 KB

ccdashboard - Clojure(Script) stack including server and frontend

Clojure 12.65% Shell 0.06% CSS 0.34% HTML 0.20% JavaScript 86.67% Nginx 0.08%

ccpeople2's Introduction

ccDashboard

Development

Prerequisites

  • Virtualbox & Vagrant
  • Ansible
  • Leiningen

Choose your favorite Clojure IDE. We provide run configurations for Cursive, making it easiest to start with that.

Getting started

This part has to be done only once.

  • Clone this repo.
  • Copy provision/private_vars/env.yml.sample to provision/private_vars/env.yml and fill out the placeholders:
    • JIRA_TEMPO, JIRA_BASE_URL and JIRA_CONSUMER_PRIVATE_KEY can be provided by your colleagues
    • DATOMIC_USER and DATOMIC_PASSWORD: Create an account at Datomic and copy username and password from Datomic account page
    • DATOMIC_POSTGRES_PASSWORD, APP_HOSTNAME, JWS_TOKEN_SECRET: you can leave them as they are.
    • DATOMIC_LICENSE_KEY: the license key received after Datomic registration
    • CCARTUSER: Artifactory Username
    • CCARTPASS: Encrypted Artifactory Password, you can get it under your Artifactory Settings
    • JIRA_ACCESS_TOKEN: See next section.

Getting a Jira Access Token

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 or u, connect your IDE to the server: for Cursive use the vagrant 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.

Working on the project

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 to u). 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 run docker-compose build (aliased to b) 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)

ccpeople2's People

Contributors

gerrit-hntschl avatar mahartma avatar rueckemann avatar marcopaga avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.