cleanup
This commit is contained in:
parent
6f729d0265
commit
86f6cf478a
|
@ -21,6 +21,11 @@ type PVConfig struct {
|
||||||
/* TODO:
|
/* TODO:
|
||||||
some way to choose which connection to use for master
|
some way to choose which connection to use for master
|
||||||
possible ignore everything for builder and always use SSH keys
|
possible ignore everything for builder and always use SSH keys
|
||||||
|
* Documentation
|
||||||
|
* Configuration (master/builder images & entry, destination stuff, etc)
|
||||||
|
* Image entry for both master/builder
|
||||||
|
https://github.com/hashicorp/packer/issues/6833
|
||||||
|
* split master/builder image/connection config. i.e. build anything, master only linux
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,43 +27,20 @@ func (s *stepCreateImage) Run(_ context.Context, state multistep.StateBag) multi
|
||||||
Description: "Packer generated TODO",
|
Description: "Packer generated TODO",
|
||||||
// The three-part name of the object
|
// The three-part name of the object
|
||||||
Name: config.ImageName,
|
Name: config.ImageName,
|
||||||
// image_file.tar.gz, where image_file is the .tar.gz name of the machine image file that you have uploaded to Oracle Cloud Infrastructure Object Storage Classic.
|
// image_file.tar.gz, where image_file is the .tar.gz name of the
|
||||||
|
// machine image file that you have uploaded to Oracle Cloud
|
||||||
|
// Infrastructure Object Storage Classic.
|
||||||
File: imageFile,
|
File: imageFile,
|
||||||
}
|
}
|
||||||
log.Printf("CreateMachineImageInput: %+v", createMI)
|
|
||||||
mi, err := machineImageClient.CreateMachineImage(createMI)
|
mi, err := machineImageClient.CreateMachineImage(createMI)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
err = fmt.Errorf("Error creating machine image: %s, %+v", err, mi)
|
err = fmt.Errorf("Error creating machine image: %s", err)
|
||||||
ui.Error(err.Error())
|
ui.Error(err.Error())
|
||||||
state.Put("error", err)
|
state.Put("error", err)
|
||||||
return multistep.ActionHalt
|
return multistep.ActionHalt
|
||||||
}
|
}
|
||||||
log.Printf("Registered machine image: %+v", mi)
|
log.Println("Registered machine image.")
|
||||||
state.Put("machine_image", mi.Name)
|
state.Put("machine_image", mi.Name)
|
||||||
/*
|
|
||||||
Registered machine image: &{
|
|
||||||
Account:/Compute-ptstest/cloud_storage
|
|
||||||
Attributes:map[]
|
|
||||||
Audited:
|
|
||||||
Description:Packer generated TODO
|
|
||||||
ErrorReason: Hypervisor:map[mode:hvm]
|
|
||||||
ImageFormat:raw
|
|
||||||
File:mwhooker_test_1539898463.tar.gz
|
|
||||||
Name:mwhooker_test_1539898463
|
|
||||||
NoUpload:true
|
|
||||||
Platform:linux
|
|
||||||
Sizes:map[uploaded:5.79793509e+08 total:5.79793509e+08 decompressed:1.610612736e+10]
|
|
||||||
State:available
|
|
||||||
URI:https://api-z61.compute.us6.oraclecloud.com/machineimage/Compute-ptstest/mhooker%40hashicorp.com/mwhooker_test_1539898463
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
/* TODO:
|
|
||||||
* Documentation
|
|
||||||
* Configuration (master/builder images & entry, destination stuff, etc)
|
|
||||||
* Image entry for both master/builder
|
|
||||||
https://github.com/hashicorp/packer/issues/6833
|
|
||||||
* split master/builder image/connection config. i.e. build anything, master only linux
|
|
||||||
*/
|
|
||||||
|
|
||||||
return multistep.ActionContinue
|
return multistep.ActionContinue
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue