add lb option

This commit is contained in:
Josh
2018-05-11 15:57:31 -04:00
parent b452932767
commit 0f8a4734b2
13 changed files with 183 additions and 41 deletions

View File

@ -12,12 +12,25 @@ module Greenlight20
# Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded.
# Default credentials (test-install.blindsidenetworks.com/bigbluebutton).
config.bigbluebutton_endpoint_default = 'http://test-install.blindsidenetworks.com/bigbluebutton/'
config.bigbluebutton_secret_default = '8cd8ef52e8e101574e400365b55e11a6'
config.loadbalanced_configuration = (ENV["USE_LOADBALANCED_CONFIGURATION"] == "true")
# BigBlueButton configuration.
config.bigbluebutton_endpoint = ENV['BIGBLUEBUTTON_ENDPOINT'] || config.bigbluebutton_endpoint_default
config.bigbluebutton_secret = ENV['BIGBLUEBUTTON_SECRET'] || config.bigbluebutton_secret_default
# Setup BigBlueButton configuration.
unless config.loadbalanced_configuration
# Default credentials (test-install.blindsidenetworks.com/bigbluebutton).
config.bigbluebutton_endpoint_default = "http://test-install.blindsidenetworks.com/bigbluebutton/"
config.bigbluebutton_secret_default = "8cd8ef52e8e101574e400365b55e11a6"
# Use standalone BigBlueButton server.
config.bigbluebutton_endpoint = ENV["BIGBLUEBUTTON_ENDPOINT"] || config.bigbluebutton_endpoint_default
config.bigbluebutton_endpoint += "api/" unless config.bigbluebutton_endpoint.ends_with?('api/')
config.bigbluebutton_secret = ENV["BIGBLUEBUTTON_SECRET"] || config.bigbluebutton_secret_default
else
# Fetch credentials from a loadbalancer based on provider.
config.loadbalancer_endpoint = ENV["LOADBALANCER_ENDPOINT"]
config.loadbalancer_secret = ENV["LOADBALANCER_SECRET"]
end
# Determine if GreenLight should allow non-omniauth signup/login.
config.greenlight_accounts = (ENV['ALLOW_GREENLIGHT_ACCOUNTS'] == "true")
end
end
end

View File

@ -1,4 +1,4 @@
# List of supported providers.
# List of supported Omniauth providers.
Rails.application.config.providers = [:google, :twitter]
# Set which providers are configured.

View File

@ -1,5 +1,6 @@
Rails.application.routes.draw do
# Room and Meeting routes.
scope '/rooms' do
scope '/:room_uid' do
get '/', to: 'rooms#index', as: :room
@ -9,18 +10,22 @@ Rails.application.routes.draw do
end
end
# Signup routes.
get '/signup', to: 'users#new'
post '/signup', to: 'users#create'
# Login to Greenlight.
get '/login', to: 'sessions#new'
# Handles login of :greenlight provider account.
post '/login', to: 'sessions#create', as: :create_session
# Login to Greenlight.
get '/login', to: 'sessions#new'
# Log the user out of the session.
get '/logout', to: 'sessions#destroy'
# Handles launches from a trusted launcher.
post '/launch', to: 'sessions#launch'
# Handles Omniauth authentication.
match '/auth/:provider/callback', to: 'sessions#omniauth', via: [:get, :post], as: :omniauth_session
get '/auth/failure', to: 'sessions#fail'