Commit 817822ab authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

Amazon builder

parent 41f77eb3
all:
@mkdir -p bin/
go get
go build -o bin/packer
go get -a
go build -a -o bin/packer
.PHONY: all
package amazon
type config struct {
AccessKey string
Region string
SecretKey string
SourceAmi string
}
type Builder struct {
config config
}
func (*Builder) Prepare() {
}
func (*Builder) Build() {
}
func (*Builder) Destroy() {
}
name = "my-custom-image"
[builder.amazon-ebs]
region = "us-east-1"
source = "ami-de0d9eb7"
[provision]
[provision.shell]
type = "shell"
path = "script.sh"
[output]
[output.vagrant]
// This is the main package for the `packer` application.
package main
import "github.com/mitchellh/packer/builder/amazon"
// A command is a runnable sub-command of the `packer` application.
// When `packer` is called with the proper subcommand, this will be
// called.
......@@ -22,10 +24,21 @@ type Environment struct {
commands map[string]Command
}
type Template struct {
Name string
Builders map[string]interface{} `toml:"builder"`
Provisioners map[string]interface{} `toml:"provision"`
Outputs map[string]interface{} `toml:"output"`
}
type Builder interface {
Prepare()
Build()
Destroy()
}
func main() {
env := Environment {
commands: map[string]Command {
""
},
}
var builder Builder
builder = &amazon.Builder{}
builder.Build()
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment