Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add support for Plane Swarm in self-hosting methods #6406

Open
wants to merge 18 commits into
base: preview
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/build-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ jobs:
retention-days: 2
path: |
${{ github.workspace }}/deploy/selfhost/setup.sh
${{ github.workspace }}/deploy/selfhost/swarm.sh
${{ github.workspace }}/deploy/selfhost/restore.sh
${{ github.workspace }}/deploy/selfhost/docker-compose.yml
${{ github.workspace }}/deploy/selfhost/variables.env
Expand Down Expand Up @@ -358,6 +359,7 @@ jobs:
generate_release_notes: true
files: |
${{ github.workspace }}/deploy/selfhost/setup.sh
${{ github.workspace }}/deploy/selfhost/swarm.sh
${{ github.workspace }}/deploy/selfhost/restore.sh
${{ github.workspace }}/deploy/selfhost/docker-compose.yml
${{ github.workspace }}/deploy/selfhost/variables.env
150 changes: 136 additions & 14 deletions deploy/selfhost/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,30 @@ Installing plane is a very easy and minimal step process.
- User context used must have access to docker services. In most cases, use sudo su to switch as root user
- Use the terminal (or gitbash) window to run all the future steps

### Downloading Latest Stable Release
### Downloading Latest Release

```
mkdir plane-selfhost

cd plane-selfhost
```

#### For *Docker Compose* based setup

```
curl -fsSL -o setup.sh https://github.com/makeplane/plane/releases/latest/download/setup.sh

chmod +x setup.sh
```

#### For *Docker Swarm* based setup

```
curl -fsSL -o setup.sh https://github.com/makeplane/plane/releases/latest/download/swarm.sh

chmod +x setup.sh
```

---

### Proceed with setup
Expand All @@ -77,8 +89,9 @@ Lets get started by running the `./setup.sh` command.

This will prompt you with the below options.

#### Docker Compose
```bash
Select a Action you want to perform:
Select an Action you want to perform:
1) Install (x86_64)
2) Start
3) Stop
Expand All @@ -87,17 +100,42 @@ Select a Action you want to perform:
6) View Logs
7) Backup Data
8) Exit

Action [2]: 1
```

For the 1st time setup, type "1" as action input.

This will create a create a folder `plane-app` or `plane-app-preview` (in case of preview deployment) and will download 2 files inside that
This will create a folder `plane-app` and will download 2 files inside that

- `docker-compose.yaml`
- `plane.env`

Again the `options [1-8]` will be popped up, and this time hit `8` to exit.

#### Docker Swarm

```bash
Select an Action you want to perform:
1) Deploy Stack
2) Remove Stack
3) View Stack Status
4) Redeploy Stack
5) Upgrade
6) View Logs
7) Exit

Action [3]: 1
```

For the 1st time setup, type "1" as action input.

This will create a create a folder `plane-app` and will download 2 files inside that

- `docker-compose.yaml`
- `plane.env`

Again the `options [1-8]` will be popped up and this time hit `8` to exit.
Again the `options [1-7]` will be popped up, and this time hit `7` to exit.

---

Expand All @@ -116,7 +154,7 @@ There are many other settings you can play with, but we suggest you configure `E

---

### Continue with setup - Start Server
### Continue with setup - Start Server (Docker Compose)

Lets again run the `./setup.sh` command. You will again be prompted with the below options. This time select `2` to start the sevices

Expand Down Expand Up @@ -147,9 +185,11 @@ You have successfully self hosted `Plane` instance. Access the application by go

---

### Stopping the Server
### Stopping the Server / Remove Stack

In case you want to make changes to `plane.env` variables, we suggest you to stop the services before doing that.

In case you want to make changes to `.env` variables, we suggest you to stop the services before doing that.
#### Docker Compose

Lets again run the `./setup.sh` command. You will again be prompted with the below options. This time select `3` to stop the sevices

Expand All @@ -171,14 +211,34 @@ If all goes well, you must see something like this

![Stop Services](images/stopped.png)

#### Docker Swarm

Lets again run the `./setup.sh` command. You will again be prompted with the below options. This time select `2` to stop the sevices

```bash
Select an Action you want to perform:
1) Deploy Stack
2) Remove Stack
3) View Stack Status
4) Redeploy Stack
5) Upgrade
6) View Logs
7) Exit

