Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Big Visible Chart CI aggregator

Remove outdated VCR config to prepare for VCR 2.0

There were lots of (duplicate) deprecation warnings.

https://gist.github.com/kincorvia/4540489 for more.
latest commit 609a9cfe63
Mike Kenyon and Yuki Nishijima authored April 17, 2014
Octocat-spinner-32 app Upgrade capybara-webkit to 1.1.1 and Capybara to 2.1.0 April 17, 2014
Octocat-spinner-32 autotest upgrading to rails 3, rspec 2.2, jasmine 1.0.1.1 November 30, 2010
Octocat-spinner-32 bin Springify the project April 09, 2014
Octocat-spinner-32 chef Add vagrant destroy to readme and rename chef step February 22, 2013
Octocat-spinner-32 config Add support for Travis Pro April 16, 2014
Octocat-spinner-32 db Add seed for initial user April 16, 2014
Octocat-spinner-32 docs Add Travis Pro to the documentation April 16, 2014
Octocat-spinner-32 lib Convert al the Ruby 1.8 hashrockets to 1.9 syntax April 11, 2014
Octocat-spinner-32 log Removing some Pivotal-specific stuff December 05, 2009
Octocat-spinner-32 public Update favicon to new logo January 17, 2014
Octocat-spinner-32 script remove crontab example and use whenever November 05, 2012
Octocat-spinner-32 spec Remove outdated VCR config to prepare for VCR 2.0 April 17, 2014
Octocat-spinner-32 tmp Added tmp dir which is required July 27, 2012
Octocat-spinner-32 vendor Build time doesn't need to update via jquery.timeago September 25, 2013
Octocat-spinner-32 .cfignore Prepare repo for deployment on Cloud Foundry. Adds clockwork gem to s… April 02, 2014
Octocat-spinner-32 .gitignore Remove manifest file from git April 02, 2014
Octocat-spinner-32 .gitmodules Add TeamCity recipe to chef for vagrant February 22, 2013
Octocat-spinner-32 .pairs Add Mike to .pairs April 14, 2014
Octocat-spinner-32 .rspec Turn off debug in rspec config, it breaks travis January 21, 2013
Octocat-spinner-32 .ruby-gemset Bump ruby to 2.0, move to .ruby-version and remove fastthread gem June 21, 2013
Octocat-spinner-32 .ruby-version :arrow_down::gem::two: . :zero::sob: April 01, 2014
Octocat-spinner-32 .slugignore Ignore chef, spec and Vagrant on heroku slug compliation July 09, 2013
Octocat-spinner-32 .travis.yml Test against Ruby 2.0.0 April 04, 2014
Octocat-spinner-32 CONTRIBUTING.md Extract Upgrading and 'Adding a project' April 14, 2014
Octocat-spinner-32 Gemfile Upgrade capybara-webkit to 1.1.1 and Capybara to 2.1.0 April 17, 2014
Octocat-spinner-32 Gemfile.lock Upgrade capybara-webkit to 1.1.1 and Capybara to 2.1.0 April 17, 2014
Octocat-spinner-32 Guardfile Updates jasmine gems July 08, 2013
Octocat-spinner-32 MIT.LICENSE Update MIT License and add to README. July 28, 2010
Octocat-spinner-32 Procfile Switches web server to a blessing of 6 unicorns April 16, 2013
Octocat-spinner-32 Procfile.development Replaces thin with unicorn in Procfile.development April 16, 2013
Octocat-spinner-32 README.md Add Travis Pro to the documentation April 16, 2014
Octocat-spinner-32 Rakefile Convert al the Ruby 1.8 hashrockets to 1.9 syntax April 11, 2014
Octocat-spinner-32 VERSION Bump version March 01, 2013
Octocat-spinner-32 Vagrantfile Convert al the Ruby 1.8 hashrockets to 1.9 syntax April 11, 2014
Octocat-spinner-32 clockwork.rb New app for 'projectmonitor:poller' April 07, 2014
Octocat-spinner-32 config.ru Fix rename of CiMonitor to ProjectMonitor December 23, 2012
README.md

Description Build Status Code Climate

ProjectMonitor is a CI display aggregator. It displays the status of multiple Continuous Integration builds on a single web page. The intent is that you display the page on a big screen monitor or TV so that the status of all your projects' builds are highly visible/glanceable (a "Big Visible Chart"). ProjectMonitor currently supports:

We use ProjectMonitor internally at Pivotal Labs to display the status of the builds for all our client projects. We also have an instance of ProjectMonitor running at ci.pivotallabs.com that we use for displaying the status of the builds of various open source projects - both of projects Pivotal Labs maintains (such as Jasmine) and of non-Pivotal projects (such as Rails).

Table of Contents

  1. Installation
  2. Configuration
  3. Deployment
  4. Ideas and Improvements

Linked Documents

  1. Upgrading to Devise
  2. Adding a Project
  3. Displaying Your Project's Status

Installation

Get the code

ProjectMonitor is a Rails application. To get the code, execute the following:

git clone git://github.com/pivotal/projectmonitor.git
cd projectmonitor
bundle install

Initial Setup

We have provided an example file for database.yml. Run the following to automatically generate these files for you:

rake setup

You likely need to edit the generated files. See below.

Set up the database

