1. Prerequisites
-
It is important to have a separate mounted volume, /vid-app and to have sufficient space -100Gb minimum, in this location on each node.
-
You must have deployed the VeridiumID new persistence servers.
Preinstall these packages on new VeridiumID persistence machines:
## install on new VeridiumID persistence:
sudo yum -y install bc python3-pyyaml python3-jinja2 libffi-devel dmidecode curl unzip wget rsync net-tools jq rng-tools make gcc
2. Create and Prepare the Temporary Installation Directory (on the first persistence node preferred)
TMP_DEST="/vid-app/install"
##in case does not exists, please create the folder and assign ownership on this folder to deployment user:
sudo mkdir -p $TMP_DEST && sudo chown $(whoami):$(whoami) $TMP_DEST && sudo chmod 755 $TMP_DEST
3. Download UBA installer (on the machine we want to start the installation)
|
Name |
URL |
SHA256 |
MD5 |
|---|---|---|---|
|
uba-onprem-installer-only-persistence.zip |
|
|
|
wget -P $TMP_DEST --user <NEXUS_USER> --password <NEXUS_PASSWORD> https://veridium-repo.veridium-dev.com/repository/UBAInstallerOnPrem/2.7.8/uba-onprem-installer-only-persistence.zip
unzip ${TMP_DEST}/uba-onprem-installer-only-persistence.zip -d ${TMP_DEST}
4. Add the generated ssh key on all persistence nodes
All nodes used in the deployment procedure will need to have the same user name that needs to have SSH connectivity to all nodes using SSH keys
## generate key (can be generated on all servers)
ssh-keygen
## take the key (id_rsa.pub) from on server, from where the installation will take place, and put it on all other servers (including himself) in .ssh/authorized_keys
cat .ssh/id_rsa.pub
vi .ssh/authorized_keys
## paste at the end the key
5. Configure variables file
vi ${TMP_DEST}/uba-onprem-installer/variables.yaml
SSH_USER: <the user for which you have generated the ssh key>
PERSISTENCE_CONTACT_POINTS: IP1,IP2,IP3
#!! MAKE SURE THE VALUES BELLOW ARE THE ONES FROM THE CURRENT ILP DEPLOYMENT !!
WEBAPP_CONTACT_POINTS: IP1,IP2
CLUSTERSUFFIX: ilp.veridium-dev.com
DOMAINSEPARATOR: "."
UBA_VERSION: "2.7.8"
6. Start the persistence installation process
cd ${TMP_DEST}/uba-onprem-installer
./uba-installer.sh
7. Migrate data
## backup and restore UBA
bash /opt/veridiumid/backup/cassandra/cassandra_backup.sh -c=/opt/veridiumid/backup/cassandra/cassandra_backup.conf
/opt/veridiumid/backup/cassandra/<YYYY-MM-DD_HH-MM>/<dc>_<node>/uba
tar -czf /vid-app/uba.tar.gz /opt/veridiumid/backup/cassandra/<YYYY-MM-DD_HH-MM>/<dc>_<node>/uba
SCHEMANAME=uba
## recreate schema:
BACKUPPATH=/tmp/opt/veridiumid/backup/cassandra/<YYYY-MM-DD_HH-MM>/<dc>_<node>/uba
sudo chown -R veridiumid.veridiumid ${BACKUPPATH}
##copy backup to temporary location
TMPLOCATION=/tmp/importedSchema
mkdir -p $TMPLOCATION
cp -R ${BACKUPPATH} $TMPLOCATION
chmod -R 770 $TMPLOCATION
chown -R veridiumid.veridiumid $TMPLOCATION
## import files from backup location
## after the import, the files are automatically removed.
for var in `ls -1 $TMPLOCATION/${SCHEMANAME}`; do
table=`echo ${var%-*}`
echo "Importing table" $table
files=($TMPLOCATION/${SCHEMANAME}/${var}/snapshots/*/*db)
if (( ${#files[@]} )); then
\cp $TMPLOCATION/${SCHEMANAME}/${var}/snapshots/*/*db $TMPLOCATION/${SCHEMANAME}/${var}/ 2>/dev/null || true
nodetool import ${SCHEMANAME} ${table} $TMPLOCATION/${SCHEMANAME}/${table}-*/
if [ $? -eq 0 ]; then
echo "=== Table '$table' imported successfully! ==="
else
echo "=== Table '$table' failed to import! ==="
fi
else
echo "=== Table '$table' is empty - nothing to import! ==="
fi
done
## propagate the data to all nodes:
nodetool repair --full $SCHEMANAME
8. Change ILP connection (on all ILP webapp nodes)
# backup existing files
cp /etc/default/veridiumid/uba_variables /etc/default/veridiumid/uba_variables_backup
cp /etc/default/veridiumid/zookeeper.properties /etc/default/veridiumid/zookeeper.properties_backup
cp /opt/veridiumid/uba/KeyStore.jks /opt/veridiumid/uba/KeyStore.jks_backup
cp /opt/veridiumid/uba/TrustStore.pem /opt/veridiumid/uba/TrustStore.pem_backup
# edit uba_variables and zookeeper.properties with current state from persistence_node[0] path:
# /vid-app/install/uba-onprem-installer/files/uba_variables and zookeeper.properties
vi /etc/default/veridiumid/uba_variables
vi /etc/default/veridiumid/zookeeper.properties
# KeyStore and TrustStore generated from the new uba_variables file
awk '/^CASSANDRA_KEYSTORE_ENV=/ { v=substr($0, index($0, "=")+1); sub(/^"/, "", v); sub(/"$/, "", v); print v; exit }' /etc/default/veridiumid/uba_variables | base64 -d > /opt/veridiumid/uba/KeyStore.jks
chown veridiumid:veridiumid /opt/veridiumid/uba/KeyStore.jks
awk '/^TRUSTSTORE_ENV=/ { v=substr($0, index($0, "=")+1); sub(/^"/, "", v); sub(/"$/, "", v); print v; exit }' /etc/default/veridiumid/uba_variables | base64 -d > /opt/veridiumid/uba/TrustStore.pem
chown veridiumid:veridiumid /opt/veridiumid/uba/TrustStore.pem
#stop services
sudo bash /opt/veridiumid/uba/scripts/uba_services.sh stop
#start uba services
sudo bash /opt/veridiumid/uba/scripts/uba_services.sh start
## after the installation, please run below command on UBA Webapp and VeridiumId persistence nodes, to be sure that everything is successfully installed:
sudo bash /opt/veridiumid/uba/scripts/uba_check_services.sh
Useful commands for troubleshooting
Start/stop services:
## run the following command to see if everything is running:
uba_check_services
## check if kafka is running:
uba_check_kafka
## stop/start UBA services:
uba_stop
uba_start
## stop/start a specific service (e.g.: uba-kafka)
systemctl stop uba-kafka
systemctl start uba-kafka
Log location
## veridium logs on Webapp VeridiumId servers
/var/log/veridiumid/tomcat/bops.log
## uba logs location on ILP nodes
/var/log/veridiumid/uba/<service_name>.log
##
grep DURATION /var/log/veridiumid/tomcat/bops.log
grep SESSION_ID /var/log/veridiumid/tomcat/bops.log
Troubleshooting commands:
## run this on Webapp VeridiumId servers
ping tenant.FQDN
## check connectivity
nc -zv tenant.FQDN 443
## curl
export https_proxy=""
curl https://tenant.FQDN:443