Class: RemoteInit
- Inherits:
-
Object
- Object
- RemoteInit
- Defined in:
- lib/commands/remote-bootstrap.rb
Instance Method Summary collapse
- #do(publicIp, privateKey) ⇒ Object
-
#initialize ⇒ RemoteInit
constructor
A new instance of RemoteInit.
Constructor Details
#initialize ⇒ RemoteInit
Returns a new instance of RemoteInit.
7 8 9 |
# File 'lib/commands/remote-bootstrap.rb', line 7 def initialize () @log = Logger.new(Canzea::config[:logging_root] + '/plans.log') end |
Instance Method Details
#do(publicIp, privateKey) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/commands/remote-bootstrap.rb', line 11 def do (publicIp, privateKey) cmd1 = "yum -y install git" cmd2 = "(rm -rf ecosystem-catalog && git clone https://gitlab.com/canzea/ecosystem-catalog.git)" cmd3 = 'find /root/ecosystem-catalog -name "*.sh" -exec chmod +x {} +' cmd4 = '(cd /root/ecosystem-catalog && ./roles/workarounds/ruby/install.sh)' cmd5 = '(cd /root/ecosystem-catalog && ./roles/workarounds/ruby-gems/install.sh)' cmd6 = '(cd /root/ecosystem-catalog && ./roles/workarounds/sshd/configure.sh)' cmd7 = '(cd /root/ecosystem-catalog && ./roles/workarounds/sshd/enable.sh)' cmd8 = '(cd /root/ecosystem-catalog && ./roles/workarounds/root/install.sh)' cmd9 = '(cd /root/ecosystem-catalog && ./roles/workarounds/image-bootstrap/install.sh)' remote = RemoteCall.new remote.exec publicIp, privateKey, cmd1, "1-9" remote.exec publicIp, privateKey, cmd2, "2-9" remote.exec publicIp, privateKey, cmd3, "3-9" remote.exec publicIp, privateKey, cmd4, "4-9" remote.exec publicIp, privateKey, cmd5, "5-9" remote.exec publicIp, privateKey, cmd6, "6-9" remote.exec publicIp, privateKey, cmd7, "7-9" remote.exec publicIp, privateKey, cmd8, "8-9" remote.exec publicIp, privateKey, cmd9, "9-9" end |