Not a member of Pastebin yet?
                        Sign Up,
                        it unlocks many cool features!                    
                - # use fog to bootstrap a Rackspace cloud server
 - # since it does not have user-data like ec2
 - @compute = Fog::Compute.new(...)
 - server = @compute.servers.create(....)
 - server.wait_for { ready? }
 - server.private_key = IO.read("~/.ssh/foo")
 - server.public_key = IO.read("~/.ssh/foo.pub")
 - server.username = 'root'
 - server.setup :password => server.password
 - server.ssh ["echo '#{user_data}' > /root/bootstrap.sh",
 - "chmod +x /root/bootstrap.sh",
 - "/root/bootstrap.sh &"]
 
Advertisement
 
                    Add Comment                
                
                        Please, Sign In to add comment