Skip to content

Commit

Permalink
feat: Version 1.2.0 documentation (#179)
Browse files Browse the repository at this point in the history
* Update README.md

* chore: Create a distribution matix with relevent playbooks

fixes #159

* Update README.md

Add an actual _note_ rather than a link

* chore: pictrs mention
  • Loading branch information
ticoombs committed Oct 4, 2023
1 parent d7be6c3 commit 3b451d8
Showing 1 changed file with 37 additions and 5 deletions.
42 changes: 37 additions & 5 deletions README.md
@@ -1,6 +1,6 @@
# Lemmy-Ansible

This provides an easy way to install [Lemmy](https://github.com/LemmyNet/lemmy) on any server. It automatically sets up an nginx server, letsencrypt certificates, and email.
This provides an easy way to install [Lemmy](https://github.com/LemmyNet/lemmy) on any server. It automatically sets up an nginx server, letsencrypt certificates, docker containers, pict-rs, and email smtp.

## Requirements

Expand All @@ -11,13 +11,27 @@ To run this ansible playbook, you need to:
- Make sure you can ssh to it, with a sudo user: `ssh <your-user>@<your-domain>`
- Install [Ansible](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html) on your **local** machine (do not install it on your destination server).

### Supported Distribution Playbook Matrix

These are the distributions we currently support. Anything not listed here is currently not supported.
If you wish to see another distribution on the list, please test on the latest commit in `main` and report your findings via an Issue.

| Distribution | Version | Playbook |
| ------------ | --------- | --------------------- |
| Debian | 10 | `lemmy.yml` |
| Debian | 11 | `lemmy.yml` |
| Debian | 12 | `lemmy.yml` |
| Ubuntu | 22.04 LTS | `lemmy.yml` |
| RHEL | 9 | `lemmy-almalinux.yml` |

## Install

1. Clone this repo:
1. Clone this repo & checkout latest tag

```
git clone https://github.com/LemmyNet/lemmy-ansible.git
cd lemmy-ansible
git checkout $(git describe --tags)
```

2. Make a directory to hold your config:
Expand Down Expand Up @@ -52,6 +66,8 @@ To run this ansible playbook, you need to:

7. Run the playbook:

_Note_: See the "Supported Distribution Playbook Matrix" section above if you should use `lemmy.yml` or not

`ansible-playbook -i inventory/hosts lemmy.yml`

_Note_: if you are not the root user or don't have password-less sudo, use this command:
Expand All @@ -72,12 +88,28 @@ To run this ansible playbook, you need to:

## Upgrading

- Run `git pull`
- Check out the [Lemmy Releases Changelog](https://github.com/LemmyNet/lemmy/blob/main/RELEASES.md) to see if there are any config changes with the releases since your last.
Since version `1.1.0` we no longer default to using `main` but use tags to make sure deployments are versioned.
With every new release all migration steps shall be written below so make sure you check out the [Lemmy Releases Changelog](https://github.com/LemmyNet/lemmy/blob/main/RELEASES.md) to see if there are any config changes with the releases since your last read.

### Upgrading to 1.2.0 (Lemmy 0.18.5)

Major changes:

- All variables are not under a singular file so you will not need to modify anything: `inventory/host_vars/{{ domain }}/vars.yml`
- `--become` is now optional instead of forced on

#### Steps

- Run `git pull && git checkout 1.2.0`
- When upgrading from older versions of these playbooks, you will need to do the following:
- Rename `inventory/host_vars/{{ domain }}/passwords/postgres` file to `inventory/host_vars/{{ domain }}/passwords/postgres.psk`
- Copy the `examples/vars.yml` file to `inventory/host_vars/{{ domain }}/vars.yml`
- Run `ansible-playbook -i inventory/hosts lemmy.yml --become`
- Edit your variables as desired
- Run your regular deployment. Example: `ansible-playbook -i inventory/hosts lemmy.yml --become`

### Upgrading to 1.1.0 (Lemmy 0.18.3)

- No major changes should be required

## Migrating your existing install to use this deploy

Expand Down

0 comments on commit 3b451d8

Please sign in to comment.