Giter VIP home page Giter VIP logo

imagefactory's Introduction

Image Factory

This Repository is a reworked ImageFactory script base upgraded to PowerShell AzureRM version 6.7.

Read the Fantastic Blog Series to see how you can integrate into VSTS for no touch automation builds.

Requirements:

  1. Windows Powershell
  $PSVersionTable.PSVersion

  # Result
  Major  Minor  Build  Revision
  -----  -----  -----  --------
  5      1      17134  248
  1. Azure PowerShell Modules
  Get-Module AzureRM -list | Select-Object Name,Version

  # Result
  Name  Version
  ----  -------
  Azure 6.7.0
  1. AzureRM Powershell Modules
  Get-Module AzureRM.* -list | Select-Object Name,Version

  # Filtered Results
  Name                                  Version
  ----                                  -------
  AzureRM.Compute                       5.5.0
  AzureRM.DevTestLabs                   4.0.7
  AzureRM.KeyVault                      5.1.1
  AzureRM.Network                       5.4.1
  AzureRM.Profile                       5.4.0
  AzureRM.Resources                     6.4.0
  AzureRM.Storage                       5.0.2
  1. Install Required PowerShell Modules if needed
Install-Module AzureRM -RequiredVersion 6.7.0
Import-Module AzureRM -RequiredVersion 6.7.0
  1. Setup a Private env.ps1 file to source in private settings from environment variabls for use in the project.

Copy env_sample.ps1 to env.ps1 and modify it as appropriate

###############################################################################################################
# Environment Settings ########################################################################################

$Env:AZURE_SUBSCRIPTION = "<your_subscription_id>"                          # Azure Desired Subscription Id
$Env:AZURE_LOCATION = "<your_region>"                                       # Azure Desired Region
$Env:AZURE_ADMINUSER = "<local_admin_user>"                                 # Virtual Machine Local Admin UserName
$Env:AZURE_ADMINPASSWORD = "<local_admin_password>"                         # Virtual Machine Local Admin Password

###############################################################################################################
  1. Setup a DevTest Lab to use as an Imaging Factory.
# Source into the shell your environment variables
. .\env.ps1 

# Build a DevTest Lab
./Make-Lab.ps1
  1. Setup a DevTest Lab(s) to use as a Personal Lab
# Source into the shell your environment variables
. .\env.ps1 

# Build a Development Lab
.\Make-Lab -ResourceGroupName DevLab

# Build a Test Lab
.\Make-Lab -ResourceGroupName TestLab
  1. Subscribe your lab for deployment by defining your lab and desired images into the Labs.json file.

.\Configuration\Labs.json

{
  "Labs": [{
    "SubscriptionId": "<your_subscription_id>",
    "LabName": "DevLab",
    "ImagePaths": [
      "Win10/VS2017.json",
      "Win2016/Datacenter.json"
    ]
  },
  {
    "SubscriptionId": "<your_subscription_id>",
    "LabName": "TestLab",
    "ImagePaths": [
      "Win10/VS2017.json"
    ]
  }]
}
  1. Run the Image Factory
./Run-Factory.ps1

imagefactory's People

Contributors

danielscholl avatar

Stargazers

Jon Barker avatar

Watchers

Jon Barker avatar James Cloos avatar

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.