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

Version 0.1.4 #3422

Merged
merged 84 commits into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
c135bf1
Add deprecation warning to docker-compose install guide
silentninja Sep 21, 2023
867f6b3
Add warning for deprecating docker-compose
silentninja Sep 21, 2023
10a2d7b
Update warning for deprecating docker-compose
silentninja Sep 21, 2023
e0ccc9e
Merge branch 'docker-docs' into debian-docs
silentninja Sep 22, 2023
b78588c
Add debian installation instructions
silentninja Sep 24, 2023
433c8b2
Update debian docs to download the deb file.
silentninja Sep 27, 2023
92efcf6
Merge branch 'develop' into debian-docs
silentninja Oct 4, 2023
1218435
Merge remote-tracking branch 'origin/debian-docs' into debian-docs
silentninja Oct 4, 2023
d45f5f0
Clean up Debian installation docs
silentninja Oct 4, 2023
b245094
Add debian install to docs navigation
silentninja Oct 5, 2023
49fd6bc
Merge branch 'develop' into deprecate-old-docs
silentninja Oct 6, 2023
226a6c3
WIP changes made over pairing session
seancolsen Oct 6, 2023
2fb0006
Point to correct Debian repo url
silentninja Oct 18, 2023
d81942c
Add concepts page
silentninja Oct 19, 2023
3531f2a
Some docs tweaks during a call
seancolsen Oct 19, 2023
fbc18d0
Merge branch 'develop' into deprecate-old-docs
silentninja Oct 31, 2023
15fd32c
merge develop while fixing conflicts
Anish9901 Nov 30, 2023
7b83f56
Merge branch 'develop' into deprecate-old-docs
Anish9901 Nov 30, 2023
536c2ee
remove debian docs
Anish9901 Nov 30, 2023
d2d2feb
reconcile docker-compose installation docs
Anish9901 Nov 30, 2023
a11eb4a
fix commands & refactoring install docs for docker compose
Anish9901 Dec 1, 2023
702556c
reconciled docker compose installation docs
Anish9901 Dec 4, 2023
0494eb7
restore guided-install & scratch install and mark as deprecated
Anish9901 Dec 4, 2023
fb2a0ca
add deprecated warnings for guided and source install
Anish9901 Dec 4, 2023
a254021
rm upgrade using ui section
Anish9901 Dec 4, 2023
2b3e643
add link for docker compose install in the welcome page
Anish9901 Dec 4, 2023
ca0804a
Merge branch 'develop' into deprecate-old-docs
mathemancer Jan 2, 2024
ce62675
update env variables to reflect the current state
Anish9901 Jan 8, 2024
9a532f3
Merge branch 'develop' into deprecate-old-docs
Anish9901 Jan 8, 2024
360c861
Add front-page quick start instructions
mathemancer Jan 9, 2024
6b8dfb1
Fix weird highlighting, improve copy
mathemancer Jan 9, 2024
fa870ab
replace mentions of DJANGO_DATABASE_URL with Internal db env vars, up…
Anish9901 Jan 9, 2024
f919ea3
document steps to upgrade and uninstall
Anish9901 Jan 9, 2024
a3f1892
Create try out section, switch headers to imperative
mathemancer Jan 11, 2024
ed8b27a
improve formatting and highlighting of docker installation page
mathemancer Jan 11, 2024
db6fe0b
remove guided installation script, documentation
mathemancer Jan 15, 2024
b8bd95d
remove deprecation labels on source installation
mathemancer Jan 15, 2024
a524e7d
Merge branch 'develop' into deprecate-old-docs
mathemancer Jan 15, 2024
9af8d75
Temporarily remove conceptual overview content
seancolsen Jan 17, 2024
4982dbd
Add info about using sudo, add method reference
mathemancer Jan 17, 2024
32d1eb0
Update bare metal installation docs
mathemancer Jan 17, 2024
f996fd9
Merge branch '0.1.4' into deprecate-old-docs
seancolsen Jan 19, 2024
92151ea
Tighten up duplicate "Prerequisites" content
seancolsen Jan 19, 2024
c9af215
Merge branch '0.1.4' into deprecate-old-docs
seancolsen Jan 23, 2024
5ced013
Import 0.1.4 release notes content from HackMD
seancolsen Jan 23, 2024
b9bb4c2
Update PR links in release notes to follow prev fmt
seancolsen Jan 23, 2024
99c3383
document reduced privilege new feature
mathemancer Jan 23, 2024
8751643
Document unified docker image for release
mathemancer Jan 23, 2024
90df3a0
document postgres version support
mathemancer Jan 23, 2024
fe5e4ca
document SQLite support, bugfixes
mathemancer Jan 23, 2024
0f2dfc8
save progress to switch tasks for a bit
mathemancer Jan 23, 2024
750ed90
Improve Docker image installation docs
seancolsen Jan 24, 2024
aea734b
checkpoint on docs at backing up setup
mathemancer Jan 25, 2024
84a2f67
Finish upgrade docs for docker compose
mathemancer Jan 25, 2024
97bf368
Move Docker image from "install" to "try"
seancolsen Jan 25, 2024
bfd3c1d
Minor language adjustment
seancolsen Jan 25, 2024
fd17f86
Small "how to" addition
seancolsen Jan 25, 2024
f4b98ef
direct build-from-scratch users to update variables
mathemancer Jan 26, 2024
65d5951
restructure: move upgrade from release notes to admin
mathemancer Jan 26, 2024
3ea2fb9
link to upgrade instructions, tidy formatting
mathemancer Jan 26, 2024
874eed6
link to upgrade from dc installation
mathemancer Jan 26, 2024
bba4d26
remove upgrade link from installation.
mathemancer Jan 26, 2024
087e37b
tidy up docker compose install section, remove sudo
mathemancer Jan 26, 2024
40ff58b
Fill in remaining info for release PRs
mathemancer Jan 26, 2024
04b8210
remove empty snippet
mathemancer Jan 26, 2024
7eedfaa
remove unneeded sudo from source uninstallation guide
mathemancer Jan 26, 2024
049d075
remove defective highlighting, sudo
mathemancer Jan 26, 2024
e5adb93
document method for logging into unified image DB
mathemancer Jan 26, 2024
b060efe
Remove unneeded sudo reference
mathemancer Jan 26, 2024
88c14e7
fix bugs in documentation
mathemancer Jan 29, 2024
41d871d
Small formatting fix
seancolsen Jan 29, 2024
e9b268a
Clean up tips for trying locally
seancolsen Jan 29, 2024
195f42b
Remove date from release notes
seancolsen Jan 29, 2024
63017fc
Update node and npm minimum versions
seancolsen Jan 29, 2024
bf13b3f
Improve disclaimer for build-from-scratch install
seancolsen Jan 29, 2024
9257170
Use one page per version of upgrade instructions
seancolsen Jan 29, 2024
babcf24
Polish upgrade instructions
seancolsen Jan 29, 2024
d73f8bc
Add disclaimer in "build from scratch" upgrade
seancolsen Jan 29, 2024
850bed6
Add general upgrade disclaimer
seancolsen Jan 29, 2024
912877d
Fix broken link
seancolsen Jan 29, 2024
6f1e3db
Polish SECRET_KEY related docs
seancolsen Jan 29, 2024
f237112
Merge pull request #3227 from mathesar-foundation/deprecate-old-docs
seancolsen Jan 29, 2024
469be9f
Add release notes helper script
seancolsen Jan 29, 2024
326a773
Merge pull request #3427 from mathesar-foundation/release_notes_helper
seancolsen Jan 29, 2024
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
8 changes: 5 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,13 @@ version: "3.9"
#-------------------------------------------------------------------------------
# CONFIG
#
# Customize your Mathesar installation with the following variables, if desired.
# Customize your Mathesar installation with the following variables.
# See https://docs.mathesar.org/configuration/env-variables/ for more info.
#
x-config: &config
# (Required) Replace '?' with '-' followed by a 50 character random string.
# You can generate one at https://djecrety.ir/
# (REQUIRED) Replace '?' with '-' followed by a 50 character random string.
# You can generate one at https://djecrety.ir/ or by running:
# echo $(cat /dev/urandom | LC_CTYPE=C tr -dc 'a-zA-Z0-9' | head -c 50)
SECRET_KEY: ${SECRET_KEY:?}

