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.
Please checkout our wiki for configuration details
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.
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:
docker-compose.yml
db: image: postgres api: image: pivotalsingapore/spotlight-rails command: bin/rails server env_file: docker_env links: - db web: image: pivotalsingapore/spotlight-dashboard env_file: docker_env ports: - "3030:80" links: - api
-
Rename
docker_env.sample
todocker_env
and edit your configuration as necessary:SECRET_KEY_BASE=<change_me!> WEB_HOST=/ GOOGLE_API_CLIENT_ID=<change_me!> GOOGLE_API_CLIENT_SECRET=<change_me!>
Remember to add your own SECRET_KEY_BASE
.
-
Run this command to prepare the db:
docker-compose run --rm api rake db:create db:migrate
-
Run the following command:
docker-compose up -d
-
You can now access the dashboard via the container IP address (e.g.
http://192.168.99.100:3030
).
You can find out the IP address of the docker machine by running docker-machine ls
.
To stop the Spotlight dashboard:
docker-compose stop
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.
To contribute code to this project, you will need to setup your local development environment to run Ruby and Rails. Here are the steps:
-
Install Homebrew.
-
Install rbenv:
brew update brew install rbenv ruby-build
-
Add
rbenv
support to your local profile:echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
If you are using
zsh
: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
-
You will need PostgreSQL installed and started.
If you are unfamiliar with PostgreSQL, we suggest that you download and install Postgres Mac App. You may need to edit
config/database.yml
to connect via TCP socket.
-
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):
bundle install
-
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
-
Prepare the environment file (one time exercise):
cp env.sample .env
-
You can start the local development web server with the following command:
foreman start
-
You can now visit the local development site at http://localhost:3000.
-
To stop the dev server, just press
ctrl
+c
on your keyboard to stop the foreman process.
We use the RSpec testing framework for this app.
To run the tests locally, use this command:
bundle exec rspec spec
To run the Javascript tests, use this command:
bundle exec rake spec:javascript
or open your browser to http://localhost:3000/specs.
-
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
docker login
:β spotlight git:(docker) β docker login Username (miccheng): WARNING: login credentials saved in /Users/miccheng/.docker/config.json Login Succeeded
-
Tag the image (assuming
ba3dcc9b42b1
is the latest image ID)docker tag ba3dcc9b42b1 pivotalsingapore/spotlight-rails:latest
-
Push to Docker Hub
docker push pivotalsingapore/spotlight-rails
fly -t aws login -c http://ci
fly -t aws set-pipeline -p spotlight-tests -c spotlight.yml -l credentials.yml
- Carlos Gavino
- Divya Bhargov
- Erika Buenaventura
- Gabe Hollombe
- Liza Ng
- Michael Cheng
- Rahul Rajeev
- Swayam Narain
- Yifeng Hou
The MIT License (MIT) Copyright (c) 2016 Pivotal Labs Singapore
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.