Last active
March 18, 2016 07:14
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bundle exec kitchen converge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker commit <container-id> <username>/<image> | |
docker push <username>/<image> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'https://rubygems.org' | |
gem 'omnibus', github: 'chef/omnibus' | |
gem 'omnibus-software', github: 'opscode/omnibus-software' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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