Vision was made with contributions from everyone found in git commit history.
Vision is a tool that will help you to manage change request, incident report, and access/resource request in your organization.
make your system running under that version.
ruby --version #=> ruby 2.7.4
bundle exec rails version # => Rails 5.2.6
Install bundler
bundle install
Install bower through NPM. Our assets are managed by bower.
npm install
bower install
cp .env.example .env # for development environment
cp .env.example .env.test # for test environment
cp config/database.example.yml config/database.yml
Follow prerequisites step here for fill .env
bundle exec rake db:setup
gem install mailcatcher
mailcatcher
Follow set Approver here
bundle exec rails s
Visit vision in http://localhost:3000
You can run Vision under docker, if you have problem with version compability
docker-compose build
docker-compose up -d
docker exec -ti vision_web_1 bash
$ bundle exec rails db:setup
Follow set Approver (here)[#5-approvers]
Visit http://localhost:3000
Vision application require some tools to run:
- Visit
https://console.cloud.google.com/apis/credentials
- Create Credentials -> OAuth client ID
- Choose Web Application as Application Type
- Fill
Authorized JavaScript origins
with your host url (e.g example.com) - Fill
Authorized redirect URIs
with your host and appendusers/auth/google_oauth2/callback
(e.g example.com/users/auth/google_oauth2/callback) - Store your Client ID and Client Secret for next Vision setup in Environment Variable
- Visit
https://api.slack.com/apps
- Create New App if you don't have app
- Go to menu
OAuth & Permissions
- Go to section
Scopes
and Add an OAuth Scope - Add
channels:history
scope forUser Token Scopes
- Add
channels:read
scope forUser Token Scopes
- Add
channels:write
scope forUser Token Scopes
- Add
chat:write
scope forUser Token Scopes
- Add
users:read
scope forUser Token Scopes
- Add
users:read.email
scope forUser Token Scopes
- Copy
User OAuth Token
value forSLACK_API_TOKEN
environment variable - Go to menu
Basic Information
- Go to
App Credentials
- Copy
Verification Token
value forSLACK_VERIFICATION_TOKEN
environment variable - Create channel for change request for
SLACK_CR_CHANNEL
environment variable - Create channel for incident report
SLACK_IR_CHANNEL
environment variable - Go to menu
Interactivity & Shortcuts
- Fill Request URL with format
{APP_HOST}/api/change_requests/action
- Create your JIRA account if you don't have here
- Put your Jira site url as value of
JIRA_URL
for environment variable - Put your email as value of
JIRA_USERNAME
for environment variable - Create API Token on Security Atlassian (
https://id.atlassian.com/manage-profile/security/api-tokens
) - Put API Token as
JIRA_PASSWORD
for environment variable
- Enable Google Calendar API
- Visit (https://calendar.google.com/calendar/u/0/r/settings)(https://calendar.google.com/calendar/u/0/r/settings)
- Go to section
Settings for my calendars
- Go to menu
Share with specific people
and invite the users with permissionMake changes to events
- Go to menu
Integrate calendar
- Copy
Calendar ID
value forDEPLOY_CALENDAR_ID
environment variable
for more info follow here
Vision required 2 Approvers, you can create with the seed:
rails vision:approver:seed name="Approver" email="approver@gmail.com"
In this example we use will Heroku to deploy vision.
- Prepare prerequisites (Google API, Slack, and Jira)
- Create Heroku Application with stack
container
- Add adds-on
Heroku Postgres
inResources Menu
- Create
Config Vars
inSettings
menu
Key | Value | Description |
---|---|---|
APP_HOST |
http://heroku-app.herokuapp.com | Required, You can fill with heroku app url |
APPROVER_EMAIL |
Required, Approver email, you can get from prerequisites | |
DB_HOST |
localhost | Required, you can get from Heroku Postgres adds-on |
DB_NAME |
vision | Required, you can get from Heroku Postgres adds-on |
DB_USERNAME |
postgres | Required, you can get from Heroku Postgres adds-on |
DB_PASSWORD |
Required, you can get from Heroku Postgres adds-on | |
DEPLOY_CALENDAR_ID |
visionopensource2021@gmail.com | Required, You can get Google Calender ID here |
ENTITY_SOURCES |
Required, you can have multiple source combine with comma. (e.g org1,org2) | |
GOOGLE_API_KEY |
Required, you can get from prerequisites step | |
GOOGLE_API_SECRET |
Required, you can get from prerequisites step | |
INCIDENT_LEVEL_GUIDELINE |
||
JIRA_USERNAME |
Required, you can get from prerequisites step | |
JIRA_PASSWORD |
Required, you can get from prerequisites step | |
JIRA_URL |
Required, you can get from prerequisites step | |
MAIL_ADDRESS |
Required | |
MAIL_AUTHENTICATION |
Required | |
MAIL_DOMAIN |
Required | |
MAIL_USERNAME |
Required | |
MAIL_PASSWORD |
Required | |
MAIL_PORT |
Required | |
RAILS_ENV |
staging | Required |
SECRET_KEY_BASE |
xx | Required, you can generate with rails secret |
SLACK_API_TOKEN |
Required, you can get from prerequisites step | |
SLACK_VERIFICATION_TOKEN |
Required, you can get from prerequisites step | |
SLACK_CR_CHANNEL |
Slack channel Change Request | |
SLACK_IR_CHANNEL |
Slack channel Incident Report | |
VALID_EMAIL |
gmail.com | you can fill with your domain google business suite |
- Push docker image to Heroku container registry
heroku container:login
heroku container:push web -a {heroku-app}
- Deploy
heroku container:release web -a {heroku-app}
Released under the Apache 2.0 License. Copyright (c) 2021 Vision.
Please make sure to read the Contributing Guide before making a pull request. Many improvements and bugfixes were contributed by the open source community.