Giter Club home page Giter Club logo

azure-spot-instances's Introduction

SCL Azure Spot Instances

Using Spot VMs allows you to take advantage of Azure unused capacity at a significant cost savings. At any point in time when Azure needs the capacity back, the Azure infrastructure will evict Spot VMs. Therefore, Spot VMs are great for workloads that can handle interruptions like batch processing jobs, dev/test environments, large compute workloads, and more.

A Spot VM offers no high availability guarantees. At any point in time when Azure needs the capacity back, the Azure infrastructure will evict Spot VMs with 30 seconds notice.

To efficiently handle this problem, the checkpointing schemes are recommended. The checkpointing saves the execution status of tasks if a certain condition is met and then recovers the task status from the last saved point upon a failure.

Use second hard drive mounted at /datadrive to store your data.

In this project we provide:

  1. Manifest to create VMs using Terraform.
  2. Manifest to configure VMs using Ansible.
  3. Monitoring system capable of reporting the status of the VM through a slack channel.
  4. Script that tries to restart the machine once every hour if it has been deallocated by azure and restart tag value is set to true.

Create VM using Terraform and Ansible

TO DO

How to use SCL Azure Spot Instances

Start Spot VM

  1. Sign in to the Azure portal at https://portal.azure.com.

  2. From the main menu on the left side, select Resource Group

  1. From the list of resource groups, select your Resource Group, and select the VM.

  1. Select the Start button on the overview page for your virtual machine.

  1. From the menu on the left side, select Tags and change restart tag from false to true.

Stop Spot VM

  1. Select the Stop button on the overview page for your virtual machine.

  1. From the menu on the left side, select Tags and change restart tag from true to false and click on Save button.

Resize Spot VM

  1. Select the Stop button on the overview page for your virtual machine.

  1. From the menu on the left side, select Size, select appropriate VM size from the list and click on resize button.

Slack Channel Notifications

VM VMGPUSPOTTEST was Started by [email protected]

  • The VM is ready. You can connect to the VM through your favorite SSH client.

VM VMGPUSPOTTEST is Ready

VM VMGPUSPOTTEST was Stopped by [email protected]

  • The VM gets evicted. You get a 30s notification before actual eviction.

    VM VMGPUSPOTTEST will be evicted in 30s

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.