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.180 lib/commands/remote-bootstrap.rb
canzea-0.1.179 lib/commands/remote-bootstrap.rb
canzea-0.1.178 lib/commands/remote-bootstrap.rb
canzea-0.1.177 lib/commands/remote-bootstrap.rb
canzea-0.1.176 lib/commands/remote-bootstrap.rb
canzea-0.1.175 lib/commands/remote-bootstrap.rb
canzea-0.1.174 lib/commands/remote-bootstrap.rb
canzea-0.1.173 lib/commands/remote-bootstrap.rb
canzea-0.1.172 lib/commands/remote-bootstrap.rb
canzea-0.1.171 lib/commands/remote-bootstrap.rb
canzea-0.1.170 lib/commands/remote-bootstrap.rb
canzea-0.1.169 lib/commands/remote-bootstrap.rb
canzea-0.1.167 lib/commands/remote-bootstrap.rb
canzea-0.1.166 lib/commands/remote-bootstrap.rb
canzea-0.1.165 lib/commands/remote-bootstrap.rb
canzea-0.1.160 lib/commands/remote-bootstrap.rb
canzea-0.1.159 lib/commands/remote-bootstrap.rb
canzea-0.1.158 lib/commands/remote-bootstrap.rb
canzea-0.1.157 lib/commands/remote-bootstrap.rb
canzea-0.1.156 lib/commands/remote-bootstrap.rb