Revert "add boot volume to builder instance"

This reverts commit cbce7b42079d2087bc622fd8c6f65d1339b735d1.
This commit is contained in:
Matthew Hooker 2018-09-07 14:45:25 -07:00
parent 2febfa2c7d
commit b3ffa975c3
No known key found for this signature in database
GPG Key ID: 7B5F933D9CE8C6A1
2 changed files with 2 additions and 14 deletions

View File

@ -81,12 +81,6 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
sourceImageList: b.config.SourceImageList, sourceImageList: b.config.SourceImageList,
bootable: true, bootable: true,
}, },
&stepCreatePersistentVolume{
volumeSize: fmt.Sprintf("%d", b.config.PersistentVolumeSize),
volumeName: fmt.Sprintf("builder-boot_%s", runID),
sourceImageList: b.config.SourceImageList,
bootable: true,
},
&stepCreatePersistentVolume{ &stepCreatePersistentVolume{
volumeSize: fmt.Sprintf("%d", b.config.PersistentVolumeSize*2), volumeSize: fmt.Sprintf("%d", b.config.PersistentVolumeSize*2),
volumeName: fmt.Sprintf("builder-storage_%s", runID), volumeName: fmt.Sprintf("builder-storage_%s", runID),
@ -114,7 +108,6 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
name: fmt.Sprintf("builder-instance_%s", runID), name: fmt.Sprintf("builder-instance_%s", runID),
masterVolumeName: fmt.Sprintf("master-storage_%s", runID), masterVolumeName: fmt.Sprintf("master-storage_%s", runID),
builderVolumeName: fmt.Sprintf("builder-storage_%s", runID), builderVolumeName: fmt.Sprintf("builder-storage_%s", runID),
builderBootName: fmt.Sprintf("builder-boot_%s", runID),
}, },
&communicator.StepConnect{ &communicator.StepConnect{
Config: &b.config.Comm, Config: &b.config.Comm,

View File

@ -14,7 +14,6 @@ type stepCreatePVBuilder struct {
name string name string
masterVolumeName string masterVolumeName string
builderVolumeName string builderVolumeName string
builderBootName string
} }
func (s *stepCreatePVBuilder) Run(_ context.Context, state multistep.StateBag) multistep.StepAction { func (s *stepCreatePVBuilder) Run(_ context.Context, state multistep.StateBag) multistep.StepAction {
@ -42,15 +41,11 @@ func (s *stepCreatePVBuilder) Run(_ context.Context, state multistep.StateBag) m
}, },
Storage: []compute.StorageAttachmentInput{ Storage: []compute.StorageAttachmentInput{
{ {
Volume: s.builderBootName, Volume: s.builderVolumeName,
Index: 1, Index: 1,
}, },
{
Volume: s.builderVolumeName,
Index: 2,
}, },
}, ImageList: config.SourceImageList,
BootOrder: []int{1},
Attributes: config.attribs, Attributes: config.attribs,
SSHKeys: []string{config.Comm.SSHKeyPairName}, SSHKeys: []string{config.Comm.SSHKeyPairName},
} }