Advertisement
Guest User

Untitled

a guest
May 15th, 2017
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.88 KB | None | 0 0
  1. $ cat ~/.aws/credentials
  2.  
  3. [packertest]
  4. aws_access_key_id = XXX
  5. aws_secret_access_key = XXX
  6.  
  7. $ aws --profile packertest ec2 describe-availability-zones
  8. {
  9. "AvailabilityZones": [
  10. {
  11. "State": "available",
  12. "RegionName": "us-east-1",
  13. ...
  14.  
  15. $ cat profile.json
  16. {
  17. "builders": [
  18. {
  19. "type": "amazon-ebs",
  20. "profile": "packertest",
  21. "region": "us-east-1",
  22. "vpc_id": "vpc-XXXX",
  23. "subnet_id": "subnet-XXXX",
  24. "source_ami": "ami-XXXX",
  25. "instance_type": "t2.medium",
  26. "ssh_username": "centos",
  27. "ssh_pty": true,
  28. "ssh_private_ip": true,
  29. "ami_name": "profiletest"
  30. }
  31. ]
  32. }$
  33. $
  34. $ PACKER_LOG=1 packer build profile.json
  35. 2017/05/15 17:22:29 [INFO] Packer version: 1.0.0
  36. 2017/05/15 17:22:29 Packer Target OS/Arch: darwin amd64
  37. 2017/05/15 17:22:29 Built with Go Version: go1.8.1
  38. 2017/05/15 17:22:29 Detected home directory from env var: /Users/12345
  39. 2017/05/15 17:22:29 Using internal plugin for amazon-ebssurrogate
  40. 2017/05/15 17:22:29 Using internal plugin for amazon-instance
  41. 2017/05/15 17:22:29 Using internal plugin for cloudstack
  42. 2017/05/15 17:22:29 Using internal plugin for file
  43. 2017/05/15 17:22:29 Using internal plugin for amazon-ebsvolume
  44. 2017/05/15 17:22:29 Using internal plugin for googlecompute
  45. 2017/05/15 17:22:29 Using internal plugin for null
  46. 2017/05/15 17:22:29 Using internal plugin for profitbricks
  47. 2017/05/15 17:22:29 Using internal plugin for vmware-iso
  48. 2017/05/15 17:22:29 Using internal plugin for virtualbox-ovf
  49. 2017/05/15 17:22:29 Using internal plugin for vmware-vmx
  50. 2017/05/15 17:22:29 Using internal plugin for amazon-ebs
  51. 2017/05/15 17:22:29 Using internal plugin for digitalocean
  52. 2017/05/15 17:22:29 Using internal plugin for hyperv-iso
  53. 2017/05/15 17:22:29 Using internal plugin for parallels-iso
  54. 2017/05/15 17:22:29 Using internal plugin for qemu
  55. 2017/05/15 17:22:29 Using internal plugin for parallels-pvm
  56. 2017/05/15 17:22:29 Using internal plugin for triton
  57. 2017/05/15 17:22:29 Using internal plugin for virtualbox-iso
  58. 2017/05/15 17:22:29 Using internal plugin for amazon-chroot
  59. 2017/05/15 17:22:29 Using internal plugin for azure-arm
  60. 2017/05/15 17:22:29 Using internal plugin for docker
  61. 2017/05/15 17:22:29 Using internal plugin for oneandone
  62. 2017/05/15 17:22:29 Using internal plugin for openstack
  63. 2017/05/15 17:22:29 Using internal plugin for salt-masterless
  64. 2017/05/15 17:22:29 Using internal plugin for shell
  65. 2017/05/15 17:22:29 Using internal plugin for shell-local
  66. 2017/05/15 17:22:29 Using internal plugin for ansible-local
  67. 2017/05/15 17:22:29 Using internal plugin for chef-solo
  68. 2017/05/15 17:22:29 Using internal plugin for file
  69. 2017/05/15 17:22:29 Using internal plugin for windows-shell
  70. 2017/05/15 17:22:29 Using internal plugin for windows-restart
  71. 2017/05/15 17:22:29 Using internal plugin for ansible
  72. 2017/05/15 17:22:29 Using internal plugin for converge
  73. 2017/05/15 17:22:29 Using internal plugin for puppet-masterless
  74. 2017/05/15 17:22:29 Using internal plugin for chef-client
  75. 2017/05/15 17:22:29 Using internal plugin for powershell
  76. 2017/05/15 17:22:29 Using internal plugin for puppet-server
  77. 2017/05/15 17:22:29 Using internal plugin for compress
  78. 2017/05/15 17:22:29 Using internal plugin for googlecompute-export
  79. 2017/05/15 17:22:29 Using internal plugin for amazon-import
  80. 2017/05/15 17:22:29 Using internal plugin for shell-local
  81. 2017/05/15 17:22:29 Using internal plugin for vsphere
  82. 2017/05/15 17:22:29 Using internal plugin for vagrant
  83. 2017/05/15 17:22:29 Using internal plugin for artifice
  84. 2017/05/15 17:22:29 Using internal plugin for docker-import
  85. 2017/05/15 17:22:29 Using internal plugin for docker-push
  86. 2017/05/15 17:22:29 Using internal plugin for docker-save
  87. 2017/05/15 17:22:29 Using internal plugin for vagrant-cloud
  88. 2017/05/15 17:22:29 Using internal plugin for atlas
  89. 2017/05/15 17:22:29 Using internal plugin for checksum
  90. 2017/05/15 17:22:29 Using internal plugin for docker-tag
  91. 2017/05/15 17:22:29 Using internal plugin for manifest
  92. 2017/05/15 17:22:29 Detected home directory from env var: /Users/12345
  93. 2017/05/15 17:22:29 Attempting to open config file: /Users/12345/.packerconfig
  94. 2017/05/15 17:22:29 [WARN] Config file doesn't exist: /Users/12345/.packerconfig
  95. 2017/05/15 17:22:29 Packer config: &{DisableCheckpoint:false DisableCheckpointSignature:false PluginMinPort:10000 PluginMaxPort:25000 Builders:map[cloudstack:/usr/local/Cellar/packer/1.0.0/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-cloudstack null:/usr/local/Cellar/packer/1.0.0/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-null profitbricks:/usr/local/Cellar/packer/1.0.0/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-profitbricks virtualbox-ovf:/usr/local/Cellar/packer/1.0.0/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-virtualbox-ovf digitalocean:/usr/local/Cellar/packer/1.0.0/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-digitalocean qemu:/usr/local/Cellar/packer/1.0.0/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-qemu virtualbox-iso:/usr/local/Cellar/packer/1.0.0/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-virtualbox-iso amazon-ebssurrogate:/usr/local/Cellar/packer/1.0.0/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-amazon-ebssurrogate file:/usr/local/Cellar/packer/1.0.0/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-file openstack:/usr/local/Cellar/packer/1.0.0/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-openstack azure-arm:/usr/local/Cellar/packer/1.0.0/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-azure-arm docker:/usr/local/Cellar/packer/1.0.0/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-docker vmware-iso:/usr/local/Cellar/packer/1.0.0/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-vmware-iso vmware-vmx:/usr/local/Cellar/packer/1.0.0/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-vmware-vmx amazon-ebs:/usr/local/Cellar/packer/1.0.0/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-amazon-ebs parallels-iso:/usr/local/Cellar/packer/1.0.0/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-parallels-iso parallels-pvm:/usr/local/Cellar/packer/1.0.0/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-parallels-pvm amazon-instance:/usr/local/Cellar/packer/1.0.0/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-amazon-instance amazon-ebsvolume:/usr/local/Cellar/packer/1.0.0/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-amazon-ebsvolume triton:/usr/local/Cellar/packer/1.0.0/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-triton amazon-chroot:/usr/local/Cellar/packer/1.0.0/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-amazon-chroot oneandone:/usr/local/Cellar/packer/1.0.0/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-oneandone googlecompute:/usr/local/Cellar/packer/1.0.0/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-googlecompute hyperv-iso:/usr/local/Cellar/packer/1.0.0/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-hyperv-iso] PostProcessors:map[googlecompute-export:/usr/local/Cellar/packer/1.0.0/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-googlecompute-export manifest:/usr/local/Cellar/packer/1.0.0/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-manifest amazon-import:/usr/local/Cellar/packer/1.0.0/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-amazon-import vsphere:/usr/local/Cellar/packer/1.0.0/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-vsphere docker-import:/usr/local/Cellar/packer/1.0.0/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-docker-import docker-save:/usr/local/Cellar/packer/1.0.0/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-docker-save vagrant-cloud:/usr/local/Cellar/packer/1.0.0/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-vagrant-cloud compress:/usr/local/Cellar/packer/1.0.0/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-compress atlas:/usr/local/Cellar/packer/1.0.0/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-atlas checksum:/usr/local/Cellar/packer/1.0.0/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-checksum shell-local:/usr/local/Cellar/packer/1.0.0/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-shell-local vagrant:/usr/local/Cellar/packer/1.0.0/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-vagrant artifice:/usr/local/Cellar/packer/1.0.0/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-artifice docker-push:/usr/local/Cellar/packer/1.0.0/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-docker-push docker-tag:/usr/local/Cellar/packer/1.0.0/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-docker-tag] Provisioners:map[shell-local:/usr/local/Cellar/packer/1.0.0/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-shell-local windows-shell:/usr/local/Cellar/packer/1.0.0/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-windows-shell chef-client:/usr/local/Cellar/packer/1.0.0/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-chef-client puppet-server:/usr/local/Cellar/packer/1.0.0/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-puppet-server salt-masterless:/usr/local/Cellar/packer/1.0.0/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-salt-masterless ansible-local:/usr/local/Cellar/packer/1.0.0/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-ansible-local chef-solo:/usr/local/Cellar/packer/1.0.0/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-chef-solo converge:/usr/local/Cellar/packer/1.0.0/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-converge powershell:/usr/local/Cellar/packer/1.0.0/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-powershell shell:/usr/local/Cellar/packer/1.0.0/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-shell file:/usr/local/Cellar/packer/1.0.0/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-file windows-restart:/usr/local/Cellar/packer/1.0.0/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-windows-restart puppet-masterless:/usr/local/Cellar/packer/1.0.0/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-puppet-masterless ansible:/usr/local/Cellar/packer/1.0.0/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-ansible]}
  96. 2017/05/15 17:22:29 Setting cache directory: /Users/12345/git/np-infra/ce-base-nodeploy/packer/packer_cache
  97. 2017/05/15 17:22:29 Detected home directory from env var: /Users/12345
  98. 2017/05/15 17:22:29 Loading builder: amazon-ebs
  99. 2017/05/15 17:22:29 Plugin could not be found. Checking same directory as executable.
  100. 2017/05/15 17:22:29 Current exe path: /usr/local/Cellar/packer/1.0.0/bin/packer
  101. 2017/05/15 17:22:29 Creating plugin client for path: /usr/local/Cellar/packer/1.0.0/bin/packer
  102. 2017/05/15 17:22:29 Starting plugin: /usr/local/Cellar/packer/1.0.0/bin/packer []string{"/usr/local/Cellar/packer/1.0.0/bin/packer", "plugin", "packer-builder-amazon-ebs"}
  103. 2017/05/15 17:22:29 Waiting for RPC address for: /usr/local/Cellar/packer/1.0.0/bin/packer
  104. 2017/05/15 17:22:29 packer: 2017/05/15 17:22:29 [INFO] Packer version: 1.0.0
  105. 2017/05/15 17:22:29 packer: 2017/05/15 17:22:29 Packer Target OS/Arch: darwin amd64
  106. 2017/05/15 17:22:29 packer: 2017/05/15 17:22:29 Built with Go Version: go1.8.1
  107. 2017/05/15 17:22:29 packer: 2017/05/15 17:22:29 Detected home directory from env var: /Users/12345
  108. 2017/05/15 17:22:29 packer: 2017/05/15 17:22:29 Attempting to open config file: /Users/12345/.packerconfig
  109. 2017/05/15 17:22:29 packer: 2017/05/15 17:22:29 [WARN] Config file doesn't exist: /Users/12345/.packerconfig
  110. 2017/05/15 17:22:29 packer: 2017/05/15 17:22:29 Packer config: &{DisableCheckpoint:false DisableCheckpointSignature:false PluginMinPort:10000 PluginMaxPort:25000 Builders:map[] PostProcessors:map[] Provisioners:map[]}
  111. 2017/05/15 17:22:29 packer: 2017/05/15 17:22:29 Setting cache directory: /Users/12345/git/np-infra/ce-base-nodeploy/packer/packer_cache
  112. 2017/05/15 17:22:29 packer: 2017/05/15 17:22:29 Detected home directory from env var: /Users/12345
  113. 2017/05/15 17:22:29 packer: 2017/05/15 17:22:29 args: []string{"packer-builder-amazon-ebs"}
  114. 2017/05/15 17:22:29 packer: 2017/05/15 17:22:29 Plugin minimum port: 10000
  115. 2017/05/15 17:22:29 packer: 2017/05/15 17:22:29 Plugin maximum port: 25000
  116. 2017/05/15 17:22:29 packer: 2017/05/15 17:22:29 Plugin address: unix /var/folders/kh/w11nblhx105d1w928r163pp0_3h46n/T/packer-plugin099279162
  117. 2017/05/15 17:22:29 packer: 2017/05/15 17:22:29 Waiting for connection...
  118. 2017/05/15 17:22:29 packer: 2017/05/15 17:22:29 Serving a plugin connection...
  119. 2017/05/15 17:22:29 ui: amazon-ebs output will be in this color.
  120. 2017/05/15 17:22:29 ui:
  121. 2017/05/15 17:22:29 Build debug mode: false
  122. 2017/05/15 17:22:29 Force build: false
  123. 2017/05/15 17:22:29 On error:
  124. 2017/05/15 17:22:29 Preparing build: amazon-ebs
  125. amazon-ebs output will be in this color.
  126.  
  127. 2017/05/15 17:22:29 packer: 2017/05/15 17:22:29 Config: {PackerConfig:{PackerBuildName:amazon-ebs PackerBuilderType:amazon-ebs PackerDebug:false PackerForce:false PackerOnError: PackerUserVars:map[]} AccessConfig:{AccessKey: SecretKey: RawRegion:us-east-1 SkipValidation:false Token: ProfileName:packertest} AMIConfig:{AMIName:profiletest AMIDescription: AMIVirtType: AMIUsers:[] AMIGroups:[] AMIProductCodes:[] AMIRegions:[] AMISkipRegionValidation:false AMITags:map[] AMIEnhancedNetworking:false AMIForceDeregister:false AMIForceDeleteSnapshot:false AMIEncryptBootVolume:false AMIKmsKeyId: SnapshotTags:map[] SnapshotUsers:[] SnapshotGroups:[]} BlockDevices:{AMIBlockDevices:{AMIMappings:[]} LaunchBlockDevices:{LaunchMappings:[]}} RunConfig:{AssociatePublicIpAddress:false AvailabilityZone: EbsOptimized:false IamInstanceProfile: InstanceType:t2.medium RunTags:map[] SourceAmi:ami-XXXX SourceAmiFilter:{Filters:map[] Owners:[] MostRecent:false} SpotPrice: SpotPriceAutoProduct: DisableStopInstance:false SecurityGroupId: SecurityGroupIds:[] SubnetId:subnet-XXXX TemporaryKeyPairName:packer_591a1c15-b327-a4c9-c92e-2fcad535fbd9 UserData: UserDataFile: WindowsPasswordTimeout:20m0s VpcId:vpc-XXXX InstanceInitiatedShutdownBehavior:stop Comm:{Type:ssh SSHHost: SSHPort:22 SSHUsername:centos SSHPassword: SSHPrivateKey: SSHPty:true SSHTimeout:5m0s SSHAgentAuth:false SSHDisableAgent:false SSHHandshakeAttempts:10 SSHBastionHost: SSHBastionPort:0 SSHBastionUsername: SSHBastionPassword: SSHBastionPrivateKey: SSHFileTransferMethod:scp WinRMUser: WinRMPassword: WinRMHost: WinRMPort:0 WinRMTimeout:0s WinRMUseSSL:false WinRMInsecure:false WinRMTransportDecorator:<nil>} SSHKeyPairName: SSHPrivateIp:true} VolumeRunTags:map[] ctx:{Data:<nil> Funcs:map[clean_ami_name:0x173b950] UserVariables:map[] EnableEnv:false BuildName:amazon-ebs BuildType:amazon-ebs TemplatePath:/Users/12345/git/np-infra/ce-base-nodeploy/packer/profile.json}}
  128. 2017/05/15 17:22:29 Waiting on builds to complete...
  129. 2017/05/15 17:22:29 Starting build run: amazon-ebs
  130. 2017/05/15 17:22:29 Running builder: amazon-ebs
  131. 2017/05/15 17:22:29 ui error: Build 'amazon-ebs' errored: error when getting section: section 'profile packertest' not exists
  132. 2017/05/15 17:22:29 Builds completed. Waiting on interrupt barrier...
  133. 2017/05/15 17:22:29 machine readable: error-count []string{"1"}
  134. 2017/05/15 17:22:29 ui error:
  135. ==> Some builds didn't complete successfully and had errors:
  136. 2017/05/15 17:22:29 machine readable: amazon-ebs,error []string{"error when getting section: section 'profile packertest' not exists"}
  137. 2017/05/15 17:22:29 ui error: --> amazon-ebs: error when getting section: section 'profile packertest' not exists
  138. 2017/05/15 17:22:29 ui:
  139. ==> Builds finished but no artifacts were created.
  140. 2017/05/15 17:22:29 waiting for all plugin processes to complete...
  141. Build 'amazon-ebs' errored: error when getting section: section 'profile packertest' not exists
  142.  
  143. ==> Some builds didn't complete successfully and had errors:
  144. --> amazon-ebs: error when getting section: section 'profile packertest' not exists
  145.  
  146. ==> Builds finished but no artifacts were created.
  147. 2017/05/15 17:22:29 /usr/local/Cellar/packer/1.0.0/bin/packer: plugin process exited
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement