alces-software / forge-packages

Package descriptors for Alces Flight Forge
0 stars 0 forks source link

Create a flight direct specific version of postgres #24

Closed WilliamMcCumstie closed 6 years ago

WilliamMcCumstie commented 6 years ago

Currently the yum repo version of postgres is set to 9.2. This is to old to work with the pg and as such a newer version needs to be installed instead.

To keep with the standard flight design pattern, a version of postgres has been compiled that can be installed into $FL_ROOT/opt/postgres. Then when it is installed, the db data is stored within $FL_ROOT/var/postgres/data. This service is managed by systemd and thus a unit file is still written to /usr/lib/systemd/system. The service has been named postgresql-flight so that is appears along side the original postgresql service without replacing it.

EDIT: The systemd unit files are now installed into /etc/systemd/system as they are installed outside of a package manager

To make offline install work correctly, flight-cache has also been updated. It no longer uses the anvil packages, instead it builds anvil directly into the package. This requires downloading the rails gems without installing them. As rails requires native c extensions, it is best to install/compile the gems at install time. However by bundle packageing the gems at build time, flight-cache can still be installed offline.

Finally, rails uses the pg gem to connect to postgres. This gem needs to be compiled against the flight version of postgres. As such the pg build config is set to use the correct pg_config.

WilliamMcCumstie commented 6 years ago

Hold off merging this PR until GitHub sorts its problem out. It appears a few commits are missing. Hmmm

Oh well, this comment will probably be rejected by the GitHub servers

WilliamMcCumstie commented 6 years ago

This PR makes the download and install of flight-cache independent of the global server. It does not however fix the snapshot itself. Thus it is a part fix for issue #21

WilliamMcCumstie commented 6 years ago

The public directory is also set during the install process. This should fix #26

WilliamMcCumstie commented 6 years ago

The bug with FileUtils in flight-syncer has also been resolved. Fixes #27