מעבר לפתרון אירוח עצמי מ-Kubernetes

Hi All,

I have been running Discourse in a Kubernetes cluster for a while using the unsupported Bitnami image. Now that Bitnami are deprecating the image and going behind a paywall I am looking to migrate our server to a self-hosted solution on AWS.

I have a few questions that I would be grateful if the community could help with:

  • We use an external Postgres DB already for the installation and so this will stay in place. However, we updated some settings via the UI and also using environment variables that the Bitnami installation scripts maps to the Discourse, for example DISCOURSE_S3_BACKUP_BUCKET maps to S3_BACKUP_BUCKET.
    • Is it good enough to set the Discourse settings in the required yaml files or should we still use env vars?
    • If we do a backup from the UI what will that actually restore - does it update the database?
    • Is it better to create a brand new database with a fresh install and then do a backup/restore?
    • If the new install is a later version of Discourse will that cause a problem if a restore is attempted?
  • The standard installation guide uses Docker - how do you monitor the containers in a production environment as it looks like the standard install is a single VM with Docker.
  • Are there any documents that detail a migration and any gotchas?

Am sure I will have more questions as the migration goes on but any advice/help that can be given would be really appreciated.

Thanks.

If it wasn’t already your plan, I’d move to a new database (on the same server) for the migration so you don’t break your existing site.

I can’t tell quite what you think Bitnami is doing, but the thing you want in your ENV is DISCOURSE_S3_BACKUP_BUCKET. See Configure an S3 compatible object storage provider for uploads for how to properly set those S3 variables in your app.yml.

If by “better” you mean “will this mean that I won’t break our existing site and leave it in a state where it will never work again?”, the answer is yes. :wink:

Set them in the YML

Yes it will update the database. I would recommend that you Restore a backup from the command line

That’s what you want. The place you restore from has to be the same or newer than the backup version. It’ll migrate the database after it’s restored.

This might be all you need to know and we’re happy to help here for free. If you’d like hands-on your-setup-specific attention, you can contact me or ask for help in Marketplace.

Also, another option would be to build images and launch those in k8s. I’ve done that a few times and used github to build the images.