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 $gatewaydir/conf/topologies directory and automatically redeploys the cluster if any descriptor changes or a new one is added. (The corresponding deployment is in $gatewaydir/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), visit: cd $gatewaydir/data/deployments.
  2. To redeploy, enter:
    ChoiceEnter
    All clusters $gatewaydir/bin/knoxcli.cmd redeploy
    A specific cluster cd $gatewaydir/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
    cd $gatewaydir/data/deployments
    
    # .
    # ..
    # cluster.war.145514f4dc8
    # cluster.war.1457241b5dc
    # myCluster.war.145514f4dc8
    # myCluster.war.1457241b5dc
    # sandbox.war.145514f4dc8
    # 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
    cd $gatewaydir/data/deployments
    
    # .
    # ..
    # cluster.war.145514f4dc8
    # myCluster.war.145514f4dc8
    # myCluster.war.1457241b5dc
    # 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).