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.110 lib/commands/remote-bootstrap.rb
canzea-0.1.109 lib/commands/remote-bootstrap.rb
canzea-0.1.108 lib/commands/remote-bootstrap.rb
canzea-0.1.107 lib/commands/remote-bootstrap.rb
canzea-0.1.106 lib/commands/remote-bootstrap.rb
canzea-0.1.105 lib/commands/remote-bootstrap.rb
canzea-0.1.104 lib/commands/remote-bootstrap.rb
canzea-0.1.103 lib/commands/remote-bootstrap.rb
canzea-0.1.102 lib/commands/remote-bootstrap.rb
canzea-0.1.101 lib/commands/remote-bootstrap.rb
canzea-0.1.100 lib/commands/remote-bootstrap.rb
canzea-0.1.98 lib/commands/remote-bootstrap.rb
canzea-0.1.97 lib/commands/remote-bootstrap.rb
canzea-0.1.96 lib/commands/remote-bootstrap.rb
canzea-0.1.95 lib/commands/remote-bootstrap.rb
canzea-0.1.94 lib/commands/remote-bootstrap.rb
canzea-0.1.93 lib/commands/remote-bootstrap.rb
canzea-0.1.91 lib/commands/remote-bootstrap.rb
canzea-0.1.90 lib/commands/remote-bootstrap.rb
canzea-0.1.89 lib/commands/remote-bootstrap.rb