Skip to content

Instantly share code, notes, and snippets.

View johnbellone's full-sized avatar
🏠
Working from home

John Bellone johnbellone

🏠
Working from home
View GitHub Profile
@johnbellone
johnbellone / Dockerfile
Created August 15, 2013 02:49
Dockerfile to setup nodenv for managing nodejs installations.
from ubuntu
maintainer John Bellone <[email protected]>
# install essentials
run apt-get -y update
run apt-get -y install build-essential git-core
# install rbenv
run git clone https://github.com/OiNutter/nodenv /usr/local/nodenv
run mkdir -p /usr/local/nodenv/plugins
@johnbellone
johnbellone / Dockerfile
Created August 15, 2013 02:49
Dockerfile for rbenv and ruby-build to manage rubies.
from ubuntu
maintainer John Bellone <[email protected]>
# install essentials
run apt-get -y update
run apt-get -y install build-essential git-core
# install rbenv
run git clone https://github.com/sstephenson/rbenv /usr/local/rbenv
run mkdir -p /usr/local/rbenv/plugins
@johnbellone
johnbellone / .env
Last active December 19, 2016 19:51
Using dotenv gem with Vagrant and proxies.
VAGRANT_HTTP_PROXY=$HTTP_PROXY
VAGRANT_HTTPS_PROXY=$HTTPS_PROXY
VAGRANT_NO_PROXY=$NO_PROXY
@johnbellone
johnbellone / bash.sh
Created March 13, 2014 15:59
Issue installing Vagrant Berkshelf with 1.5 Vagrant
jbellone@dc110-05-298dx:~/Projects/vagrant-berkshelf % vagrant plugin install vagrant-berkshelf-1.4.0.dev1.gem 11:58:26
Installing the 'vagrant-berkshelf-1.4.0.dev1.gem' plugin. This can take a few minutes...
/Applications/Vagrant/embedded/gems/gems/bundler-1.5.3/lib/bundler/parallel_workers/unix_worker.rb:19:in `initialize': uninitialized constant Net::HTTP::Persistent (NameError)
from /Applications/Vagrant/embedded/gems/gems/bundler-1.5.3/lib/bundler/parallel_workers.rb:14:in `new'
from /Applications/Vagrant/embedded/gems/gems/bundler-1.5.3/lib/bundler/parallel_workers.rb:14:in `worker_pool'
from /Applications/Vagrant/embedded/gems/gems/bundler-1.5.3/lib/bundler/installer.rb:281:in `install_in_parallel'
from /Applications/Vagrant/embedded/gems/gems/bundler-1.5.3/lib/bundler/installer.rb:95:in `run'
from /Applications/Vagrant/embedded/gems/gems/bundler-1.5.3/lib/bundler/installer.rb:15:in `install'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/v
ruby-2.0.0-p451 (#<Kitchen::Driver::Vagrant:0x007f9faa03c4c8>):2 > ls
Kitchen::Logging#methods: banner debug error fatal info warn
Kitchen::Driver::Base#methods: [] config_keys diagnose instance name validate_config!
Kitchen::Driver::SSHBase#methods: login_command ssh
Kitchen::Driver::Vagrant#methods: converge create default_box_url destroy instance= setup verify verify_dependencies
self.methods: __pry__
instance variables: @config @instance @vagrant_root @vagrantfile_created
locals: _ __ _dir_ _ex_ _file_ _in_ _out_ _pry_
ruby-2.0.0-p451 (#<Kitchen::Driver::Vagrant:0x007f9faa03c4c8>):2 > puts Kitchen::VERSION
1.2.1
@johnbellone
johnbellone / chef-server.rb
Last active August 29, 2015 14:05
Provision Chef Server using a simple Chef Metal recipe.
machine 'chef-server' do
run_list ['chef-server::default']
end
@johnbellone
johnbellone / chef-server.rb
Last active August 29, 2015 14:05
Hydrate a Chef Server with generated keys.
root_path = File.join(File.dirname(__FILE__), '.chef')
chef_data_bag 'clients'
%w(chef-validator blp-validator).each do |name|
key = OpenSSL::PKey::RSA.new IO.read(File.join(root_path, "#{name}.pem"))
chef_data_bag_item name do
data_bag 'clients'
raw_data({
chef_server: {

Keybase proof

I hereby claim:

  • I am johnbellone on github.
  • I am jbellone (https://keybase.io/jbellone) on keybase.
  • I have a public key ASArenNJXaWRd8m10mDOP5UtsXSdbrFvjFlhfxSGHCbOEAo

To claim this, I am signing this object:

target_dir = directory "/root/#{dir}"
node['liquibase_file_paths'].each do |filename|
remote_file "#{target_dir.path}/#{File.basename(filename)}" do
source "file:///#{Chef::Config[:file_cache_path]}"
notifies :run, "execute[liquibase migrate]"
end
end
@johnbellone
johnbellone / service.sh
Created May 28, 2015 20:24
Poise service issue.
* collectd_service[collectd] action enable
* directory[/etc/collectd.d] action create
- change mode from '0744' to '0644'
- restore selinux security context
* yum_package[collectd] action install (up to date)
* poise_service[collectd] action enable
================================================================================
Error executing action `enable` on resource 'poise_service[collectd]'
================================================================================