Skip to content

Instantly share code, notes, and snippets.

@tmclaugh
tmclaugh / gist:81f7bca4273f304829fd
Last active August 29, 2015 14:09
Packer - Provisioners
"provisioners":
[
{
"type" : "shell",
"environment_vars" :
[
"os_name=CentOS",
"os_version=6.5"
],
@tmclaugh
tmclaugh / gist:9f605008f76f872d2ed3
Last active August 29, 2015 14:09
Packer - Builders
"builders":
[
{
"type" : "virtualbox-iso",
"boot_command":
[
"<esc>",
" linux ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks/centos65.ks",
"<enter>",
[root@c6 ~]# fdisk -lu mnt/images/aws-paravirt/CentOS-6.5-x86_64-1410576856-paravirt.img
You must set cylinders.
You can do this from the extra functions menu.
Disk mnt/images/aws-paravirt/CentOS-6.5-x86_64-1410576856-paravirt.img: 0 MB, 0 bytes
255 heads, 63 sectors/track, 0 cylinders, total 0 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0002d42f
Vagrant.configure('2') do |config|
config.vm.define "nginx-lb", primary: true do |nginx|
nginx.vm.hostname = 'lb.hubspot.local'
nginx.vm.provision :puppet_server, id: 'default_puppet_server' do |p|
p.puppet_server = "puppetmaster.hubspot.local"
p.options = "--verbose --waitforcert 120"
p.facter = { 'role' => 'hubspot::roles::puppet::role_puppetmaster',
'hs_lb_type' => $hs_lb_type,
'hs_server_names' => $hs_server_names
# -*- mode: ruby -*-
# vi: set ft=ruby :
#
$vg_role = ENV['VG_ROLE'] || "hubspot::roles::role_basenode"
$vg_profile = ENV['VG_PROFILE'] || ''
$inst_home = ENV['VG_INST_HOME'] || File.dirname(__FILE__)
$inst_name = ENV['VG_INST_NAME'] || $inst_home.split(File::SEPARATOR)[-1]
$vm_box = ENV['VG_VM_BOX'] || "CentOS-6.5-x86_64-201407100058"
$hostname = ENV['VG_HOSTNAME'] || "%s.hubspot.local" % $inst_name
@tmclaugh
tmclaugh / gist:fdc9b55b61700df9bcf7
Created August 8, 2014 16:58
vagrant rake wrapper
# Rake wrapper around Vagrant.
#
# The intended usage is as follows
# $ rake vagrant:init[<branch_name>]
#
# This will create a vagrant instance named <branch_name>. It will also
# ensure that the puppet-deploy tree is on the same branch and that Puppet
# librarian has been run.
#
# TODO
@tmclaugh
tmclaugh / gist:f923bcd437d7a3f91cb3
Last active August 14, 2018 20:52
Vagrant file
# -*- mode: ruby -*-
# vi: set ft=ruby :
#
# TODO
# - Current box is broken. Need to remove v.name setting hardcoding the box
# name. This breaks parallelization.
VG_ROLE = ENV['VG_ROLE'] || "hubspot::roles::role_basenode"
INST_HOME = ENV['VG_INST_HOME'] || File.dirname(__FILE__)
INST_NAME = ENV['VG_INST_NAME'] || INST_HOME.split(File::SEPARATOR)[-1]
# Rake wrapper around Vagrant.
#
# The intended usage is as follows
# $ rake vagrant:init[<branch_name>]
#
# This will create a vagrant instance named <branch_name>. It will also
# ensure that the puppet-deploy tree is on the same branch and that Puppet
# librarian has been run.
#
# TODO
puppetVar:
- "hs_environment=qa"
- "creator=tmclaughlin"
- "data_center=iad01"
- "instance_id=i-25d4f74a"
- "tenant=prod"
- "provider=amazon"
- "security_group=default"
- "os=centos6"
- "rack=us-east-1e"
@tmclaugh
tmclaugh / gist:6757162
Created September 29, 2013 22:29
nodejs-npm-registry-client failure.
Error: Package: nodejs-npm-registry-client-0.2.28-1.el6.noarch (epel)
Requires: npm(request) >= 2.25.0
Installing: nodejs-request-2.21.0-1.el6.noarch (epel)
npm(request) = 2.21.0
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest