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
026175e6
Commit
026175e6
authored
Aug 16, 2013
by
Mitchell Hashimoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
website: document handling reboots
parent
5963756c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
website/source/docs/provisioners/shell.html.markdown
website/source/docs/provisioners/shell.html.markdown
+20
-0
No files found.
website/source/docs/provisioners/shell.html.markdown
View file @
026175e6
...
...
@@ -107,3 +107,23 @@ defines certain commonly useful environmental variables:
*
`PACKER_BUILDER_TYPE`
is the type of the builder that was used to create
the machine that the script is running on. This is useful if you want to
run only certain parts of the script on systems built with certain builders.
## Handling Reboots
Provisioning sometimes involves restarts, usually when updating the operating
system. Packer is able to tolerate restarts via the shell provisioner.
Packer handles this by retrying to start scripts for a period of time
before failing. This allows time for the machine to start up and be ready
to run scripts. The amount of time the provisioner will wait is configured
using
`start_retry_timeout`
, which defaults to a few minutes.
Sometimes, when executing a command like
`reboot`
, the shell script will
return and Packer will start executing the next one before SSH actually
quits and the machine restarts. For this, put a long
`sleep`
after the
reboot so that SSH will eventually be killed automatically:
```
reboot
sleep 60
```
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