Sha256: 8f45153d10b27be3c6722694f36249853b782f5cc8c6d45cc5b12dd08f9a6b8c

Contents?: true

Size: 1.18 KB

Versions: 1

Compression:

Stored size: 1.18 KB

Contents

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

class RemoteInit
    def do (publicIp, privateKey)
        cmd1 = "yum -y install git"

        cmd2 = "(rm -rf ike-environments && git clone https://gitlab.com/canzea/ecosystem-catalog.git)"

        cmd3 = 'find /root/ike-environments -name "*.sh" -exec chmod +x {} +'

        cmd4 = '(cd /root/ike-environments && ./roles/workarounds/ruby/install.sh)'
        cmd5 = '(cd /root/ike-environments && ./roles/workarounds/ruby-gems/install.sh)'
        cmd6 = '(cd /root/ike-environments && ./roles/workarounds/sshd/configure.sh)'
        cmd7 = '(cd /root/ike-environments && ./roles/workarounds/sshd/enable.sh)'
        cmd8 = '(cd /root/ike-environments && ./roles/workarounds/canzea/install-root.sh)'

        remote = RemoteCall.new

        remote.exec publicIp, privateKey, cmd1
        remote.exec publicIp, privateKey, cmd2
        remote.exec publicIp, privateKey, cmd3
        remote.exec publicIp, privateKey, cmd4
        remote.exec publicIp, privateKey, cmd5
        remote.exec publicIp, privateKey, cmd6
        remote.exec publicIp, privateKey, cmd7
        remote.exec publicIp, privateKey, cmd8
    end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
canzea-0.1.22 lib/commands/remote-bootstrap.rb