Giter Site home page Giter Site logo

vmssdashboard's Introduction

VMSS Dashboard tools

Simple Python tools to demonstrate Azure Virtual Machine Scale Sets by calling the Azure Compute REST API.

VMSS Editor

GUI editor to view and manage Azure VM Scale Sets.

Image of VMSS Editor

VMSS Editor is a Python/Tkinter script to manage VM Scale Sets. You can use it to:

  • View VM Scale Set properties and status.
  • Manually scale a VM Scale Set in or out.
  • Upgrade the sku of a platform image.
  • Upgrade the version of a platform image, or upgrade a custom image.
  • Vertically scale - increase of decrease VMs size and roll it out across the set.
  • Perform a rolling upgrade of image or VM size across scale set
  • Start/Restart/Power off/Stop dealloc a scale set.
  • View scale set VMs in a heat map showing fault domains and update domains.
  • Operate on fault domains: Upgrade/Reimage/Start/Power off.
  • Operate on individual VMs: Upgrade/Reimage/Start/Power off/Delete/Restart/Dealloc.

Installation

  1. Install Python 3.x.
  2. Install the latest azurerm REST wrappers for Microsoft Azure: "pip install azurerm". If the azurerm Python library is already installed, do an update, as only the latest version of VMSS Editor is tested with the latest version of azurerm.
  3. Clone or copy this repo. Specifically you need vmsseditor.py, subscription.py, vmss.py, vm.ico and vmssconfig.json.
  4. Authenticate - you can do this by creating a Service Principal, or by logging in with CLI. Service Principal - Register an Azure application, create a service principal and get your tenant id. See "Using vmssdashboard and vmsseditor" below. CLI - See Authenticating using CLI in the Azurerm readme - this will require a couple of modifications to VMSSEditor - log an issue if anyone wants me to add built-in support for authenticating using CLI instead of using a Service Principal.
  5. Put in values for your application and subscription in vmssconfig.json.
  6. Run: python vmsseditor.py

Using vmssdashboard and vmsseditor

To use these apps (and in general to access Azure Resource Manager from a program without going through 2 factor authentication) you need to register your application with Azure and create a "Service Principal" (an application equivalent of a user). Once you've done this you'll have 3 pieces of information: A tenant ID, an application ID, and an application secret. You will use these to populate the vmssconfig.json file. For more information on how to get this information go here: [Authenticating a service principal with Azure Resource Manager][service-principle]. See also: [Azure Resource Manager REST calls from Python][python-auth].

[service-principle]: https://azure.microsoft.com/en-us/documentation/articles/resource-group-authenticate-service-principal/ - make sure you create it with at least "Contributor" rights, not "Reader". [python-auth]: https://msftstack.wordpress.com/2016/01/05/azure-resource-manager-authentication-with-python

Performing a rolling upgrade

The rolling upgrade feature was added to show how scale set operations like "manualUpgrade" can be combined to form a semi-automated roll-out of VM updates without disrupting application availability.

Here's a 2 minute video demo of the rolling upgrade feature in action..

rolling upgrade demo

Check this Wiki page on how to use custom images for VM scale sets in Azure.

vmssdashboard's People

Contributors

gbowerman avatar murthyvemparala avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vmssdashboard's Issues

Missing Installation Step.

I think there is step missing in Readme.md Installation.

After creating the Service Principle name, we need to give permission to service principle to access the subscription.

I did as per the installation steps but it shows me that there are no VMSS found. Then I realize I didn't give permission to SP to access the subscription, then give the contributor role to SP and all works.

KeyError: 'offer'

After installing vmssdashboard, i receiving an error when try to launch vmsseditor.py:

root@host# python3 vmsseditor.py
Traceback (most recent call last):
File "vmsseditor.py", line 559, in
displayvmss(vmsslist[0])
File "vmsseditor.py", line 401, in displayvmss
current_vmss = vmss.vmss(vmssname, sub.vmssdict[vmssname], sub.sub_id, sub.access_token)
File "/home/mrn/Documentos/microsoft/azure/vmss_tools/vmssdashboard-master/vmss.py", line 30, in init
self.offer = vmssmodel['properties']['virtualMachineProfile']['storageProfile']['imageReference']['offer']
KeyError: 'offer'

Using Ubuntu 16.04.2 LTS x64, let me know if more info is needed

Prebuilt support for Authenticating via CLI?

Hi,
I know it's been a while and I'm not even sure if this is still supported, but I'm looking to auth via CLI but not sure what changes need to be made to vmsseditor.py. Any chance you could post what changes to make or rebuild with CLI auth support?
Thanks!

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.