Name: bosh-aws-light-stemcell-builder
Owner: Cloud Foundry
Description: Builds light stemcells for AWS from a "full" bosh stemcell
Created: 2015-11-24 00:50:20.0
Updated: 2018-05-23 23:55:42.0
Pushed: 2018-05-24 03:25:20.0
Homepage: null
Size: 16557
Language: Go
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This tool takes a raw machine image and a configuration file and creates a collection of AMIs. Any AWS region including China is supported.
light-stemcells-for-project-XXX
)builder-policy.json
esource": [
"arn:aws:s3:::<disk-image-file-bucket>",
"arn:aws:s3:::<disk-image-file-bucket>/*"
"arn:aws:s3:::light-stemcells-for-project-XXX",
"arn:aws:s3:::light-stemcells-for-project-XXX/*"
Note: The arn for AWS GovCloud region is aws-us-gov
. It looks like this: "arn:aws-us-gov:s3:::<disk-image-file-bucket>"
vmimport
AWS role as detailed here, specifying the previously created bucket in place of <disk-image-file-bucket>
; see example IAM policy.integration-test-policy.json
Unit testing:
go -r --skipPackage driver,integration
Example config:
mi_configuration": {
"description": "Your description here",
"virtualization_type": "hvm",
"visibility": "public"
mi_regions": [
{
"name": "us-east-1",
"credentials": {
"access_key": "US_ACCESS_KEY_ID",
"secret_key": "US_ACCESS_SECRET_KEY"
},
"bucket_name": "US_BUCKET_NAME",
"destinations": ["us-west-1", "us-west-2"]
},
{
"name": "cn-north-1",
"credentials": {
"access_key": "CN_ACCESS_KEY_ID",
"secret_key": "CN_ACCESS_SECRET_KEY"
},
"bucket_name": "CN_BUCKET_NAME"
}
Usage:
ght-stemcell-builder -c config.json --image root.img --manifest stemcell.MF > updated-stemcell.MF
Example Output:
: bosh-aws-xen-hvm-ubuntu-trusty-go_agent
ion: "3202"
_protocol: "1"
: f0c10bb5e8b7fee9c29db15bbb4ae481e398eab6
ating_system: ubuntu-trusty
cell_formats:
s-light
d_properties:
i:
cn-north-1: ami-69ae6504
us-east-1: ami-e62f158c
us-west-1: ami-947e0df4
us-west-2: ami-54328238
If the vmimport
role is not present, you will receive this error from the light stemcell builder:
Error publishing AMIs to us-east-1: creating snapshot: creating import snapshot task: InvalidParameter: The sevice role
does not exist or does not have sufficient permissions for the service to continue status code: 400, request id: