Coder Social home page Coder Social logo

acc-vm-engine's Introduction

Azure template generator for ACC VMs

Supported VMs

  • Confidential VM (CVM)

Pre-Requisite

If you want to build on Linux or MacOS, make sure you have golang installed. If not, you can download it by following these instructions:

# update your system
sudo apt update
sudo apt upgrade

# download the go binary
wget https://dl.google.com/go/go1.15.5.linux-amd64.tar.gz

# extract binaries tarball
sudo tar -C /usr/local/ -xzf go1.15.5.linux-amd64.tar.gz

# set the right path
cd /usr/local/
echo $PATH
sudo nano $HOME/.profile

inside your profile, append the following:

export PATH=$PATH:/usr/local/go/bin

save and apply changes:

source $HOME/.profile

check that it installed correctly:

go version

Build

On Linux or MacOS, execute:

make build

Alternatively, you can build with a Docker container:

docker run \
  -v $PWD:/go/src/github.com/microsoft/acc-vm-engine \
  -w /go/src/github.com/microsoft/acc-vm-engine \
  golang:1.15-alpine go build ./cmd/acc-vm-engine

Generate template

A sample configuration file for CVM deployment is located in the test/ folder. If your machine runs Linux or MacOS, you can execute the following command to generate templates for a windows vm deployment:

./acc-vm-engine generate -c ./test/cvm-win.json

Please note that for a linux deployment, you will have to put your ssh public key into the test/cvm-ubuntu.json parameter file under 'admin_password_or_key' or you will not be able to connect. Then execute:

./acc-vm-engine generate -c ./test/cvm-ubuntu.json

In case you need to generate an ssh public key, you can use the following command and use the public key content that it outputs into your ~/.ssh folder:

ssh-keygen -t rsa -b 4096 -C "[email protected]"

Alternatively, use Docker container:

docker run \
  -v $PWD:/go/src/github.com/microsoft/acc-vm-engine \
  -w /go/src/github.com/microsoft/acc-vm-engine \
  golang:1.15-alpine ./acc-vm-engine generate -c ./test/cvm-win.json

The template and parameter files will be generated in _output directory (by default).

Deploy the VM

Use Azure CLI or PowerShell to deploy the VM.

When using Azure CLI, you may want to log in to Azure and set default subscription. This is a one-time operation:

SUB=<subscription ID>

az login

az account set --subscription ${SUB}

Create a resource group and deploy the VM:

RGROUP=<resource group name>
LOC=<deployment region>

az group create -n ${RGROUP} -l ${LOC}

az deployment group create \
  --resource-group ${RGROUP} \
  --name MyDeployment \
  --template-file ./_output/azuredeploy.json \
  --parameters @./_output/azuredeploy.parameters.json

acc-vm-engine's People

Contributors

anjuligoring avatar dmitsh avatar microsoft-github-operations[bot] avatar microsoft-github-policy-service[bot] avatar shruti25ratnam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

acc-vm-engine's Issues

[Action Needed] This repo is inactive

This GitHub repository has been identified as a candidate for archival

This repository has had no activity for more than 2 years. Long periods of inactivity present security and code hygiene risks. Archiving will not prevent users from viewing or forking the code. A banner will appear on the repository alerting users that the repository is archived.

Please see https://aka.ms/sunsetting-faq to learn more about this process.

Action

✍️

❗**If this repository is still actively maintained, please simply close this issue. Closing an issue on a repository is considered activity and the repository will not be archived.🔒

If you take no action, this repository is still inactive 30 days from today it will be automatically archived..

Need more help? 🖐️

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.