Skip to main content

A utility for building cloud-init user-data.

Project description

mkciud

This module assembles user-data files for use with cloud-init.

More information on the format of user-data files can be found here.

This package provides a command-line utility and a module for Python 3.

Type autodetection is done by looking for a recognized specifier in the first line of the file, such as #!/bin/bash or #cloud-config.

Command-Line

mkciud [ [type-specifier:]filename ]+
python -m mkciud [ [type-specifier:]filename ]+
type-specifiers:
    (default), (empty string), auto           autodetect
    cb, cloud-boothook                        cloud-boothook
    cc, cloud-config                          cloud-config
    ca, cloud-config-archive                  cloud-config-archive
    ph, part-handler                          part-handler
    uj, upstart-job                           upstart-job
    io, include-once, x-include-once-url      x-include-once-url
    in, include, x-include-url                x-include-url
    sh, shellscript, x-shellscript            x-shellscript

Outputs user-data to stdout. This will be binary data, so redirect to a file.

Module

import mkciud

userdata = mkciud.UserData()
for message_body, message_subtype in message_bodies_and_subtypes:
	userdata.add(message_body, message_subtype)
userdata.export(sys.stdout.buffer)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mkciud-1.0.0.tar.gz (3.4 kB view hashes)

Uploaded source

Built Distribution

mkciud-1.0.0-py3-none-any.whl (6.7 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page