Manually Redeploy Cluster Topologies
You are not required to manually redeploy clusters after updating cluster
properties. The gateway monitors the topology descriptor files in the
$gateway/conf/topologies
directory and automatically redepolys the cluster if any
descriptor changes or a new one is added. (The corresponding deployment is in
$gateway/data/deployments
.)
However, you must redeploy the clusters after changing any of the following gateway properties or gateway-wide settings:
Time settings on the gateway host
Implementing or updating Kerberos
Implementing or updating SSL certificates
Changing a cluster alias
Redeploying all clusters at the same time
When making gateway-wide changes (such as implementing Kerberos or SSL), or if you change the system clock, you must redeploy all the Cluster Topologies. Do the following:
To verify the timestamp on the currently deployed clusters enter:
cd $gatewaydir data/deployments
. The system displays something similar to:Directory of C:/hdp/knox-0.4.0.2.1.2.0-1557/data/deployments 04/17/2014 05:30 PM <DIR> . 04/17/2014 05:30 PM <DIR> .. 04/17/2014 05:30 PM <DIR> cluster.war.145514f4dc8 04/17/2014 05:30 PM <DIR> myCluster.war.145514f4dc8 04/11/2014 08:35 AM <DIR> sandbox.war.145514f4dc8 0 File(s) 0 bytes 5 Dir(s) 9,730,977,792 bytes free
To redeploy all clusters, enter
/bin/knoxcli.cmd redeploy
.To verify that a new cluster WAR was created, enter
cd $gatewaydir data/deployments.
The system displays something similar to:Directory of C:/hdp/knox-0.4.0.2.1.2.0-1557/data/deployments 04/17/2014 05:34 PM <DIR> . 04/17/2014 05:34 PM <DIR> .. 04/17/2014 05:30 PM <DIR> cluster.war.145514f4dc8 04/17/2014 05:34 PM <DIR> cluster.war.1457241b5dc 04/17/2014 05:30 PM <DIR> myCluster.war.145514f4dc8 04/17/2014 05:34 PM <DIR> myCluster.war.1457241b5dc 04/11/2014 08:35 AM <DIR> sandbox.war.145514f4dc8 04/17/2014 05:34 PM <DIR> sandbox.war.1457241b5dc 0 File(s) 0 bytes 8 Dir(s) 9,730,850,816 bytes free
A new file is created for each cluster, with the current timestamp.
Redeploy only specific clusters
When making changes that impact a single cluster, such as changing an alias or restoring from an earlier cluster topology descriptor file, you only redeploy the effected cluster. Do the following:
To verify the timestamp on the currently deployed Cluster Topology WAR files, enter:
cd $gatewaydir data/deployments.
The system displays something similar to:Directory of C:/hdp/knox-0.4.0.2.1.2.0-1557/data/deployments 04/17/2014 05:30 PM <DIR> . 04/17/2014 05:30 PM <DIR> .. 04/17/2014 05:30 PM <DIR> cluster.war.145514f4dc8 04/17/2014 05:30 PM <DIR> myCluster.war.145514f4dc8 04/11/2014 08:35 AM <DIR> sandbox.war.145514f4dc8 0 File(s) 0 bytes 5 Dir(s) 9,730,977,792 bytes free
To redeploy a specific cluster, enter:
cd $gateway bin/knoxcli.cmd redeploy --cluster $cluster_name
where
$cluster_name
is the name of the cluster topology descriptor (without the.xml
extension). For example, myCluster.To verify that the cluster was deployed, enter:
cd $gatewaydir data/deployments
. The system displays something similar to:Directory of C:/hdp/knox-0.4.0.2.1.2.0-1557/data/deployments 04/17/2014 05:30 PM <DIR> . 04/17/2014 05:30 PM <DIR> .. 04/17/2014 05:30 PM <DIR> cluster.war.145514f4dc8 04/17/2014 05:30 PM <DIR> myCluster.war.145514f4dc8 04/17/2014 05:34 PM <DIR> myCluster.war.1457241b5dc 04/11/2014 08:35 AM <DIR> sandbox.war.145514f4dc8 0 File(s) 0 bytes 5 Dir(s) 9,730,977,792 bytes free
You should see that existing cluster war files are unchanged, but the war file for myCluster was updated (has a current timestamp).