Coder Social home page Coder Social logo

nanobox-adapter-libcloud's Introduction

nanobox-adapter-libcloud

A Nanobox cloud provider adapter to integrate with multiple cloud providers

Required evars

In order to grab catalog data without a user's cedentials (for generic pricing estimates, for example), default credentials are required for each supported provider. These creds will never be used to actually create/manage actual VMs, as the internal logic will never even look them up outside of the one scenario where catalog data is being generated for generic use. Still, it's a lot of variables to set, so they'll all be listed below, to ensure they all get added in. Since there are non-auth evars required as well, the sensitive ones are marked, below, with an asterisk (*).

Please keep this list sorted alphabetically by provider name to help with finding evars quickly.

Google Compute Engine

  • GCE_SERVICE_EMAIL*
  • GCE_SERVICE_KEY*
  • GCE_PROJECT_ID*
  • GCE_MONTHLY_DISK_COST
  • GCE_MONTHLY_SSD_COST

Microsoft Azure Classic (Experimental)

  • AZC_SUB_ID*
  • AZC_KEY*

Microsoft Azure Resource Manager

  • AZR_SUBSCRIPTION_ID*
  • AZR_TENANT_ID*
  • AZR_APPLICATION_ID*
  • AZR_AUTHENTICATION_KEY*
  • AZR_CLOUD_ENVIRONMENT* (optional)

OVH

  • OVH_APP_KEY*
  • OVH_APP_SECRET*
  • OVH_CONSUMER_KEY*
  • OVH_PROJECT_ID*
  • OVH_APP_REGION*

Packet

  • PKT_API_KEY*

Scaleway

  • SCALEWAY_ACCESS_KEY*
  • SCALEWAY_API_TOKEN*

Vultr

  • VULTR_API_KEY*

Et Cetera

More info will be added to this README as it comes up.

nanobox-adapter-libcloud's People

Contributors

danhunsaker avatar jjkester avatar tylerflint avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

nanobox-adapter-libcloud's Issues

ERROR in app: Exception on /vultr/keys [POST]

During a server order, a user encountered the following error:

[,665] ERROR in app: Exception on /vultr/keys [POST]
Traceback (most recent call last):
File "/data/lib/python3.6/site-packages/flask/app.py", line 1982, in wsgi_app
response = self.full_dispatch_request()
File "/data/lib/python3.6/site-packages/flask/app.py", line 1614, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/data/lib/python3.6/site-packages/flask_cors/extension.py", line 161, in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
File "/data/lib/python3.6/site-packages/flask/app.py", line 1517, in handle_user_exception
if key.public_key == data['key']:
reraise(exc_type, exc_value, tb)
File "/data/lib/python3.6/site-packages/flask/_compat.py", line 33, in reraise
raise value
File "/data/lib/python3.6/site-packages/flask/app.py", line 1612, in full_dispatch_request
rv = self.dispatch_request()
File "/data/lib/python3.6/site-packages/flask/app.py", line 1598, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/app/nanobox_libcloud/controllers/keys.py", line 19, in key_create
result = adapter.do_key_create(request.headers, request.json)
File "/app/nanobox_libcloud/adapters/base.py", line 154, in do_key_create
AttributeError: 'SSHKey' object has no attribute 'public_key'
192.168.0.3 - - [12/Sep/2017:20:05:06 +0000] "POST /vultr/keys HTTP/1.1" 500 291 "-" "Faraday v0.9.2"

Scaleway only permit to add a VC1S server

Hi !

The Scaleway adapter only propose a VC1S server, is it possible to support the others servers please?
Or could you tell me how to help you to add them quickly please?
I don't known if the list is fetched from the ScaleWay API (I don't see any routes on their API for that), or if you have a static JSON file. The static/scaleway.json file seems wrong (there is digitalOcean informations inside it).

By the way, do you support ARM architectures? (ScaleWay have a lot of ARM / ARMv8 servers)
If you need I can create a JSON array list like that:
{"id": "ARM64-2GB", "ram": 2048, "cpu": 4, "disk": 50, "transfer": 1, "dollars_per_hr": 0, "dollars_per_mo": 0},
This could be useful to add the architecture ( ARM, ARMv8, x86 ) inside the JSON file and to view it inside the nanobox.io website.

