Discourse

  • By Canonical IS DevOps
Channel Revision Published Runs on
latest/stable 124 25 Apr 2024
Ubuntu 20.04
latest/edge 127 26 Apr 2024
Ubuntu 20.04
juju deploy discourse-k8s
Show information

Platform:

How to access the Rails console

Ideally, the discourse charm should be handled by interacting with Juju, and everything that can be done with the console should be doable with juju actions. In case there is something that needs to be done with the console anyway, the console can be accessed.

Prerequisites

Have a Discourse deployment active.

Access the console

First of all, switch into the juju Discourse model if necessary:

juju switch discourse-model

Then ssh into the Discourse unit:

juju ssh --container discourse discourse-k8s/leader bash   

Now access the console using Pebble:

pebble exec --user=_daemon_ --context=discourse -w=/srv/discourse/app -ti -- /srv/discourse/app/bin/bundle exec rails console

If the output of the last command contains something similar to this:

Loading production environment (Rails 7.0.5.1)
irb(main):001:0>

Congratulations, you have accessed the rails console.