Skip to content

cloud-init and UserData service documentation cleanup#132

Merged
yadvr merged 5 commits into
apache:masterfrom
onitake:patch-1
Jan 11, 2021
Merged

cloud-init and UserData service documentation cleanup#132
yadvr merged 5 commits into
apache:masterfrom
onitake:patch-1

Conversation

@onitake

@onitake onitake commented May 28, 2020

Copy link
Copy Markdown
Contributor

The cloud-init documentation in the CloudStack manual has always been a bit outdated and was missing a few crucial bits, such as the data-server. well-known host name, which is supported by cloud-init since version 19.4.

This PR is almost a full rewrite to make it clearer and easier to use.

One open question: I updated the links to the API docs to 4.14. Is there a generic link that always points to the latest version?

@onitake

onitake commented May 28, 2020

Copy link
Copy Markdown
Contributor Author

One more thing: Simply base64-ing the cloud-config and passing it to cloudmonkey is not enough. It needs to be a proper multi-part MIME message, such as this one:

Content-Type: multipart/mixed; boundary="//"
MIME-Version: 1.0

--//
Content-Type: text/cloud-config; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="cloud-config.txt"

#cloud-config
write_files:
- path: /testfile    
  content: hello world

I think I'm also going to add this to the example.

@andrijapanicsb

Copy link
Copy Markdown
Contributor

@onitake you should use relative links, please see some other examples here in the doc.

One interesting thing, unless I was seriously drunk, I recall I was adding a simple one-line cleartext text as userdata while testing some things a few months ago (i.e. not base64 encoded)...

@andrijapanicsb

Copy link
Copy Markdown
Contributor

requesting docbuild

@ACSGitBot

Copy link
Copy Markdown

Your request had been received, i'll go and build the documentation and check the output log for errors.

This shouldn't take long.

@ACSGitBot

Copy link
Copy Markdown

Build finished. You can review it at: https://acs-www.shapeblue.com/docs/WIP-PROOFING/pr132

Build Log Output:

No log errors found to report.

@onitake

onitake commented Jul 24, 2020

Copy link
Copy Markdown
Contributor Author

@andrijapanicsb I tried plaintext as well, but it wouldn't work with cmk. And without the MIME headers, cloud-init would refuse to decode the file. Apparently, you can put multiple files into this field, that's why MIME headers are needed.

As for relative links: That works with the API docs as well?

@andrijapanicsb

Copy link
Copy Markdown
Contributor

I'll be honest and say that I have no idea about those specific links - please try to find some existing examples - or link to /latest/ - that might be a safe bet.

@yadvr

yadvr commented Sep 24, 2020

Copy link
Copy Markdown
Member

@onitake can you address merge conflict, and update as necessary? Thanks

@DaanHoogland

Copy link
Copy Markdown
Contributor

@onitake can you address the conflict and the comments?

@yadvr

yadvr commented Dec 30, 2020

Copy link
Copy Markdown
Member

Ping @onitake

@onitake

onitake commented Jan 4, 2021

Copy link
Copy Markdown
Contributor Author

Sorry for the delay, I'll look into this until tomorrow.

@yadvr

yadvr commented Jan 5, 2021

Copy link
Copy Markdown
Member

Thanks @onitake

@onitake

onitake commented Jan 10, 2021

Copy link
Copy Markdown
Contributor Author

I adapted the DHCP lease path PR, but haven't found any example on how to create apidoc links in the repository.

However, I found plenty of links that point to https://cloudstack.apache.org/docs/api/ - and that page produces a 404. There is also no https://cloudstack.apache.org/docs/api/latest/ . In other places, https://cloudstack.apache.org/api.html is used, which works and displays a list of API versions.

@rhtyd Maybe we should ensure that https://cloudstack.apache.org/docs/api/apidocs-latest/ (or similar) works, and that https://cloudstack.apache.org/docs/api/ redirects to https://cloudstack.apache.org/api.html or that all the links are fixed?

@yadvr

yadvr commented Jan 11, 2021

Copy link
Copy Markdown
Member

@onitake you can give specific version for example http://cloudstack.apache.org/api/ or http://cloudstack.apache.org/api/apidocs-4.14

requesting docbuild

@yadvr

yadvr commented Jan 11, 2021

Copy link
Copy Markdown
Member

requesting docbuild

@ACSGitBot

Copy link
Copy Markdown

Your request had been received, i'll go and build the documentation and check the output log for errors.

This shouldn't take long.

@ACSGitBot

Copy link
Copy Markdown

Build finished. You can review it at: https://acs-www.shapeblue.com/docs/WIP-PROOFING/pr132//

Build Log Output:

No log errors found to report.//

@weizhouapache weizhouapache left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@yadvr yadvr added this to the 4.15 milestone Jan 11, 2021
@yadvr yadvr merged commit c50d817 into apache:master Jan 11, 2021
@onitake

onitake commented Jan 11, 2021

Copy link
Copy Markdown
Contributor Author

@onitake you can give specific version for example http://cloudstack.apache.org/api/ or http://cloudstack.apache.org/api/apidocs-4.14

Yes, this I know.
@andrijapanicsb requested that I use a more generic URL (such as "latest/"), and I agree that this would be better. But with the way the API docs are set up, there doesn't seem to be a way to refer to the latest version.

I will also prepare a PR to replace https://cloudstack.apache.org/docs/api/ with https://cloudstack.apache.org/api.html - the former link doesn't work.

@onitake onitake deleted the patch-1 branch January 11, 2021 13:44
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.

7 participants