← Back to team overview

cloud-init team mailing list archive

Re: I need help on adding a new bistro to cloud-init

 

Shedi,

It looks like you've already done the hardest work, which is
overriding the Distro class for your needs. For everything else, the
easiest way to get started would be to take a look at a previous PR
that added a new distro. For example, support for AlmaLinux (a rhel
based distro) was recently added in this PR:
https://github.com/canonical/cloud-init/pull/872/files

You'll see some various distro lists, setup files, and systemd units
that you may need to add your distro to.

For testing locally, you'll see where unit tests were added in that
AlmaLinux PR. Generally, you'll want to ensure that your distro is
correctly identified and that any new behavior you add works as
expected. Unit tests can be run by calling "pytest" with the filename
you wish to test (they'll also run on our CI when you submit a PR).
Guidelines for unit tests can be found here:
https://cloudinit.readthedocs.io/en/latest/topics/testing.html

For running/debugging your distro locally, KVM is probably your best
bet. See the documentation here (using your image instead of the one
referenced):
https://cloudinit.readthedocs.io/en/latest/topics/debugging.html#analyze-quickstart-kvm

For the actual process of creating and submitting a PR, we have
documentation here:
https://cloudinit.readthedocs.io/en/latest/topics/hacking.html#submitting-your-first-pull-request

Hope that helps!

- James

On Thu, May 20, 2021 at 1:51 PM Shreenidhi Shedi <sshedi@xxxxxxxxxx> wrote:
>
> Hi All,
>
>
>
> Hope you all are doing well.
>
> I am interested in contributing to cloud-init and I submitted one minor documentation fix to cloud-init sometime back.
>
> I work on VMware’s open source OS Photon - https://vmware.github.io/photon/assets/files/html/3.0/Introduction.html
>
> We have our own distro specific things and we have https://github.com/vmware/photon/blob/dev/SPECS/cloud-init/photon-distro.patch
>
> And using this patch in our spec file.
>
>
>
> I want to make it a part of upstream cloud-init and would like to know how can I get started in this regard.
>
> What are the tests I need to add, how can I test my changes in my local build machine and so on.
>
>
>
> Appreciate any kind of help in this regard.
>
>
>
> --
>
> Shedi
>
>
>
> --
> Mailing list: https://launchpad.net/~cloud-init
> Post to     : cloud-init@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~cloud-init
> More help   : https://help.launchpad.net/ListHelp


Follow ups

References