[OpenStack-docs] [openstack-dev] Fwd: [Neutron][LBaaS][Octavia][Docs] Need experienced contributor documentation best-practices and how-tos
Stephen Balukoff
sbalukoff at bluebox.net
Fri Mar 4 05:39:59 UTC 2016
Hello Lana!
Thank you for your prompt reply-- I found it extremely helpful! Comments
inline:
> > So in the intervening days I've been going through the openstack-manuals,
> > openstack-doc-tools, and other repositories, trying to figure out where I
> > make my edits. I found both the CLI and API reference in the
> > openstack-manuals repository... but when I went to edit these files, I
> > noticed that there's a comment at the top stating they are auto-generated
> > and shouldn't be edited? It seemed odd to me that the results of
> something
> > auto-generated should be checked into a git repository instead of the
> > configuration which creates the auto-generated output... but it's not my
> > project, right?
>
> Believe me, we know. At the moment, this is the best we can do with what
> we have to work with.
>
Yep! I get it.
> > Anyway, so then I went to try to figure out how I get this auto-generated
> > output updated, and haven't found much (ha!) documented on the process...
> > when I sought help from Sam-I-Am, I was told that these essentially get
> > generated once per release by "somebody." So... I'm done, right?
>
> That 'somebody', to be more specific, is the speciality team in charge of
> the book in question. We also do a full refresh of the scripts before each
> release.
>
>
Cool! Is that process documented anywhere? Or better yet, is there a way
for developers to do a "check experimental" or similar operation on any
given patch so we can see what the manual will look like after our API /
CLI updates (presumably in said patch)?
> > Well... I'm not so sure. Yes, if the CLI and API documentation gets
> > auto-generated from the right sources, we should be good to go on that
> > front, but how can I be sure the automated process is pulling this
> > information from the right place? Shouldn't there be some kind of
> > continuous integration or jenkins check which tests this that I can look
> > at? (And if such a thing exists, how am I supposed to find out about it?)
> >
> > Also, the new feature I've added is somewhat involved, and it could
> > probably use another document describing its intended use beyond the CLI
> /
> > API ref. Heck, we already created on in the OpenStack wiki... but I'm
> also
> > being told that we're trying to not rely on the wiki as much, per se, and
> > that anything in the wiki really ought to be moved into the "official"
> > documentation canon.
>
> Depending on the feature and project in question, I would usually
> recommend you add it to the appropriate documentation in your project repo.
> These are then published to
> http://docs.openstack.org/developer/[yourproject] and are considered
> official OpenStack documentation.
>
> If you want it added to the broader OpenStack documentation (the top level
> on the docs.openstack.org), then I suggest you open a bug, wait for a
> docs person to triage it (we can help advise on book/chapter, etc), and
> then create a patch against the book in the same way as you do for your
> project. If you don't want to write it yourself, that's fine. Open the bug,
> give as much detail as you can, and we'll take it from there.
>
>
Aah-- so I knew that the Octavia documentation we've committed thus far
showed up that way but I'd been given the impression that we were doing the
wrong thing: That it was generally not considered a good thing to have your
documentation live in your own custom non-openstack-manual space and that
you should instead work to get all of it moved into the openstack manual.
In any case it's good to know about how you prefer people contribute
changes to the manual: I expected y'all to want full editorial control over
everything the goes into the manual, but I didn't know you'd just go write
excerpts yourself on features that developers add and then open
documentation bug reports for. That sounds like a lot of work for you!
> >
> > So.... I'm at a loss. I'm a big fan of documentation as a communication
> > tool, and I'm an experienced OpenStack developer, but when I look in the
> > manual for how to contribute to the OpenStack documentation, I find a
> guide
> > that wants to walk me through setting up gerrit... and very little
> targeted
> > toward someone who already knows that, but just needs to know the actual
> > process for updating the manual (and which part of the manual should be
> > updated).
>
> There's not a lot of content here to share. You commit docs in exactly the
> same way as you commit code. If you already have the skills to commit code
> to an OpenStack project, then you know everything you need to know to
> commit to docs.
>
...except for the stuff that's in there right now that's auto-generated. :)
I wonder if there's a better way to communicate that developers generally
won't have to worry about updating API / CLI references manually as this is
all auto-generated... other than having been here long enough to know
that's the case. (FWIW, I dislike relying on tribal knowledge...)
>
> > When I went back to Sam-I-Am about this, this spawned a much larger
> > discussion and he suggested I bring this up on the mailing list because
> > there might be some "big picture" issues at play that should get a larger
> > discussion. So... here I am.
> >
> > Here's what I think the problem is:
> >
> > * We want developers to document the features they add or modify
> > * We want developers to provide good user, operator, etc. documentation
> > that actual users, operators, etc. can use to understand and use the
> > software we're writing.
> > * We even go so far as to say that a feature is not complete unless it
> has
> > this documentation (which I agree with)
> > * With a rather small openstack-docs contributor team, we want to
> automate
> > as much as possible, and rely on the docs team to *edit* documentation
> > written by developers instead of writing the docs themselves (which is
> more
> > time consuming for the docs team to do, and may miss important things
> only
> > the developers know about.)
>
> I agree with all of your points here.
>
> >
> > But:
> >
> > * We don't actually provide much help to the developers to know how to do
> > this. We have plenty for people who are new to OpenStack to get started
> > with gerrit-- but there doesn't seem to be much practical help on where
> to
> > get started, as an experienced contributor to other projects, on the
> actual
> > task of updating the manual.
>
> As I said earlier, it's no different to contributing to other projects, so
> you already have the requisite skills.
>
> >
> > And I would wager:
> >
> > * We don't seem to have many automated tools that tie into the jenkins
> gate
> > checks to make sure that new features are properly documented.
> > * We need something better than the 'APIImpact' and 'DocImpact' flags you
> > can add to a commit message which generate docs project bug reports These
> > are post-hoc back-filling at best, and as I understand it, often mean
> that
> > some poor schmuck on the docs team will probably be the one who ends up
> > writing the docs for the feature the developer added, probably without
> the
> > developer's help.
>
> I also agree with these points. We've recently overhauled the DocImpact
> flag to try and correct some of this behaviour.
>
> >
> > Please understand: I know that big strides have been made in the right
> > direction here recently, and I know that the docs team is both small and
> > under-appreciated. For example, the move from XML-based documentation to
> > .rst based documentation is a huge step in a direction that will prevent
> > most developers from wanting to gouge their own eyes out anymore when it
> > comes to writing documentation (though in my searching over the last few
> > days I did find one api reference repository where it looked like people
> > are actually editing raw XML and submitting this through the gerrit
> review
> > process... please tell me this is not actually still the state of
> affairs!)
>
> Thanks. It was a lot of hard work, and we're not quite there yet. API docs
> are in the process of some major changes, though, so please watch this
> space.
>
Ok, good to know!
>
> >
> > Also, I certainly don't blame the docs team for the history of how we got
> > to where we are today. I'm pretty sure everyone on that (and most)
> projects
> > is truly here to make the OpenStack world a better place and is working
> > hard to make that happen. Nobody is trying to burn the house down.
> >
> > But I think there are some flames that need extinguishing. I'm writing
> this
> > e-mail because I think we've got some additional steps that need to be
> > taken to actually help experienced openstack contributors know *how* they
> > go about updating the openstack docs. It's not that we aren't willing to
> > write documentation (well, I don't think most are unwilling), it's that
> the
> > process for doing this seems extremely obfuscated.
>
> I'm pleased to say that we have many developers in the OpenStack community
> who are very dedicated to contributing great documentation, and committed
> to ensuring the docs we have are also very high quality. Just submit a
> patch in exactly the same way as you would for any other project.
> >
> > Ideally, I would like to see a practical and relatively short how-to
> guide
> > along the lines of: "The shiny new feature you added to your OpenStack
> > project has merged. Congratulations! Here's how you update the manual..."
> > This should be written by someone already very familiar with the
> OpenStack
> > documentation system. This practical guide would provide answers for:
> >
> > * How to actually ensure that API / CLI documentation is updated (if it's
> > actually automated, and what the process for that is so that others can
> > check.)
> > * Criteria to know when more documentation is required than just API /
> CLI
> > reference updates
> > * Where to put this more extensive documentation.
> > * Other non-intuitive information you should know (eg. what image format
> > diagrams should be in, and best practices for uploading them, plus style
> > guides for the images)
>
> All of this is documented in the Infra manual, with a few docs-specific
> things (docs repos, writing style, etc) in our Contributor Guide:
> http://docs.openstack.org/contributor-guide/index.html
>
> If you feel there's something specific missing, please raise a bug in our
> queue, or propose a patch to the Contributor Guide.
>
Aah-- you're right that a good portion of this is already documented there.
Sorry-- I looked through the guide but didn't see what I was after in a lot
of it.
I guess the piece that was missing for me here was an opinionated guideline
on where documentation should go that is not necessarily appropriate for
the general openstack manual. You already told me above it should go in
project-specific documentation repositories, but perhaps it would be
helpful to mention something about that in this contributor guide? More on
this later...
> > Even more ideally, I would like to see a practical how-to guide along the
> > lines of: "So you've started a new OpenStack project. Here's how to make
> > sure it plays nice with the documentation system..." This would provide
> > answers for:
> >
> > * How to set up automated tests to ensure documentation meets
> > machine-discernable standards for the openstack manual (eg. pep8 for docs
> > with specific style-enforcement included)
>
> I've been a technical writer in a professional capacity for a very long
> time, and I've not yet seen anyone even attempt to enforce style
> automatically. English is tricky. That said, we do already run a series of
> Jenkins jobs to ensure books build, and links resolve, etc.
>
Oh! I meant "style" in the developers' sense, not English writing style.
(We'll have to be worried, indeed, once computers are able to reliably do
the latter.) I was talking more of the sorts of things that pep8 is able to
pick out: Lines that are too long, images in formats or in sizes we don't
allow, required sections of documents missing or using the wrong
separators. In other words, things that are syntactically correct that the
underlying compilation tools will allow, but that we have decided not to do
because we have opinionated conventions and standards we want to follow
(which are documented in the contributor's guide). That's the kind of
"style" computers are generally great at enforcing.
> * How to set up automated tests to ensure that documentation is either
> > imported from your project to the OpenStack manual (less ideal, I know--
> > coders are coders and not writers for a reason), or that there are hooks
> > from the openstack manual into your project which flag and potentially
> > block merges of insufficiently-documented changes (ie. something better
> > than adding 'APIImpact' and 'DocImpact' to your commit message and hoping
> > somebody comes along and documents it at some point).
>
> This was part of the concerns we had around DocImpact that forced the
> recent changes, and we eventually determined that really it needs human
> (not automated) intervention to decide what 'complete' means in the sense
> of documentation.
I guess I was just trying to see if there was a simpler way that project
cores could prevent merging code that wasn't well documented-- in other
words, force the developer submitting code to write a first draft of what
they think should be included in the manual for this. As it is right now,
the core has to merge the code with a 'DocImpact' flag in the commit
message, and then it falls off the radar-- the core may not follow-up that
the documentation was ever written or included important subtle details.
Maybe it would be better to add a new "Doc-Change: <id>" flag that refers
to the change ID of an update to the openstack-manuals repository that's
under review? That way if the core thinks the change warrants an openstack
manual update, they can force the submitter to actually get that started
(and even near its final form) before the code is merged.
This would allow cores (who care about making sure documentation is
updated) to enforce that policy more effectively: If a developer can't get
their code merged without a good documentation draft, they're going to
write the documentation.
If we had that feature, then we could lobby hard to convince cores to
require "Doc-Change:" instead of "DocImpact" whenever an openstack manual
update is required. :)
> * Best practices for things like where to put the documentation, how and
> > when to require release notes, documentation templates with the proper
> > style, where to put sample config files so they get automatically slurped
> > into the openstack manual, etc.
> > * How to know if certain types of documentation are inappropriate for the
> > openstack manual, and best practices on where to put this, if not in the
> > manual.
>
> These are very subjective things, and you really need someone skilled in
> the art of Information Architecture to determine this. It's another reason
> why we ask people to wait while the docs team triage their bug. If you
> could work out how to wrap rules around IA, you'd put a lot of us out of
> work and, incidentally, render my university degree pointless. Information
> Architecture, translation, technical writing and associated tasks are all
> very much more an art than a science.
>
> But, on the upside, you know we have a mailing list now, and we're always
> willing to answer these kinds of questions for you. The thing about writers
> is we genuinely love being asked about writing. Try us ;)
>
See, this is one of the things I think we could improve upon:
I was around when the Octavia project was founded. We had no idea what the
"right" way was for us to organize our repository with regard to
documentation, let alone how to set up automated tests for things like
whether our local manual would build. We ended up essentially stealing code
and conventions from other openstack and stackforge projects (which often
didn't do things consistently), also having no idea whether they were doing
things the "right" or best way. This wasn't so much about "should our API
reference go in this directory or that" so much as "is there a convention
for this, and will our choice potentially cause predictable problems for
others and/or break automated documentation compilation tools."
We also had no idea whether it was appropriate to keep documentation in our
own repository-- we put it there as a place to keep it temporarily until
and if the project was ever accepted into the OpenStack umbrella (at which
point we thought we'd have to get it all into the manual somehow).
What I'd like to see on this front is some kind of opinionated guide on the
best way to organize where documentation should go within a project, as
well as recommendations for which tests should be set up for the same. Of
course this won't be appropriate for every project (hence "opinionated
guide"), but it seems to me that it would be helpful to project cores to
have such a thing-- and would likely aid with automation and consistency of
documentation across the umbrella of OpenStack projects.
In addition to this, I also don't find any good guideline in the
documentation contributors' guide as to what kind of documentation is
appropriate for the openstack manual, and which should go elsewhere. I
realize this is also very much a judgement call-- but that's why I'd call
it an "informed opinion."
Again, what I'm asking for here is an codified informed opinion (which is
really all a "best practices" guide is). No strict enforcement of policy
(unless the individual project cores want to do that), per se: Just
guidelines y'all think that project cores should be following regarding the
treatment of documentation within and without the OpenStack manual. We are
more experienced than we were back then, but I suspect that even very
mature projects could benefit from this guide (especially if best practices
change, or as there is turnover in cores). Having that added to the
documentation contributors' guideline would be very helpful, in my opinion!
> I fully admit that it's possible the above may already exist scattered in
> > various places in the current documentation structure. However, I can
> tell
> > you from my experience in the several OpenStack projects I've contributed
> > to, that it is apparently not easily located or consumed because very few
> > of the experienced contributors I work with have any clue about much of
> the
> > above.
>
> I'm very sad to hear this. Docs handled in the same way as code has been
> our guiding principle since Anne Gentle formed the openstack-manuals team.
> What else should we be doing to get this message out there?
>
I agree that handling docs like code is a good thing. Maybe adding the
"Doc-Change:" feature described above could aid in that. :)
Perhaps part of the problem is that the contributors' guide has only one
"Quickstart" page, that is aimed purely at people new to OpenStack
contribution in general. Perhaps it would be a good thing to create two
more quickstart pages: One aimed at experienced contributors who
nevertheless don't do (or haven't done) documentation updates that often,
and another aimed at project cores which list best practices for where
different types of documentation should go, as well as best practices for
how to organize and test documentation kept within their own repositories
(even if half of this just ends up being links to infra docs)?
Part of the problem with the contributors' guide as I see it right now is
that it provides a lot of detail on specific items, but it's easy to get
quickly overloaded in detail. The detail is definitely important, but
without knowing where to get started, it can become frustrating (and people
will give up-- even people who have otherwise work with gerrit every day.)
Does that make sense?
> > Please also note that I am *NOT* volunteering to write the above
> documents
> > per se: The above docs need to be written by someone actually familiar
> with
> > the documentation system. But it will be effort well spent, because when
> > developers actually do start contributing documentation along with their
> > new code, you'll get to spend more time editing those documentation
> > contributions than writing them from scratch yourself. And everyone wins
> > then because the OpenStack documentation becomes more complete and sucks
> > less.
>
> We greatly appreciate all the developers who contribute to docs. There are
> many already involved, but it's always wonderful to welcome more :)
>
> >
> > In any case, I am certainly willing to provide feedback on the above
> > suggested how-to guides, should someone decide to write them.
> >
> > Thanks,
> > Stephen
> >
> > P.S. I still have no idea how I go about updating the manual for the
> major
> > features that we added to neutron-lbaas and Octavia in this cycle.
>
> Your automated content should be here:
> http://docs.openstack.org/liberty/config-reference/content/networking-plugin-lbaas.html
> Please raise a bug against openstack-manuals (
> https://launchpad.net/openstack-manuals) if that is not the case.
>
>
Ok, I will do what I can to galvanize my team to make the above not suck.
:) Given our previous discussion, I don't suppose there's an obvious way to
figure out where a relatively new project's information ought to be
inserted in the manual? (Octavia is the reference implementation for
Neutron-LBaaS, so in the operators' guide on how to set up LBaaS we're also
going to have to describe how to set up, configure and maintain Octavia.)
> Octavia is documented here: http://docs.openstack.org/developer/octavia/
> If you have content to add, propose a patch to
> http://git.openstack.org/cgit/openstack/octavia
>
>
Yep-- contributed a good portion of that myself already, actually. :)
(Didn't know that was "kosher.")
> If you feel these things should be documented elsewhere, please raise a
> bug, or ping me on IRC (I'm loquacity) and we can chat further about the
> best place for it.
>
Cool beans! I'm "sbalukoff" on IRC and can usually be raised in the
#openstack-lbaas channel.
Thanks,
Stephen
--
Stephen Balukoff
Principal Technologist
Blue Box, An IBM Company
www.blueboxcloud.com
sbalukoff at blueboxcloud.com
206-607-0660 x807
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-docs/attachments/20160303/3e9dd00d/attachment-0001.html>
More information about the OpenStack-docs
mailing list