This is a work in progress still, but I’ve been working on making Discourse dead simple to deploy to the cloud (AWS, OpenStack, etc) with Juju. You can find the progress so far on Juju Charms site and mirrored on Github;
there is still a bit of work left to get this working 100% but figured I put this out there if people were interested. This now works to get discourse running, future updates are simply to streamline the deployment and management of discourse.
The goal is to have something like this when all said and done:
juju deploy discourse juju deploy postgresql juju add-relation discourse postgresql:db-admin juju expose discourse
If you’re interested in helping to test this, check out getting started with Juju, pull requests are always welcome!
If you want to try this out as it is, first check what is still left to be done so you can set appropriate expectations.
If you don’t have access to juju (IE: You don’t have Ubuntu anywhere to use) you can use one of these vagrant boxes that include the latest Juju application.
Once you have Juju installed you’ll need to type
juju boostrap then edit
~/.juju/environments.yaml (You can use vim, nano, or any other command-line editor). Then either follow the instructions for Amazon AWS, HP Cloud, or OpenStack. If you don’t have an account with any of these cloud providers you can use the local provider. However, the local provider will not work in the vagrant box.
Use the following commands to deploy discourse and postgresql to your cloud:
juju deploy cs:~marcoceppi/discourse juju deploy postgresql
The discourse charm isn’t yet in the charm store since it’s not done, so you can deploy from my personal branch for now. Once those are deployed you’ll need to relate postgresql to discourse
juju add-relation discourse postgresql:db-admin
Finally, expose discourse
juju expose discourse
At any time you can check the status of your environment by typing
juju status if each node is marked as
started and there are no errors, you can proceed.
I need admins
You can change the admins at anytime by running the following command:
juju set discourse admins="marcoceppi"
This will set the account
marcoceppi as an admin. If you want more than one admin do the following:
juju set discourse admins="marcoceppi,codinghorror,eviltrout"
You can have as many admins as you’d like just provide them in a comma separated string. If you want to remove an admin, simply remove them from the list:
juju set discourse admins="codinghorror,eviltrout"
Create an upstart/init.d script
Make sure discourse can scale
Test redis-master charm connection
configuration option for web servers (apache/nginx)
configuration option for repository
Version pinning and proper upgrade paths