one icon indicating copy to clipboard operation
one copied to clipboard

Consider redesign or new Azure driver to support Resource Manager infrastructure

Open OpenNebulaProject opened this issue 9 years ago • 2 comments


Author Name: Warren Frame (Warren Frame) Original Redmine Issue: 5084, https://dev.opennebula.org/issues/5084 Original Date: 2017-03-29


Hi!

The Azure driver was completed a while back: https://dev.opennebula.org/issues/2989

Unfortunately, Microsoft completely redesigned their Azure offerings, and have been pushing folks to use Resource Manager rather than "classic" VM deployments for some time (details: https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-deployment-model).

New Ruby SDK: https://github.com/Azure/azure-sdk-for-ruby (note the old SDK is now in the asm branch of that repo) New gems: azure_mgmt_compute, azure_mgmt_storage, azure_mgmt_network, etc.

Note that while the new sdk has been around for 8 months, it's still in preview. This new architecture will presumably stick around for some time. It may be worth re-designing, or adding a new Azure driver to support Resource Manager.

I personally don't have the bandwidth or background in Ruby to implement this - sorry!

Cheers!


Driver Status

General info

To start and use this driver you should download source code of the proper branch Feature-1203, compile and install it.

Azure preparation

  • Active directory
    • Create an application (ex: AzureDriver_one) -> manage access for the application (for the moment SECRET key is mandatory)

Create OpenNebula host:

onehost create <name> -i az -v az

Update the template adding the next attributes (requirement to get the driver to work):

ONE ATTRIBUTES:

handling authentication:

  • AZ_CLIENT= application ID, its mandatory to have any app working with active directory
  • AZ_SECRET= the secret key for the user
  • AZ_TENANT= the directory ID
  • AZ_SUB= normal subscription id

  • LOCATION_NAME= the name of the location
  • CAPACITY = [KEY="VALUE"] based on /etc/one/az_driver.conf

Once you have completed all the steps, the host should be green.

Template example

Using public cloud attributes we can define vm properties:

CPU="0.5"
MEMORY="128" 
NAME="test"
PUBLIC_CLOUD=[
    IMAGE="UbuntuServer",
    INSTANCE_TYPE="ExtraSmall",
    PRUEBA="vacio",
    PUBLISHER="canonical",
    SKU="16.04.0-LTS",
    SSHPORT="2222",
    TCP_ENDPOINTS="80",
    TYPE="AZURE",
    VERSION="latest",
    VM_PASSWORD="Mypassword1234",
    VM_USER="azuser",
    WIN_RM="https" ]

Behaviour Opennebula Host will create new reource group (new paradigm based) with his own name to control all resources.

PROBLEMS:

  • monitor all vms at same time (impossible until microsoft provides instance view for list calls)
  • driver actions take too long due Azure API:
    • terminate action -> opennebula keeps waiting for the vm to deletion and reach a timeout(?) then the vm keeps running but is deleted in azure.
    • deploy action -> azure takes too long (very very long) to deploy a machine, meanwhile you cannot perform any action in opennebula or the monitoring will fail.

TODO

  • [x] cipher secret key,
  • [ ] Improve cli creation
  • [ ] check cert option
  • [ ] Optional attribute for RESOURCE_GROUP name
  • [ ] Network/NIC management through public cloud
  • [ ] Replacing cli template for new one with new atts/options
  • [ ] Update opennebula instance_types
NIC_0="vnet_name"
NIC_1 = ....
  • [ ] Deploy_id azure tags based -> -one- -> AZ_PREFIX attribute to choose the name of the machine, -> example: vm-$i-$name

Missing features

  • remove nics/disks when terminate
  • set up public addresses
  • basic context package
  • improve monitoring

OpenNebulaProject avatar Nov 20 '17 11:11 OpenNebulaProject

Hello, check out our alpha-release. We'll be very pleased to work together.

ione-cloud avatar Nov 19 '18 12:11 ione-cloud

your driver looks nice!

we will try that soon ;)

Semedi avatar Nov 22 '18 11:11 Semedi