Feature #4383

[Docker] upload all docker containers to docker repository, and then add a script to download and run them in one go

Added by Ward Vandewege over 7 years ago. Updated over 7 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
-
Target version:
Start date:
11/03/2014
Due date:
% Done:

100%

Estimated time:
(Total: 1.00 h)
Story points:
0.5

Subtasks

Task #4405: add a feature to auto-admin the first user who signs in for a new installationResolvedWard Vandewege

Task #4430: review 4383-easy-installResolvedWard Vandewege

Associated revisions

Revision 7b3296a9 (diff)
Added by Ward Vandewege over 7 years ago

Upload our docker images to the docker.io registry.

refs #4383

Revision 7b3296a9 (diff)
Added by Ward Vandewege over 7 years ago

Upload our docker images to the docker.io registry.

refs #4383

Revision 7ae95cd8 (diff)
Added by Ward Vandewege over 7 years ago

Add first version of the easy-evaluation script.

refs #4383

Revision 7ae95cd8 (diff)
Added by Ward Vandewege over 7 years ago

Add first version of the easy-evaluation script.

refs #4383

Revision 076ba4ed (diff)
Added by Ward Vandewege over 7 years ago

Rename easy installation script. Update comments at the top of the script.

refs #4383

Revision 076ba4ed (diff)
Added by Ward Vandewege over 7 years ago

Rename easy installation script. Update comments at the top of the script.

refs #4383

Revision a383999f (diff)
Added by Ward Vandewege over 7 years ago

Add instructions for 'binary' docker installation.

refs #4383

Revision 234f7303 (diff)
Added by Ward Vandewege over 7 years ago

Enable auto_setup_new_users in the docker API server image.

refs #4383

Revision 28053f8a (diff)
Added by Ward Vandewege over 7 years ago

Enable auto_setup_new_users in the docker API server image.

refs #4383

Revision 4498d813 (diff)
Added by Ward Vandewege over 7 years ago

system_user and anonymous_user should be excluded from
auto_setup_new_user, always.

refs #4383

Revision 31407b1e (diff)
Added by Ward Vandewege over 7 years ago

system_user and anonymous_user should be excluded from
auto_setup_new_user, always.

refs #4383

Revision f8002c59 (diff)
Added by Ward Vandewege over 7 years ago

The sso server docker image is not used by default at the moment, so
arvdock shouldn't try to start it unless explicitly requested.

refs #4383

Revision a6606b79 (diff)
Added by Ward Vandewege over 7 years ago

The sso server docker image is not used by default at the moment, so
arvdock shouldn't try to start it unless explicitly requested.

refs #4383

Revision c5c8c883 (diff)
Added by Ward Vandewege over 7 years ago

The sso server docker image is not used by default at the moment, so
arvdock shouldn't try to start it unless explicitly requested (part 2).

refs #4383

Revision 3978e8ae (diff)
Added by Ward Vandewege over 7 years ago

The sso server docker image is not used by default at the moment, so
arvdock shouldn't try to start it unless explicitly requested (part 2).

refs #4383

Revision f05771f1 (diff)
Added by Ward Vandewege over 7 years ago

When auto_admin_first_user is set to true (default false), the first
user to sign in on a new installation will be an admin.

refs #4383

Revision 18e63e25 (diff)
Added by Ward Vandewege over 7 years ago

Add unit tests for new auto_admin_first_user configuration setting.

refs #4383

Revision 611a3323
Added by Ward Vandewege over 7 years ago

Merge branch 'master' into 4383-easy-install

Conflicts:
docker/api/application.yml.in

refs #4383

Revision d20968af (diff)
Added by Ward Vandewege over 7 years ago

Update the behavior of the auto_admin_user configuration field a bit to
make it more intuitive: the first user created with an e-mail address
that matches auto_admin_user will now become admin, regardless of the
presence of other admin users. Any subsequent accounts created with that
e-mail address will no longer become admin.

refs #4383

Revision abc28ee2 (diff)
Added by Ward Vandewege over 7 years ago

Add more tests so that we cover all possible combinations of the
auto_admin_first_user and auto_admin_user configuration settings.

refs #4383

Revision 2c2212b5 (diff)
Added by Ward Vandewege over 7 years ago

Only try to install .config/arvados/settings.conf if we have a token to
put in there.

refs #4383

Revision 3db43f17
Added by Ward Vandewege over 7 years ago

