Skip to content

docs: Add docs for module creation (SC-961)#1415

Merged
TheRealFalcon merged 5 commits into
canonical:mainfrom
TheRealFalcon:module-docs
May 3, 2022
Merged

docs: Add docs for module creation (SC-961)#1415
TheRealFalcon merged 5 commits into
canonical:mainfrom
TheRealFalcon:module-docs

Conversation

@TheRealFalcon
Copy link
Copy Markdown
Contributor

Proposed Commit Message

docs: Add docs for module creation

Additionally remove the cc_foo module as any relevant documentation
there has been moved to the official documentation.

@TheRealFalcon TheRealFalcon changed the title docs: Add docs for module creation docs: Add docs for module creation (SC-961) Apr 28, 2022
@holmanb
Copy link
Copy Markdown
Member

holmanb commented Apr 29, 2022

I think this does a good job of covering what goes in the config module directory. Think we should add context for boot stage determination / cloud.cfg.tmpl / etc?

Comment thread doc/rtd/topics/module_creation.rst
Comment thread doc/rtd/topics/module_creation.rst Outdated
would be a significant change to the instance metadata. An example
could be an instance being moved to a different subnet.

* ``examples``: Lists examples to be shown in the documentation.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* ``examples``: Lists examples to be shown in the documentation.
* ``examples``: Lists examples of any new cloud-config keys this module reacts to.
These examples will be rendered in the module reference documentation.

Comment thread doc/rtd/topics/module_creation.rst Outdated
"distros": [ALL_DISTROS],
"frequency": PER_INSTANCE,
"examples": [
"cc_example: example1",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might want to express this as something a bit different from cc_example so it doesn't imply some sort of requirement to match the current module name.

Suggested change
"cc_example: example1",
"some_new_config_key: allowed_value",

Additionally remove the cc_foo module as any relevant documentation
there has been moved to the official documentation.
@TheRealFalcon
Copy link
Copy Markdown
Contributor Author

Addressed comments in a separate commit. Force push is only for rebase.

Comment thread doc/rtd/topics/module_creation.rst Outdated
Comment on lines +96 to +97
In order for a module to be run, it must be defined in ``/etc/cloud`` on the
launched instance. The three module sections are
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In order for a module to be run, it must be defined in ``/etc/cloud`` on the
launched instance. The three module sections are
In order for a module to be run, it must be defined in a module run section in
``/etc/cloud/cloud.cfg`` or ``/etc/cloud/cloud.cfg.d`` on the launched instance.
The three module sections are

Copy link
Copy Markdown
Collaborator

@blackboxsw blackboxsw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor thought on being clear about where the config files exist for changing such a value. If we don't point to /etc/cloud/cloud.cfg specifically, someone may inadvertently add a cloud_init_modules: [cc_my_mod] which would drop all of our predefined modules in the base config.

I'll defer to whether or not you think the specific comment is useful or needed but +1 regardless of your choice there in wording.

Copy link
Copy Markdown
Member

@holmanb holmanb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the cloud.cfg.tmpl addition. LGTM

@TheRealFalcon TheRealFalcon merged commit 9e411fa into canonical:main May 3, 2022
@TheRealFalcon TheRealFalcon deleted the module-docs branch May 3, 2022 14:24
aciba90 pushed a commit to aciba90/cloud-init that referenced this pull request May 10, 2022
Additionally remove the cc_foo module as any relevant documentation
there has been moved to the official documentation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants