Deploy multiple Lemmy instances to the same server (ref #474) #24

Manually merged
dessalines merged 1 commits from nutomic/lemmy:multiple-instances into master 2020-03-19 02:38:11 +00:00
Owner

Some notes:

  • i still need to copy this stuff into lemmy.yml
  • this only works with an ssh agent (or without a password for your ssh key), otherwise you will get dozens of ssh key prompts
  • port selection has a race condition because it runs in parallel
  • we probably need to put the inventory and vars/ into a seperate, private git repo if we both want to run the ansible playbooks
  • you cant just put the same host at the beginning of each inventory line, they need to be different or it will only run once (and they also need to be in ~/.ssh/known_hosts)

I am running with the following in my inventory:

root@test.lemmy.ml  domain=test.lemmy.ml  letsencrypt_contact_email=xxx
root@test2.lemmy.ml  domain=test2.lemmy.ml  letsencrypt_contact_email=xxx
root@test3.lemmy.ml  domain=test3.lemmy.ml  letsencrypt_contact_email=xxx

You can give this a try, but first you will probably have to shut down all the existing instances as you dont have the same variables in vars/ (just run the uninstall.yml playbook for that).

Some notes: - i still need to copy this stuff into lemmy.yml - this only works with an ssh agent (or without a password for your ssh key), otherwise you will get dozens of ssh key prompts - port selection has a race condition because it runs in parallel - we probably need to put the inventory and `vars/` into a seperate, private git repo if we both want to run the ansible playbooks - you cant just put the same host at the beginning of each inventory line, they need to be different or it will only run once (and they also need to be in ~/.ssh/known_hosts) I am running with the following in my inventory: ``` root@test.lemmy.ml domain=test.lemmy.ml letsencrypt_contact_email=xxx root@test2.lemmy.ml domain=test2.lemmy.ml letsencrypt_contact_email=xxx root@test3.lemmy.ml domain=test3.lemmy.ml letsencrypt_contact_email=xxx ``` You can give this a try, but first you will probably have to shut down all the existing instances as you dont have the same variables in `vars/` (just run the uninstall.yml playbook for that).
Owner

We should also add inventory_sample and inventory_dev_sample, just so that's obvious to see in there.

We should also add inventory_sample and inventory_dev_sample, just so that's obvious to see in there.
Author
Owner

What would be the difference between those two files?

What would be the difference between those two files?
Owner

Oh nevermind, I thought something had changed for some reason.

Oh nevermind, I thought something had changed for some reason.
dessalines closed this pull request 2020-03-19 02:38:11 +00:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: LemmyNet/lemmy#24
No description provided.