The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,358 other followers

Archive for the ‘Windows Azure’ Category

Microsoft Azure training resources

Posted by jpluimers on 2020/10/14

For my link list:

–jeroen

Posted in Azure Cloud, Cloud, Cloud Development, Development, Infrastructure, Software Development, Windows Azure | Leave a Comment »

Packer template for Alpine Linux on Hyper-V and Azure; GitHub – tomconte/packer-alpine-azure

Posted by jpluimers on 2020/10/05

Cool: aĀ Packer template for Alpine Linux on Hyper-V and Azure:Ā [WayBack] GitHub – tomconte/packer-alpine-azure

I likeĀ Alpine LinuxĀ because it is lightweight and the focus of being very secure, how popular it is in the Docker scene where it replaced Ubuntu and is now the standar package atĀ [Archive.is/A2] library/alpine – Docker HubĀ and the mottoĀ [WayBack] Alpine Linux; Small. Simple. Secure. Alpine Linux is a security-oriented, lightweight Linux distribution based on musl libc and busybox.

Alpine is not yet out of of the box endorsed by Azure ([WayBack] Endorsed distributions of Linux | Microsoft Docs) so this is a very welcome tool.

From the readme:

Packer template for Alpine Linux on Hyper-V and Azure

This Packer template will generate a VHD suitable for use in Hyper-V or Azure.

How it works

  • The Packer template downloads the Alpine 3.6 ISO from the official download site.
  • It then usesĀ setup-alpineĀ to perform anĀ installation to disk.
  • TheĀ answersĀ file is served using Packer’s built-in HTTP server.
  • It also installs theĀ hvtoolsĀ package and enables theĀ hv_kvp_daemonĀ service so Hyper-V can detect the VM is running and retrieve its IP address. (Read more aboutĀ Hyper-V Integration Services.)

Software installed

The Packer provisioning step performs the following actions in order to prepare a proper Azure image:

  • Installs Python and OpenSSL, plusĀ sudoĀ andĀ bash
  • Installs theĀ shadowĀ package (forĀ useradd)
  • Installs theĀ Azure Linux Agent
  • Adds recommended boot parameters
  • Sets theĀ sshĀ client interval to 180
  • Enables the Azure Agent to start at boot

The template also installs a customĀ useraddĀ script (inĀ /usr/local/sbin) that changes the behavior of adding password-less accounts (i.e. accounts that log in using SSH keys). By defaultĀ useraddĀ locks the password-less account, preventing it from logging in. The custom script forces an illegal password, so that the password cannot be used to log in, but leaves the account unlocked so it can be access via SSH.

How to use the template

On Linux, usingĀ qemu

Check out theĀ packer-qemuĀ branch for a WIP version that builds the Alpine image usingĀ qemu, allowing you to generate the image from a Linux machine.

Detailed docs TBD, but the Windows instructions below should help.

On Windows, using Hyper-V

The commands need to be run from an elevated PowerShell prompt so that they can interact with Hyper-V.

First run the template. This will generate a VHDX file locally, inĀ output-hyperv-iso.

packer build alpinehv.json

To use the image in Azure, you need to convert the image to VHD usingĀ convert.ps1.

TheĀ deploy.cmdĀ script will upload the VHD to Azure and start a VM based on the image. Please amend the script variables as necessary.

Once the VM is started, you can log on viaĀ sshĀ and make any additional changes. Then deprovision the VM to get it ready to be used as an image:

waagent -deprovision

Finally,Ā makeimage.cmdĀ will deallocate the VM, capture it as an image, and start another VM based on that image.

TODO

  • Review/tweak boot command based onĀ ladar’s comment
  • InvestigateĀ iptablesĀ error messages

Used tooling:

If you are Dutch, or you are fine with a Google translate, then read this background info:

Endorsed version combinations grouped by heritance:

A few others covered inĀ [WayBack] Review: The best Linux distros for Docker and containers | InfoWorld:

and [WayBack]Ā Linux Distributions Optimized for Hosting Docker Ā· Sweetcode.io:

  • Alpine Linux,
  • Container Linux,
  • RancherOS,
  • Atomic Host,
  • Boot2Docker,
  • Ubuntu Core

–jeroen

Posted in Azure Cloud, Cloud, Cloud Development, Development, Hyper-V, Infrastructure, Power User, Virtualization, Windows Azure | Leave a Comment »

Getting Started with Azure Event Grid Scenarios | Serverless360 Blog

Posted by jpluimers on 2020/07/30

For my link list, especially because how it categorises the various kinds of messages:Ā [WayBack]Ā Getting Started with Azure Event Grid Scenarios | Serverless360 Blog:

  • messaging, which conveys an intent
  • eventing, which conveys a fact
    • series events, which represent a stream of events belonging together (like telemetry, logging, or streaming data)
    • discrete events, which are independent, and report some type of state change

If you use Azure, these solutions then apply to the categories:

  • messaging: Azure Event Bus
  • series events: Azure Event Hub
  • discrete events: Azure Event Grid

Related:

–jeroen

Posted in Cloud Development, Development, Software Development, Windows Azure | Leave a Comment »

Virtual Machine Serial Console access | Blog | Microsoft Azure

Posted by jpluimers on 2020/07/08

Reminder to self: out of band access (some older Windows images need extra work; it works out of the box for Linux and more recent Windows images) [WayBack]Ā Virtual Machine Serial Console access | Blog | Microsoft Azure.

Related: [WayBack] Azure virtual machine serial console | Microsoft DocsĀ Bi-Directional serial console for Azure virtual machines (aka.ms/serialconsolehelp).

Via:Ā [WayBack] Microsoft Serial Console: how to fix a ā€˜brokenā€™ cloud – Open Source Insider

–jeroen

 

Posted in Azure Cloud, Cloud, Cloud Development, Development, Infrastructure, Power User, Software Development, Windows Azure | Leave a Comment »

DBA Blog 2.0: Installing Zabbix into Azure using a MySQL PaaS

Posted by jpluimers on 2019/01/04

Interesting: [WayBack] DBA Blog 2.0: Installing Zabbix into Azure using a MySQL PaaS

–jeroen

Posted in *nix, Azure Cloud, Cloud, Cloud Development, Development, Infrastructure, Monitoring, Power User, Software Development, Windows Azure, Zabbix | Leave a Comment »

 
%d bloggers like this: