Feature #7330

[SSO] Convert arvados-sso-server-upgrade.sh to fpm after-install/before-remove scripts

Added by Brett Smith over 5 years ago. Updated over 5 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
SSO
Target version:
Start date:
09/14/2015
Due date:
% Done:

100%

Estimated time:
(Total: 0.00 h)
Story points:
2.0

Description

The after-install script should, in the usual case, perform all the same actions that arvados-sso-server-upgrade.sh currently performs. However, there are some expected implementation differences:

  • Be prepared to be called with dpkg's calling arguments or rpm's calling arguments. If some actions don't make sense in some calling scenarios, make sure they're skipped.
  • Instead of introspecting the system to determine whether we're on Debian or Red Hat, use the calling arguments so we get that information directly from the packaging system, which should be more reliable.
  • Instead of copying /etc/arvados/sso/*.yml to /var/www/arvados-sso/current/config, we should make symlinks in /var to files in /etc, so the copies don't get out of sync with the canonical versions. If there's a way to do this directly with fpm, feel free to do that, since it will probably be more reliable. But if nothing else, you can make the symlinks in the after-install script, and add a before-remove script to remove them when the last version of the package is being removed (so they don't interfere with removing all of /var/www/arvados-sso).
  • Update our install guide to remove references to running arvados-sso-server-upgrade.sh.

Subtasks

Task #7348: ReviewResolvedWard Vandewege

Associated revisions

Revision 656b5e38 (diff)
Added by Ward Vandewege over 5 years ago

First commit.

refs #7330

Revision 656b5e38 (diff)
Added by Ward Vandewege over 5 years ago

First commit.

refs #7330

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

Add prerm and postrm scripts, various cleanups.

refs #7330

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

Add prerm and postrm scripts, various cleanups.

refs #7330

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

The sso server package has a package dependency on either nginx or
apache2.

refs #7330

Revision 170c3381 (diff)
Added by Ward Vandewege over 5 years ago

Remove bash-ism from arvados-sso-server.postinst.

refs #7330

Revision 170c3381 (diff)
Added by Ward Vandewege over 5 years ago

Remove bash-ism from arvados-sso-server.postinst.

refs #7330

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

Initial version of run-test-packages-sso.sh

refs #7330

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

Initial version of run-test-packages-sso.sh

refs #7330

Revision 439fc3c4 (diff)
Added by Ward Vandewege over 5 years ago

Add package dependencies for CentOS.

refs #7330

Revision 3789a461 (diff)
Added by Ward Vandewege over 5 years ago

Add support for CentOS6 to the improved SSO packages.

refs #7330

Revision 3789a461 (diff)
Added by Ward Vandewege over 5 years ago

Add support for CentOS6 to the improved SSO packages.

refs #7330

Revision 593c0767 (diff)
Added by Ward Vandewege over 5 years ago

For CentOS, do not depend on the httpd package (that's Apache).

refs #7330

Revision 9ac3e54b (diff)
Added by Ward Vandewege over 5 years ago

A number of additional tweaks.

refs #7330

Revision 9ac3e54b (diff)
Added by Ward Vandewege over 5 years ago

A number of additional tweaks.

refs #7330

Revision 3677f1ae (diff)
Added by Ward Vandewege over 5 years ago

Update the SSO installation documentation to reflect the new and
improved packages.

refs #7330

Revision 88b4f320 (diff)
Added by Ward Vandewege over 5 years ago

More improvements for the SSO server installation guide.

refs #7330

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

Another tweak for the SSO server installation guide: the PostgreSQL
service needs to be started manually if it was pulled in as a dependency
by arvados-sso-server.

refs #7330

Revision 1c82c1f8 (diff)
Added by Ward Vandewege over 5 years ago

More fixes for the SSO server packages.

refs #7330

Revision 1c82c1f8 (diff)
Added by Ward Vandewege over 5 years ago

More fixes for the SSO server packages.

refs #7330

Revision 9446aefa (diff)
Added by Nico César over 5 years ago

7330: curl isnt available by default in ubuntu 14.04. added the apt-get

refs #7330

Revision 8752f4d9 (diff)
Added by Nico César over 5 years ago

7330: apt-get command had a typo

refs #7330

Revision f9620be0 (diff)
Added by Nico César over 5 years ago

7330: making sso install guide similar to workbench and api server

refs #7330

Revision d084c7b4 (diff)
Added by Nico César over 5 years ago

7330: 'edit' should be replaced by 'editor' that will go to the default editor of the ditro

refs #7330

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

More language tweaks.

refs #7330

Revision a9f03b2a
Added by Ward Vandewege over 5 years ago

Merge branch '7330-postinst-for-sso-server'

refs #7330

Revision a9f03b2a
Added by Ward Vandewege over 5 years ago

Merge branch '7330-postinst-for-sso-server'

refs #7330

Revision 3a4b7ec9
Added by Ward Vandewege over 5 years ago

Merge branch 'master' into 7330-improved-sso-package

refs #7330

Revision 4e8c321b
Added by Ward Vandewege over 5 years ago

Merge branch '7330-improved-sso-package'

closes #7330

History

#1 Updated by Brett Smith over 5 years ago

  • Subject changed from [SSO] Convert arvados-sso-server-upgrade.sh to a postinst script in Debian packages to [SSO] Convert arvados-sso-server-upgrade.sh to an fpm after-install script
  • Description updated (diff)

#2 Updated by Brett Smith over 5 years ago

  • Subject changed from [SSO] Convert arvados-sso-server-upgrade.sh to an fpm after-install script to [SSO] Convert arvados-sso-server-upgrade.sh to fpm after-install/before-remove scripts
  • Description updated (diff)

#3 Updated by Brett Smith over 5 years ago

  • Description updated (diff)

We are kicking downgrades out of this ticket. We'll deal with them separately, later.

#4 Updated by Brett Smith over 5 years ago

  • Story points set to 2.0

#5 Updated by Brett Smith over 5 years ago

  • Target version changed from Arvados Future Sprints to 2015-09-30 sprint

#6 Updated by Brett Smith over 5 years ago

  • Assigned To set to Nico César

#7 Updated by Ward Vandewege over 5 years ago

  • Tracker changed from Bug to Feature
  • Status changed from New to In Progress

#8 Updated by Ward Vandewege over 5 years ago

  • Assigned To changed from Nico César to Ward Vandewege

#9 Updated by Ward Vandewege over 5 years ago

Branches to review:

arvados repository: 7330-improved-sso-package
arvados-dev repository: 7330-postinst-for-sso-server

Notes for review of 7330-postinst-for-sso-server:

Build package for one target:

WORKSPACE=path/to/sso-provider ./run-build-packages-one-target.sh --target ubuntu1204 --command run-build-packages-sso.sh

I've also created a 'run-test-packages-sso.sh' script, which runs a few basic tests. It makes sure the generated package can actually be installed and uninstalled without errors (and without leaving stray files behind):

WORKSPACE=path/to/sso-provider ./run-build-packages-one-target.sh --target ubuntu1204 --command run-test-packages-sso.sh

All targets:

WORKSPACE=path/to/sso-provider ./run-build-packages-all-targets.sh --command run-build-packages-sso.sh

Test all targets:

WORKSPACE=path/to/sso-provider ./run-build-packages-all-targets.sh --command run-test-packages-sso.sh

Notes for review of 7330-improved-sso-package:

This is a documentation branch. It updates the SSO server installation instructions. I encourage you to pick one of our supported distributions and do a manual installation according to the instructions (for example, in a Docker container).

#10 Updated by Nico César over 5 years ago

I reviewed both branches.

arvados c6d10ad822ac94453d74371af0bf57072c43f018
arvados-dev
1c82c1f875ca2681ff36e804fde8f6beb8f36c77

I created my own deb for the installation and followed all the instructions from the documentation.

pull 'arvados' up to d084c7b404fa0cb597fbba4dcb007c087da49ba5 there are minor changes

LGTM!

#11 Updated by Ward Vandewege over 5 years ago

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

Applied in changeset arvados|commit:4e8c321b344d8ec23de7ee7c68b2553d87defb67.

Also available in: Atom PDF