Sha256: 579cf449fe02a5c2e9cd5587a088037b7259fd7676ba73ab9ad80350a919779d

Contents?: true

Size: 1.48 KB

Versions: 97

Compression:

Stored size: 1.48 KB

Contents

require "git"
require "fileutils"
require "pathname"
require "ssh-base-cmd-class"

class RemoteInit
    def initialize ()
        @log = Logger.new(Canzea::config[:logging_root] + '/plans.log')
    end

    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

end

Version data entries

97 entries across 97 versions & 1 rubygems

Version Path
canzea-0.1.88 lib/commands/remote-bootstrap.rb
canzea-0.1.87 lib/commands/remote-bootstrap.rb
canzea-0.1.86 lib/commands/remote-bootstrap.rb
canzea-0.1.85 lib/commands/remote-bootstrap.rb
canzea-0.1.84 lib/commands/remote-bootstrap.rb
canzea-0.1.83 lib/commands/remote-bootstrap.rb
canzea-0.1.82 lib/commands/remote-bootstrap.rb
canzea-0.1.81 lib/commands/remote-bootstrap.rb
canzea-0.1.80 lib/commands/remote-bootstrap.rb
canzea-0.1.78 lib/commands/remote-bootstrap.rb
canzea-0.1.77 lib/commands/remote-bootstrap.rb
canzea-0.1.76 lib/commands/remote-bootstrap.rb
canzea-0.1.74 lib/commands/remote-bootstrap.rb
canzea-0.1.73 lib/commands/remote-bootstrap.rb
canzea-0.1.72 lib/commands/remote-bootstrap.rb
canzea-0.1.71 lib/commands/remote-bootstrap.rb
canzea-0.1.70 lib/commands/remote-bootstrap.rb