Regards,

Azure "location is required" error

[,581] ERROR in app: Exception on /azure_arm/servers [POST]
Traceback (most recent call last):
File "/data/lib/python3.6/site-packages/flask/app.py", line 1982, in wsgi_app
response = self.full_dispatch_request()
File "/data/lib/python3.6/site-packages/flask/app.py", line 1614, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/data/lib/python3.6/site-packages/flask_cors/extension.py", line 161, in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
File "/data/lib/python3.6/site-packages/flask/app.py", line 1517, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/data/lib/python3.6/site-packages/flask/_compat.py", line 33, in reraise
raise value
File "/data/lib/python3.6/site-packages/flask/app.py", line 1612, in full_dispatch_request
File "/data/lib/python3.6/site-packages/libcloud/compute/drivers/azure_arm.py", line 261, in list_sizes
rv = self.dispatch_request()
File "/data/lib/python3.6/site-packages/flask/app.py", line 1598, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/app/nanobox_libcloud/controllers/servers.py", line 19, in server_create
result = adapter.do_server_create(request.headers, request.json)
File "/app/nanobox_libcloud/adapters/azure_arm.py", line 83, in do_server_create
result = super().do_server_create(headers, data)
File "/app/nanobox_libcloud/adapters/base.py", line 219, in do_server_create
result = driver.create_node(**self._get_create_args(data))
File "/app/nanobox_libcloud/adapters/azure_arm.py", line 265, in _get_create_args
size = self._find_size(driver, location, data['size'])
File "/app/nanobox_libcloud/adapters/azure_arm.py", line 311, in _find_size
for size in driver.list_sizes(location):
ValueError: location is required.
raise ValueError("location is required.")
104.236.156.96 - - [07/Nov/2017:15:54:17 +0000] "POST /azure_arm/servers HTTP/1.1" 500 291 "-" "Faraday v0.9.2"

respond to client errors with 400 range responses rather than 500

Would it be possible to respond to errors that are a result of client/user provided data with 400 range statuses rather than 500? That way Odin can handle them differently. For example:

500:{
  "errors": [
    "Your IP (...) is not authorized to use this API key"
  ]
}

Currently that error indicates to Odin that something malfunctioned within the adapter because of the 500 status, when really it was just a user setting causing the error.

'SSHKey' object has no attribute 'fingerprint'

This snippet if from the adapter-libcloud logs.

104.236.156.96 - - [06/Nov/2017:15:42:26 +0000] "GET /vultr/keys/nanobox-Platform-7a00a91a2a40 HTTP/1.1" 500 291 "-" "Faraday v0.9.2"
[,196] ERROR in app: Exception on /vultr/keys/nanobox-Platform-7a00a91a2a40 [GET]
Traceback (most recent call last):
File "/data/lib/python3.6/site-packages/flask/app.py", line 1982, in wsgi_app
response = self.full_dispatch_request()
File "/data/lib/python3.6/site-packages/flask/app.py", line 1614, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/data/lib/python3.6/site-packages/flask_cors/extension.py", line 161, in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
File "/data/lib/python3.6/site-packages/flask/app.py", line 1517, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/data/lib/python3.6/site-packages/flask/_compat.py", line 33, in reraise
raise value
File "/data/lib/python3.6/site-packages/flask/app.py", line 1612, in full_dispatch_request
rv = self.dispatch_request()
File "/data/lib/python3.6/site-packages/flask/app.py", line 1598, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/app/nanobox_libcloud/controllers/keys.py", line 38, in key_query
result = adapter.do_key_query(request.headers, key_id)
File "/app/nanobox_libcloud/adapters/base.py", line 187, in do_key_query
fingerprint=key.fingerprint
AttributeError: 'SSHKey' object has no attribute 'fingerprint'

[question] bare metal vs virtual machines

Hi,

We've read in the « Custom provider » documentation that we can use virtual and bare metal servers.
If we have the choice between 2 machines, one virtual, one bare metal, with the same number of CPU, RAM and SSD, is there any performances increased with nanobox if we take the bare metal server? (less layer of virtualization)

Thanks for your time!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.