Skip to content

Latest commit

 

History

History
50 lines (37 loc) · 1.55 KB

README.md

File metadata and controls

50 lines (37 loc) · 1.55 KB

Inizer cloud-init tool

Inizer is a small tool serve as a replacement for cloud-init, it can configure a user VM based on metadata received from cloudnode and run pre-defined user-scripts.

About Inizer

Inizer was inspired by cloud-init concept only, it doesn't implement nor share any cloud-init specification except for the metadata url. Inizer is a single executable binary file lives on /usr/sbin/inizer and executed from /etc/rc.local, with self-update capability from the following url:

http://updates.sadeem.io/inizer/latest

Configuration

Inizer consume the Metadata API endpoint at the following url:

http://169.254.169.254/metadata/v1/

The configuration done by inizer is governed by token sent in vendor-data endpoint. it currently support the following tokens:

Token Description
SetAnchor Configure anchor IP for the VM
NewVM Configure the VM for the first time

Example for the fully expected json is available at metadata.json

To prevent re-configure the VM twice, inizer creates a lock file under /var/lib/ and check if it's exist before processing the configuration, on the other hand inizer don't permanently set the Anchor IP, instead it will be configure on the fly each time the VM start, to work around the case of changing anchor IPs by service provider.

Executing a Script

Inizer supports executing user-data as a script. Make sure the first line of user-data is a shebang and Inizer will attempt to execute it:

Example:

#!/bin/bash

echo 'Hello, world!'