Browse Source

Update psql to use 15 version

pull/9688/head
Andrii Landiak 3 years ago
parent
commit
fef62e2693
  1. 22
      application/src/main/data/json/edge/instructions/install/centos/instructions.md
  2. 2
      application/src/main/data/json/edge/instructions/install/ubuntu/instructions.md
  3. 2
      application/src/main/data/json/edge/instructions/upgrade/docker/upgrade_db.md
  4. 4
      application/src/main/java/org/thingsboard/server/service/update/DefaultUpdateService.java

22
application/src/main/data/json/edge/instructions/install/centos/instructions.md

@ -56,13 +56,13 @@ sudo yum update
sudo yum -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
# Install packages
sudo yum -y install epel-release yum-utils
sudo yum-config-manager --enable pgdg12
sudo yum install postgresql12-server postgresql12
sudo yum-config-manager --enable pgdg15
sudo yum install postgresql15-server postgresql15
# Initialize your PostgreSQL DB
sudo /usr/pgsql-12/bin/postgresql-12-setup initdb
sudo systemctl start postgresql-12
sudo /usr/pgsql-15/bin/postgresql-15-setup initdb
sudo systemctl start postgresql-15
# Optional: Configure PostgreSQL to start on boot
sudo systemctl enable --now postgresql-12
sudo systemctl enable --now postgresql-15
{:copy-code}
```
@ -74,12 +74,12 @@ sudo systemctl enable --now postgresql-12
sudo yum -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm
# Install packages
sudo dnf -qy module disable postgresql
sudo dnf -y install postgresql12 postgresql12-server
sudo dnf -y install postgresql15 postgresql15-server
# Initialize your PostgreSQL DB
sudo /usr/pgsql-12/bin/postgresql-12-setup initdb
sudo systemctl start postgresql-12
sudo /usr/pgsql-15/bin/postgresql-15-setup initdb
sudo systemctl start postgresql-15
# Optional: Configure PostgreSQL to start on boot
sudo systemctl enable --now postgresql-12
sudo systemctl enable --now postgresql-15
{:copy-code}
```
@ -101,7 +101,7 @@ After configuring the password, edit the pg_hba.conf to use MD5 authentication w
Edit pg_hba.conf file:
```bash
sudo nano /var/lib/pgsql/12/data/pg_hba.conf
sudo nano /var/lib/pgsql/15/data/pg_hba.conf
{:copy-code}
```
@ -121,7 +121,7 @@ host all all 127.0.0.1/32 md5
Finally, you should restart the PostgreSQL service to initialize the new configuration:
```bash
sudo systemctl restart postgresql-12.service
sudo systemctl restart postgresql-15.service
{:copy-code}
```

2
application/src/main/data/json/edge/instructions/install/ubuntu/instructions.md

@ -49,7 +49,7 @@ echo "deb http://apt.postgresql.org/pub/repos/apt/ ${RELEASE}"-pgdg main | sudo
# install and launch the postgresql service:
sudo apt update
sudo apt -y install postgresql-12
sudo apt -y install postgresql-15
sudo service postgresql start
{:copy-code}
```

2
application/src/main/data/json/edge/instructions/upgrade/docker/upgrade_db.md

@ -23,7 +23,7 @@ services:
entrypoint: upgrade-tb-edge.sh
postgres:
restart: always
image: "postgres:12"
image: "postgres:15"
ports:
- "5432"
environment:

4
application/src/main/java/org/thingsboard/server/service/update/DefaultUpdateService.java

@ -69,10 +69,10 @@ public class DefaultUpdateService implements UpdateService {
@Autowired
private NotificationRuleProcessor notificationRuleProcessor;
@Autowired
@Autowired(required = false)
private EdgeInstallInstructionsService edgeInstallInstructionsService;
@Autowired
@Autowired(required = false)
private EdgeUpgradeInstructionsService edgeUpgradeInstructionsService;
private final ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1, ThingsBoardThreadFactory.forName("tb-update-service"));

Loading…
Cancel
Save