Skip to content

Instantly share code, notes, and snippets.

@marcy-terui
Last active March 18, 2016 07:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marcy-terui/1191598a2d959a6e2220 to your computer and use it in GitHub Desktop.
Save marcy-terui/1191598a2d959a6e2220 to your computer and use it in GitHub Desktop.
chef/omnibusとDockerでPythonランタイムとpypiライブラリをパッケージングする ref: http://qiita.com/marcy-terui/items/9b3610bed4e5fcafd9b9
driver:
name: docker_cli
transport:
name: docker_cli
provisioner:
name: chef_zero
platforms:
- name: centos-6.6
driver_config:
image: centos:centos6.6
run_list:
- yum-epel::default
- omnibus::default
- omnibus-lamvery::yum_clean
- name: ubuntu-14.04
run_list:
- apt::default
- omnibus::default
- omnibus-lamvery::apt_clean
suites:
- name: default
attributes:
omnibus:
build_user: root
build_user_group: root
build_user_home: /root
install_dir: /opt/lamvery
bundle exec kitchen converge
docker commit <container-id> <username>/<image>
docker push <username>/<image>
require 'rexml/document'
require 'open-uri'
doc = REXML::Document.new(open('https://pypi.python.org/pypi?:action=doap&name=lamvery').read)
p doc.elements['rdf:RDF/Project/release/Version/revision'].text #=> "0.14.0"
require 'rexml/document'
require 'open-uri'
doc = REXML::Document.new(open('https://pypi.python.org/pypi?:action=doap&name=lamvery').read)
p doc.elements['rdf:RDF/Project/release/Version/revision'].text #=> "0.14.0"
source 'https://rubygems.org'
gem 'omnibus', github: 'chef/omnibus'
gem 'omnibus-software', github: 'opscode/omnibus-software'
name "lamvery"
build do
command "#{install_dir}/embedded/bin/pip install lamvery==#{version}"
command "ln -fs #{install_dir}/embedded/bin/lamvery #{install_dir}/bin/lamvery"
end
name "pypi"
build do
command "curl -kL https://bootstrap.pypa.io/get-pip.py | #{install_dir}/embedded/bin/python"
command "ln -fs #{install_dir}/embedded/bin/pip #{install_dir}/bin/pip"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment