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
1055f470
Commit
1055f470
authored
Dec 13, 2013
by
Mitchell Hashimoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
builder/googlecompute: enable SSH
parent
a72d31fb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
builder/googlecompute/builder.go
builder/googlecompute/builder.go
+3
-2
builder/googlecompute/ssh.go
builder/googlecompute/ssh.go
+2
-0
No files found.
builder/googlecompute/builder.go
View file @
1055f470
...
...
@@ -4,6 +4,7 @@ package googlecompute
import
(
"log"
"time"
"github.com/mitchellh/multistep"
"github.com/mitchellh/packer/common"
...
...
@@ -51,13 +52,13 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
new
(
StepCreateSSHKey
),
new
(
StepCreateInstance
),
new
(
StepInstanceInfo
),
}
/*
&
common
.
StepConnectSSH
{
SSHAddress
:
sshAddress
,
SSHConfig
:
sshConfig
,
SSHWaitTimeout
:
5
*
time
.
Minute
,
},
}
/*
new(common.StepProvision),
new(stepUpdateGsutil),
new(stepCreateImage),
...
...
builder/googlecompute/ssh.go
View file @
1055f470
...
...
@@ -24,9 +24,11 @@ func sshConfig(state multistep.StateBag) (*gossh.ClientConfig, error) {
if
err
:=
keyring
.
AddPEMKey
(
privateKey
);
err
!=
nil
{
return
nil
,
fmt
.
Errorf
(
"Error setting up SSH config: %s"
,
err
)
}
sshConfig
:=
&
gossh
.
ClientConfig
{
User
:
config
.
SSHUsername
,
Auth
:
[]
gossh
.
ClientAuth
{
gossh
.
ClientAuthKeyring
(
keyring
)},
}
return
sshConfig
,
nil
}
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