GithubHelp home page GithubHelp logo

isabella232 / vision-3 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gojek/vision

0.0 0.0 0.0 24.67 MB

License: Apache License 2.0

Shell 0.08% JavaScript 8.25% Ruby 49.80% CSS 5.84% HTML 33.91% Dockerfile 0.12% SCSS 0.04% Gherkin 1.97% Procfile 0.01%

vision-3's Introduction

Vision

Vision was made with contributions from everyone found in git commit history.

Getting Started

Vision is a tool that will help you to manage change request, incident report, and access/resource request in your organization.

Installation

Install ruby 2.7.4 and Rails 5.2.6

make your system running under that version.

ruby --version #=> ruby 2.7.4
bundle exec rails version # => Rails 5.2.6

Install project dependencies

Install bundler

bundle install

Install bower through NPM. Our assets are managed by bower.

npm install
bower install

Configuration

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

DB Migration and Seed

bundle exec rake db:setup

For mail interaction in Development environment, install and run Mailcatcher by running

gem install mailcatcher

mailcatcher

Approvers

Follow set Approver here

Run Application

bundle exec rails s

Visit vision in http://localhost:3000

Run with Docker

You can run Vision under docker, if you have problem with version compability

docker-compose build
docker-compose up -d

DB Migration and Seed

docker exec -ti vision_web_1 bash

$ bundle exec rails db:setup

Approvers

Follow set Approver (here)[#5-approvers]

Run Application

Visit http://localhost:3000

Prerequisites

Vision application require some tools to run:

1. Google Oauth 2.0

  • 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 append users/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

2. Slack

  • 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 for User Token Scopes
  • Add channels:read scope for User Token Scopes
  • Add channels:write scope for User Token Scopes
  • Add chat:write scope for User Token Scopes
  • Add users:read scope for User Token Scopes
  • Add users:read.email scope for User Token Scopes
  • Copy User OAuth Token value for SLACK_API_TOKEN environment variable
  • Go to menu Basic Information
  • Go to App Credentials
  • Copy Verification Token value for SLACK_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

3. JIRA

  • 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

4. Google Calendar

for more info follow here

5. Approvers

Vision required 2 Approvers, you can create with the seed:

rails vision:approver:seed name="Approver" email="[email protected]"

Deploy

In this example we use will Heroku to deploy vision.

  1. Prepare prerequisites (Google API, Slack, and Jira)
  2. Create Heroku Application with stack container
  3. Add adds-on Heroku Postgres in Resources Menu
  4. Create Config Vars in Settings 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 [email protected] 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
  1. Push docker image to Heroku container registry
heroku container:login
heroku container:push web -a {heroku-app}
  1. Deploy
heroku container:release web -a {heroku-app}

LICENSE

Released under the Apache 2.0 License. Copyright (c) 2021 Vision.

Contributing

Please make sure to read the Contributing Guide before making a pull request. Many improvements and bugfixes were contributed by the open source community.

vision-3's People

Contributors

kevinster73 avatar r0r1 avatar adirizka7 avatar adamnoto avatar dwiyanrr avatar paxa avatar dwiyanr avatar idhame avatar rafeequl avatar sreeix avatar barockok avatar robeth avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.