# (Optional) Replace 'http://localhost' with custom domain(s) e.g.
Expand Down
99 changes: 95 additions & 4 deletions docs/docs/administration/uninstall.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,98 @@

The uninstall instructions vary depending on the [installation method](../index.md#installing-mathesar) you chose. Select your installation method below to proceed.

- [Uninstall a **guided** installation of Mathesar](../installation/guided-install/index.md#uninstall)
- [Uninstall a **Docker compose** installation of Mathesar](../installation/docker-compose/index.md#uninstall)
- [Uninstall a **Docker** installation of Mathesar](../installation/docker/index.md#uninstall)
- [Uninstall a **source-built** installation of Mathesar](../installation/build-from-source/index.md#uninstall)
## Uninstall a Docker installation of Mathesar

!!!note
Depending on your Docker setup, you may need to run `docker` commands with `sudo`.

1. Remove the Mathesar container.

```
docker rm -v mathesar_service
```

1. Remove the Mathesar Image

```
docker rmi mathesar_service
```

1. Remove volumes related to Mathesar

```
docker volume rm static &&
docker volume rm media
```

{% include 'snippets/uninstall-schemas.md' %}


## Uninstall a Guided script or Docker compose installation of Mathesar

1. Remove all Mathesar Docker images and containers.

```
docker compose -f docker-compose.yml down --rmi all -v
```

1. Remove configuration files.

```
rm -rf xMATHESAR_INSTALLATION_DIRx # may need sudo, depending on location
```

{% include 'snippets/uninstall-schemas.md' %}

## Uninstall a source installation of Mathesar

1. Stop Caddy service

```
systemctl disable caddy.service && systemctl stop caddy.service
```

1. Remove Caddy service file and Caddyfile (requires `sudo`)

```
sudo rm /lib/systemd/system/caddy.service
sudo rm /etc/caddy/Caddyfile
```

1. Stop Gunicorn

```
systemctl disable gunicorn.service
systemctl stop gunicorn.service
```

1. Remove Gunicorn service file

```
sudo rm /lib/systemd/system/gunicorn.service
```

1. Remove your Mathesar installation directory

```
rm -r xMATHESAR_INSTALLATION_DIRx # May need sudo, depending on location
```

!!! warning "Your installation directory might be customized"
It's possible that Mathesar could have been installed into a different directory than shown above. Use caution when deleting this directory.

1. Remove Django database

1. Connect to the psql terminal.

```
sudo -u postgres psql
```

2. Drop the Django database.

```postgresql
DROP DATABASE mathesar_django;
```

{% include 'snippets/uninstall-schemas.md' %}
19 changes: 0 additions & 19 deletions docs/docs/administration/upgrade.md

This file was deleted.

206 changes: 206 additions & 0 deletions docs/docs/administration/upgrade/0.1.4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,206 @@
# Upgrade Mathesar to 0.1.4

The 0.1.4 release requires more upgrade steps than we hope to have for future releases! If you run into any trouble, we encourage you to [open an issue](https://github.com/mathesar-foundation/mathesar/issues/new/choose) or [contact us](https://mathesar.org/free-install.html) for help.

## For installations using Docker Compose {:#docker-compose}

If you followed our [Docker Compose installation instructions](../../installation/docker-compose/index.md), then use these steps to upgrade your installation to 0.1.4.

!!! note
Depending on your setup, you may need to run some commands with `sudo`.

1. Find needed parts

1. Find your `.env` and `docker-compose.yml` files. Run

```
docker inspect mathesar_service
```

and look for the value of the `"com.docker.compose.project.config_files"` key in the resulting JSON to find the path to the `docker-compose.yml` file. The `.env` file should be in the same directory. If you have `jq` installed, you can run

```
docker inspect mathesar_service \
| jq '.[0].Config.Labels."com.docker.compose.project.config_files"'
```

and get the path directly. The `.env` file should be in the same directory.

1. Copy the path of the directory containing `docker-compose.yml` and `.env` into the box below. Do not include a trailing slash.

<input data-input-for="MATHESAR_INSTALLATION_DIR" aria-label="Your Mathesar installation directory"/>

Then press <kbd>Enter</kbd> to customize this guide with the configuration directory.

1. If you are using a Docker container for your PostgreSQL database, Run

```
docker volume inspect mathesar_postgresql_data
```

and look for the `"Mountpoint"` in the resulting JSON.

1. Copy the path of the directory into the box below. Do not include a trailing slash.

<input data-input-for="MATHESAR_PG_DIR" aria-label="Your Mathesar Postgres data directory"/>

Then press <kbd>Enter</kbd> to customize this guide with the PostgreSQL data directory.

1. Stop Mathesar, remove old images

```
docker compose -f xMATHESAR_INSTALLATION_DIRx/docker-compose.yml down --rmi all
```

1. Set up new configuration

!!! warning
`MATHESAR_DATABASES` has been deprecated as of v0.1.4 and will be removed entirely in future releases of Mathesar. If you end up deleting the variable from your `.env` file before starting up Mathesar after the upgrade, you can still add the connections manually through Mathesar's UI.

1. Back up the old configuration files:

```
mv xMATHESAR_INSTALLATION_DIRx/docker-compose.yml xMATHESAR_INSTALLATION_DIRx/docker-compose.yml.backup
cp xMATHESAR_INSTALLATION_DIRx/.env xMATHESAR_INSTALLATION_DIRx/env.backup
```

(We'll modify the old file, so we copy instead of moving it.)

1. Download the new docker compose file:

```
curl -sfL -o xMATHESAR_INSTALLATION_DIRx/docker-compose.yml https://raw.githubusercontent.com/mathesar-foundation/mathesar/0.1.4/docker-compose.yml
```

1. Edit the `xMATHESAR_INSTALLATION_DIRx/.env` file to break the `DJANGO_DATABASE_URL` variable into its parts.

This variable should have the form:

```
DJANGO_DATABASE_URL=postgres://<username>:<password>@<host>:<port>/<database>
```

You should edit the `.env` file to have the variables:

```
POSTGRES_USER=<username>
POSTGRES_PASSWORD=<password>
POSTGRES_HOST=<host>
POSTGRES_PORT=<port>
POSTGRES_DB=<database>
```

If you don't want to set those environment variables (e.g., if they're otherwise used), you can instead edit the `docker-compose.yml` file directly to add those variables.

1. Double-check the rest of the configuration:

- You should have your [`SECRET_KEY` variable](../../configuration/env-variables.md#secret_key) defined.
- If hosting on the internet, you should have a `DOMAIN_NAME` variable defined.

1. Initialize new Mathesar installation

```
docker compose -f xMATHESAR_INSTALLATION_DIRx/docker-compose.yml up -d
```

This will pull new images, and start the Mathesar containers. Wait a few minutes, then run `docker ps` to verify that you have `mathesar_service`, `mathesar-caddy-reverse-proxy-1`, and `mathesar_db` running and that the service is healthy. The services should not be reporting errors. If you were _not_ using Docker volumes for your Mathesar PostgreSQL data, you're done, and you can login to Mathesar via your usual method. If you're not sure, try to login to Mathesar. If you're presented with a screen instructing you to create an Admin user, you likely need to proceed to the next step.

1. Move your PostgreSQL directory

1. Bring down the services:

```
docker compose -f xMATHESAR_INSTALLATION_DIRx/docker-compose.yml down
```

1. Remove scaffold database data, copy your old PostgreSQL volume to the new location:

```
rm -r xMATHESAR_INSTALLATION_DIRx/msar/pgdata
cp -r xMATHESAR_PG_DIRx xMATHESAR_INSTALLATION_DIRx/msar/pgdata
```

1. Bring the services back up:

```
docker compose -f xMATHESAR_INSTALLATION_DIRx/docker-compose.yml up -d
```

1. If things look good, then you can try to login at the usual address using your normal username and password, and you should see your data.

## For installations done via our guided script {:#guided}

If you installed Mathesar with our (now deprecated) guided script, then you have a Docker Compose installation. See the [Docker Compose upgrade steps](#docker-compose).


## For installations done from scratch {:#scratch}

If you installed Mathesar [from scratch](../../installation/build-from-source/index.md), then use these steps to upgrade your installation to 0.1.4.

!!! warning
These steps have not yet been tested extensively. If you run into any trouble, we encourage you to [open an issue](https://github.com/mathesar-foundation/mathesar/issues/new/choose) or submit a PR proposing changes to [this file](https://github.com/mathesar-foundation/mathesar/blob/master/docs/docs/administration/upgrade/0.1.4.md).

1. Go to your Mathesar installation directory.

```
cd xMATHESAR_INSTALLATION_DIRx
```

!!! note
Your installation directory may be different from above if you used a different directory when installing Mathesar.

1. Pull the latest version from the repository

```
git pull https://github.com/mathesar-foundation/mathesar.git
```

1. Update Python dependencies

```
pip install -r requirements.txt
```

1. Next we will activate our virtual environment:

```
source ./mathesar-venv/bin/activate
```

1. Update your environment variables according to the [the new configuration specification](../../configuration/env-variables.md#db). In particular, you must put the connection info for the internal DB into new `POSTGRES_*` variables. The `DJANGO_DATABASE_URL` variable is no longer supported.

1. Add the environment variables to the shell before running Django commands

```
export $(sudo cat .env)
```

1. Run the latest Django migrations

```
python manage.py migrate
```

1. Install the frontend dependencies

```
npm ci --prefix mathesar_ui
```

1. Build the Mathesar frontend app

```
npm run --prefix mathesar_ui build --max_old_space_size=4096
```

1. Update Mathesar functions on the database:

```
python mathesar/install.py --skip-confirm >> /tmp/install.py.log
```

1. Restart the gunicorn server

```
systemctl restart gunicorn
```
17 changes: 17 additions & 0 deletions docs/docs/administration/upgrade/older.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Upgrading Mathesar to older versions

## For installations using Docker Compose {:#docker-compose}

If you have a Docker compose installation (including one from the guided script), run the command below:

```
docker compose -f /etc/mathesar/docker-compose.yml up \
--force-recreate --build service
```

!!! note "Your installation directory may be different"
You may need to change `/etc/mathesar/` in the command above if you chose to install Mathesar to a different directory.

## For installations done from scratch {:#scratch}

If you installed from scratch, the upgrade instructions are the same as [for 0.1.4](../upgrade/0.1.4.md#scratch), but you do not need to change the environment variables.
8 changes: 3 additions & 5 deletions docs/docs/configuration/connect-to-existing-db.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,13 @@
psql -c 'create database mathesar_django;'
```

1. Configure the [`DJANGO_DATABASE_URL` environment variable](./env-variables.md#django_database_url) to point to the database you just created.

1. (Optional) For Docker Compose related installations, you may [disable Mathesar's default database server](./customize-docker-compose.md#disable-db-service) if you like.
1. Configure the [Internal database environment variables](./env-variables.md#db) to point to the database you just created.


## Connect to a database server running on the host {: #localhost-db }

!!! info ""
This content is related to Mathesar running in Docker related environments. This is applicable for the [Guided installation method](../installation/guided-install/index.md), [Docker Compose installation method](../installation/docker-compose/index.md), and [Docker installation method](../installation/docker/index.md).
This content is related to Mathesar running in Docker related environments.

If you're running Mathesar in a Docker related environment, and your database server runs on the host machine, you will not be able to connect to it using `localhost:<db_port>`, since `localhost` would refer to the Docker environment and not to the host.

Expand Down Expand Up @@ -67,7 +65,7 @@ You can try using `host.docker.internal` instead of `localhost`. Below are detai

=== "Linux"
```
sudo systemctl restart postgresql
systemctl restart postgresql
```
=== "MacOS"
```
Expand Down
Loading
Loading