Build infrastructure for creating platform-specific builds of Alces Flight projects with Omnibus.
The Alces Flight Omnibus Builder repository provides build instructions and configuration to allow complex Alces Flight projects to be built for distribution for particular platforms (primarily Enterprise Linux) using Omnibus. This allows them to be shipped along with their necessary dependencies on versions of upstream projects that aren't made available as part of the distribution, for e.g. more advanced Ruby versions, latest VNC servers etc.
The build infrastructure requires that you have a working Vagrant installation.
Firstly, clone the repo!
git clone https://github.com/alces-flight/alces-flight-omnibus-builder
Bring up the EL7 build VM:
cd alces-flight-omnibus-builder
vagrant up
The EL7 build VM will be provisioned with the required tools including required distribution dependencies via yum
and an RVM installation of Ruby 2.6.
Access the build VM using vagrant ssh
. The build infrastructure is mounted within the guest at /vagrant
.
Log in to the build VM and set up the Omnibus build infrastructure.
vagrant ssh
cd /vagrant/builders/flight-example
bundle install
The build infrastructure is set up so as not to need root access. This is important because, when building and installing complex projects, the installation of any software dependencies that attempt to write outside of the /opt/flight
hierarchy will fail fast allowing potential problems to be corrected.
To build a project, enter the project directory within /vagrant/builders
and issue the omnibus build
command, e.g.:
cd /vagrant/builders/flight-example
bin/omnibus build flight-example
Once the build has completed, the RPM package will be available in the pkg/
subdirectory.
The Vagrantfile
also contains a definition for a simple VM you can use to test built packages. Manage and access the test VM using the test
definition:
vagrant up test
vagrant ssh test
Similarly to the build VM, the build infrastructure is mounted within the guest at /vagrant
where you can find the packages you built within the build VM, for e.g.:
sudo -s
cd /vagrant/builders/flight-example
yum install pkg/flight-example-someversion.el7.x86_64.rpm
Once a package is built, the result can be uploaded to a yum
repository.
Alces Flight contributors who have been provided with permissions to publish to the Alces Flight yum
repositories on Amazon S3, can use the scripts/publish-rpm.sh
script to push an RPM to the development repository.
First, add your AWS credentials:
aws configure
Next, publish the RPM that you've built:
scripts/publish-rpm.sh builders/flight-example/pkg/flight-example-someversion.rpm
Users of the alces-flight-dev
repository will then have access to install the new RPM via yum
on their systems.
Once the RPM has been tested, you can promote it to the live/production repo using the scripts/promote-rpm.sh
script:
scripts/promote-rpm.sh flight-example-someversion
Note that the script does not take a file path, but takes a name pattern to match one or more RPMs that are present in the development repo.
Once the RPM is published to the production repo, users of the alces-flight
repository will have access to install/upgrade to the new RPM via yum
on their systems.
Fork the project. Make your feature addition or bug fix. Send a pull request. Bonus points for topic branches.
Read CONTRIBUTING.md for more details.
Eclipse Public License 2.0, see LICENSE.txt for details.
Copyright (C) 2019-present Alces Flight Ltd.
This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0 which is available at https://www.eclipse.org/legal/epl-2.0, or alternative license terms made available by Alces Flight Ltd - please direct inquiries about licensing to [email protected].
Alces Flight Omnibus Builder is distributed in the hope that it will be useful, but WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. See the Eclipse Public License 2.0 for more details.