Action [3]: 2
```

If all goes well, you will see the confirmation from docker cli

---

### Restarting the Server
### Restarting the Server / Redeploy Stack

In case you want to make changes to `.env` variables, without stopping the server or you noticed some abnormalies in services, you can restart the services with RESTART option.
In case you want to make changes to `plane.env` variables, without stopping the server or you noticed some abnormalies in services, you can restart the services with `RESTART` / `REDEPLOY` option.

Lets again run the `./setup.sh` command. You will again be prompted with the below options. This time select `4` to restart the sevices

#### Docker Compose
```bash
Select a Action you want to perform:
1) Install (x86_64)
Expand All @@ -197,14 +257,32 @@ If all goes well, you must see something like this

![Restart Services](images/restart.png)

#### Docker Swarm

```bash
1) Deploy Stack
2) Remove Stack
3) View Stack Status
4) Redeploy Stack
5) Upgrade
6) View Logs
7) Exit

Action [3]: 4
```

If all goes well, you will see the confirmation from docker cli

---

### Upgrading Plane Version
### Upgrading Plane Version

It is always advised to keep Plane up to date with the latest release.

Lets again run the `./setup.sh` command. You will again be prompted with the below options. This time select `5` to upgrade the release.

#### Docker Compose

```bash
Select a Action you want to perform:
1) Install (x86_64)
Expand All @@ -231,13 +309,41 @@ Once done, choose `8` to exit from prompt.

Once done with making changes in `plane.env` file, jump on to `Start Server`

#### Docker Swarm

Lets again run the `./setup.sh` command. You will again be prompted with the below options. This time select `5` to upgrade the release.

```bash
1) Deploy Stack
2) Remove Stack
3) View Stack Status
4) Redeploy Stack
5) Upgrade
6) View Logs
7) Exit

Action [3]: 5
```

By choosing this, it will stop the services and then will download the latest `docker-compose.yaml` and `plane.env`.

Once done, choose `7` to exit from prompt.

> It is very important for you to validate the `plane.env` for the new changes.

Once done with making changes in `plane.env` file, jump on to `Redeploy Stack`

---

### View Logs

There would a time when you might want to check what is happening inside the API, Worker or any other container.

Lets again run the `./setup.sh` command. You will again be prompted with the below options. This time select `6` to view logs.
Lets again run the `./setup.sh` command. You will again be prompted with the below options.

This time select `6` to view logs.

#### Docker Compose

```bash
Select a Action you want to perform:
Expand All @@ -253,7 +359,22 @@ Select a Action you want to perform:
Action [2]: 6
```

#### Docker Swarm


```bash
1) Deploy Stack
2) Remove Stack
3) View Stack Status
4) Redeploy Stack
5) Upgrade
6) View Logs
7) Exit

Action [3]: 6
```

#### Service Menu Options for Logs
This will further open sub-menu with list of services
```bash
Select a Service you want to view the logs for:
Expand All @@ -267,9 +388,10 @@ Select a Service you want to view the logs for:
8) Redis
9) Postgres
10) Minio
11) RabbitMQ
0) Back to Main Menu

Service:
Service: 3
```

Select any of the service to view the logs e.g. `3`. Expect something similar to this
Expand Down Expand Up @@ -323,7 +445,7 @@ Similarly, you can view the logs of other services.

---

### Backup Data
### Backup Data (Docker Compose)

There would a time when you might want to backup your data from docker volumes to external storage like S3 or drives.

Expand Down Expand Up @@ -355,7 +477,7 @@ Backup completed successfully. Backup files are stored in /....../plane-app/back

---

### Restore Data
### Restore Data (Docker Compose)

When you want to restore the previously backed-up data, follow the instructions below.

Expand Down
Loading
Loading