GithubHelp home page GithubHelp logo

isabella232 / pl-build-tools-vanagon Goto Github PK

View Code? Open in Web Editor NEW

This project forked from puppetlabs/pl-build-tools-vanagon

0.0 0.0 0.0 632 KB

A vanagon project for building out gcc and friends. PATCHES ACCEPTED.

Ruby 69.32% CMake 14.93% Shell 15.63% Dockerfile 0.13%

pl-build-tools-vanagon's Introduction

Overview

The pl-build-tools-vanagon repo uses vanagon to build packages that satisfy build-time dependencies for puppet software: artifacts built using this repo are not included in final builds of puppet software. For runtime dependency packages, see the puppet-runtime project instead.

This project exists to create a consistent build process for use in our continuous integration systems, and to provide versions of build tools that may not be available as system tools on all of the target platforms that Puppet Enterprise supports.

At Puppet Inc, we ship these packages to repositories on our internal network only, but you may build them locally: see the general vanagon instructions and the examples below to get started.

Available projects

The tools and libraries you can build using this repository can be found in the configs/projects/ directory. For example:

  • pl-gcc
  • pl-boost (build requires pl-gcc)
  • pl-cmake (build requires pl-gcc)
  • pl-yaml-cpp (build requires pl-gcc, pl-boost, and pl-cmake)

...and others.

These projects all generate packages with a "pl-" prefix (for Puppet Labs) and are installed under /opt/pl-build-tools/ so that they do not conflict with equivalent system packages. Note that not all projects are guaranteed to successfully build on every platform listed in configs/platforms/.

Setting Up Your Build Environment

A modern Linux or Mac OS X operating system with a recent version of Ruby (1.9 or later) with the bundler gem is required to run these builds.

This repository makes use of the Vanagon build system, which is written in Ruby. The Gemfile included in this repo specifies all of the needed ruby libraries to build a target project. Additionally, vanagon requires a virtualization engine to build target packages in. More information on the different virtualization engine options is available in the vanagon repo.

Begin by cloning this repository:

git clone https://github.com/puppetlabs/pl-build-tools-vanagon.git

and install the required Ruby gems with the bundle install command:

cd pl-build-tools-vanagon/
bundle install

Using VANAGON_LOCATION to specify a custom Vanagon source

By default, our Gemfile specifies a particular version of Vanagon (typically, the latest master branch checked out from the vanagon GitHub repo). There are times where you may wish to use a customized version of vanagon from a git repository branch, or a copy of Vanagon stored locally on your filesystem. You can do this by setting the environment variable VANAGON_LOCATION when running bundle install:

  • 0.3.14 - Use a specific git tag from the Vanagon git repo
  • [email protected]:puppetlabs/vanagon#master - Customize the remote git location and/or branch
  • file:///workspace/vanagon - Absolute file path
  • file://../vanagon - File path relative to the project directory

Examples

Let's say you want to build pl-gcc for Debian 8 (Jessie) 64-bit. First verify that you have a project pl-gcc (configs/projects/pl-gcc.rb) and a platform file for Debian 8 (configs/platforms/debian-8-amd64.rb). Ensure you are current in the root directory of the repo, and run:

bundle exec build pl-gcc debian-8-amd64 <target host>

where target host is the hostname or IP address of a 64-bit Debian 8 server or VM that the build will be run on. Internally at Puppet we have a dynamic vmpooler infrastructure that provides VMs for all of our target platforms, so target host is not necessary in that case.

The build process will take the configuration defined in configs/projects/pl-gcc.rb and build any component dependencies required from configs/components. The final project will then be packaged and made available under the output/ directory.

Build Arguments

The build command above comes from the vanagon gem, and it has a number of position-dependent arguments:

project name

The name of the project to build. A file named project_name.rb must be present in the configs/projects/ directory.

platform name

The name of the platform to build for. A file named platform_name.rb must be present in the configs/platforms/ directory.

You can specify multiple platforms to build for at once by using a comma-separated list (e.g, platform1,platform2).

target host [optional]

Target host is an optional argument which overrides the host selection. Instead of using a vm collected from the pooler, the build will attempt to ssh to the target host as root.

If you're building multiple platforms at once, multiple target hosts can also be specified using a comma-separated list (e.g, host1,host2). If fewer targets are specified than platforms, the default build engine (the pooler) will be used for platforms without a target host. If more target hosts are specified than platforms, the extra target hosts will be ignored.

Howto: Add a New Platform

To add a new platform, begin by adding the platform definition file in configs/platforms. Then additional customizations when building components for that platform can be added to the component definitions in configs/components. If this is an entirely new platform (and not just a new version of a platform already supported), you may need to make changes in vanagon as well. Using the build dependency graph above, start with pl-gcc and work your way through the dependency chain. Once packages for all of the relevant pl-build-tools have been generated, you can then move on to building a puppet-agent package using the puppet-agent repository.

Howto: Add a New Project

New projects require an entry in configs/projects. A file for anything this project includes, with instructions on how to configure and build it, should also be added under configs/components if it does not already exists. Refer to existing projects in this repo or to the example in vanagon for more details.

Support

Puppet, Inc. offers community-based support for this repository. Questions should be directed to the Puppet Developers mailing list. Some code in this repository is related to platforms available only to Puppet Enterprise users, (e.g, Solaris and AIX), and we only offer support for those platforms to official partners of Puppet, Inc.

pl-build-tools-vanagon's People

Contributors

branan avatar caseywilliams avatar e-gris avatar gabrielnagy avatar geoffnichols avatar gimmyxd avatar haus avatar heathseals avatar iristyle avatar jcoconnor avatar loopinu avatar magisus avatar mcdonaldseanp avatar mckern avatar melissa avatar mihaibuzgau avatar mikaelsmith avatar mwaggett avatar nicklewis avatar pdemonaco avatar rhenwood-arm avatar sarameisburger avatar scottgarman avatar sebastian-miclea avatar sharpie avatar shermdog avatar speedofdark avatar stahnma avatar tavilarion avatar theshanx avatar

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.