Upgrade Ubuntu to version 16¶
This is an online upgrade of Ubuntu. Make sure you have an active internet connection. These steps are common for upgrading Motadata master server and Motadata RPE server.
Stop motadata and clickhouse-server services:
service motadata stop //wait till all services are stopped. service clickhouse-server stop //wait till all services are stopped.
Perform apt-get update and upgrade commands:
apt-get update apt-get -f install apt-get upgrade //system will ask for confirmation. Select Y. apt-get dist-upgrade //system will ask for confirmation. Select Y.
Reboot the server and stop clickhouse service again:
reboot //wait till server is up again. service clickhouse-server stop apt-get clean //clears the cache memory
Download the upgrade ubuntu 14 to 16.zip file. Extract the zip file.
//upload location path: cd /motadata
Following files and folders should be uploaded:
motadata-datanode
motadata-master
motadata-observer
motadata-rpe
clickhouse.tar.gz
UbuntuUp16Packages.tar.gz
From extracted files, copy the UbuntuUp16Packages.tar.gz to archives directory.
cp -pr UbuntuUp16Packages.tar.gz /var/cache/apt/archives
Extract UbuntuUp16Packages.tar.gz:
cd /var/cache/apt/archives tar -zxvf UbuntuUp16Packages.tar.gz
Perform ubuntu 14 to 16 upgrade process and give necessary input during upgrade process
cd /var/cache/apt/archives do-release-upgrade //system will ask for below inputs. Use your custom inputs or select the default inputs: ask for another ssh daemon, select yes ask for continue, press enter ask for package, upgrade process select yes ask for remove statistics data files, select yes ask for Restart services during upgrades without asking, select yes ask for Configuring unattended-upgrades, select 2nd option "keep local version" ask for Remove obsolete packages, select yes ask for system restart when upgrade is done, select yes
You may get an error in downloading linux header package. This is because, linux frequently upgrades its header package.

Error in Downloading Linux Header Package¶
To solve this issue, you need to download the package manually. Ubuntu shows the path of file from where you have to download the package.

File Path to Download Package Manually¶
Use wget command followed by the path shown in error to download the file.
cd /var/cache/apt/archives
wget <file_path shown in error message>
do-release-upgrade //run the command again.
Verify the Ubuntu version:
lsb_release -a
Stop the clickhouse service:
service clickhouse-server stop
Copy the clickhouse.tar.gz in opt directory:
cd /motadata cp -pr clickhouse.tar.gz /opt
Extract clickhouse.tar.gz:
cd /opt tar -zxvf clickhouse.tar.gz
Go to clickhouse directory created:
cd /opt/clickhouse
Run de-package command. Make sure you select N during installation. Else, you will loose all your clickhouse data.
dpkg -i *.deb
Note
Select default option N during installation so that config.xml doesn’t get overwritten with default settings.
Verify clickhouse version:
dpkg -l | grep -i clickhouse // current clickhouse version is 1.1.54370 in (all components)
Copy following services in system directory.
motadata.service
motadata-cluster.service
cd /motadata/motadata-master cp -pr motadata.service motadata-cluster.service /lib/systemd/system
Remove following service files from init.d.
motadata
motadata-ha
motadata-cluster
cd /etc/init.d rm -rf motadata rm -rf motadata-ha rm -rf motadata-cluster
Reload systemctl daemon:
systemctl daemon-reload
Start clickhouse and motadata services:
service clickhouse-server start