Giter VIP home page Giter VIP logo

vagrant-fpm's Introduction

vagrant-fpm

Multiple environments for creating deb packages using fpm.

How to use it?

Vagrant

Start vagrant environment

$ cd vagrant
$ vagrant up
$ vagrant ssh
$ cd /vagrant/

Check fpm version:

vagrant@vagrant-ubuntu-precise-64:/vagrant$ fpm --version
1.5.0

Download and unzip Packer

vagrant@vagrant-ubuntu-precise-64:/vagrant$ wget https://releases.hashicorp.com/packer/0.10.0/packer_0.10.0_linux_amd64.zip
vagrant@vagrant-ubuntu-precise-64:/vagrant$ unzip packer_0.10.0_linux_amd64.zip

Copy packer binary to /usr/bin and run fpm

vagrant@vagrant-ubuntu-precise-64:/vagrant$ sudo cp packer /usr/bin/
vagrant@vagrant-ubuntu-precise-64:/vagrant$ fpm -s dir -t deb -n "packer" -v 0.10.0 /usr/bin/packer
Created package {:path=>"packer_0.10.0_amd64.deb"}

Verify Packer debian package is created

vagrant@vagrant-ubuntu-precise-64:/vagrant$ ls -l
-rwxr-xr-x 1 vagrant vagrant 41684248 Mar 15 04:05 packer
-rw-r--r-- 1 vagrant vagrant  8823254 May  2 17:30 packer_0.10.0_amd64.deb
-rw-r--r-- 1 vagrant vagrant  8821665 Mar 15 04:28 packer_0.10.0_linux_amd64.zip
-rw-r--r-- 1 vagrant vagrant      402 May  2 13:30 Vagrantfile

Packer

todo

Docker

Start vagrant env with docker

cd docker
vagrant up
vagrant ssh

Pull docker image with Ruby & fpm installed (ubuntu:16.04)

docker pull qba73/fpm

Download Packer from Hashicorp

wget https://releases.hashicorp.com/packer/0.10.0/packer_0.10.0_linux_amd64.zip
unzip packer_0.10.0_linux_amd64.zip
cp packer /hashicorp

Run docker container and build debian package

cd fpmbuild
$ ./fpm.sh -p=packer -v=0.10.0
Building packer debian package version 0.10.0 ...
Created package {:path=>"packer_0.10.0_amd64.deb"}

Verify package is created

$ ls -l hashicorp/
total 49328
-rwxr-xr-x 1 vagrant vagrant 41684248 May  2 15:08 packer
-rw-r--r-- 1 vagrant vagrant  8823710 May  2 17:23 packer_0.10.0_amd64.deb
-rw-r--r-- 1 vagrant vagrant        0 May  2 17:11 README.md

vagrant-fpm's People

Contributors

qba73 avatar

Watchers

 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.