Git Product home page Git Product logo

alces-flight-omnibus-builder's Introduction

Alces Flight Omnibus Builder

Build infrastructure for creating platform-specific builds of Alces Flight projects with Omnibus.

Overview

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.

Installation

Prerequisites

The build infrastructure requires that you have a working Vagrant installation.

Install the build environment

Clone the repo

Firstly, clone the repo!

git clone https://github.com/alces-flight/alces-flight-omnibus-builder

Initialize build VM

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.

Initialize build infrastructure within the VM

Log in to the build VM and set up the Omnibus build infrastructure.

vagrant ssh
cd /vagrant/builders/flight-example
bundle install

Building a project

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.

Testing built packages

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

Uploading built packages to the yum repo

Once a package is built, the result can be uploaded to a yum repository.

Publishing to the development repo

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.

Promoting to the production repo

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.

Contributing

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.

License

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.

alces-flight-omnibus-builder's People

Contributors

williammccumstie avatar benarmston avatar mjtko avatar voxsecundus avatar colonelpanicks avatar

Watchers

 avatar Steve Norledge avatar James Cloos avatar  avatar

alces-flight-omnibus-builder's Issues

Bump Vagrant Bundler Version to 2.1.4

The default VM currently runs with bundler 1.17.2, this can be fixed in place by manually installing the later version with gem.

Logging here to fix in the Vagrantfile

Prettify the tabulated output of newly created assets

The following is an example output of newly created assets. It uses tab (\t) to separate the new asset from the support type. This causes the fields to be a bit wonky due to name lengths.

$ flight gather export gateway1 node01 node02
Exported: gateway1
Exported: node01
Exported: node02

The following nodes have been created:
Asset    Support Type
gateway1    managed
node01    managed
node02    managed


You may update the support type with:
/opt/flight/bin/flight asset update-asset ASSET --support-type TYPE

<snip>

This will likely require some tabulation library instead of the following line:

echo "$list_output" | grep "^$asset"$'\t' | cut -f1,2 >&2

Original trello issue:
https://trello.com/c/a5drIMmH/49-improve-flight-gather-support-for-support-types-when-exporting-to-flight-center#comment-5f1eb0271aa23519769cbdb1

Update URL for OpenFlightHPC repo

The scripts/install-flight-runway.sh script is using an old URL to install Flight Runway (https://repo.openflighthpc.org/openflight/centos/7/x86_64/openflighthpc-release-2-1.noarch.rpm). This URL no longer points to anything. It ought to be replaced with the proper repo URL (most likely https://repo.openflighthpc.org/pub/centos/7/openflighthpc-release-latest.noarch.rpm).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.