Merge branch 'master' into 4383-easy-install

refs #4383

Revision 7ff49661 (diff)
Added by Ward Vandewege over 7 years ago

Install instructions: be a bit more explicit that arvdock is downloaded
and saved in the current working directory.

refs #4383

Revision 5acdc268 (diff)
Added by Ward Vandewege over 7 years ago

Another documentation tweak based on review feedback.

closes #4383

Revision 0f3d2c5a
Added by Ward Vandewege over 7 years ago

Merge branch 'master' into 4383-easy-install

refs #4383

Revision 70f3e36e
Added by Ward Vandewege over 7 years ago

Merge branch '4383-easy-install'

refs #4383

History

#1 Updated by Ward Vandewege over 7 years ago

  • Subject changed from upload all docker containers to docker repository, and then add a script to download and run them in one go to [Docker] upload all docker containers to docker repository, and then add a script to download and run them in one go

#2 Updated by Ward Vandewege over 7 years ago

  • Target version set to 2014-11-19 sprint

#3 Updated by Ward Vandewege over 7 years ago

  • Status changed from New to In Progress

#4 Updated by Tom Clegg over 7 years ago

At 611a332...

A more complete set of tests could be worthwhile to verify the interaction between the two auto flags:
  • [[false, 'foo@example.com', true, false],
     [false, 'bar@example.com', false, true],
     [true, 'foo@example.com', true, false],
     [true, 'bar@example.com', true, true],
     [false, false, false, false],
     [true, false, true, false]
    ].each do |auto_admin_first_user_config, auto_admin_user_config, foo_should_be_admin, bar_should_be_admin|
      # In each case, 'foo' logs in first, then 'bar', then someone else.
      test "auto admin with auto_admin_first=#{auto_admin_first_user_config} auto_admin=#{auto_admin_user_config}" do
        ... # foo arrives
        assert_equal foo_should_be_admin, foo_user.is_admin
        ... # bar arrives
        assert_equal foo_should_be_admin, foo_user.is_admin
        assert_equal bar_should_be_admin, bar_user.is_admin
        ... # baz arrives
        assert !baz.is_admin
      end
    end
    
  • Even if you don't go that far, at least the last case -- ensuring that the first user is not automatically made admin when the flag is false -- seems like a worthwhile thing to protect with a test.
I tried the curl|bash method and it seems to have brought up the containers properly, but writing settings.conf failed (I assume) because arvdock assumes cwd is {arvados-tree}/docker:
  • *****************************************************************
    You can access the Arvados workbench at http://localhost:9899
    *****************************************************************
    
    cat: api/generated/superuser_token: No such file or directory
    To stop the containers, run
    
    ./arvdock stop
    tom@arvados:~$ cat ~/.config/arvados/settings.conf
    ARVADOS_API_HOST=172.17.0.105
    ARVADOS_API_HOST_INSECURE=yes
    ARVADOS_API_TOKEN=
    

I thought it was a bit odd that it left an arvdock program in whatever my cwd happened to be when I ran curl|bash. Perhaps this should go in a more predictable place, like $HOME/bin or /tmp -- or perhaps the "quick installation" instructions should tell me to cd ~/bin (or /tmp) before running curl|bash?

#5 Updated by Ward Vandewege over 7 years ago

Thanks for the review - I've added the extra tests (that thought had crossed my mind, too). I've also stopped arvdock from trying to install ~/.config/arvados/settings.conf if it doesn't have a token to put in there.

As for arvdock - I've added a more explicit note to the install instructions that it is being stored in the current working directory.

#6 Updated by Tom Clegg over 7 years ago

At 7ff4966

LGTM.

This shouldn't hold up the merge, but one more thing worth noting in the docs: The "quick install" method currently assumes you're doing this on your workstation -- or, more precisely, it assumes your web browser and arvdock run on the same host. (If you run Docker in a VM somewhere, you'll be able to connect to Workbench, but the "log in" button (and websockets) won't work out-of-the-box because API server thinks it's at 172.16.*.* and that routing probably isn't set up on your network.)

#7 Updated by Ward Vandewege over 7 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 50 to 100

Applied in changeset arvados|commit:5acdc268c662f452de81d2d00766a879c73f8c08.

#8 Updated by Ward Vandewege over 7 years ago

  • Assigned To set to Ward Vandewege

Also available in: Atom PDF