Upgrade

The Flexter upgrade process.

Upgrade the License

If the license is going to expire, the upgrade can be done replacing the flexter.lic file done in the Post Installation .

Replace the license file where it exists in one of these paths:

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

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

# same directory that you are launching a flexter command
./flexter.lic

Upgrading Repository’s packages

If the Repository Setup where done before, you can upgrade through it.

YUM/DNF Repository

Upgrading to latest version

$ sudo yum --enablerepo=sonra-flexter update xml2er xsd2er json2er merge2er flexchma flexter-ui

Upgrating to the specific version

$ sudo yum --enablerepo=sonra-flexter update xml2er-2.6.3 xsd2er-2.6.3 json2er-2.6.3 merge2er-2.6.3 flexchma-2.6.3 flexter-ui-2.6.3

APT Repository

The apt repository might be disabled by default, you can check it or run the enable script

Enabling the Repository

Edit the sonra-flexter.list

$ sudo vi /etc/apt/sources.list.d/sonra-flexter.list

Then uncomment it removing the # in the bignning of the line

#deb [arch=all] https://nexus.sonra.io/repository/apt-releases releases main #Sonra Flexter

Or run the script which removes the comment automatically

$ sudo sed -ri 's/^([^#])/#\1/g' /etc/apt/sources.list.d/sonra-flexter.list

Upgrading

Upgrading to latest version

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

Upgrading to the specific version

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

The repository is enabled by default. We recommend to disable it after installations to avoid unwanted upgrades, eg. when the server administrator wants to upgrade the server packages, not Flexter itself.

Disabling the Repository

To do that edit the /etc/apt/sources.list.d/sonra-flexter.list and comment the relevant section as below:

#deb [arch=all] https://nexus.sonra.io/repository/apt-releases releases main #Sonra Flexter

or run the script to do same:

$ sudo sed -ri 's/^([^#])/#\1/g' /etc/apt/sources.list.d/sonra-flexter.list

Direct Download Packages Upgrade

In cases where the repository haven’t being setup, the packages can be downloaded directly and upgraded manually as the procedures below.

Make sure the curl or wget command is available. All examples are based on curl, but you can use wget instead.

# curl approach
$ curl -u "<USER>:<PASS>" -OL <URL>

# wget approach
$ wget --user "<USER>" --password "<PASS>" <URL>

URL pattern:

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

Redhat based

Redhat/CentOS/Fedora/Scientific/Oracle variants

Download installers

You can download the latest installers or specific versions as the pattern <MODULE>[-VERSION].rpm

$ curl -u "USER:PASS" -OL https://nexus.sonra.io/download/flexchma.rpm
$ curl -u "USER:PASS" -OL https://nexus.sonra.io/download/xml2er.rpm
$ curl -u "USER:PASS" -OL https://nexus.sonra.io/download/xsd2er.rpm
$ curl -u "USER:PASS" -OL https://nexus.sonra.io/download/json2er.rpm
$ curl -u "USER:PASS" -OL https://nexus.sonra.io/download/merge2er.rpm
$ curl -u "USER:PASS" -OL https://nexus.sonra.io/download/flexter-ui.rpm

Checking hash (optional)

Checking if the files were downloaded correctly with the md5 hash algorithm.

$ curl -u "USER:PASS" -OL https://nexus.sonra.io/download/flexchma.rpm.md5
$ curl -u "USER:PASS" -OL https://nexus.sonra.io/download/xml2er.rpm.md5
$ curl -u "USER:PASS" -OL https://nexus.sonra.io/download/xsd2er.rpm.md5
$ curl -u "USER:PASS" -OL https://nexus.sonra.io/download/json2er.rpm.md5
$ curl -u "USER:PASS" -OL https://nexus.sonra.io/download/merge2er.rpm.md5
$ curl -u "USER:PASS" -OL https://nexus.sonra.io/download/flexter-ui.rpm.md5

# helper function
$ md5ck() { md5sum -c <(echo `cat $1.md5` $1); }

$ md5ck flexchma*.rpm
$ md5ck xml2er*.rpm
$ md5ck xsd2er*.rpm
$ md5ck json2er*.rpm
$ md5ck merge2er*.rpm
$ md5ck flexter-ui*.rpm

Upgrading the packages

$ yum install -y xml2er*.rpm xsd2er*.rpm json2er*.rpm merge2er*.rpm flexchma*.rpm flexter-ui*.rpm

Debian based

Debian/Ubuntu/Linux Mint

Download installers

You can download the latest installers or specific versions as the pattern <MODULE>[-VERSION].deb

$ curl -u USER:PASS -OL https://nexus.sonra.io/download/flexchma.deb
$ curl -u USER:PASS -OL https://nexus.sonra.io/download/xml2er.deb
$ curl -u USER:PASS -OL https://nexus.sonra.io/download/xsd2er.deb
$ curl -u USER:PASS -OL https://nexus.sonra.io/download/json2er.deb
$ curl -u USER:PASS -OL https://nexus.sonra.io/download/merge2er.deb
$ curl -u USER:PASS -OL https://nexus.sonra.io/download/flexter-ui.deb

