Upgrade

Upgrade the license, the Flexter packages, the metadata database and Apache Spark.

Upgrade the License

If the license is about to expire, replace the flexter.lic file in the location chosen during the Post-Installation:

# For all users
/etc/flexter/conf/flexter.lic

# For the current user
~/.config/flexter/flexter.lic

# Same directory from which the Flexter command is launched
./flexter.lic

Repository Packages Upgrade

If the Repository Setup was done during the installation, upgrade through the repository.

Upgrading to the latest version

sudo dnf --repo=sonra-flexter update xml2er xsd2er json2er merge2er flexchma flexter-ui

Upgrading to a specific version

sudo dnf --repo=sonra-flexter update \
  xml2er-2.14.2 xsd2er-2.14.2 json2er-2.14.2 \
  merge2er-2.14.2 flexchma-2.14.2 flexter-ui-2.14.2

Upgrading to the latest version

sudo apt update
sudo apt upgrade xml2er xsd2er json2er merge2er flexchma flexter-ui

Upgrading to a specific version

sudo apt update
sudo apt upgrade \
  xml2er=2.14.2 xsd2er=2.14.2 json2er=2.14.2 \
  merge2er=2.14.2 flexchma=2.14.2 flexter-ui=2.14.2

Manual Packages Upgrade

When no repository has been set up, download the new packages and upgrade manually. The download works exactly as described in Manual Download, using the same URL pattern and credentials:

https://download.sonra.io/flexter/<MODULE>[-VERSION].<EXTENSION>

Download the installers

curl -u "<USER>:<PASS>" -OL https://download.sonra.io/flexter/flexchma.rpm
curl -u "<USER>:<PASS>" -OL https://download.sonra.io/flexter/xml2er.rpm
curl -u "<USER>:<PASS>" -OL https://download.sonra.io/flexter/xsd2er.rpm
curl -u "<USER>:<PASS>" -OL https://download.sonra.io/flexter/json2er.rpm
curl -u "<USER>:<PASS>" -OL https://download.sonra.io/flexter/merge2er.rpm
curl -u "<USER>:<PASS>" -OL https://download.sonra.io/flexter/flexter-ui.rpm
Checking the hashes (optional)
for m in flexchma xml2er xsd2er json2er merge2er flexter-ui; do
  curl -u "<USER>:<PASS>" -OL "https://download.sonra.io/flexter/$m.rpm.md5"
done

md5ck() { md5sum -c <(echo "$(cat "$1.md5") $1"); }
for f in *.rpm; do md5ck "$f"; done

Upgrade the packages

sudo dnf install xml2er*.rpm xsd2er*.rpm json2er*.rpm merge2er*.rpm flexchma*.rpm flexter-ui*.rpm

Download the installers

curl -u "<USER>:<PASS>" -OL https://download.sonra.io/flexter/flexchma.deb
curl -u "<USER>:<PASS>" -OL https://download.sonra.io/flexter/xml2er.deb
curl -u "<USER>:<PASS>" -OL https://download.sonra.io/flexter/xsd2er.deb
curl -u "<USER>:<PASS>" -OL https://download.sonra.io/flexter/json2er.deb
curl -u "<USER>:<PASS>" -OL https://download.sonra.io/flexter/merge2er.deb
curl -u "<USER>:<PASS>" -OL https://download.sonra.io/flexter/flexter-ui.deb
Checking the hashes (optional)
for m in flexchma xml2er xsd2er json2er merge2er flexter-ui; do
  curl -u "<USER>:<PASS>" -OL "https://download.sonra.io/flexter/$m.deb.md5"
done

md5ck() { md5sum -c <(echo "$(cat "$1.md5") $1"); }
for f in *.deb; do md5ck "$f"; done

Upgrade the packages

sudo apt install ./xml2er*.deb ./xsd2er*.deb ./json2er*.deb ./merge2er*.deb ./flexchma*.deb ./flexter-ui*.deb

Download the installers

curl -u "<USER>:<PASS>" -OL https://download.sonra.io/flexter/flexchma.tgz
curl -u "<USER>:<PASS>" -OL https://download.sonra.io/flexter/xml2er.tgz
curl -u "<USER>:<PASS>" -OL https://download.sonra.io/flexter/xsd2er.tgz
curl -u "<USER>:<PASS>" -OL https://download.sonra.io/flexter/json2er.tgz
curl -u "<USER>:<PASS>" -OL https://download.sonra.io/flexter/merge2er.tgz
curl -u "<USER>:<PASS>" -OL https://download.sonra.io/flexter/flexter-ui.tgz
Checking the hashes (optional)
for m in flexchma xml2er xsd2er json2er merge2er flexter-ui; do
  curl -u "<USER>:<PASS>" -OL "https://download.sonra.io/flexter/$m.tgz.md5"
done

md5ck() { md5sum -c <(echo "$(cat "$1.md5") $1"); }
for f in *.tgz; do md5ck "$f"; done

Upgrade with root access

Move the current installation to a backup folder, then extract the new packages as during the installation. The symbolic links in /usr/bin and /etc/flexter keep pointing to the new files.

sudo mv /usr/share/flexter /usr/share/flexter_$(date --iso-8601)

for m in flexchma xml2er xsd2er json2er merge2er flexter-ui; do
  sudo tar xzf $m*.tgz -C /usr/share
done

Upgrade without root access

mv ~/.local/share/flexter ~/.local/share/flexter_$(date --iso-8601)

for m in flexchma xml2er xsd2er json2er merge2er flexter-ui; do
  tar xzf $m*.tgz -C ~/.local/share
done

Post Upgrade

A few extra steps complete the upgrade.

Upgrading the Database

Apply the metadata schema changes shipped with the new version:

flexchma update

# or with explicit connection parameters
flexchma update -m "jdbc:postgresql:[<host>[:port]/]<db>" -M <user> -w <password>

Upgrading Apache Spark

If Apache Spark was installed with the download.sh module, run it again to install the Spark version shipped as default with the new release. See the Post-Installation section for the options.

# with root access
sudo /usr/share/flexter/sbin/download.sh

# without root access
~/.local/share/flexter/sbin/download.sh

Restarting flexter-ui

The services must be restarted for the upgrade to take effect:

sudo systemctl restart flexterui-backend

# only if env.json is set to production mode
sudo systemctl restart flexterui-frontend