Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
packer
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kristopher Ruzic
packer
Commits
0a76d073
Commit
0a76d073
authored
Jul 20, 2013
by
Mitchell Hashimoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
builder/amazon: provision on instance
parent
2f9840a4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
builder/amazon/common/ssh.go
builder/amazon/common/ssh.go
+5
-0
builder/amazon/instance/builder.go
builder/amazon/instance/builder.go
+1
-0
No files found.
builder/amazon/common/ssh.go
View file @
0a76d073
...
...
@@ -7,6 +7,8 @@ import (
"github.com/mitchellh/packer/communicator/ssh"
)
// SSHAddress returns a function that can be given to the SSH communicator
// for determining the SSH address based on the instance DNS name.
func
SSHAddress
(
port
int
)
func
(
map
[
string
]
interface
{})
(
string
,
error
)
{
return
func
(
state
map
[
string
]
interface
{})
(
string
,
error
)
{
instance
:=
state
[
"instance"
]
.
(
*
ec2
.
Instance
)
...
...
@@ -14,6 +16,9 @@ func SSHAddress(port int) func(map[string]interface{}) (string, error) {
}
}
// SSHConfig returns a function that can be used for the SSH communicator
// config for connecting to the instance created over SSH using the generated
// private key.
func
SSHConfig
(
username
string
)
func
(
map
[
string
]
interface
{})
(
*
gossh
.
ClientConfig
,
error
)
{
return
func
(
state
map
[
string
]
interface
{})
(
*
gossh
.
ClientConfig
,
error
)
{
privateKey
:=
state
[
"privateKey"
]
.
(
string
)
...
...
builder/amazon/instance/builder.go
View file @
0a76d073
...
...
@@ -84,6 +84,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
SSHConfig
:
awscommon
.
SSHConfig
(
b
.
config
.
SSHUsername
),
SSHWaitTimeout
:
b
.
config
.
SSHTimeout
(),
},
&
common
.
StepProvision
{},
}
// Run!
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment