[Deployment] /var/www/arvados-RAILSPKG/config includes symlinks to /etc/arvados/RAILSPKG as appropriate
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.
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.
#11 Updated by Brett Smith almost 6 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.
#14 Updated by Nico César almost 6 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 firstname.lastname@example.org 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 email@example.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