Story #8014

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

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

Status:
Resolved
Priority:
Normal
Assigned To:
Brett Smith
Category:
Deployment
Target version:
Start date:
01/04/2016
Due date:
% Done:

100%

Estimated time:
(Total: 0.50 h)
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

Task #8111: Review 8014-rails-postinst-doc-update-wipResolvedBrett Smith

Task #8036: Review arvados-dev branch 8014-rails-postinst-scripts-wipResolvedBrett Smith


Related issues

Related to Arvados - Story #8059: [Deployment] arvados-*-upgrade.sh is a postinst scriptResolved

Blocks Arvados - Story #8066: [Deployment] API server package postinst sets up git_internal_dirResolved01/22/2016

Associated revisions

Revision 4805adc6 (diff)
Added by Brett Smith almost 5 years ago

8014: Add #configure anchors to API server and Workbench install guides.

Package postinst scripts will use these to point people to the right
places in the documentation to read what steps they need to take
manually. The SSO server docs+package already follow this
convention. Refs #8014.

Revision 1e48d4f9
Added by Brett Smith almost 5 years ago

Merge branch '8014-rails-postinst-scripts-wip'

Refs #8014. Closes #8036.

Revision 1e48d4f9
Added by Brett Smith almost 5 years ago

Merge branch '8014-rails-postinst-scripts-wip'

Refs #8014. Closes #8036.

Revision 7d6ff766
Added by Brett Smith almost 5 years ago

Merge branch '8014-rails-postinst-doc-update-wip'

Refs #8014. Closes #8111.

Revision a9335a76 (diff)
Added by Brett Smith almost 5 years ago

8014: Remove more upgrade script references from install guide.

The steps removed are now handled by Rails package postinst scripts.
This should've been done in 378a988bbf9e29736382339f587582259b641782,
but was overlooked. Refs #8014.

History

#1 Updated by Brett Smith almost 5 years ago

  • Target version set to Arvados Future Sprints

#2 Updated by Brett Smith almost 5 years ago

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

#3 Updated by Brett Smith almost 5 years ago

  • Target version set to Arvados Future Sprints

#4 Updated by Brett Smith almost 5 years ago

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

#5 Updated by Brett Smith almost 5 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)

#6 Updated by Brett Smith almost 5 years ago

  • Description updated (diff)

#7 Updated by Tom Clegg almost 5 years ago

  • Category set to Deployment
  • Assigned To set to Tom Clegg

#8 Updated by Brett Smith almost 5 years ago

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

#9 Updated by Brett Smith almost 5 years ago

  • Assigned To deleted (Tom Clegg)

#10 Updated by Brett Smith almost 5 years ago

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

#11 Updated by Brett Smith almost 5 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.

#12 Updated by Brett Smith almost 5 years ago

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

#13 Updated by Brett Smith almost 5 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.

#14 Updated by Nico César almost 5 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

#15 Updated by Nico César almost 5 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

#16 Updated by Brett Smith almost 5 years ago

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

#17 Updated by Peter Amstutz almost 5 years ago

_install_rails_reconfigure.liquid is missing

#18 Updated by Brett Smith almost 5 years ago

Peter Amstutz wrote:

_install_rails_reconfigure.liquid is missing

Sorry about that. Fixed in 78ae7f1.

#19 Updated by Peter Amstutz almost 5 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.

#20 Updated by Brett Smith almost 5 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.

#21 Updated by Brett Smith almost 5 years ago

  • Status changed from In Progress to Resolved

Also available in: Atom PDF