Skip to content

Instantly share code, notes, and snippets.

@englishm
Last active December 19, 2015 03:28
Show Gist options
  • Save englishm/e12fff3aa975d956e5c7 to your computer and use it in GitHub Desktop.
Save englishm/e12fff3aa975d956e5c7 to your computer and use it in GitHub Desktop.
{
"builders": [{
"type": "amazon-ebs",
"access_key": "REDACTED",
"secret_key": "REDACTED",
"region": "us-east-1",
"source_ami": "ami-de0d9eb7",
"instance_type": "t1.micro",
"ssh_username": "ubuntu",
"ami_name": "packer-example {{.CreateTime}}"
}],
"provisioners": [{
"type": "shell",
"inline": [
"sudo apt-get update",
"cat /etc/apt/sources.list",
"sudo apt-get install -y redis-server"
]
}]
}
$ packer build example.json
amazon-ebs output will be in this color.
==> amazon-ebs: Creating temporary keypair for this instance...
==> amazon-ebs: Creating temporary security group for this instance...
==> amazon-ebs: Authorizing SSH access on the temporary security group...
==> amazon-ebs: Launching a source AWS instance...
==> amazon-ebs: Waiting for instance to become ready...
==> amazon-ebs: Connecting to the instance via SSH...
==> amazon-ebs: Provisioning with shell script: /var/folders/gp/gn1043nx4fn5k3db55x6w9l40000gn/T/packer-shell412891583
Ign http://security.ubuntu.com precise-security InRelease
Get:1 http://security.ubuntu.com precise-security Release.gpg [198 B]
Ign http://archive.ubuntu.com precise InRelease
Get:2 http://security.ubuntu.com precise-security Release [49.6 kB]
Ign http://archive.ubuntu.com precise-updates InRelease
Hit http://archive.ubuntu.com precise Release.gpg%]
Get:3 http://archive.ubuntu.com precise-updates Release.gpg [198 B]
Hit http://archive.ubuntu.com precise Release
Get:4 http://archive.ubuntu.com precise-updates Release [49.6 kB]
Get:5 http://security.ubuntu.com precise-security/main amd64 Packages [295 kB]
Hit http://archive.ubuntu.com precise/main amd64 Packages
Hit http://archive.ubuntu.com precise/restricted amd64 Packages
Hit http://archive.ubuntu.com precise/universe amd64 Packages
Hit http://archive.ubuntu.com precise/multiverse amd64 Packages
Hit http://archive.ubuntu.com precise/main i386 Packages
Hit http://archive.ubuntu.com precise/restricted i386 Packages
Hit http://archive.ubuntu.com precise/universe i386 Packages
Hit http://archive.ubuntu.com precise/multiverse i386 Packages
Hit http://archive.ubuntu.com precise/main TranslationIndex
amazon-ebs: Get:6 http://security.ubuntu.com precise-security/restricted amd64 Packages [4627 B]
Hit http://archive.ubuntu.com precise/multiverse TranslationIndex
amazon-ebs: Get:7 http://security.ubuntu.com precise-security/universe amd64 Packages [77.1 kB]
Get:8 http://security.ubuntu.com precise-security/multiverse amd64 Packages [2182 B]
Get:9 http://security.ubuntu.com precise-security/main i386 Packages [309 kB]
Hit http://archive.ubuntu.com precise/restricted TranslationIndex
Hit http://archive.ubuntu.com precise/universe TranslationIndex
Get:10 http://archive.ubuntu.com precise-updates/main amd64 Packages [644 kB]
Get:11 http://security.ubuntu.com precise-security/restricted i386 Packages [4620 B]
Get:12 http://security.ubuntu.com precise-security/universe i386 Packages [79.8 kB]
Get:13 http://security.ubuntu.com precise-security/multiverse i386 Packages [2367 B]
Get:14 http://security.ubuntu.com precise-security/main TranslationIndex [74 B]
Get:15 http://security.ubuntu.com precise-security/multiverse TranslationIndex [71 B]
Get:16 http://security.ubuntu.com precise-security/restricted TranslationIndex [72 B]
Get:17 http://security.ubuntu.com precise-security/universe TranslationIndex [73 B]
Get:18 http://archive.ubuntu.com precise-updates/restricted amd64 Packages [10.1 kB]
Get:19 http://archive.ubuntu.com precise-updates/universe amd64 Packages [207 kB]
amazon-ebs: Get:20 http://security.ubuntu.com precise-security/main Translation-en [143 kB]
Hit http://security.ubuntu.com precise-security/multiverse Translation-en
Get:21 http://security.ubuntu.com precise-security/restricted Translation-en [1253 B]
Get:22 http://archive.ubuntu.com precise-updates/multiverse amd64 Packages [13.6 kB]
Get:23 http://security.ubuntu.com precise-security/universe Translation-en [49.1 kB]
Get:24 http://archive.ubuntu.com precise-updates/main i386 Packages [662 kB]
Get:25 http://archive.ubuntu.com precise-updates/restricted i386 Packages [10.0 kB]
Get:26 http://archive.ubuntu.com precise-updates/universe i386 Packages [211 kB]
Get:27 http://archive.ubuntu.com precise-updates/multiverse i386 Packages [13.8 kB]
Get:28 http://archive.ubuntu.com precise-updates/main TranslationIndex [3564 B]
Get:29 http://archive.ubuntu.com precise-updates/multiverse TranslationIndex [2605 B]
Get:30 http://archive.ubuntu.com precise-updates/restricted TranslationIndex [2461 B]
Get:31 http://archive.ubuntu.com precise-updates/universe TranslationIndex [2850 B]
Hit http://archive.ubuntu.com precise/main Translation-en
Hit http://archive.ubuntu.com precise/multiverse Translation-en
Hit http://archive.ubuntu.com precise/restricted Translation-en
Hit http://archive.ubuntu.com precise/universe Translation-en
Get:32 http://archive.ubuntu.com precise-updates/main Translation-en [296 kB]
Get:33 http://archive.ubuntu.com precise-updates/multiverse Translation-en [7834 B]
Get:34 http://archive.ubuntu.com precise-updates/restricted Translation-en [2432 B]
Get:35 http://archive.ubuntu.com precise-updates/universe Translation-en [122 kB]
Fetched 3280 kB in 4s (787 kB/s) B] [35 Translat
amazon-ebs:
Reading package lists... Donege lists... 0%
amazon-ebs:
amazon-ebs:
amazon-ebs: ## Note, this file is written by cloud-init on first boot of an instance
amazon-ebs: ## modifications made here will not survive a re-bundle.
amazon-ebs: ## if you wish to make changes you can:
amazon-ebs: ## a.) add 'apt_preserve_sources_list: true' to /etc/cloud/cloud.cfg
amazon-ebs: ## or do the same in user-data
amazon-ebs: ## b.) add sources in /etc/apt/sources.list.d
amazon-ebs: ## c.) make changes to template file /etc/cloud/templates/sources.list.tmpl
amazon-ebs: #
amazon-ebs:
amazon-ebs: # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
amazon-ebs: # newer versions of the distribution.
amazon-ebs: deb http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise main
amazon-ebs: deb-src http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise main
amazon-ebs:
amazon-ebs: ## Major bug fix updates produced after the final release of the
amazon-ebs: ## distribution.
amazon-ebs: deb http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates main
amazon-ebs: deb-src http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates main
amazon-ebs:
amazon-ebs: ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
amazon-ebs: ## team. Also, please note that software in universe WILL NOT receive any
amazon-ebs: ## review or updates from the Ubuntu security team.
amazon-ebs: deb http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise universe
amazon-ebs: deb-src http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise universe
amazon-ebs: deb http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates universe
amazon-ebs: deb-src http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates universe
amazon-ebs:
amazon-ebs: ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
amazon-ebs: ## team, and may not be under a free licence. Please satisfy yourself as to
amazon-ebs: ## your rights to use the software. Also, please note that software in
amazon-ebs: ## multiverse WILL NOT receive any review or updates from the Ubuntu
amazon-ebs: ## security team.
amazon-ebs: # deb http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise multiverse
amazon-ebs: # deb-src http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise multiverse
amazon-ebs: # deb http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates multiverse
amazon-ebs: # deb-src http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates multiverse
amazon-ebs:
amazon-ebs: ## Uncomment the following two lines
==> amazon-ebs: Stopping the source instance...
==> amazon-ebs: Error stopping instance: Get https://ec2.us-east-1.amazonaws.com/?AWSAccessKeyId=REDACTED&Action=StopInstances&InstanceId.1=i-25e67345&Signature=REDACTED&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2013-06-29T05%3A52%3A48Z&Version=2011-12-15: lookup ec2.us-east-1.amazonaws.com: no such host
==> amazon-ebs: Terminating the source AWS instance...
==> amazon-ebs: Error terminating instance, may still be around: Get https://ec2.us-east-1.amazonaws.com/?AWSAccessKeyId=REDACTED&Action=TerminateInstances&InstanceId.1=i-25e67345&Signature=REDACTED&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2013-06-29T05%3A52%3A49Z&Version=2011-12-15: lookup ec2.us-east-1.amazonaws.com: no such host
==> amazon-ebs: Deleting temporary security group...
==> amazon-ebs: Error cleaning up security group. Please delete the group manually: sg-8a01dbe1
==> amazon-ebs: Deleting temporary keypair...
==> amazon-ebs: Error cleaning up keypair. Please delete the key manually: packer 1885f34a3b3a4dda2766b3ffd8ee467c
Build 'amazon-ebs' errored: Error stopping instance: Get https://ec2.us-east-1.amazonaws.com/?AWSAccessKeyId=REDACTED&Action=StopInstances&InstanceId.1=i-25e67345&Signature=REDACTED&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2013-06-29T05%3A52%3A48Z&Version=2011-12-15: lookup ec2.us-east-1.amazonaws.com: no such host
==> Some builds didn't complete successfully and had errors:
--> amazon-ebs: Error stopping instance: Get https://ec2.us-east-1.amazonaws.com/?AWSAccessKeyId=REDACTED&Action=StopInstances&InstanceId.1=i-25e67345&Signature=REDACTED&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2013-06-29T05%3A52%3A48Z&Version=2011-12-15: lookup ec2.us-east-1.amazonaws.com: no such host
==> Builds finished but no artifacts were created.
$
$ packer build example.json
amazon-ebs output will be in this color.
==> amazon-ebs: Creating temporary keypair for this instance...
==> amazon-ebs: Creating temporary security group for this instance...
==> amazon-ebs: Authorizing SSH access on the temporary security group...
==> amazon-ebs: Launching a source AWS instance...
==> amazon-ebs: Waiting for instance to become ready...
==> amazon-ebs: Connecting to the instance via SSH...
==> amazon-ebs: Provisioning with shell script: /var/folders/gp/gn1043nx4fn5k3db55x6w9l40000gn/T/packer-shell677778697
Ign http://security.ubuntu.com precise-security InRelease
Ign http://archive.ubuntu.com precise InRelease
Get:1 http://security.ubuntu.com precise-security Release.gpg [198 B]
Ign http://archive.ubuntu.com precise-updates InRelease
Get:2 http://security.ubuntu.com precise-security Release [49.6 kB]
Hit http://archive.ubuntu.com precise Release.gpgase 14
Get:3 http://archive.ubuntu.com precise-updates Release.gpg [198 B]
Hit http://archive.ubuntu.com precise Release0%] [2 Rel
Get:4 http://archive.ubuntu.com precise-updates Release [49.6 kB]
Get:5 http://security.ubuntu.com precise-security/main amd64 Packages [295 kB]
Hit http://archive.ubuntu.com precise/main amd64 Packages
Hit http://archive.ubuntu.com precise/restricted amd64 Packages
Hit http://archive.ubuntu.com precise/universe amd64 Packages
Hit http://archive.ubuntu.com precise/multiverse amd64 Packages
Hit http://archive.ubuntu.com precise/main i386 Packages
Hit http://archive.ubuntu.com precise/restricted i386 Packages
amazon-ebs: Hit http://archive.ubuntu.com precise/universe i386 Packages
Hit http://archive.ubuntu.com precise/multiverse i386 Packages
Hit http://archive.ubuntu.com precise/main TranslationIndex
Get:6 http://security.ubuntu.com precise-security/restricted amd64 Packages [4627 B]
Hit http://archive.ubuntu.com precise/multiverse TranslationIndex
amazon-ebs: Get:7 http://security.ubuntu.com precise-security/universe amd64 Packages [77.1 kB]
Get:8 http://security.ubuntu.com precise-security/multiverse amd64 Packages [2182 B]
Get:9 http://security.ubuntu.com precise-security/main i386 Packages [309 kB]
Hit http://archive.ubuntu.com precise/restricted TranslationIndex
Hit http://archive.ubuntu.com precise/universe TranslationIndex
Get:10 http://archive.ubuntu.com precise-updates/main amd64 Packages [644 kB]
Get:11 http://security.ubuntu.com precise-security/restricted i386 Packages [4620 B]
Get:12 http://security.ubuntu.com precise-security/universe i386 Packages [79.8 kB]
Get:13 http://security.ubuntu.com precise-security/multiverse i386 Packages [2367 B]
Get:14 http://security.ubuntu.com precise-security/main TranslationIndex [74 B]
Get:15 http://security.ubuntu.com precise-security/multiverse TranslationIndex [71 B]
Get:16 http://security.ubuntu.com precise-security/restricted TranslationIndex [72 B]
Get:17 http://security.ubuntu.com precise-security/universe TranslationIndex [73 B]
Get:18 http://archive.ubuntu.com precise-updates/restricted amd64 Packages [10.1 kB]
amazon-ebs: Get:19 http://security.ubuntu.com precise-security/main Translation-en [143 kB]
Get:20 http://archive.ubuntu.com precise-updates/universe amd64 Packages [207 kB]
Hit http://security.ubuntu.com precise-security/multiverse Translation-en
Get:21 http://security.ubuntu.com precise-security/restricted Translation-en [1253 B]
Get:22 http://security.ubuntu.com precise-security/universe Translation-en [49.1 kB]
Get:23 http://archive.ubuntu.com precise-updates/multiverse amd64 Packages [13.6 kB]
Get:24 http://archive.ubuntu.com precise-updates/main i386 Packages [662 kB]
Get:25 http://archive.ubuntu.com precise-updates/restricted i386 Packages [10.0 kB]
Get:26 http://archive.ubuntu.com precise-updates/universe i386 Packages [211 kB]
Get:27 http://archive.ubuntu.com precise-updates/multiverse i386 Packages [13.8 kB]
Get:28 http://archive.ubuntu.com precise-updates/main TranslationIndex [3564 B]
Get:29 http://archive.ubuntu.com precise-updates/multiverse TranslationIndex [2605 B]
Get:30 http://archive.ubuntu.com precise-updates/restricted TranslationIndex [2461 B]
Get:31 http://archive.ubuntu.com precise-updates/universe TranslationIndex [2850 B]
Hit http://archive.ubuntu.com precise/main Translation-en
Hit http://archive.ubuntu.com precise/multiverse Translation-en
Hit http://archive.ubuntu.com precise/restricted Translation-en
Hit http://archive.ubuntu.com precise/universe Translation-en
Get:32 http://archive.ubuntu.com precise-updates/main Translation-en [296 kB]
Get:33 http://archive.ubuntu.com precise-updates/multiverse Translation-en [7834 B]
Get:34 http://archive.ubuntu.com precise-updates/restricted Translation-en [2432 B]
Get:35 http://archive.ubuntu.com precise-updates/universe Translation-en [122 kB]
Fetched 3280 kB in 5s (627 kB/s) B] [35 Translat
Reading package lists... Donege lists... 0%
amazon-ebs: ## Note, this file is written by cloud-init on first boot of an instance
amazon-ebs: ## modifications made here will not survive a re-bundle.
amazon-ebs: ## if you wish to make changes you can:
amazon-ebs: ## a.) add 'apt_preserve_sources_list: true' to /etc/cloud/cloud.cfg
amazon-ebs: ## or do the same in user-data
amazon-ebs: ## b.) add sources in /etc/apt/sources.list.d
amazon-ebs: ## c.) make changes to template file /etc/cloud/templates/sources.list.tmpl
amazon-ebs: #
amazon-ebs:
amazon-ebs: # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
amazon-ebs: # newer versions of the distribution.
amazon-ebs: deb http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise main
amazon-ebs: deb-src http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise main
amazon-ebs:
amazon-ebs: ## Major bug fix updates produced after the final release of the
amazon-ebs: ## distribution.
amazon-ebs: deb http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates main
amazon-ebs: deb-src http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates main
amazon-ebs:
amazon-ebs: ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
amazon-ebs: ## team. Also, please note that software in universe WILL NOT receive any
amazon-ebs: ## review or updates from the Ubuntu security team.
amazon-ebs: deb http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise universe
amazon-ebs: deb-src http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise universe
amazon-ebs: deb http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates universe
amazon-ebs: deb-src http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates universe
amazon-ebs:
amazon-ebs: ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
amazon-ebs: ## team, and may not be under a free licence. Please satisfy yourself as to
amazon-ebs: ## your rights to use the software. Also, please note that software in
amazon-ebs: ## multiverse WILL NOT receive any review or updates from the Ubuntu
amazon-ebs: ## security team.
amazon-ebs: # deb http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise multiverse
amazon-ebs: # deb-src http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise multiverse
amazon-ebs: # deb http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates multiverse
amazon-ebs: # deb-src http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates multiverse
amazon-ebs:
amazon-ebs: ## Uncomment the following two lines to add software from the 'backports'
amazon-ebs: ## repository.
amazon-ebs: ## N.B. software from this repository may not have been tested as
amazon-ebs: ## extensively as that contained in the main release, although it includes
amazon-ebs: ## newer versions of some applications which may provide useful features.
amazon-ebs: ## Also, please note that software in backports WILL NOT receive any review
amazon-ebs: ## or updates from the Ubuntu security team.
amazon-ebs: # deb http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse
amazon-ebs: # deb-src http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse
amazon-ebs:
amazon-ebs: ## Uncomment the following two lines to add software from Canonical's
amazon-ebs: ## 'partner' repository.
amazon-ebs: ## This software is not part of Ubuntu, but is offered by Canonical and the
amazon-ebs: ## respective vendors as a service to Ubuntu users.
amazon-ebs: # deb http://archive.canonical.com/ubuntu precise partner
amazon-ebs: # deb-src http://archive.canonical.com/ubuntu precise partner
amazon-ebs:
amazon-ebs: deb http://security.ubuntu.com/ubuntu precise-security main
amazon-ebs: deb-src http://security.ubuntu.com/ubuntu precise-security main
amazon-ebs: deb http://security.ubuntu.com/ubuntu precise-security universe
amazon-ebs: deb-src http://security.ubuntu.com/ubuntu precise-security universe
amazon-ebs: # deb http://security.ubuntu.com/ubuntu precise-security multiverse
amazon-ebs: # deb-src http://security.ubuntu.com/ubuntu precise-security multiverse
Reading package lists... Donege lists... 0%
Building dependency tree... 50%ency tree... 0%
Reading state information... Doneormation... 0%
amazon-ebs: The following NEW packages will be installed:
amazon-ebs: redis-server
amazon-ebs: 0 upgraded, 1 newly installed, 0 to remove and 78 not upgraded.
amazon-ebs: Need to get 204 kB of archives.
amazon-ebs: After this operation, 523 kB of additional disk space will be used.
Get:1 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise/universe redis-server amd64 2:2.2.12-1build1 [204 kB]
Fetched 204 kB in 0s (2,372 kB/s)r 0 B/204 kB 0%]
amazon-ebs: Selecting previously unselected package redis-server.
(Reading database ... 47420 files and directories currently installed.)
amazon-ebs: Unpacking redis-server (from .../redis-server_2%3a2.2.12-1build1_amd64.deb) ...
amazon-ebs: Processing triggers for initramfs-tools ...
amazon-ebs: update-initramfs: Generating /boot/initrd.img-3.2.0-38-virtual
amazon-ebs: Processing triggers for ureadahead ...
amazon-ebs: Processing triggers for man-db ...
amazon-ebs: Setting up redis-server (2:2.2.12-1build1) ...
amazon-ebs: Starting redis-server: redis-server.
==> amazon-ebs: Stopping the source instance...
==> amazon-ebs: Waiting for the instance to stop...
==> amazon-ebs: Creating the AMI: packer-example 1372480518
==> amazon-ebs: AMI: ami-1a1c6e73
==> amazon-ebs: Waiting for AMI to become ready...
==> amazon-ebs: Error querying images: The image id '[ami-1a1c6e73]' does not exist (InvalidAMIID.NotFound)
==> amazon-ebs: Terminating the source AWS instance...
==> amazon-ebs: Deleting temporary security group...
==> amazon-ebs: Deleting temporary keypair...
Build 'amazon-ebs' errored: Error querying images: The image id '[ami-1a1c6e73]' does not exist (InvalidAMIID.NotFound)
==> Some builds didn't complete successfully and had errors:
--> amazon-ebs: Error querying images: The image id '[ami-1a1c6e73]' does not exist (InvalidAMIID.NotFound)
==> Builds finished but no artifacts were created.
$
$ packer build example.json
amazon-ebs output will be in this color.
==> amazon-ebs: Creating temporary keypair for this instance...
==> amazon-ebs: Creating temporary security group for this instance...
==> amazon-ebs: Authorizing SSH access on the temporary security group...
==> amazon-ebs: Launching a source AWS instance...
==> amazon-ebs: Waiting for instance to become ready...
==> amazon-ebs: Connecting to the instance via SSH...
==> amazon-ebs: Provisioning with shell script: /var/folders/gp/gn1043nx4fn5k3db55x6w9l40000gn/T/packer-shell017850759
Ign http://security.ubuntu.com precise-security InRelease
Ign http://archive.ubuntu.com precise InRelease
Get:1 http://security.ubuntu.com precise-security Release.gpg [198 B]
Ign http://archive.ubuntu.com precise-updates InRelease
Get:2 http://security.ubuntu.com precise-security Release [49.6 kB]
Hit http://archive.ubuntu.com precise Release.gpgse 0 B
Get:3 http://archive.ubuntu.com precise-updates Release.gpg [198 B]
Hit http://archive.ubuntu.com precise Release0%] [2 Rel
Get:4 http://archive.ubuntu.com precise-updates Release [49.6 kB]
Get:5 http://security.ubuntu.com precise-security/main amd64 Packages [295 kB]
Hit http://archive.ubuntu.com precise/main amd64 Packages
Hit http://archive.ubuntu.com precise/restricted amd64 Packages
Hit http://archive.ubuntu.com precise/universe amd64 Packages
Hit http://archive.ubuntu.com precise/multiverse amd64 Packages
Hit http://archive.ubuntu.com precise/main i386 Packages
Hit http://archive.ubuntu.com precise/restricted i386 Packages
Hit http://archive.ubuntu.com precise/universe i386 Packages
Hit http://archive.ubuntu.com precise/multiverse i386 Packages
Get:6 http://security.ubuntu.com precise-security/restricted amd64 Packages [4627 B]
Hit http://archive.ubuntu.com precise/main TranslationIndex
Get:7 http://security.ubuntu.com precise-security/universe amd64 Packages [77.1 kB]
Hit http://archive.ubuntu.com precise/multiverse TranslationIndex
Get:8 http://security.ubuntu.com precise-security/multiverse amd64 Packages [2182 B]
Hit http://archive.ubuntu.com precise/restricted TranslationIndex
Get:9 http://security.ubuntu.com precise-security/main i386 Packages [309 kB]
Hit http://archive.ubuntu.com precise/universe TranslationIndex
Get:10 http://archive.ubuntu.com precise-updates/main amd64 Packages [644 kB]
Get:11 http://security.ubuntu.com precise-security/restricted i386 Packages [4620 B]
Get:12 http://security.ubuntu.com precise-security/universe i386 Packages [79.8 kB]
Get:13 http://security.ubuntu.com precise-security/multiverse i386 Packages [2367 B]
Get:14 http://security.ubuntu.com precise-security/main TranslationIndex [74 B]
Get:15 http://security.ubuntu.com precise-security/multiverse TranslationIndex [71 B]
Get:16 http://security.ubuntu.com precise-security/restricted TranslationIndex [72 B]
Get:17 http://security.ubuntu.com precise-security/universe TranslationIndex [73 B]
Get:18 http://security.ubuntu.com precise-security/main Translation-en [143 kB]
Get:19 http://archive.ubuntu.com precise-updates/restricted amd64 Packages [10.1 kB]
Get:20 http://archive.ubuntu.com precise-updates/universe amd64 Packages [207 kB]
Hit http://security.ubuntu.com precise-security/multiverse Translation-en
Get:21 http://security.ubuntu.com precise-security/restricted Translation-en [1253 B]
Get:22 http://security.ubuntu.com precise-security/universe Translation-en [49.1 kB]
Get:23 http://archive.ubuntu.com precise-updates/multiverse amd64 Packages [13.6 kB]
Get:24 http://archive.ubuntu.com precise-updates/main i386 Packages [662 kB]
Get:25 http://archive.ubuntu.com precise-updates/restricted i386 Packages [10.0 kB]
Get:26 http://archive.ubuntu.com precise-updates/universe i386 Packages [211 kB]
Get:27 http://archive.ubuntu.com precise-updates/multiverse i386 Packages [13.8 kB]
Get:28 http://archive.ubuntu.com precise-updates/main TranslationIndex [3564 B]
Get:29 http://archive.ubuntu.com precise-updates/multiverse TranslationIndex [2605 B]
Get:30 http://archive.ubuntu.com precise-updates/restricted TranslationIndex [2461 B]
Get:31 http://archive.ubuntu.com precise-updates/universe TranslationIndex [2850 B]
Get:32 http://archive.ubuntu.com precise/main Translation-en [726 kB]
Get:33 http://archive.ubuntu.com precise/multiverse Translation-en [93.4 kB]
Get:34 http://archive.ubuntu.com precise/restricted Translation-en [2395 B]
Get:35 http://archive.ubuntu.com precise/universe Translation-en [3341 kB]
Get:36 http://archive.ubuntu.com precise-updates/main Translation-en [296 kB]
Get:37 http://archive.ubuntu.com precise-updates/multiverse Translation-en [7834 B]
Get:38 http://archive.ubuntu.com precise-updates/restricted Translation-en [2432 B]
Get:39 http://archive.ubuntu.com precise-updates/universe Translation-en [122 kB]
Fetched 7442 kB in 10s (694 kB/s) bzip2 0 B] [39 T
Reading package lists... Donege lists... 0%
amazon-ebs: ## Note, this file is written by cloud-init on first boot of an instance
amazon-ebs: ## modifications made here will not survive a re-bundle.
amazon-ebs: ## if you wish to make changes you can:
amazon-ebs: ## a.) add 'apt_preserve_sources_list: true' to /etc/cloud/cloud.cfg
amazon-ebs: ## or do the same in user-data
amazon-ebs: ## b.) add sources in /etc/apt/sources.list.d
amazon-ebs: ## c.) make changes to template file /etc/cloud/templates/sources.list.tmpl
amazon-ebs: #
amazon-ebs:
amazon-ebs: # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
amazon-ebs: # newer versions of the distribution.
amazon-ebs: deb http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise main
amazon-ebs: deb-src http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise main
amazon-ebs:
amazon-ebs: ## Major bug fix updates produced after the final release of the
amazon-ebs: ## distribution.
amazon-ebs: deb http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates main
amazon-ebs: deb-src http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates main
amazon-ebs:
amazon-ebs: ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
amazon-ebs: ## team. Also, please note that software in universe WILL NOT receive any
amazon-ebs: ## review or updates from the Ubuntu security team.
amazon-ebs: deb http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise universe
amazon-ebs: deb-src http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise universe
amazon-ebs: deb http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates universe
amazon-ebs: deb-src http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates universe
amazon-ebs:
amazon-ebs: ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
amazon-ebs: ## team, and may not be under a free licence. Please satisfy yourself as to
amazon-ebs: ## your rights to use the software. Also, please note that software in
amazon-ebs: ## multiverse WILL NOT receive any review or updates from the Ubuntu
amazon-ebs: ## security team.
amazon-ebs: # deb http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise multiverse
amazon-ebs: # deb-src http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise multiverse
amazon-ebs: # deb http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates multiverse
amazon-ebs: # deb-src http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates multiverse
amazon-ebs:
amazon-ebs: ## Uncomment the following two lines to add software from the 'backports'
amazon-ebs: ## repository.
amazon-ebs: ## N.B. software from this repository may not have been tested as
amazon-ebs: ## extensively as that contained in the main release, although it includes
amazon-ebs: ## newer versions of some applications which may provide useful features.
amazon-ebs: ## Also, please note that software in backports WILL NOT receive any review
amazon-ebs: ## or updates from the Ubuntu security team.
amazon-ebs: # deb http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse
amazon-ebs: # deb-src http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse
amazon-ebs:
amazon-ebs: ## Uncomment the following two lines to add software from Canonical's
amazon-ebs: ## 'partner' repository.
amazon-ebs: ## This software is not part of Ubuntu, but is offered by Canonical and the
amazon-ebs: ## respective vendors as a service to Ubuntu users.
amazon-ebs: # deb http://archive.canonical.com/ubuntu precise partner
amazon-ebs: # deb-src http://archive.canonical.com/ubuntu precise partner
amazon-ebs:
amazon-ebs: deb http://security.ubuntu.com/ubuntu precise-security main
amazon-ebs: deb-src http://security.ubuntu.com/ubuntu precise-security main
amazon-ebs: deb http://security.ubuntu.com/ubuntu precise-security universe
amazon-ebs: deb-src http://security.ubuntu.com/ubuntu precise-security universe
amazon-ebs: # deb http://security.ubuntu.com/ubuntu precise-security multiverse
amazon-ebs: # deb-src http://security.ubuntu.com/ubuntu precise-security multiverse
Reading package lists... Donege lists... 0%
Building dependency tree... 50%ency tree... 0%
Reading state information... Doneormation... 0%
amazon-ebs: E: Unable to locate package redis-server
==> amazon-ebs: Terminating the source AWS instance...
==> amazon-ebs: Deleting temporary security group...
==> amazon-ebs: Deleting temporary keypair...
Build 'amazon-ebs' errored: Script exited with non-zero exit status: 100
==> Some builds didn't complete successfully and had errors:
--> amazon-ebs: Script exited with non-zero exit status: 100
==> Builds finished but no artifacts were created.
$
$ packer build example.json
amazon-ebs output will be in this color.
==> amazon-ebs: Creating temporary keypair for this instance...
==> amazon-ebs: Creating temporary security group for this instance...
==> amazon-ebs: Authorizing SSH access on the temporary security group...
==> amazon-ebs: Launching a source AWS instance...
==> amazon-ebs: Waiting for instance to become ready...
==> amazon-ebs: Connecting to the instance via SSH...
==> amazon-ebs: Provisioning with shell script: /var/folders/gp/gn1043nx4fn5k3db55x6w9l40000gn/T/packer-shell747059119
Ign http://security.ubuntu.com precise-security InRelease
Ign http://archive.ubuntu.com precise InRelease
Get:1 http://security.ubuntu.com precise-security Release.gpg [198 B]
Ign http://archive.ubuntu.com precise-updates InRelease
Get:2 http://security.ubuntu.com precise-security Release [49.6 kB]
Hit http://archive.ubuntu.com precise Release.gpgase 14
Get:3 http://archive.ubuntu.com precise-updates Release.gpg [198 B]
==> amazon-ebs: Terminating the source AWS instance...
==> amazon-ebs: Deleting temporary security group...
==> amazon-ebs: Deleting temporary keypair...
Build 'amazon-ebs' errored: Script exited with non-zero exit status: 100
==> Some builds didn't complete successfully and had errors:
--> amazon-ebs: Script exited with non-zero exit status: 100
==> Builds finished but no artifacts were created.
$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment