Skip to content

Search for Azure VM Images with ASP.NET 5, Angular, Azure Search and Azure Automation

License

Notifications You must be signed in to change notification settings

michaelsrichter/vmimagesearch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Azure VM Image Search

Search through all the built-in Microsoft Azure VM Images and generate a PowerShell script for deploying VMs. Using automation, the Search database is updated every few hours. Searching is easy with fuzzy matching and typeahead features.

To see a live demo, visit http://vmimagesearch.azurewebsites.net

This projects demonstrates how to use:

  • Azure Search Services
  • Azure Automation
  • Azure PowerShell Commands
  • ASPNET 5 tools (DNX, DNU).

Getting Started

Prerequisites

To get this project working you need the following

  • Azure Account If you don't have one already, you can sign up for a Free Trial.
  • Azure PowerShell Get this from here How to install and configure Azure PowerShell. Follow the directions to install Azure PowerShell and associate it with your account.
  • Automation Administrator Create a global admin in your Azure Active Directory. Azure Automation will run under this account. Follow the directions to Create or edit users in Azure AD. Choose "New user in your organization" for the global admin. Note the admin's email address and make sure to reset the password to a permanent one.
  • Azure Search Service Account Visit the preview Azure portal at https://portal.azure.com and create a new Search Service. Read Get Started with Azure Search for more info. Note your search service name and key.
  • ASPNET 5 The website that hosts the image search is written in ASPNET 5. This requires Visual Studio 2015 RC or just install DNX and DNU with ASPNET. See Getting Started
  • Node.js, Bower and Gulp If you don't install Visual Studio 2015, you will need to manually install Node.js and then Bower and Gulp by running
npm install -g bower
mpm install -g gulp

Running It

Once you have all the prerequistes, getting up and running is just a few steps.

  1. Open the setupAutomation.ps1 file and edit the parameters at the top (use the values from the prerequisites). If this is the first time you are running through this, leave the first 2 values ($updateIndexDefinitionOnly and $createNewStorageAccount) unchanged.
		$updateIndexDefinitionOnly = $false									
		$createNewStorageAccount = $true									
		$searchApiKey = "YOURSEARCHSERVICEAPIKEY"
		$searchName = "YOURSEARCHSERVICENAME"
		$user = "ADMIN@YOURDEFAULTTENANT.COM"
		$pw = ConvertTo-SecureString "ADMINPASSWORD" -AsPlainText -Force
  1. Run setupAutomation.ps1 from any PowerShell commandline.
  2. Once setupAutomation completes you will have a new Azure Automation account, a runbook, an automation schedule, and an automation credential. The workbook will be published and associated with the schedule. The job will run after 5 minutes and then every 4 hours.
  3. Set up the web project by going into the root solution folder (the folder that contains vmimagesearch.sln) and run:
dnu restore

and then, in the vmimagesearch.website folder, run

dnx . web

When it says "Started" your ASPNET 5 website is running and you can reach it via http://localhost:5000

To learn more

Copyright and License

  • Copyright © Microsoft Corporation 2015
  • Released under the MIT License (MIT)
  • Please see LICENSE for more information.

About

Search for Azure VM Images with ASP.NET 5, Angular, Azure Search and Azure Automation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published