Developer guide #746

Merged
merged 148 commits into from Jan 4, 2016

Conversation

Projects
None yet
Contributor

mbruzek commented Nov 25, 2015

This adds a developer guide section above the charm authors section in the
navigation. This adds the updated content for developers who want to use layers
and reactive with a focus on the Getting Started Guide and Reference material.

The focus of this PR changes the following:

  • Updated Reference guide with Python and Bash examples for Hook Tools
  • A Reactive/Layers focus on the charm developer docs
  • A guide for implementing Charm Layers
  • A guide for implementing Charm interfaces
  • An updated Hook Environment variable reference
  • Various imports from the existing author docs (thank you contributors)
  • Updated charm testing section (incomplete)

Please review the attached guide for organization, correctness, cross-file linking
to the reference guide where applicable. You will notice that we did not delete any files at this point. The author section is just moved down in the navigation.

code formatting a link? 🚳

Minor suggestion to link filesystem-type to the usage guide anchor for filesystem storage.

same with block-type as above

"a charm code"? sounds weird. seemed fine as it was, but if you really think adding "code" in there helps, I think you should drop the "a"

Collaborator

chuckbutler replied Nov 18, 2015

+1 - allows charm code to query, or allows a charm sounds proper.

Owner

mbruzek replied Nov 18, 2015

fixed this.

maybe also an example with "storage-get -s data/0 location", which will just print out "/srv/data"

Owner

mbruzek replied Nov 18, 2015

OK

I think these limitations belong in charms-storage.md

Owner

mbruzek replied Nov 18, 2015

Moved the section to the "using" document. Thanks for the feedback @axw

this doesn't quite work for me:

# storage-get location
error: no storage instance specified

What I think it should be is:

# storage-get -s osd-devices/1 location
/dev/xvdf
Owner

mbruzek replied Nov 18, 2015

Updated with your suggestion. Thanks @ChrisMacNaughton !

axw replied Nov 19, 2015

Hold up: storage-get should work without "-s" if you're in a storage-attached or storage-detaching hook. It won't work if you're in a different kind of hook, because there's no implied storage instance for the other hooks.

@ChrisMacNaughton what hook were you trying to use it from?

it was in the config-changed I think; the ceph charm, storage branch checks all storage on that hook (https://bazaar.launchpad.net/~axwalk/charms/precise/ceph/trunk/view/head:/hooks/hooks.py#L149), may be worth thinking about how we handle documenting that :)

axw replied Nov 19, 2015

@ChrisMacNaughton Agreed, we should be clear about this.
@mbruzek below is the low-down, please add something to this effect after translating to English.

If storage-get is called from within a storage-attached or storage-detaching hook, it will, by default, respond with information about the storage instance relating to the hook. If you are within a different hook, or you just want information relating to a different storage instance, you must specify the storage instance's ID via the "-s" flag.

Without any arguments, storage-list will list all of the storage instances assigned to the unit. storage-list takes an optional positional argument, the name of a store declared in the charm metadata, which will restrict the results to only those storage instances of that named store.

mbruzek and others added some commits Nov 18, 2015

Renaming the charming with docker file.
Updating navigation to reflect this change.
Merge pull request #20 from mbruzek/charming-docker
Renaming the charming with docker file.
Moving event navigation above charm layers.
You need to know about charm events before you can layer.
Merge pull request #21 from mbruzek/event-navigation
Moving event navigation above charm layers.
Merge pull request #22 from mbruzek/hook-tools
Adding headers for code blocks, removing powershell.
Insert some missing ENV Vars
@evilnick May want to fact check some of these. For example, I couldn't get a straight answer on JUJU_ACTION_TAG so i pretty much put in there what it was... just a concat of the UUID and the word action. It may be internal use, but i'm not sure. LMK if any of this needs refactoring.
Merge pull request #29 from chuckbutler/transparency-fix
Adjusted transparency for diagrams
Merge pull request #25 from chuckbutler/leadership-impl
Initial commit of leadership docs, direct copy from author-charm-leadership.md

mbruzek and others added some commits Nov 17, 2015

Renaming the charming with docker file.
Updating navigation to reflect this change.
Moving event navigation above charm layers.
You need to know about charm events before you can layer.
Insert some missing ENV Vars
@evilnick May want to fact check some of these. For example, I couldn't get a straight answer on JUJU_ACTION_TAG so i pretty much put in there what it was... just a concat of the UUID and the word action. It may be internal use, but i'm not sure. LMK if any of this needs refactoring.
Merge branch 'hook-tools-merge' into developer-guide
Conflicts:
	src/en/developer-testing.md
	src/en/reference-charm-hooks.md
	src/en/reference-hook-tools.md
	src/navigation.tpl
Member

evilnick commented Nov 25, 2015

Hello
thanks @mbruzek and @chuckbutler for all your work on this so far.

I think that there are some unresolved issues which are probably best addressed by raising issues against your branch rather than commiting this version to master and breaking stuff that will be hard to unbreak.

I suggest @petermatulis and myself review that branch, raise issues there and we can work through it.

I will leave this open though as it does provide a handy diff of changes

Owner

marcoceppi commented Nov 25, 2015

Nothing in this pull request removes or deletes anything. We'd appreciate getting this reviewed an in devel docs before 1.26 lands. That said, there are pages we have deprecated, though we have opted not to delete them from the repository yet.

Oh nice! I didn't even catch that. Grammar 👮 approves

ader1990 and others added some commits Dec 2, 2015

Contributor

mbruzek commented Dec 2, 2015

I merged a contribution from our partners at CloudBase for the powershell equivalent methods! I love collaboration!

Owner

mbruzek commented on 283d8fd Dec 15, 2015

Addressing @justcfx2u's comments on this doc. #41 (comment)

marcoceppi added a commit that referenced this pull request Jan 4, 2016

@marcoceppi marcoceppi merged commit 7bd0304 into juju:master Jan 4, 2016

Contributor

jamesbeedy commented Jan 4, 2016

+1

Contributor

pmatulis commented Jan 4, 2016

I'll probably de-merge this today or tomorrow.

Contributor

arosales commented Jan 4, 2016

Peter,

Thanks for the comment and help on the docs. The intent here is to have a development space where folks may collaborate on the new version of the docs. This version is far from a final version and thus is in the development branch. Folks can make small incremental pull requests to the docs and not affect the stable docs. The thought is to collaboratively work on getting the -devel docs in shape for Juju 2.0 (April time frame). I would ask you keep this branch and open an issues or pull requests to get these docs ready for Juju 2.0. We could very much use your expertise in helping shape these docs for Juju 2.0.

-thanks,
Antonio

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment