A proof-of-concept Identity Management System.
Notice: This project is still in alpha.
- Ruby 2.3.1
- Postgresql
- Redis 2.8+
- Node.js v4.4.x
Testing dependencies:
-
Make sure you have a working development environment with all the dependencies installed. On a Mac, the easiest way to set up a development environment is by running our Laptop script. The script will install all of this project's dependencies.
-
Make sure Postgres and Redis are running. For example, on OS X:
$ brew services start redis postgres
- Run the following command to set up the environment:
$ make setup
This command copies sample configuration files, installs required gems and sets up the database.
- Run the app server with:
$ make run
If you want to develop without and internet connection, you can set
RAILS_OFFLINE=1 in your environment. This disables the mx record
check on email addresses.
If you want to measure the app's performance in development, set the
rack_mini_profiler option to 'on' in config/application.yml and
restart the server. See the rack_mini_profiler gem for more details.
-
Download, install, and launch Docker
-
Set up the Docker image
$ bin/setup --docker
More useful Docker commands:
- Start the container:
docker-compose up - Stop this running container:
docker-compose stop - Stop and delete the containers:
docker-compose down - Open a shell in the web container:
docker-compose run --rm web bash
See the Docker Compose docs for more information.
Once it is up and running, the app will be accessible
at http://localhost:3000/. Email messages will be visible in MailCatcher
at http://localhost:1080/.
Make sure you have PhantomJS installed prior to running
tests. On OS X, PhantomJS can be installed with Homebrew via: brew install phantomjs. For other platforms, refer to the PhantomJS download
page.
To run all the tests:
$ make test
See RSpec docs for more information.
Run security scanner
$ make brakeman
We currently run a demo environment at https://idp.demo.login.gov. Core developers can deploy to those hosts with Capistrano using the following command:
$ cap <env/stage> deploy
You will need to provide a copy of your SSH public key and you may need to provide your IP address if you are not in a GSA building or on the GSA VPN. Post a message in the Slack channel if you need help.
Note: server secrets are currently manually configured. If you deploy to an environment, make sure to update any required configuration in application.yml and be sure any worker hosts are also updated.
To restart the web server (on a web host, from /srv/idp/current)
$ touch tmp/restart.txt
To get status of the background workers (on a worker host):
$ sudo monit status
To restart the background workers:
$ sudo monit restart sidekiq_idp_production0
"skill in means" https://en.wikipedia.org/wiki/Upaya