Project

General

Profile

Actions

Idea #8014

closed

[Deployment] /var/www/arvados-RAILSPKG/config includes symlinks to /etc/arvados/RAILSPKG as appropriate

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

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
Deployment
Target version:
Story points:
0.5

Description

The SSO package already does this: the postinst script creates symbolic links in /var/www/arvados-sso/config to the corresponding file in /etc/arvados/sso, for files the user is expected to edit: application.yml, database.yml, production.rb.

Follow the same pattern in the process of building the API and Workbench packages. Stop copying files from /etc to /var/www, and instead set up symlinks in the postinst script.

In order to make your changes effective, you'll need to increment the iteration of the two packages, or force a rebuild of the packages by making a noop commit to them in arvados.

Update the install guide to remove references to running arvados-RAILSPKG-update.sh. That will be moot after this change.


Subtasks 2 (0 open2 closed)

Task #8111: Review 8014-rails-postinst-doc-update-wipResolvedBrett Smith01/04/2016Actions
Task #8036: Review arvados-dev branch 8014-rails-postinst-scripts-wipResolvedBrett Smith01/04/2016Actions

Related issues

Related to Arvados - Idea #8059: [Deployment] arvados-*-upgrade.sh is a postinst scriptResolvedBrett SmithActions
Blocks Arvados - Idea #8066: [Deployment] API server package postinst sets up git_internal_dirResolvedNico César01/22/2016Actions
Actions #1

Updated by Brett Smith over 8 years ago

  • Target version set to Arvados Future Sprints
Actions #2

Updated by Brett Smith over 8 years ago

  • Description updated (diff)
  • Target version deleted (Arvados Future Sprints)
  • Story points set to 0.5
Actions #3

Updated by Brett Smith over 8 years ago

  • Target version set to Arvados Future Sprints
Actions #4

Updated by Brett Smith over 8 years ago

  • Target version changed from Arvados Future Sprints to 2016-01-06 sprint
Actions #5

Updated by Brett Smith over 8 years ago

  • Subject changed from [API] [Workbench] /var/www/arvados-foo/config includes symlinks to /etc/arvados/foo as appropriate to [Deployment] /var/www/arvados-RAILSPKG/config includes symlinks to /etc/arvados/RAILSPKG as appropriate
  • Description updated (diff)
Actions #6

Updated by Brett Smith over 8 years ago

  • Description updated (diff)
Actions #7

Updated by Tom Clegg over 8 years ago

  • Category set to Deployment
  • Assigned To set to Tom Clegg
Actions #8

Updated by Brett Smith over 8 years ago

  • Target version changed from 2016-01-06 sprint to Arvados Future Sprints
Actions #9

Updated by Brett Smith over 8 years ago

  • Assigned To deleted (Tom Clegg)
Actions #10

Updated by Brett Smith over 8 years ago

  • Status changed from New to In Progress
  • Assigned To set to Brett Smith
Actions #11

Updated by Brett Smith over 8 years ago

8014-rails-postinst-scripts-wip is up for review. It does both this and #8059, and it does them both by DRYing up all the Rails package infrastructure into a single stack. Now run-library.sh has a handle_rails_package function, and it's used to build the API server, Workbench, and SSO server, with just small hooks to account for the differences between them.

First the branch makes several small bugfixes and cleanups to the SSO package postinst to make it ready to handle the other packages. This is a long series of small commits explaining each change.

Then there's the big unifying commit to bring all the Rails package-building infrastructure together. If you run git show -M on that last commit, you can see the changes in the postinst script that mostly just serve to unify it for all packages, compared to the last version of the SSO postinst script.

handle_rails_package builds postinst/prerm/postrm scripts for all these packages on the fly. See jenkins/rails-package-scripts/README.md for details.

Actions #12

Updated by Brett Smith over 8 years ago

  • Target version changed from Arvados Future Sprints to 2016-01-06 sprint
Actions #13

Updated by Brett Smith over 8 years ago

Also: for all three packages, I was able to install the modified package, fill in the necessary .yml files, and reconfigure the package and see it finish all the postinst steps. So there's been at least that much testing.

Actions #14

Updated by Nico César over 8 years ago

I compiled the branch and copy the arvados-api-server to c97qk ... it seems like a successful install .. it did even a database schema change:

c97qk:~# dpkg -i arvados-api-server_0.1.20160104193447.3344f5b-3_amd64.deb
(Reading database ... 69923 files and directories currently installed.)
Preparing to unpack arvados-api-server_0.1.20160104193447.3344f5b-3_amd64.deb ...
Unpacking arvados-api-server (0.1.20160104193447.3344f5b-3) over (0.1.20151223192841.378e6e0-1) ...
Setting up arvados-api-server (0.1.20160104193447.3344f5b-3) ...

Assumption: nginx is configured to serve Rails from
            /var/www/arvados-api/current
Assumption: nginx and passenger run as www-data:www-data

Creating symlinks to configuration in /etc/arvados/api ...... done.
Running bundle install... done.
Ensuring directory and file permissions ...... done.                                                                                                                        
Running db:migrate...==  AddExitCodeToContainers: migrating ========================================                                                                        
-- add_column(:containers, :exit_code, :integer)                                                                                                                            
   -> 0.0009s                                                                                                                                                               
==  AddExitCodeToContainers: migrated (0.0010s) ===============================                                                                                             

 done.
Checking application.yml for completeness...AppVersion (discovered)          378e6e0-1 
action_controller.perform_caching true
admin_notifier_email_from        support@curoverse.com
arvados_docsite                  https://doc.arvados.org
(..)
sso_app_id                       c97qk.arvadosapi.com
sso_app_secret                   *********
sso_insecure                     false
sso_provider_url                 https://auth.curoverse.com
user_notifier_email_from         support@curoverse.com
user_profile_notification_address false
uuid_prefix                      c97qk
websocket_address                wss://ws.c97qk.arvadosapi.com/websocket
workbench_address                https://workbench.c97qk.arvadosapi.com
 done.
Precompiling assets... done.
 * Restarting nginx nginx                                                                                                                                            [ OK ] 
c97qk:~# echo $?
0
Actions #15

Updated by Nico César over 8 years ago

I did a mistake and added some comments in the review ticket see https://dev.arvados.org/issues/8036#note-12

but this LGTM. lets merge

Actions #16

Updated by Brett Smith over 8 years ago

  • Target version changed from 2016-01-06 sprint to 2016-01-20 Sprint
Actions #17

Updated by Peter Amstutz over 8 years ago

_install_rails_reconfigure.liquid is missing

Actions #18

Updated by Brett Smith over 8 years ago

Peter Amstutz wrote:

_install_rails_reconfigure.liquid is missing

Sorry about that. Fixed in 78ae7f1.

Actions #19

Updated by Peter Amstutz over 8 years ago

Brett Smith wrote:

Peter Amstutz wrote:

_install_rails_reconfigure.liquid is missing

Sorry about that. Fixed in 78ae7f1.

With that fix, looks good to me.

Actions #20

Updated by Brett Smith over 8 years ago

Everything built and deployed successfully last night, so I'm going to call this resolved. I imagine we'll find bugs in the new stuff but those can be new issues.

Actions #21

Updated by Brett Smith over 8 years ago

  • Status changed from In Progress to Resolved
Actions

Also available in: Atom PDF