Checking hash (optional)

Checking if the files were downloaded correctly with the md5 hash algorithm.

$ curl -u USER:PASS -OL https://nexus.sonra.io/download/flexchma.deb.md5
$ curl -u USER:PASS -OL https://nexus.sonra.io/download/xml2er.deb.md5
$ curl -u USER:PASS -OL https://nexus.sonra.io/download/xsd2er.deb.md5
$ curl -u USER:PASS -OL https://nexus.sonra.io/download/json2er.deb.md5
$ curl -u USER:PASS -OL https://nexus.sonra.io/download/merge2er.deb.md5
$ curl -u USER:PASS -OL https://nexus.sonra.io/download/flexter-ui.deb.md5

# helper function
$ md5ck() { md5sum -c <(echo `cat $1.md5` $1); }

$ md5ck flexchma*.deb
$ md5ck xml2er*.deb
$ md5ck xsd2er*.deb
$ md5ck json2er*.deb
$ md5ck merge2er*.deb
$ md5ck flexter-ui*.deb

Installing the packages

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

Unix based

Linux/Unix/Mac OS X

Download installers

You can download the latest installers or specific versions as the pattern <MODULE>[-VERSION].tgz

$ curl -u USER:PASS -OL https://nexus.sonra.io/download/flexchma.tgz
$ curl -u USER:PASS -OL https://nexus.sonra.io/download/xml2er.tgz
$ curl -u USER:PASS -OL https://nexus.sonra.io/download/xsd2er.tgz
$ curl -u USER:PASS -OL https://nexus.sonra.io/download/json2er.tgz
$ curl -u USER:PASS -OL https://nexus.sonra.io/download/merge2er.tgz
$ curl -u USER:PASS -OL https://nexus.sonra.io/download/flexter-ui.tgz

Checking hash (optional)

Checking if the files were downloaded correctly with the md5 hash algorithm.

$ curl -u USER:PASS -OL https://nexus.sonra.io/download/flexchma.tgz.md5
$ curl -u USER:PASS -OL https://nexus.sonra.io/download/xml2er.tgz.md5
$ curl -u USER:PASS -OL https://nexus.sonra.io/download/xsd2er.tgz.md5
$ curl -u USER:PASS -OL https://nexus.sonra.io/download/json2er.tgz.md5
$ curl -u USER:PASS -OL https://nexus.sonra.io/download/merge2er.tgz.md5
$ curl -u USER:PASS -OL https://nexus.sonra.io/download/flexter-ui.tgz.md5

# helper function

$ md5ck() { md5sum -c <(echo `cat $1.md5` $1); }

$ md5ck flexchma*.tgz
$ md5ck xml2er*.tgz
$ md5ck xsd2er*.tgz
$ md5ck json2er*.tgz
$ md5ck merge2er*.tgz
$ md5ck flexter-ui*.tgz

Upgrading the packages - with root access

Move old packages to a backup folder

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

Then, the next procedures are similar to the installation.

# flexchma
$ tar xzf flexchma*.tgz -C /usr/share

# xml2er
$ tar xzf xml2er*.tgz -C /usr/share

# xsd2er
$ tar xzf xsd2er*.tgz -C /usr/share

# json2er
$ tar xzf json2er*.tgz -C /usr/share

# merge2er
$ tar xzf merge2er*.tgz -C /usr/share

# flexter-ui
$ mkdir -p /usr/share/flexter/flexter-ui
$ tar xzf flexter-ui*.tgz -C /usr/share/flexter/flexter-ui

Upgrading the packages - without root access

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

Then, repeat the same procedures as the installation

# flexchma
$ tar xzf flexchma*.tgz -C ~/.local/share

# xml2er
$ tar xzf xml2er*.tgz -C ~/.local/share

# xsd2er
$ tar xzf xsd2er*.tgz -C ~/.local/share

# json2er
$ tar xzf json2er*.tgz -C ~/.local/share

# merge2er
$ tar xzf merge2er*.tgz -C ~/.local/share

# flexter-ui
$ mkdir -p ~/.local/share/flexter/flexter-ui
$ tar xzf flexter-ui*.tgz -C ~/.local/share/flexter/flexter-ui

Post Upgrade

A few extra procedures are needed to complete the upgrade.

Upgrading the Database

# For all users
$ flexchma update

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

Upgrading the Apache Spark

In cases where the apache spark isn’t available in the system, it can be upgraded using the script as below:

With root access

$ /usr/share/flexter/sbin/download.sh

without root access

$ ~/.local/share/flexter/sbin/download.sh

More details at the Post Installation section.

Restarting flexter-ui

After the upgrade, the services might require be restarted to take affect.

flexterui-backend

$ systemctl restart flexterui-backend

flexterui-frontend

Optional, if the the env.json is set in the production mode

$ systemctl restart flexterui-frontend