Code Monkey home page Code Monkey logo

vsts-image-generation's Introduction

Getting started with Packer on Azure

Windows

How to use Packer to create Windows virtual machine images in Azure

Linux

How to use Packer to create Linux virtual machine images in Azure

General Packer

https://www.packer.io/

Build VS2017 Image

Packer should be in your path and you will need to gather your service principal and resource group information based on the Azure document above

cd images\Windows\Vs2017

packer.exe build^
    -var "client_id=<spn.applicationId>"^
    -var "client_secret=<spn_password>"^
    -var "subscription_id=<spn.subscriptionId>"^
    -var "tenant_id=<spn.tenantId>"^
    -var "object_id=<spn.Id>"^
    -var "location=<rg_location>"^
    -var "resource_group=<capture_rg>"^
    -var "storage_account=<capture_storage_account>"^
    vs2017-Server2016-Azure.json

You can shortcut the command line by creating a JSON file that has all of your variable values in it.

{
    "client_id": "<spn.applicationId>",
    "client_secret": "<spn_password>",
    "subscription_id": "<spn.subscriptionId>",
    "tenant_id": "<spn.tenantId>",
    "object_id": "<spn.Id>",
    "resource_group": "<capture_rg>",
    "storage_account": "<capture_storage_account>"
    "location": "<rg location>"
}

packer build -var-file=<path to variables file> -var "commit_id=$(git log --pretty=format:'%H' -n 1)" vs2017-Server2016-Azure.json

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

vsts-image-generation's People

Contributors

lokesh755 avatar chrispat avatar niadak avatar thechrisjohnson avatar microsoftopensource avatar msftgits avatar

Watchers

James Cloos avatar Shane Neuville avatar  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.