Hi. I’m trying to write a charm for Rocket.Chat (just for learning purposes) using the snap layer.
So far I did charm create rocketchat
, I edited the layer.yaml file to be:
includes:
- layer:basic
- layer:snap
options:
snap:
rocketchat-server:
channel: stable
devmode: false
jailmode: false
dangerous: false
classic: false
revision: null
I edited metadata.yaml to be:
name: rocketchat
summary: <Fill in summary here>
maintainer: David Coronel <David.Coronel@davecorelaptop>
description: |
<Multi-line description here>
tags:
# Replace "misc" with one or more whitelisted tags from this list:
# https://jujucharms.com/docs/stable/authors-charm-metadata
- misc
subordinate: false
I ran charm build
and I juju deployed it to my localhost Juju cluster. The install hook fails and I get the following error:
unit-rocketchat-0: 16:20:00 ERROR unit.rocketchat/0.juju-log Hook error:
Traceback (most recent call last):
File “/var/lib/juju/agents/unit-rocketchat-0/.venv/lib/python3.6/site-packages/charms/reactive/init.py”, line 72, in main
hookenv._run_atstart()
File “/var/lib/juju/agents/unit-rocketchat-0/.venv/lib/python3.6/site-packages/charmhelpers/core/hookenv.py”, line 1206, in _run_atstart
callback(*args, **kwargs)
File “/var/lib/juju/agents/unit-rocketchat-0/charm/reactive/snap.py”, line 61, in install
supported_archs = snap_opts.pop(‘supported-architectures’, None)
AttributeError: ‘NoneType’ object has no attribute ‘pop’
I see some mentions of undocumented info in the snap layer at README.md - layer-snap - [no description]
Am I doing this right? Am I at least going in the right direction for someone who would want to charm Rocket.Chat?
Thanks!