Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
160
Issues
160
List
Board
Labels
Milestones
Merge Requests
14
Merge Requests
14
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
haskell-gargantext
Commits
326e5840
Commit
326e5840
authored
Sep 12, 2022
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ADMIN] Upgrade script tested
parent
bf7784ae
Pipeline
#3167
passed with stage
in 92 minutes
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
12 deletions
+23
-12
CHANGELOG.md
CHANGELOG.md
+1
-1
0.0.6.1.sh
devops/upgrade/0.0.6.1.sh
+22
-11
No files found.
CHANGELOG.md
View file @
326e5840
...
...
@@ -3,7 +3,7 @@
*
[
BACK
][
FIX
]
Confluence on Graph
*
[
BACK
][
FIX
]
HAL parser fix
*
[
BACK
][
UPGRADE
]
./bin/psql gargantext.ini < devops/postgres/upgrade/0.0.6.2.sql
*
[
BACK
][
ADMIN
]
upgrade script
(WIP)
*
[
BACK
][
ADMIN
]
upgrade script
, test ok
## Version 0.0.6.1
*
[
BACK
][
FEAT
]
Spacy Server connection for French (and others) languages
...
...
devops/upgrade/0.0.6.1.sh
View file @
326e5840
#!/bin/bash
# To be executed at the root of the project
# To upgrade from 0.0.5.9 to 0.0.6.2
# backup
sudo
apt update
sudo
apt
-yy
upgrade
...
...
@@ -15,11 +15,14 @@ git pull origin dev
./bin/install
# Database upgrade
#./bin/psql gargantext.ini < devops/postgres/upgrade/0.0.6.0.sql
# exec script haskell upgrade
echo
"0.0.6.0 SQL upgrade"
./bin/psql gargantext.ini < devops/postgres/upgrade/0.0.6.0.sql
#./bin/psql gargantext.ini < devops/postgres/upgrade/0.0.6.1.sql
# ~/.local/bin/gargantext-upgrade
echo
"Executing script haskell upgrade"
~/.local/bin/gargantext-upgrade
echo
"0.0.6.1 SQL upgrade"
./bin/psql gargantext.ini < devops/postgres/upgrade/0.0.6.1.sql
sudo
-i
-u
postgres bash
<<
EOF
pg_dumpall > /tmp/backup.dump
...
...
@@ -29,23 +32,31 @@ sudo sed -i "s/bullseye/bookworm/g" /etc/apt/sources.list
sudo
apt update
sudo
apt
-yy
dist-upgrade
sudo
apt
install
-y
postgresql-14 libpq-dev
sudo
apt remove
--purge
postgresql-11 postgresql-13
sudo
apt autoremove
sudo
-i
-u
postgres bash
<<
EOF
psql < /tmp/backup.dump
EOF
sed
-i
"s/DB_PORT = 5432/DB_PORT = 5433/"
gargantext.ini
DBPASS
=
$(
grep
"DB_PASS"
gargantext.ini |
sed
"s/^.*= //"
)
sed
-i
"s/DB_PORT = 5432/DB_PORT = 5434/"
gargantext.ini
# be sure the DB password is the right one
DBPASS
=
$(
grep
"DB_PASS"
gargantext.ini |
sed
"s/^.*= //"
)
echo
$DBPASS
sudo
-i
-u
postgres
bash
<<
EOF
psql < 'ALTER ROLE gargantua password \'
$DBPASS
\'
';
sudo
-i
-u
postgres
psql
<<
EOF
ALTER ROLE gargantua password '
${
DBPASS
}
';
EOF
echo
"0.0.6.2 SQL upgrade"
./bin/psql gargantext.ini < devops/postgres/upgrade/0.0.6.2.sql
# Make sure compilation is ok
./bin/install
echo
"Upgrade is over"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment