Charm Authoring Feedback

The mission

This all started because I wanted to make the charm Martin did work generically and I couldn’t figure out how the @#$%$# the nagios setup worked. I couldn’t get the right combo of hooks, nrpe, nagios, which interface does what…and decided I’d try to build from scratch using layers and grabbing interfaces other folks had already written. 

Getting setup

The instructions to setup directories doesn’t seem to tell me where to actually stick my charm code
No reference to charm create in the getting started documentation

  • Ran charm create and got 
INFO: Using default charm template (reactive-python). To select a different template, use the -t option.
Traceback (most recent call last):
  File "/snap/charm/11/bin/charm-create", line 11, in <module>
    sys.exit(main())
  File "/snap/charm/11/lib/python2.7/site-packages/charmtools/create.py", line 96, in main
    generator = CharmGenerator(args)
  File "/snap/charm/11/lib/python2.7/site-packages/charmtools/generators/generator.py", line 44, in __init__
    self.plugin = self._load_plugin()
  File "/snap/charm/11/lib/python2.7/site-packages/charmtools/generators/generator.py", line 53, in _load_plugin
    return ep.load()()
  File "/snap/charm/11/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2295, in load
    self.require(*args, **kwargs)
  File "/snap/charm/11/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2318, in require
    items = working_set.resolve(reqs, env, installer, extras=self.extras)
  File "/snap/charm/11/lib/python2.7/site-packages/pkg_resources/__init__.py", line 859, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.VersionConflict: (SecretStorage 2.3.1 (/snap/charm/11/lib/python2.7/site-packages), Requirement.parse('secretstorage<2.3.0'))

I thought these was python3?

I grabbed a tarball of a generic charm create from lazypower and used that to start with. 

  • I have an interface layer form cmars…how do I include it? Checking the docs 

No reference to the layers.yaml file

  • Build should ignore .swp files

proof: W: README includes boilerplate: Step by step instructions on using the charm:
proof: W: README includes boilerplate: You can then browse to http://ip-address to configure the service.
proof: W: README includes boilerplate: - Upstream mailing list or contact information
proof: W: README includes boilerplate: - Feel free to add things if it's useful for users
proof: W: .README.swp includes boilerplate: Step by step instructions on using the charm:
proof: W: .README.swp includes boilerplate: You can then browse to http://ip-address to configure the service.
proof: W: .README.swp includes boilerplate: - Upstream mailing list or contact information
proof: W: .README.swp includes boilerplate: - Feel free to add things if it's useful for users