Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Solaris 11 Base Box
MSOSUG 18th Feb 2014
Alan Chalmers
http://resilvered.blogspot.com.au/
@bigal

Wednesday, 19 February 1...
Vagrant
• a tool for building and distributing working
environments

• development started in 2010
• wrapper around virtua...
Base Box
• A basic unit of OS for Vagrant
• http://www.vagrantbox.es/ + others

Wednesday, 19 February 14
Vagrant anatomy
Vagrant File

Wednesday, 19 February 14

Vagrant File

Project VM

Vagrant File

Base box

Project VM

Pro...
Packer

vmware

and more

virtual box

amazon web

services

•

Packer is a tool for creating identical
machine images for...
Packer File
• json
• Builders
• Provisioners
• Post Processors
Wednesday, 19 February 14
builder
{
	
  	
  "builders":	
  [
	
  	
  	
  	
  {
	
  	
  	
  	
  	
  	
  "boot_command":	
  [	
  boot	
  command	
  go...
builder
	
  	
  	
  	
  	
  "vboxmanage":	
  [
	
  	
  	
  	
  	
  	
  	
  	
  [
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  "...
builder
"boot_command":	
  [
	
  	
  	
  	
  	
  	
  	
  	
  "27<enter><wait>",
	
  	
  	
  	
  	
  	
  	
  	
  "3<enter><...
provisioner
	
  	
  "provisioners":	
  [
	
  	
  	
  	
  {
	
   	
   	
   	
   	
   	
   "execute_command":	
   "echo	
   ...
post-processor

	
  	
  "post-­‐processors":	
  [
	
  	
  	
  	
  {
	
  	
  	
  	
  	
  	
  "compression_level":	
  9,
	
 ...
packer build
packer build -only=virtualbox-iso solaris11.json

Wednesday, 19 February 14
Quick Demo
• Questions to @bigal
• http://resilvered.blogspot.com.au/
• https://github.com/Alanc-au/packer

Wednesday, 19 ...
Upcoming SlideShare
Loading in …5
×

Solaris 11 base box for Vagrant using Packer

1,872 views

Published on

Solaris 11 base box for Vagrant using Packer.

Published in: Technology
  • Be the first to comment

Solaris 11 base box for Vagrant using Packer

  1. 1. Solaris 11 Base Box MSOSUG 18th Feb 2014 Alan Chalmers http://resilvered.blogspot.com.au/ @bigal Wednesday, 19 February 14
  2. 2. Vagrant • a tool for building and distributing working environments • development started in 2010 • wrapper around virtualbox • supports additional hypervisors or providers • https://www.vagrantup.com/ Wednesday, 19 February 14
  3. 3. Base Box • A basic unit of OS for Vagrant • http://www.vagrantbox.es/ + others Wednesday, 19 February 14
  4. 4. Vagrant anatomy Vagrant File Wednesday, 19 February 14 Vagrant File Project VM Vagrant File Base box Project VM Project VM
  5. 5. Packer vmware and more virtual box amazon web services • Packer is a tool for creating identical machine images for multiple platforms from a single source configuration. • www.packer.io Wednesday, 19 February 14
  6. 6. Packer File • json • Builders • Provisioners • Post Processors Wednesday, 19 February 14
  7. 7. builder {    "builders":  [        {            "boot_command":  [  boot  command  goes  here]            "boot_wait":  "95s",            "disk_size":  40960,            "guest_os_type":  "OpenSolaris_64",            "iso_checksum":  "1d0efbffe1b194959c1a3d3c8b8d801411c54278",            "iso_checksum_type":  "sha1",            "iso_url":  "file:///ISO/Oracle/sol-­‐11_1-­‐text-­‐x86.iso",            "output_directory":  "packer-­‐solaris11-­‐virtualbox",            "shutdown_command":  "sudo  /usr/sbin/shutdown  -­‐g  0  -­‐y  -­‐i  5",            "ssh_password":  "1vagrant",            "ssh_port":  22,            "ssh_username":  "vagrant",            "type":  "virtualbox-­‐iso",   Wednesday, 19 February 14
  8. 8. builder          "vboxmanage":  [                [                    "modifyvm",                    "{{.Name}}",                    "-­‐-­‐memory",                    "1024"                ],                [                    "modifyvm",                    "{{.Name}}",                    "-­‐-­‐cpus",                    "1"                ]            ],            "virtualbox_version_file":  ".vbox_version",            "vm_name":  "packer-­‐solaris-­‐11"        } }   Wednesday, 19 February 14
  9. 9. builder "boot_command":  [                "27<enter><wait>",                "3<enter><wait10>",                "<wait10><wait10><wait10><wait10><wait10>",                "1<enter><wait10><wait10>",                "<f2><wait><wait><wait>",                "<f2><wait>",                "<f2><wait>",                "<f2><wait>",                "-­‐vagrant<wait><tab>",                "<f2><wait>",                "<tab><tab><tab><tab><tab><tab><tab><wait>",                "<f2><wait>", . .                "vagrant<enter><wait>",                "1vagrant<enter><wait>",                "sudo  bash<enter><wait>",        "1vagrant<enter><wait>",                "echo  'vagrant  ALL=(ALL)  NOPASSWD:  ALL'  >>  /etc/sudoers<enter><wait>",         "/usr/gnu/bin/sed   -­‐i   's/^.*requiretty/#Defaults   requiretty/'   /etc/ sudoers<enter><wait>",                "exit<enter><wait>"            ], Wednesday, 19 February 14
  10. 10. provisioner    "provisioners":  [        {             "execute_command":   "echo   'vagrant'  |   {{.Vars}}   sudo   -­‐S   -­‐E   bash  '{{.Path}}'",            "scripts":  [                "scripts/solaris/vmtools.sh",                "scripts/solaris/postinstall.sh"            ],            "type":  "shell"        }    ] Wednesday, 19 February 14
  11. 11. post-processor    "post-­‐processors":  [        {            "compression_level":  9,            "output":  "../builds/{{.Provider}}/solaris11.box",            "type":  "vagrant"        }    ], Wednesday, 19 February 14
  12. 12. packer build packer build -only=virtualbox-iso solaris11.json Wednesday, 19 February 14
  13. 13. Quick Demo • Questions to @bigal • http://resilvered.blogspot.com.au/ • https://github.com/Alanc-au/packer Wednesday, 19 February 14

×