...
Stop all services, and other programs in all your applications.
Stop all CDAP processes:
Code Block $ for i in `ls /etc/init.d/ | grep cdap` ; do sudo service $i stop ; done
Update the CDAP repository definition by running either of these methods:
On RPM using Yum:
Code Block $ sudo curl -o /etc/yum.repos.d/cask.repo https://repository.cdap.io/centos/6/x86_64/cdap/6.2/cask.repo
This will create the file
/etc/yum.repos.d/cask.repo
with:Code Block [cask] name=Cask Packages baseurl=https://repository.cdap.io/centos/6/x86_64/cdap/6.2 enabled=1 gpgcheck=1
Add the Cask Public GPG Key to your repository:
Code Block $ sudo rpm --import https://repository.cdap.io/centos/6/x86_64/cdap/6.2/pubkey.gpg
Update your Yum cache:
Code Block $ sudo yum makecache
On Debian using APT:
Code Block $ sudo curl -o /etc/apt/sources.list.d/cask.list https://repository.cdap.io/ubuntu/precise/amd64/cdap/6.2/cask.list
This will create the file
/etc/apt/sources.list.d/cask.list
with:Code Block deb [ arch=amd64 ] https://repository.cdap.io/ubuntu/precise/amd64/cdap/6.2 precise cdap
Add the Cask Public GPG Key to your repository:
Code Block $ curl -s https://repository.cdap.io/ubuntu/precise/amd64/cdap/6.2/pubkey.gpg | sudo apt-key add -
Update your APT-cache:
Code Block $ sudo apt-get update
Update the CDAP packages by running either of these methods:
On RPM using Yum:
Code Block $ sudo yum upgrade 'cdap*'
On Debian using APT:
Code Block $ sudo apt-get install --only-upgrade '^cdap.*'
Run the upgrade tool, as the user that runs CDAP Master (the CDAP user, indicated by
<cdap-user>
):Code Block $ sudo -u <cdap-user> /opt/cdap/master/bin/cdap run io.cdap.cdap.data.tools.UpgradeTool upgrade
Note that once you have upgraded an instance of CDAP, you cannot reverse the process; down-grades to a previous version are not possible. Also, note that authorization is disabled in the UpgradeTool so that the
cdap
user can upgrade all users' data.The UpgradeTool will produce output similar to the following, prompting you to continue with the upgrade:
Code Block UpgradeTool - version 6.2.0-<build timestamp>. upgrade - Upgrades CDAP to 6.2.0 The upgrade tool upgrades the following: 1. User Datasets - Upgrades the coprocessor jars for tables - Migrates the metadata for PartitionedFileSets 2. System Datasets 3. UsageRegistry Dataset Type Note: Once you run the upgrade tool you cannot rollback to the previous version. Do you want to continue (y/n) y Starting upgrade ...
You can run the tool in a non-interactive fashion by using the
force
flag, in which case it will run unattended and not prompt for continuing:Code Block $ sudo -u <cdap-user> /opt/cdap/master/bin/cdap run io.cdap.cdap.data.tools.UpgradeTool upgrade force
Restart the CDAP processes:
Code Block $ for i in `ls /etc/init.d/ | grep cdap` ; do sudo service $i start ; done
To upgrade existing pipeline applications created using the 4.2.x versions of system artifacts, there are separate instructions on doing so.
Once CDAP has restarted, you can check the status of the upgrade using the Monitor HTTP RESTful APIMicroservices:
Code Block $ curl -w"\n" -X GET "http://<cdap-host>:11015/v3/system/upgrade/status"
Returning:
Code Block {"metadata":true }
...