GithubHelp home page GithubHelp logo

fpm-recipes's Introduction

Graylog Package Builds

This repository contains fpm-cookery recipes to build the official Graylog packages.

The package builds are executed in isolated Docker containers by using the Vagrant Docker Provider.

Please open an issue if you run into any problems with the packages.

Setup

Linux

Make sure that the user that executes the package builds via vagrant docker-run is a member of the docker group. Otherwise there will be errors regarding the Docker socket.

Mac OSX

Since Docker does not have native support for Mac OSX, Vagrant will automatically use a small virtual machine to run docker. This requires VirtualBox to be installed.

Build Packages

For now the fpm-cook command to build the package has to be executed via vagrant docker-run. See the example below.

Example

The following example command builds the graylog-server package for Ubuntu 14.04.

$ vagrant docker-run ubuntu1404 -- fpm-cook package /vagrant/recipes/graylog-server/recipe.rb
==> ubuntu1404: Building the container from a Dockerfile...
    ubuntu1404: Image: 0f7af5021f9f
==> ubuntu1404: Creating the container...
    ubuntu1404:   Name: recipes_ubuntu1404_1399476701
    ubuntu1404:  Image: 0f7af5021f9f
    ubuntu1404:    Cmd: fpm-cook package /vagrant/recipes/graylog-server/recipe.rb
    ubuntu1404: Volume: /src/graylog-fpm-recipes:/vagrant
    ubuntu1404:
    ubuntu1404: Container is starting. Output will stream in below...
    ubuntu1404:
    ubuntu1404: ===> Starting package creation for graylog-server-1.0.0 (ubuntu, deb)
    ubuntu1404: ===>
    ubuntu1404: ===> Verifying build_depends and depends with Puppet
    ubuntu1404: ===> Verifying package: openjdk-7-jre-headless
    ubuntu1404: ===> All build_depends and depends packages installed
    ubuntu1404: ===> Fetching source:
    ubuntu1404: ===> Using cached file /vagrant/recipes/graylog-server/cache/graylog-server-1.0.0.tgz
    ubuntu1404: ===> Building in /vagrant/recipes/graylog-server/tmp-build/graylog-server-1.0.0
    ubuntu1404: ===> Installing into /vagrant/recipes/graylog-server/tmp-dest
    ubuntu1404: ===> [FPM] Converting dir to deb {}
    ubuntu1404: ===> Removing existing package file: graylog-server_1.0.0_all.deb
    ubuntu1404: ===> [FPM] No deb_installed_size set, calculating now. {}
    ubuntu1404: ===> [FPM] Reading template {"path":"/var/lib/gems/1.9.1/gems/fpm-1.0.2/templates/deb.erb"}
    ubuntu1404: ===> [FPM] Creating {"path":"/tmp/package-deb-build20140507-1-32jt4z/control.tar.gz","from":"/tmp/package-deb-build20140507-1-32jt4z/control"}
    ubuntu1404: ===> [FPM] Created deb package {"path":"graylog-server_1.0.0_all.deb"}
    ubuntu1404: ===> Created package: /vagrant/recipes/graylog-server/pkg/graylog-server_1.0.0_all.deb
$

To build the graylog-server package on CentOS 6 only the VM name needs to be exchanged.

$ vagrant docker-run centos6 -- fpm-cook package /vagrant/recipes/graylog-server/recipe.rb
==> centos6: Building the container from a Dockerfile...
    centos6: Image: ca5e4f877dac
==> centos6: Creating the container...
    centos6:   Name: graylog-fpm-recipes_centos6_1399484675
    centos6:  Image: ca5e4f877dac
    centos6:    Cmd: fpm-cook package /vagrant/recipes/graylog-server/recipe.rb
    centos6: Volume: /src/graylog-fpm-recipes:/vagrant
    centos6:
    centos6: Container is starting. Output will stream in below...
    centos6:
    centos6: ===> Starting package creation for graylog-server-1.0.0 (centos, rpm)
    centos6: ===>
    centos6: ===> Verifying build_depends and depends with Puppet
    centos6: ===> Verifying package: java-1.7.0-openjdk
    centos6: ===> All build_depends and depends packages installed
    centos6: ===> Fetching source:
    centos6: ===> Using cached file /vagrant/recipes/graylog-server/cache/graylog-server-1.0.0.tgz
    centos6: ===> Building in /vagrant/recipes/graylog-server/tmp-build/graylog-server-1.0.0
    centos6: ===> Installing into /vagrant/recipes/graylog-server/tmp-dest
    centos6: ===> [FPM] Converting dir to rpm {}
    centos6: ===> Removing existing package file: graylog-server-1.0.0-1.noarch.rpm
    centos6: ===> [FPM] Reading template {"path":"/usr/lib/ruby/gems/1.8/gems/fpm-1.0.2/templates/rpm.erb"}
    centos6: ===> [FPM] Running rpmbuild {"args":["rpmbuild","-bb","--define","buildroot /tmp/package-rpm-build20140507-1-ttb91c/BUILD","--define","_topdir /tmp/package-rpm-build20140507-1-ttb91c","--define","_sourcedir /tmp/package-rpm-build20140507-1-ttb91c","--define","_rpmdir /tmp/package-rpm-build20140507-1-ttb91c/RPMS","/tmp/package-rpm-build20140507-1-ttb91c/SPECS/graylog-server.spec"]}
    centos6: ===> [FPM] Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.PiGYv6 {}
    centos6: ===> [FPM] Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.14unGZ {}
    centos6: ===> [FPM] Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.8xL6QS {}
    centos6: ===> [FPM] Processing files: graylog-server-1.0.0-1.noarch {}
    centos6: ===> [FPM] Wrote: /tmp/package-rpm-build20140507-1-ttb91c/RPMS/noarch/graylog-server-1.0.0-1.noarch.rpm {}
    centos6: ===> [FPM] Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.M2OieO {}
    centos6: ===> [FPM] Created rpm {"path":"graylog-server-1.0.0-1.noarch.rpm"}
    centos6: ===> Created package: /vagrant/recipes/graylog-server/pkg/graylog-server-1.0.0-1.noarch.rpm
$

Available Operating Systems

Name VM Name
Ubuntu 14.04 LTS ubuntu1404
Ubuntu 12.04 LTS ubuntu1204
CentOS 6.5 centos6
Debian 7 debian7

Credits

Lots of scripts and config files are based on the following great repositories maintained by the community. Thank you!

DEB

RPM

fpm-recipes's People

Contributors

bernd avatar joschi avatar mariussturm avatar hggh avatar shanemcc avatar grafjo avatar

Watchers

James Cloos avatar Terry avatar  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.