Commit Graph

346 Commits

Author SHA1 Message Date
Cheng Sun
acd16bb984 Make HIMN IP finding and ping interruptible 2014-12-09 16:32:37 +00:00
Cheng Sun
c75b4555cc Make boot_wait interruptible 2014-12-09 16:32:37 +00:00
Cheng Sun
ba7c5ddcd2 interruptible_wait: allow nil Predicate
Allow for the case where InterruptibleWait is used purely for the
timeout.
See the documentation string for details.
2014-12-09 16:32:37 +00:00
Cheng Sun
651274e508 interruptible_wait: evaluate Predicate immediately
Previous behaviour was to wait PredicateInterval before the first
time that the Predicate is evaluated
2014-12-09 16:32:37 +00:00
Cheng Sun
94dcf160df Don't close session twice 2014-12-09 16:32:37 +00:00
Cheng Sun
8a41cc693a Add more error handling 2014-12-09 14:02:48 +00:00
Cheng Sun
70e57a2d66 Add error handling to step_wait 2014-12-09 11:48:10 +00:00
Cheng Sun
c88168f4ba Replace all Fatal calls with Error calls 2014-12-09 11:48:07 +00:00
Cheng Sun
efbc365b6d fmt step_wait, interruptible_wait 2014-12-09 11:18:35 +00:00
Cheng Sun
cadf3a5d6a Add install_timeout to stop build if step_wait takes too long
Halts the build when the VM does not shutdown within the timeout period
Implemented with interruptible_wait, so step_wait is also interruptible
2014-12-09 10:48:34 +00:00
Cheng Sun
1dd963278f Add generic interruptible wait method 2014-12-09 10:45:52 +00:00
Cheng Sun
d9757f2c38 Revert "Add a pause to ensure SSH has a chance to start. This is a tempoary workaround for the fact that the SSH tunnel code will cause packer to halt if the destination does not exist."
This reverts commit fd35d7c984.
2014-12-09 10:45:52 +00:00
Cheng Sun
6071be1572 Don't create Artifact if there were errors
Prevents nil-dereference crash when errors occur
2014-12-09 10:45:52 +00:00
Rob Dobson
50403a3ed6 Merge pull request #5 from chengsun/master
Minor cosmetic changes
2014-12-08 18:34:55 +00:00
Cheng Sun
1de826270c Capitalise SSHWaitTimeout for consistency 2014-12-08 16:12:18 +00:00
Cheng Sun
ee0d6d38e0 Replace reflect with type assertion 2014-12-08 16:01:12 +00:00
Cheng Sun
e6e8855da4 Use log.Printf instead of log.Fatalf 2014-12-08 15:56:10 +00:00
Cheng Sun
bf92b3abff Update README to reflect increased disk size
Changed in d48d46306f
2014-12-08 15:39:37 +00:00
Cheng Sun
91c1326bc4 Cosmetic: fix typo in log message 2014-12-08 15:37:36 +00:00
Cheng Sun
2dbe047d45 Cosmetic: go fmt 2014-12-08 15:36:38 +00:00
Rob Dobson
538966204c Merge branch 'examples' 2014-11-24 18:18:18 +00:00
Rob Dobson
fd35d7c984 Add a pause to ensure SSH has a chance to start. This is a tempoary workaround for the fact that the SSH tunnel code will cause packer to halt if the destination does not exist.
Signed-off-by: Rob Dobson <rob.dobson@citrix.com>
2014-11-24 18:16:56 +00:00
Rob Dobson
68ccc25108 Merge pull request #4 from rdobson/examples
Give some examples.
2014-11-21 18:11:53 +00:00
Rob Dobson
d48d46306f Increase the disk size as LVM sometimes complains. 2014-11-21 18:11:36 +00:00
Rob Dobson
d0746481e7 Updating example file and README.
Signed-off-by: Rob Dobson <rob.dobson@citrix.com>
2014-11-21 17:49:25 +00:00
Rob Dobson
8bf2609a7f Adding static memory config to the template.
Signed-off-by: Rob Dobson <rob.dobson@citrix.com>
2014-11-21 17:49:25 +00:00
Rob Dobson
4dd435dafe Adding defaults for Clone template, Network and Storage to avoid having to configure it in the packer file.
Signed-off-by: Rob Dobson <rob.dobson@citrix.com>
2014-11-21 17:49:24 +00:00
Rob Dobson
e69f739d19 Merge pull request #3 from rdobson/defaults
Set a number of parameters as defaults
2014-11-21 17:32:42 +00:00
Rob Dobson
1daab4ef1a Adding static memory config to the template.
Signed-off-by: Rob Dobson <rob.dobson@citrix.com>
2014-11-21 13:48:57 +00:00
Rob Dobson
74cfea407d Adding defaults for Clone template, Network and Storage to avoid having to configure it in the packer file.
Signed-off-by: Rob Dobson <rob.dobson@citrix.com>
2014-11-21 13:39:25 +00:00
Rob Dobson
4746a397be Merge pull request #1 from rdobson/himn
Use the host internal management interface to obtain VM IP
2014-11-20 18:57:59 +00:00
Rob Dobson
6538c248fd Add a wait for the VM to boot properly.
Signed-off-by: Rob Dobson <rob.dobson@citrix.com>
2014-11-20 18:54:23 +00:00
Rob Dobson
d64357bc71 Skip the uploading ISO step for the moment until it is fully implemented.
Signed-off-by: Rob Dobson <rob.dobson@citrix.com>
2014-11-20 18:53:05 +00:00
Rob Dobson
d0dd202829 Remove old file.
Signed-off-by: Rob Dobson <rob.dobson@citrix.com>
2014-11-18 18:49:22 +00:00
Rob Dobson
269ec2f3c9 Switch to using a combination of the GetVNCPort step and the ForwardPortOverSSH step.
Signed-off-by: Rob Dobson <rob.dobson@citrix.com>
2014-11-18 18:49:02 +00:00
Rob Dobson
16a8be4fb0 Reduce the VNC port step to just obtaining the correct port number. Use the port forward step to simplify the code.
Signed-off-by: Rob Dobson <rob.dobson@citrix.com>
2014-11-18 18:47:50 +00:00
Rob Dobson
b61adffc01 Remove the sleep.
Signed-off-by: Rob Dobson <rob.dobson@citrix.com>
2014-11-18 18:47:08 +00:00
Rob Dobson
bc3d792341 Adding extra messaging.
Signed-off-by: Rob Dobson <rob.dobson@citrix.com>
2014-11-18 18:46:49 +00:00
Rob Dobson
f40ab554c0 Use the Host Internal Management interface to retrieve an instances IP as opposed to relying on the tools being installed.
Signed-off-by: Rob Dobson <rob.dobson@citrix.com>
2014-11-18 18:18:39 +00:00
Rob Dobson
6216e2fa95 Use an environment variable to find where paker is located.
Signed-off-by: Rob Dobson <rob.dobson@citrix.com>
2014-11-14 18:27:10 +00:00
Rob Dobson
4d961011fa Fix invalid cast.
Signed-off-by: Rob Dobson <rob.dobson@citrix.com>
2014-11-14 18:25:22 +00:00
Rob Dobson
f282a95bf8 Including fatal log of API error description.
Signed-off-by: Rob Dobson <rob.dobson@citrix.com>
2014-11-14 18:25:01 +00:00
Rob Dobson
dd6494b9e8 Adding example packer config file and kick-starter file. (Note: currently the xs-tools RPMs are a dependency).
Signed-off-by: Rob Dobson <rob.dobson@citrix.com>
2014-11-10 18:32:25 +00:00
Rob Dobson
4093b3d8a0 Adding initial README
Signed-off-by: Rob Dobson <rob.dobson@citrix.com>
2014-11-10 18:20:39 +00:00
Rob Dobson
4d634aaf70 Initial plugin for building XenServer images using Packer.IO
Signed-off-by: Rob Dobson <rob.dobson@citrix.com>
2014-11-10 18:16:02 +00:00
Rob Dobson
56820d268c Adding initial barebones for the xenserver packer plugin.
Signed-off-by: Rob Dobson <rob.dobson@citrix.com>
2014-11-05 09:35:34 +00:00