Project

General

Profile

Feature #9864

Post-installation utility to migrate/seed/restart

Added by Dominic Cleal over 5 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Packaging
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:

Description

Our core and plugin packages have a lot of postinstall duplication where the db:migrate, db:seed, apipie:cache rake tasks are called depending on what the plugin/package contains. At best this is code duplication, at worst it considerably slows down installation with many plugins.

It would be useful to have a lightweight way of running postinstall tasks that could be used in all packages, that can run migrations/seeds/apipie reindexing and a restart of the Foreman app (including under Passenger) only when required - using some kind of flag during package installation to indicate what the plugin requires.

Note that there are already two flags (db migrate and seed) within the DB settings, but they're unused outside of core and require starting the Rails environment to determine their value, which is slow.


Related issues

Related to Packaging - Refactor #6016: Convert foreman sysvinit script to systemd unitClosed
Related to Foreman - Feature #19228: Upgrade process with multiple servers is extremely time consuming (many many db:seed, db:migrate apipie cache runs) New2017-04-08

History

#1 Updated by Dominic Cleal over 5 years ago

  • Related to Refactor #6016: Convert foreman sysvinit script to systemd unit added

#2 Updated by Dominic Cleal over 3 years ago

  • Related to Feature #19228: Upgrade process with multiple servers is extremely time consuming (many many db:seed, db:migrate apipie cache runs) added

Also available in: Atom PDF