phishlulz icon indicating copy to clipboard operation
phishlulz copied to clipboard

DigitalOcean Support

Open mehranexpert opened this issue 8 years ago • 1 comments

Any plan for digitalocean ?

mehranexpert avatar Nov 17 '16 19:11 mehranexpert

I haven't tested it yet, however the FOG gem I use supports the community version: http://fog.io/about/provider_documentation.html

So, it should be as simple as modifying the code at lines in connect:

connection = Fog::Compute.new({
       :provider => PROVIDER,
       :region => REGION,
       :aws_access_key_id => AWS_ACCESS_KEY_ID,
       :aws_secret_access_key => AWS_SECRET_ACCESS_KEY
       #:connection_options => {:proxy => 'http://127.0.0.1:9090', :ssl_verify_peer => false}
   })
    @instances = connection.servers

and create:

   se_vm = @instances.create(
        :image_id => INSTANCE_AMI,
        :flavor_id => INSTANCE_TYPE,
        :key_name => SECURITY_KEY_PAIR,
        :tags => {:Name => instance_name},
        :security_group_ids => [SECURITY_GROUP]
    )

antisnatchor avatar Nov 20 '16 22:11 antisnatchor