Configuring Proxy with Apache Knox
Also available as:
PDF
loading table of contents...

Manually Redeploy Cluster Topologies

How to manually redeploy cluster topologies, when configuring the Knox Gateway.

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 redeploys 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

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.

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 affected cluster.

  1. To verify the timestamp on the currently deployed cluster(s) enter:
    ChoiceEnter
    All clusters cd $gatewaydir data/deployments
    A specific cluster cd $gatewaydir data/deployments.
    The system displays something similar to:
    Choice Output
    All clusters
    Directory of C:/hdp/knox-0.4.0.2.1.1.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
    A specific cluster
    Directory of C:/hdp/knox-0.4.0.2.1.1.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
  2. To redeploy, enter:
    ChoiceEnter
    All clusters /bin/knoxcli.cmd redeploy
    A specific cluster 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.

  3. To verify that a new cluster WAR was created, enter:
    ChoiceEnter
    All clusters cd $gatewaydir data/deployments.
    A specific cluster cd $gatewaydir data/deployments
    The system displays something similar to:
    Choice Output
    All clusters
    Directory of C:/hdp/knox-0.4.0.2.1.1.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.

    A specific cluster
    Directory of C:/hdp/knox-0.4.0.2.1.1.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).