4570: Revert to links on log in page instead of form. Fixup documentation to
authorPeter Amstutz <peter.amstutz@curoverse.com>
Tue, 6 Jan 2015 13:44:49 +0000 (08:44 -0500)
committerPeter Amstutz <peter.amstutz@curoverse.com>
Tue, 6 Jan 2015 13:44:49 +0000 (08:44 -0500)
to describe a production setup.

apps/workbench/app/views/users/welcome.html.erb
doc/install/install-sso.html.textile.liquid

index 4541d5be29d939b736c3a7dfe313ac2317bab4cd..f4fb4d1eef5ee09400be3da9916c1d8b488f71f3 100644 (file)
 
       </p>
       <p>
-        <!-- <%= arvados_api_client.arvados_login_url %> -->
-        <%= form_tag(arvados_api_client.arvados_login_url(), :method => :get, :authenticity_token => false) do %>
-          <%= hidden_field_tag 'return_to', request.url %>
-          <div class="row pull-right">
-
-            <%# Todo: add list of external authentications providers to
-            discovery document, then generate the option list on the fly. Right
-            now, don't provide 'auth_provider' and hope that the default one is
-            the one we want. %>
-
-            <%#= select_tag "auth_provider", "<option value='google'>Google OpenID</option><option value='google_oauth2'>Google OAuth2</option>".html_safe, class: "form-control", style: "width: 15em; display: inline" %>
-           <%= button_tag type: 'submit', name: nil, class: "btn btn-primary" do %>
-            Log in to <%= Rails.configuration.site_name %> <i class="fa fa-fw fa-arrow-circle-right"></i>
+        <%# Todo: add list of external authentications providers to
+            discovery document, then generate the option list here. Right
+            now, don't provide 'auth_provider' to get the default one. %>
+        <div class="row pull-right">
+         <%= link_to arvados_api_client.arvados_login_url(return_to: request.url), class: "pull-right btn btn-primary" do %>
+          Log in to <%= Rails.configuration.site_name %>
+          <i class="fa fa-fw fa-arrow-circle-right"></i>
           <% end %>
         </div>
-        <% end %>
       </p>
     </div>
   </div>
index 646cb3bfe269ea2005b87bf213225613155d663a..f272d857a7ab552c672a83a576e1b5d66396985f 100644 (file)
@@ -6,7 +6,7 @@ title: Install Single Sign On (SSO) server
 
 h2(#dependencies). Install dependencies
 
-Make sure you have "Ruby and bundler":install-manual-prerequisites-ruby.html installed.
+Make sure you have "Ruby and Bundler":install-manual-prerequisites-ruby.html installed.
 
 h2(#install). Install SSO server
 
@@ -17,8 +17,8 @@ h3. Get SSO server code and create database
 ~$ <span class="userinput">git clone https://github.com/curoverse/sso-devise-omniauth-provider.git</span>
 ~$ <span class="userinput">cd sso-devise-omniauth-provider</span>
 ~/sso-devise-omniauth-provider$ <span class="userinput">bundle install</span>
-~/sso-devise-omniauth-provider$ <span class="userinput">rake db:create</span>
-~/sso-devise-omniauth-provider$ <span class="userinput">rake db:migrate</span>
+~/sso-devise-omniauth-provider$ <span class="userinput">RAILS_ENV=production bundle exec rake db:create</span>
+~/sso-devise-omniauth-provider$ <span class="userinput">RAILS_ENV=production bundle exec rake db:migrate</span>
 </code></pre>
 </notextile>
 
@@ -38,11 +38,11 @@ Edit @config/initializers/secret_token.rb@ to set @config.secret_token@ to the s
 h3. Configure upstream authentication provider
 
 <notextile>
-<pre><code>~/sso-devise-omniauth-provider$ <span class="userinput">cp -i config/environment.rb.example config/environment.rb</span>
+<pre><code>~/sso-devise-omniauth-provider$ <span class="userinput">cp -i config/environments/production.rb.example config/environments/production.rb</span>
 </code></pre>
 </notextile>
 
-Edit @config/environment.rb@ to set @config.google_client_id@ and @config.google_client_secret@.  See "Omniauth Google OAuth2 gem documentation":https://github.com/zquestz/omniauth-google-oauth2 and "Using OAuth 2.0 to Access Google APIs":https://developers.google.com/accounts/docs/OAuth2 for information about using the "Google Developers Console":https://console.developers.google.com to get a Google client id and client secret.
+Edit @config/environments/production.rb@ to set @config.google_oauth2_client_id@ and @config.google_oauth2_client_secret@.  See "Omniauth Google OAuth2 gem documentation":https://github.com/zquestz/omniauth-google-oauth2 and "Using OAuth 2.0 to Access Google APIs":https://developers.google.com/accounts/docs/OAuth2 for information about using the "Google Developers Console":https://console.developers.google.com to get a Google client id and client secret.
 
 h3(#client). Create arvados-server client
 
@@ -51,7 +51,7 @@ Use @rails console@ to create a @Client@ record that will be used by the Arvados
 <notextile>
 <pre><code>~/sso-devise-omniauth-provider$ <span class="userinput">rake secret</span>
 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-~/sso-devise-omniauth-provider$ <span class="userinput">rails console</span>
+~/sso-devise-omniauth-provider$ <span class="userinput">RAILS_ENV=production bundle exec rails console</span>
 irb(main):001:0&gt; <span class="userinput">c = Client.new</span>
 irb(main):002:0&gt; <span class="userinput">c.name = "joshid"</span>
 irb(main):003:0&gt; <span class="userinput">c.app_id = "arvados-server"</span>
@@ -63,15 +63,15 @@ irb(main):006:0&gt; <span class="userinput">quit</span>
 
 h2. Start the SSO server
 
-h3. Development environment
+h3. Run a simple standalone server
 
-To run in development mode, you can now run the development server this way:
+You can use the Webrick server that is bundled with Ruby to quickly verify that your installation is functioning:
 
 <notextile>
-<pre><code>~/arvados/services/api$ <span class="userinput">bundle exec rails server</span>
+<pre><code>~/arvados/services/api$ <span class="userinput">RAILS_ENV=production bundle exec rails server</span>
 </code></pre>
 </notextile>
 
 h3. Production environment
 
-As a Ruby on Rails application, the SSO server should be compatible with any Ruby application server that supports Rack applications.
+As a Ruby on Rails application, the SSO server should be compatible with any Ruby application server that supports Rack applications.  We recommend "Passenger":https://www.phusionpassenger.com/ to run the SSO server in production.