You'll need a database. Create it with whatever name you want. If you have not run rake setup, copy database.yml.example to database.yml. Edit the production environment configuration so it's right for your database:

cp config/database.yml.example config/database.yml
<edit database.yml>
RAILS_ENV=production rake db:create
RAILS_ENV=production rake db:migrate

Set up memcached for performant/distributed caching

Statuses are cached via an in-memory store by default. If you want to use memcache, you'll need to ensure it's installed. It should be very easy to install if you have homebrew or another package manager:

brew install memcached

After you have successfully installed memcached follow the instructions to run it.

Authentication support

IP Whitelist

If you want to use Webhooks, your ProjectMonitor instance will need to be located on a publically accessible server. If you don't want your ProjectMonitor dashboard to also be publically accessible, you can whitelist access by IP address.

The whitelist is disabled by default, but can be enabled by uncommenting the "ip_whitelist" property in settings.yml and adding a list of IP addresses to whitelist. If you're running ProjectMonitor behind a load balancer (e.g. on a hosted provider such as Heroku), you'll probably want to set "ip_whitelist_request_proxied" to true. See settings.yml for more documentation.

Password authentication

Project monitor uses Devise to provide both database backed authentication and Google OAuth2 logins.

Regular password authentication for managing project settings is enabled by default and can be switched off by setting the password_auth_enabled setting to false. To ensure strong password encryption you should adjust the value for password_auth_pepper and password_auth_stretches appropriately.

Google OAuth2 setup

To use Google OAuth2 authentication you need Google apps set up for your domain and the following configuration options specified:

oauth2_enabled: true
oauth2_apphost: 'MY_APP_ID'
oauth2_secret: 'MY_SECRET'

Setup Cron with Whenever

We have included a sample whenever gem config in config/schedule.rb. Refer to the whenever documentation for instructions on how to integrate it with your deployment. Refer to Heroku scheduler documentation for instructions on how to integrate the rake task with your Heroku deployment.

The default schedule clears log entries and cleans up unused tags daily, and fetches project statuses every 3 minutes.

The fetch project task is what goes out and hits the individual builds. We find that if you do this too frequently it can swamp the builds. On the other hand, you don't want ProjectMonitor displaying stale information. At Pivotal we set it up to run every 3 minutes.

Start workers

The cron job above will add jobs to the queue, which workers will execute. To start running the workers, use the following command:

rake start_workers

The default number of workers is 2, but if you wanted 3 you would call it like this:

rake start_workers[3]

These workers need only be started once per system reboot, and must be running for your project statuses to update. To stop the workers, run this command:

rake stop_workers

The workers are implemented using the delayed_job gem. The workers are configured to have a maximum timeout of 1 minute when polling project status. If you want to change this setting, you can edit config/initializers/delayed_job_config.rb

Start the application

Execute:

nohup rails server -e production &> projectmonitor.log

Next Steps

Now you need to add a project or two! Keep reading the Configuration section for instructions.

Configuration

Each build that you want ProjectMonitor to display is called a "project" in ProjectMonitor. You can log in to set up projects by clicking the "Manage Projects" link in the bottom-right corner of the main ProjectMonitor screen. You can either create a user using the console as follows:

rails c production
User.create!(login: 'john', name: 'John Doe', email: 'jdoe@example.com', password: 'password', password_confirmation: 'password')

Or, if you have set up Google OAuth2 as per above, you can simply log in with Google to create a new user account.

Admin Interface

Click 'manage projects' at the lower right to edit project details.

Add Projects

We have instructions detailing how to add a project.

Importing and Exporting Configurations

You can export your configuration for posterity or to be transferred to another host:

rake projectmonitor:export > ${your_configuration.yml}

Or using heroku:

heroku run rake projectmonitor:export --app projectmonitor-staging > ${your_configuration.yml}

Or you can download it using the configuration endpoint, using curl (or your web browser):

curl --user ${username}:${password} ${your_project_monitor_host}/configuration > ${your_configuration.yml}

NOTE: That heroku doesn't treat STDERR and STDOUT differently so you may get some warnings at the beginning of the generated file that you'll have to remove manually.

It can be imported in a similar way:

rake projectmonitor:import < ${your_configuration.yml}

On heroku or another host which doesn't allow you to directly load files or read from stdin, you'll need to post the file to the configuration endpoint like so:

curl --user ${username}:${password} -F "content=@-" ${your_project_monitor_host}/configuration < ${your_configuration.yml}

Deployment

Heroku

To get running on Heroku, after you have cloned and bundled, run the following commands:

NB: These instructions are for the basic authentication strategy.

heroku create
git push heroku master
heroku run rake db:migrate
heroku config:add REST_AUTH_SITE_KEY=<unique, private and long alphanumeric key, e.g. abcd1234edfg78910>
heroku config:add REST_AUTH_DIGEST_STRETCHES=<count of number of times to apply the digest, 10 recommended>
heroku labs:enable user-env-compile
heroku run console 

When inside the console, run the creating a new user step above. You should then be able to access your server and start using it.

Ideas and Improvements

Got a burning idea that just needs to be implemented? Check the CONTRIBUTE.md file for help getting started. Join the google group and share your ideas with the team.

The google group for Project Monitor is projectmonitor_pivotallabs

Copyright (c) 2013 Pivotal Labs. This software is licensed under the MIT License.

Bitdeli Badge

Something went wrong with that request. Please try again.