[ARVADOS] updated: 19c292c1757bf98ecb3f1979c0b759f54c0aad7a

git at public.curoverse.com git at public.curoverse.com
Thu Apr 24 10:41:05 EDT 2014


Summary of changes:
 doc/install/install-api-server.html.textile.liquid |   32 ++++++++------------
 1 files changed, 13 insertions(+), 19 deletions(-)

       via  19c292c1757bf98ecb3f1979c0b759f54c0aad7a (commit)
      from  475c550e2ee1377b2f7b2ad9fcfdf392ecbd983b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 19c292c1757bf98ecb3f1979c0b759f54c0aad7a
Author: Tom Clegg <tom at curoverse.com>
Date:   Thu Apr 24 10:40:59 2014 -0400

    Fix admin user setup instructions, add some missing "bundle exec",
    remove unnecessary "Create an API token" section.

diff --git a/doc/install/install-api-server.html.textile.liquid b/doc/install/install-api-server.html.textile.liquid
index 14719e9..a1cca3d 100644
--- a/doc/install/install-api-server.html.textile.liquid
+++ b/doc/install/install-api-server.html.textile.liquid
@@ -126,7 +126,7 @@ Edit @config/initializers/omniauth.rb at . Set @APP_SECRET@ to the value of @app_se
 You can now run the development server:
 
 <notextile>
-<pre><code>~/arvados/services/api$ <span class="userinput">bundle exec rails server
+<pre><code>~/arvados/services/api$ <span class="userinput">bundle exec rails server --port=3030
 </code></pre></notextile>
 
 h3. Apache/Passenger (optional)
@@ -142,28 +142,22 @@ To enable streaming so users can monitor crunch jobs in real time, add to your P
 
 h2. Add an admin user
 
-Point browser to the API endpoint. Log in with a google account.
-
-In the rails console:
+Point your browser to the API server's login endpoint:
 
 <notextile>
-<pre><code>~/arvados/services/api$ <span class="userinput">rails console</span>
-irb(main):001:0> <span class="userinput">Thread.current[:user] = User.find(1)</span>
-irb(main):002:0> <span class="userinput">Thread.current[:user].is_admin = true</span>
-irb(main):003:0> <span class="userinput">User.find(1).update_attributes is_admin: true, is_active: true</span>
-irb(main):004:0> <span class="userinput">User.find(1).is_admin</span>
-=> true
-</code></pre></notextile>
+<pre><code><span class="userinput">https://localhost:3030/login</span>
+</code></pre>
+</notextile>
 
-h2. Create an API token
+Log in with your google account.
 
-In rails console:
+Use the rails console to give yourself admin privileges:
 
 <notextile>
-<pre><code>~/arvados/services/api$ <span class="userinput">rails console</span>
-irb(main):001:0> <span class="userinput">a = ApiClient.new(owner_uuid:'0')</span>
-irb(main):002:0> <span class="userinput">a.save!</span>
-irb(main):003:0> <span class="userinput">x = ApiClientAuthorization.new(api_client_id:a.id, user_id:1)</span>
-irb(main):004:0> <span class="userinput">x.save</span>
-irb(main):005:0> <span class="userinput">x.api_token</span>
+<pre><code>~/arvados/services/api$ <span class="userinput">bundle exec rails console</span>
+irb(main):001:0> <span class="userinput">Thread.current[:user] = User.all.select(&:identity_url).last</span>
+irb(main):002:0> <span class="userinput">Thread.current[:user].is_admin = true</span>
+irb(main):003:0> <span class="userinput">Thread.current[:user].update_attributes is_admin: true, is_active: true</span>
+irb(main):004:0> <span class="userinput">User.where(is_admin: true).collect &:email</span>
+=> ["root", "<b>your_address at example.com</b>"]
 </code></pre></notextile>

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list