Skip to content

cppforlife/packer-bosh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BOSH provisioner for Packer

BOSH provisioner allows to provision VM by specifying regular BOSH deployment manifest.

You might also be interested in vagrant-bosh.

Usage

  1. Run go get github.com/cppforlife/packer-bosh to download packer-bosh. Make sure to run git submodule update --init from inside packer-bosh directory.

  2. Configure Packer's $HOME/.packerconfig to know about packer-bosh executable:

{
  "provisioners": {
    "packer-bosh": "/your-bin-dir/packer-bosh"
  }
}

See Packer core configuration for more details on how to configure custom provisioners.

  1. Add new provisioning step to your template.json. For example:
{
  ...

  "provisioners": [{
    "type": "packer-bosh",
    "manifest_path": "example-bosh-lite-manifest.yml",
    "assets_dir": "/your-go-dir/src/github.com/cppforlife/packer-bosh/bosh-provisioner/assets",
    "ssh_password": "ubuntu"
  }]
}

See dev/template-vbox-*.json for example using VirtualBox.

  1. Create a deployment manifest and specify it via manifest_path option. See dev/example-bosh-manifest.yml for an example deployment manifest used to deploy BOSH Director with BOSH Warden CPI.

  2. Run packer build to build a VM

Provisioner options

  • manifest_path (String, default: nil) must contain a local path to a full BOSH deployment manifest (unless remote_manifest_path is provided)

  • remote_manifest_path (String, default: nil)

    • if manifest_path is not provided, a manifest must be present at remote_manifest_path
    • if manifest_path is also provided, it will be uploaded to remote_manifest_path instead of the default location
  • assets_dir (String, default: nil) should contain path to directory with bosh-provisioner assets

  • ssh_password (String, default: nil) should contain password of SSH user to run sudo; can be empty if password-less sudo is configured

  • full_stemcell_compatibility (Boolean, default: false) forces provisioner to install all (not just minimum) dependencies usually found on a stemcell

  • agent_infrastructure (String, default: warden) configures BOSH Agent infrastructure (e.g. aws, openstack)

  • agent_platform (String, default: ubuntu) configures BOSH Agent platform (e.g. ubuntu, centos)

  • agent_configuration (Hash, default: '{ ... }')

Using provisioner to build BOSH stemcells

See building AWS Stemcell.

About

BOSH provisioner for Packer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages