canonical / canonical/cloud-init

[docs]: Development documentation: How to test code changes in my local cloud-init repo when spinning up a new VM?

Open
#6,292 6 comments 0 reactions 0 assignees View on GitHub
documentation
Dominant language
Python
Stars
3.8k
Forks
1.1k
Avg merge
2d 23h
Merged PRs (30d)
18

Description

# Documentation request

Hi, I have started working on a bug (my first) in cloud-init but I want to understand how I can manually check that my code is working.

I have went through the documentation and couldn't find anything about local deployment. The closest I found was the how to [test the pre-release cloud-init](https://docs.cloud-init.io/en/latest/howto/ubuntu_test_prerelease.html) tutorial.

My guess is to build the python wheel out of the source code then installing it on the VM.

The other part of my question is how to test my local package on the first boot of the VM (which is the intended use case of `cloud-init`) and not via `sudo cloud-init clean --logs --reboot` (which is more of a workaround). Is it some `virt-customize` magic on the cloud image before running the VM?

If someone couldjust share their script in this issue without necessarily working on updating the documentation, that would be great as well to unblock me. Thanks!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.