Coder Social home page Coder Social logo

cloud-init-for-windows's Introduction

Simple incomplete cloud init for Windows

This is a very basic implementation of cloud init for the Microsoft Windows platform. Cloud init is used to configure instance specific properties (like hostname, ssh keys) of virtual machines.

How it works

The hypervisor adds a CDROM drive with an virtual ISO image containing two files: user-data and meta-data. They contain instance specific data (like hostname, ssh keys) in a yaml format.

Prerequisites

Since cloud-init for Windows was orginally developed for our (Linbit) internal ci system (which also virter was written for) it requires cygwin (including the openssh package) to be installed on the machine. Please refer to the virter documentation for more information about setting up such Windows virtual machine templates.

The main work is done by a bash script, so we need to have cygwin installed on the Windows VM. Windows Subsystem for Linux (WSL) does not work.

Functionality

Again, because we use it in our internal ci, only the features we need are implemented. These are:

  • Setting the hostname (including rebooting the machine if necessary).

  • Install the ssh host keys and authorized keys (to make virter vm ssh work)

  • Make sure that cygsshd (the OpenSSH daemon) is actually running.

That's it.

Installing

There is an inno-setup installer script that adds a Windows task scheduler job to run cloud-init for Windows on system startup. It will generate an EXE file which must be run on the VM template before creating VM instances.

Building

You need:

  • A copy of inno-setup version 5 (version 6 may work but hasn't been tested).

  • If you are building on Linux, you also need wine

  • If you are building on Windows you just can unset WINE in the Makefile.

The run

make

This will create a file called install-cloud-init-$VERSION.exe. (you might have to also pull the git tags using:

git pull --tags

).

This file then has to be run on the virtual machine template.

If you are running in an ssh session add the /verysilent parameter as follows:

install-cloud-init-0.6.exe /verysilent

Questions?

The author of this little script can be reached at [email protected]

Have fun :)

cloud-init-for-windows's People

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cloud-init-for-windows's Issues

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.