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).
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
Once you have all the prerequistes, getting up and running is just a few steps.
- 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
- Run setupAutomation.ps1 from any PowerShell commandline.
- 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.
- 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
- Azure Automation - http://azure.microsoft.com/en-us/services/automation/
- Auzre Search - http://azure.microsoft.com/en-us/services/search/ and https://msdn.microsoft.com/en-us/magazine/dn913187.aspx
- PowerShell - http://blogs.msdn.com/b/powershell/ and https://www.microsoftvirtualacademy.com/en-us/training-courses/getting-started-with-powershell-3-0-jump-start-8276
- ASPNET 5 - http://www.asp.net/ and http://docs.asp.net/en/latest/
- Copyright © Microsoft Corporation 2015
- Released under the MIT License (MIT)
- Please see LICENSE for more information.