Write down some docs about how to deploy Atlasboard in Nodejitsu, EC2 or similar.

Issue #30 new
Iván Loire created an issue

No description provided.

Comments (5)

  1. JonathanL

    This is what I did (from memory):

    Prepare Atlasboard

    • install atlasboard on my laptop
    • create a new dashboard atlasboard create myheroku; cd myheroku
    • install any submodules git submodule add https://user@bitbucket.org/atlassian/atlasboard-social-package.git packages/social
    • add atlasboard to the dependencies in package.json
      "dependencies": {
        "atlasboard": "^1.1.3"
       }
    
    • create/change globalAuth.json to use environment variables for values, keeps secrets from being published to the git repo, e.g.
    {
      "twitter": {
        "consumer_key": "${TWITTER.CONSUMER_KEY}",
        "consumer_secret": "${TWITTER.CONSUMER_SECRET}",
        "access_token": "${TWITTER.ACCESS_TOKEN}",
        "access_token_secret": "${TWITTER.ACCESS_TOKEN_SECRET}"
      }
    }
    
    • copy any dependencies from the package.json files in the submodules into the top-level package.json (may be heroku specific?)
      "dependencies": {
        "atlasboard": "^1.1.3",
        "twit": "1.1.18"
       }
    
    • Note I removed the demo dashboard - it uses ical which must be moved to the top package.json if used.

    Heroku specific

    • Change start.js to use heroku's port:
    //atlasboard({port: process.env.ATLASBOARD_PORT || 3000, install: true}, function (err) {
    // should be:
    atlasboard({port: process.env.PORT || 3000, install: true}, function (err) {
    

    Then basically follow the node.js example for Heroku.

    • Login to heroku: heroku login
    • Create a heroku instance heroku create
    • Add the current state of the code to git: git add .
    • Create the variables in the globalAuth.json file, e.g.
    heroku config:set TWITTER.CONSUMER_KEY=YourConsumerKey
    heroku config:set TWITTER.CONSUMER_SECRET =YourConsumerSecret
    heroku config:set TWITTER.ACCESS_TOKEN =YourAccessToken
    heroku config:set TWITTER.ACCESS_TOKEN_SECRET =YourAccessTokenSecret
    
    • deploy the code git push heroku master
    • look at logs heroku logs --tail
    • open the app heroku open

    General

    I recommend putting dashboards in the non-submodule packages - otherwise you must commit and update the submodule repos, and then commit the submodule to the containing git instance. However placing dashboards in packages/default/dashboards places the code in the main heroku repo, making updates simpler. Note that you will be required to refer to jobs in their long form, social#twitter vs just twitter e.g.:

      {"row" : 1, "col" : 5, "width" : 2, "height" : 1, 
            "widget" : "social#twitter",   "job" : "social#twitter", "config": "twitter-moo"
      },
    
  2. Iván Loire reporter

    Thanks @jlongman !

    Would you like to create a PR so we can include it in the README or should just copy it over myself?

  3. JonathanL

    I think the best thing to do would be to have someone take my notes and walk through them and add any notes they feel necessary.

  4. Log in to comment