A kickass dashboard for devshops
Spotlight is a simple dashboard for your devshop that:
- Allows people to easily create a dashboard and manage widgets from a predefined set of widgets.
- Is wrapped in a container that can easily be downloaded and installed on any environment.
- Lets you view Continuous Integration build status for the various projects is the primary goal.
- Lets you add new widgets from a list of predefined ones, or create your own.
Software developers are increasingly adopting agile and lean approaches to the software development lifecycle. One key component for agile software processes is that of Continuous Integration (CI). With the ubiquity of inexpensive hardware like flat panel displays and Raspberry Pis (single board computer), the DIY approach to building custom information displays is gaining increasing appeal.
We believe there is a need for a simple, hassle free approach to CI monitors.
Running the Spotlight Dashboard
We recommend installing the Spotlight dashboard as a Docker instance on the target machine.
Install the Docker Toolbox.
In your working folder, create a new file:
db: image: postgres api: image: neosgspotlight/spotlight-rails command: bundle exec foreman start environment: - SECRET_KEY_BASE=<change_me!> - WEB_HOST=/ - GOOGLE_API_CLIENT_ID=<change_me!> - GOOGLE_API_CLIENT_SECRET=<change_me!> links: - db web: image: neosgspotlight/spotlight-dashboard ports: - "3030:80" links: - api
Remember to add your own
Starting the Spotlight Docker instance
Run the following command:
docker-compose up -d docker-compose run --rm web rake db:create db:migrate
You can now access the dashboard via the container IP address (e.g.
You can find out the IP address of the docker machine by running
To stop the Spotlight dashboard:
Accessing Spotlight on your network
To make this dashboard available to your local area network (LAN), you should map one of your host OS's public ports to the Docker Machine's port 3030.
Here's a nice write up on how to do so.
Local Development Setup
To contribute code to this project, you will need to setup your local development environment to run Ruby and Rails. Here are the steps:
A. Install Ruby
brew update brew install rbenv ruby-build
rbenvsupport to your local profile:
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
If you are using
echo 'eval "$(rbenv init -)"' >> ~/.zshrc
Install the current Ruby version:
rbenv install -l rbenv install 2.3.0
Use it globally:
rbenv global 2.3.0
B. Install PostgreSQL database server
You will need PostgreSQL installed and started.
C. Install Rails & other Gems
Install Bundler, the Ruby dependency management software:
gem install bundler
Install the rest of the Ruby Gems needed for the app (including Ruby on Rails):
D. Prepare the Database
Create the database:
bundle exec rake db:create
Create the database tables:
bundle exec rake db:migrate
Prepare sample data:
bundle exec rake db:seed
E. Start the development web server
Prepare the environment file (one time exercise):
cp env.sample .env
You can start the local development web server with the following command:
You can now visit the local development site at http://localhost:3000.
To stop the dev server, just press
con your keyboard to stop the foreman process.
We use the RSpec testing framework for this app.
To run the test locally, use this command:
bundle exec rspec spec
To run feature tests, use this command
bundle exec rake spotlight:test_features
or open your browser to http://localhost:3000/specs.
Rebuilding the Docker container
Rebuild the local Docker image
docker build -t spotlight-rails .
Check for the image ID
➜ spotlight git:(docker) ✗ docker images REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE spotlight-rails latest ba3dcc9b42b1 16 seconds ago 954.3 MB
Login to your Docker account (one time exercise) with
➜ spotlight git:(docker) ✗ docker login Username (miccheng): WARNING: login credentials saved in /Users/miccheng/.docker/config.json Login Succeeded
Tag the image
docker tag ba3dcc9b42b1 neosgspotlight/spotlight-rails:latest
Push to Docker Hub
docker push neosgspotlight/spotlight-rails
The MIT License (MIT)
Copyright (c) 2015 Neo Innovation
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.