0

I am trying to automate deployment on the remote server.After doing some investigation I came across two approaches:

1.Using expect

2.Using sshpass

I want to run a script file with deployment steps,without manually entering any password or any other input parameter required by my script from command line. Please suggest me the right approach. I went through Ref1 and downloaded expect5.45.tar. Can anyone please let me know what should I do next. I am not able to install as I don't have admin rights.

Community
  • 1
  • 1
Dev
  • 3,922
  • 3
  • 24
  • 44
  • If you can't install anything, then you're going to be pretty limited in what you can do. Do you have sshpass installed? – IBam Nov 03 '15 at 14:21
  • use `ssh-copy-id` to allow ssh connections without password. Then use `scp` or `rsync` to distribute the files. – glenn jackman Nov 03 '15 at 15:56
  • @glennjackman.Thanks for suggestion. But how can i provide extra input parameters required for deployment process after logging in. – Dev Nov 05 '15 at 06:51

1 Answers1

0

Would Jenkins not suite this questions. Jenkins will allow for script control as an environmental file as well as control over the remote host (via the publish over ssh plugin). This would allow you to automated your process.

Dup Step
  • 218
  • 1
  • 6
  • but how how we pass additional parameters which could be required during the actual deployment,like i have to enter password 2 times and some other inputs required for the deployment to proceed. – Dev Nov 05 '15 at 06:48
  • In a Jenkins build these would be parameters (i.e. Build with parameters) in the configuration section of Jenkins – Dup Step Nov 05 '15 at 12:38
  • Also as it pertains to other input requirements you can have environmental script used via Jenkins. An example would be for .exe silent installs or GUI interactions. Jenkins is a build platform that can mimic much of the manual processes. I highly suggest setting up an instance (https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins) and then understanding how Jenkins and all of its plugins can benefit you – Dup Step Nov 05 '15 at 13:42