canonical / juju-dashboard-charm Goto Github PK
View Code? Open in Web Editor NEWThe Juju charm for the Juju Dashboard
The Juju charm for the Juju Dashboard
root@hazem-pfe:~# juju status
Model Controller Cloud/Region Version SLA Timestamp
controller localhost-localhost localhost/localhost 3.1.5 unsupported 14:09:06Z
App Version Status Scale Charm Channel Rev Exposed Message
controller active 1 juju-controller 3.1/stable 14 no
Unit Workload Agent Machine Public address Ports Message
controller/0* active idle 0 10.217.74.97
Machine State Address Inst id Base AZ Message
0 started 10.217.74.97 juju-4553c3-0 [email protected] Running
root@hazem-pfe:~# juju deploy juju-dashboard-k8s dashboard
Located charm "juju-dashboard-k8s" in charm-hub, revision 8
Deploying "dashboard" from charm-hub charm "juju-dashboard-k8s", revision 8 in channel stable on [email protected]/stable
ERROR Charm feature requirements cannot be met:
Feature descriptions:
For additional
We have two versions of the juju_dashboard
charm library:
https://github.com/canonical/juju-dashboard-charm/blob/main/k8s-charm/lib/charms/juju_dashboard/v0/juju_dashboard.py
https://github.com/canonical/juju-dashboard-charm/blob/main/machine-charm/lib/charms/juju_dashboard/v0/juju_dashboard.py
Both have the same LIBID, LIBAPI, and LIBPATCH, but there are differences between them. This doesn't seem like a good idea.
In fact, I don't really like the way this repo is structured at all. It's two copies of nearly the same code - and skew will arise over time as we forget to patch both of them. I'm not sure there's a way around this at the moment, though.
Consider using reify to render the template from config? It's designed to do just that :)
Would slot into https://github.com/canonical-web-and-design/juju-dashboard-charm/blob/master/src/charm.py#L79 quite easily
Juju would like to request that port be configurable for the Kubernetes charm so we can configure the dashboard proxy from Juju correctly. Currently this is hard coded to port 80.
Changes made in #16 have been packaged as a beta juju-dashboard charm.
The charm sets the IP address at which the dashboard is reachable into the relation data for the dashboard endpoint. On AWS, the cloud local address is sent. For now, we need to avoid network-get
and just use unit-get-public-address
until the networking stuff is sorted on the juju side.
juju bootstrap microk8s c
juju switch controller
juju deploy juju-dashboard
juju relate juju-dashboard controller
Debug logs:
unit-dashboard-0: 17:28:54 WARNING unit.dashboard/0.controller-relation-changed ERROR public address not found
unit-dashboard-0: 17:28:54 ERROR unit.dashboard/0.juju-log controller:0: Uncaught exception while in charm code:
Traceback (most recent call last):
File "/var/lib/juju/agents/unit-dashboard-0/charm/./src/charm.py", line 127, in <module>
main(JujuDashboardKubernetesCharm)
File "/var/lib/juju/agents/unit-dashboard-0/charm/venv/ops/main.py", line 438, in main
_emit_charm_event(charm, dispatcher.event_name)
File "/var/lib/juju/agents/unit-dashboard-0/charm/venv/ops/main.py", line 150, in _emit_charm_event
event_to_emit.emit(*args, **kwargs)
File "/var/lib/juju/agents/unit-dashboard-0/charm/venv/ops/framework.py", line 355, in emit
framework._emit(event) # noqa
File "/var/lib/juju/agents/unit-dashboard-0/charm/venv/ops/framework.py", line 856, in _emit
self._reemit(event_path)
File "/var/lib/juju/agents/unit-dashboard-0/charm/venv/ops/framework.py", line 931, in _reemit
custom_handler(event)
File "/var/lib/juju/agents/unit-dashboard-0/charm/./src/charm.py", line 55, in _on_controller_relation_changed
requires = JujuDashReq(self, event.relation, event.app)
File "/var/lib/juju/agents/unit-dashboard-0/charm/lib/charms/juju_dashboard/v0/juju_dashboard.py", line 58, in __init__
ip = check_output(["unit-get", "public-address"]).decode().strip()
File "/usr/lib/python3.10/subprocess.py", line 420, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/lib/python3.10/subprocess.py", line 524, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['unit-get', 'public-address']' returned non-zero exit status 1.
I suspect the problem was my commit here - this was the correct fix for the machine charm, but I probably shouldn't have changed it for k8s.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.