Giter VIP home page Giter VIP logo

azure-packer-rhel-base's Introduction

Custom RHEL image to Azure

CREATE SERVICE PRINCIPAL IN AZURE

az login
az account set --subscription <subscription_name>
az account show
az ad sp create-for-rbac -n <servicePricipalName> --password <chosen-password> --role contributor --scopes /subscriptions/<subscriptionId>

This is how the output looks like (save the output in order to use its values during the image creation process)

{
  "appId": "aaxxx746-5xx2-4xxb-8xxa-648xxxxxx99a",
  "displayName": "<servicePricipalName>",
  "name": "http://<servicePricipalName>",
  "password": "blablabla",
  "tenant": "b0xxxx3f-8xx5-4xxd-bxxe-283xxxxxx237"
}

GENERATE SSH KEYS (no passphrase)

ssh-keygen -t rsa

CREATE KEY VAULT TO STORE SSH PRIVATE KEY

az group create -n <resourceGroupName> -l 'West Europe'
az keyvault create -n <keyVaultName> -g <resourceGroupName> -l 'West Europe' --enabled-for-template-deployment true
az keyvault secret set --vault-name <keyVaultName> -n <secretName> --file ~/temp/id_rsa

INSTALL PACKER

wget -O packer_1.2.1_linux_amd64.zip https://releases.hashicorp.com/packer/1.2.1/packer_1.2.1_linux_amd64.zip?_ga=2.5616755.1754411308.1519853768-856854198.1519853768
sudo unzip packer_1.2.1_linux_amd64.zip -d /usr/local/packerio
sudo ln -s /usr/local/packerio/packer packer
sudo ln -s /usr/local/packerio/packer packerio

CREATE A STORAGE ACCOUNT AND A CONTAINER TO UPLOAD THE VHD

az group create -n <resourceGroupName> -l 'West Europe'
az storage account create --sku Premium_LRS --resource-group <resourceGroupName> --name <storageAccountName>

Modify azure_base.json

Change parameters to reflect your values.

To create VHD and upload to the storage account: packerio build rhel.json

azure-packer-rhel-base's People

Contributors

teemu-u 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.