Auto Deploy Code into Dynamically Provisioned VM

37 views
Skip to first unread message

Prashant .B

unread,
Nov 17, 2014, 2:48:08 AM11/17/14
to jenkin...@googlegroups.com
Hi All,

i have installed the Jenkins and integrated with git for code repo and vmware for new VM provisioning.

now i want to move the code to newly provisioned vm, can some one help me to understand how can i move code from jenkins master/slave to newly provisioned vm.

i'm using Jenkins ver. 1.588.

Thanks in Advance.

teilo

unread,
Nov 19, 2014, 6:44:52 AM11/19/14
to jenkin...@googlegroups.com
It all depends on what is your target server is running, and what you want to transfer.


If the slave and target server are unix like then scp is your friend. For windows things get a little more complex but if you can expose a share on the target you can just copy (windows to windows with unc paths) or for unix to windows use something like smbclient.

With windows the harder part may be getting your software to run depending what your deployment model is.

Message has been deleted

James Nord

unread,
Dec 1, 2014, 6:26:28 AM12/1/14
to jenkin...@googlegroups.com
Hi Prashant,

If you use Cloudbees autoscaling plugin to provision your VMWare virtual machine (ServerB) then the IPAddress is available as a job environment variable[1].

If you use the OSS vSphere cloud plugin[2] then the ip address is available for certain commands - but I think you will need to controll the pooling of the VMs yourself.

As for passwords in scp - you are in control of the SUT so why not enable public/private key authentication?
you can always pass a password to scp if you are running Unix commands - I will leave that as an excersize for you to google.

/James

[1] http://jenkins-enterprise.cloudbees.com/docs/user-guide-bundle/VMWareActivationWrapper.html
[2] https://wiki.jenkins-ci.org/display/JENKINS/vSphere+Cloud+Plugin#vSphereCloudPlugin-PowerOn%2FResumeVM

On 01/12/2014 11:04, Prashant .B wrote:
Hi James,

Thanks for update.

i am using all linux boxes for this task.

As i mentioned above my jenkins will get the code from Git and bundle it on server A, After this step i'm provisioning new VM in VMware infrastructure.

Now i want to move that code from Server A to newly Provisioned Server B.

As you mentioned i tried to use SCP plugin to transfer the code, but the challenge i'm facing here is SCP target has to be pre-configured ( but my target is always dynamic) in Jenkins(Correct me if i'm wrong). is there any chance to use scp command along with password..? since i'm not using key based authentication.
--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/f11d9768-6877-4695-9a98-e7c65a8bb85f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages