Skip to main content

A Pulumi package for creating and managing Xen Orchestra cloud resources.

Project description

Xen Orchestra Provider

The provider on top of Xen Orchestra to manage XCP-ng resources. The releases of this package are hosted on the DESY Gitlab here. Pull Requests from dependabot are managed here and then synced back to our Gitlab. Only Python packages are released for the provider since we cannot test it for other languages.

Installing

If you want to use this provider in your python Code you need to install the python package from the Gitlab pypi registry:

pip install pulumi-xenorchestra --index-url https://gitlab.desy.de/api/v4/projects/14393/packages/pypi/simple

Then you can run the following command to install the plugin (the golang binary) from the gitlab releaes page:

pulumi plugin install resource xenorchestra 1.2.0 --server https://gitlab.desy.de/cloud-public/pulumi-xenorchestra/-/releases/v1.2.0/downloads/

Usage

in your __main__.py set up the Xen-Orchestra provider for pulumi in the following way:

import pulumi_xenorchestra as xoa

xoa_provider = xoa.Provider(
    "xenorchestra",
    xoa.ProviderArgs(
        url=Output.secret(secret_data["xoa_url"]),
        token=Output.secret(secret_data["xoa_token"]),
        insecure=False,
)

You can then une the provider to create a Virtual Machine:

xoa.Vm(
    resource_name=machine.name,
    name_label=machine.name,
    name_description="XOA VM",
    cpus=4,
    memory_max=8590000000,
    template=template.id,
    tags=["pulumi"],
    cloud_config=pathlib.Path("./config/cloudinit-xen-static.yaml").read_text()
    ),
    disks=[
        xoa.VmDiskArgs(
            sr_id=machine.storage_repository_id,
            name_label="OS",
            size=34361835520,
        ),
    ],
    networks=[
        xoa.VmNetworkArgs(
            network_id=network.id,
            mac_address=map_ip_to_mac(
                machine.ipv4_address,
                separator=":",
            ),
        ),
    ],
    opts=pulumi.ResourceOptions(
        provider=xoa_provider,
        # Do not recreate node with new credentials
        ignore_changes=["cloud_config"],
        parent=self,
    ),
)

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

pulumi_xenorchestra-1.4.0a1739797154.tar.gz (47.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pulumi_xenorchestra-1.4.0a1739797154-py3-none-any.whl (87.2 kB view details)

Uploaded Python 3

File details

Details for the file pulumi_xenorchestra-1.4.0a1739797154.tar.gz.

File metadata

File hashes

Hashes for pulumi_xenorchestra-1.4.0a1739797154.tar.gz
Algorithm Hash digest
SHA256 f69e75ac7de30a17a43f17a13cbe5d70a70aa1d017562ad5c879fec686f23f3f
MD5 28c5fc35c1ec5def2e0e173dd8d866d0
BLAKE2b-256 7efa03652ec8739482ce6d235de944a988b543ec9b29126b8994cf2069875301

See more details on using hashes here.

File details

Details for the file pulumi_xenorchestra-1.4.0a1739797154-py3-none-any.whl.

File metadata

File hashes

Hashes for pulumi_xenorchestra-1.4.0a1739797154-py3-none-any.whl
Algorithm Hash digest
SHA256 15c2a7306986ce47de539538c34c6fc33d0e4a6ba05d1a03893af693cfbfdd5e
MD5 871de6507e4d56a5abcfd18c0a3c85ed
BLAKE2b-256 c359b5c69cf5ddba26b6ddac1dbbbc33c54bade68fbda78e116ab20668dd63d3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page