Sha256: 96fee79db1f7adca88ed1cf2d4155f0ae8a2c7d1e9881085aa9a978a7508feea
Contents?: true
Size: 1.07 KB
Versions: 4
Compression:
Stored size: 1.07 KB
Contents
# WORKDIR = "/Users/piousbox/projects/docker_wco" # class Instance # def chmod # start do |ssh| # ssh.exec "sudo chmod +x /tmp/provision.sh" # # other operations on ssh # end # end # private # def start # Net::SSH.start(ip, 'ubuntu', keys: "mykey.pem" ) do |ssh| # yield ssh # end # end # end ## works: # nginx_root = '/opt/nginx' # config = { service_name: 'abba', } # Net::SSH.start( "18.209.12.11", "ubuntu", keys: "access/mac_id_rsa_3.pem" ) do |ssh| # out = ssh.scp.upload! "tmp/#{config[:service_name]}", "/opt/tmp/two.txt" do |ch, name, sent, total| # puts "#{name}: #{sent}/#{total}" # end # puts! out, 'out' # end def create_volume_1 config={} puts! config, '#create_volume' out = ` cd #{WORKDIR} ; \ [ ! -e #{config[:kind]}__prototype.zip ] && wget #{config.tmpl.volume_zip} ; \ [ ! -e #{config[:kind]}__prototype ] && unzip #{config[:kind]}__prototype.zip ; \ mv #{config[:kind]}__prototype #{config[:service_name]}_data ; \ echo ok #create_volume `; puts! out, 'out' end
Version data entries
4 entries across 4 versions & 1 rubygems