Editing, Stopping, and Restarting Appian on Kubernetes

Overview

This page walks through how to edit the Appian custom resource (CR) and stop and start Appian on Kubernetes for self-managed customers. It looks at cases for when to do a full restart after updating the custom resource (CR), or when changes can be done on the fly.

Editing and restarting Appian

Typically when a change is made to a running Kubernetes custom resource, the corresponding operator automatically reconciles that change to the Kubernetes resources it manages. See What is the Appian Operator? to understand the relationship between a custom resource and an operator. Due to product constraints, there are many fields in the Appian custom resource that once initially set, cannot be changed without some sort of restart and downtime.

Changes that require a full restart

Configurations that can’t be changed without a restart are documented in the Appian CRD docs as immutable. They include things like Pod resource configurations, topology configurations for Appian services, and site data sources.

Immutable property changes require Stopping the Appian site, editing your custom resource, and Restarting the Appian site.

In order to prevent users from inadvertently changing a field in the Appian custom resource that would cause a problem with the product, the Appian operator has a validating webhook that prevents immutable fields from being changed. The validating webhook is only enabled when webhooks.enabled is set to true in the Appian operator’s Helm values.

Changes that can be made to a running site

Site configurations that can be made without restarts include any properties in the Appian CRD docs not marked as immutable. For these, you can edit the existing Appian custom resource with the following command.

kubectl -n <NAMESPACE> edit appians <APPIAN>

Once changed, Kubernetes will work to reconcile the change for the Appian custom resource.

Changes to Custom Properties

You can change Appian’s custom.properties file by updating the customProperties key-value pairs inside the Appian CRD. The key-value pairs are then injected into the custom.properties file shared by all components.

Changes to customProperties can be made without a full restart of Appian. After making the changes to the running site, you can check that the corresponding custom.properties file on the webapp pod has been fully updated using the following command.

kubectl -n <NAMESPACE> exec <WEBAPP POD> -- cat /usr/local/appian/ae/conf/custom.properties

Some custom.property changes require a restart of the Application Server (webapp component). For custom property changes that require an Application Server restart, you can delete your webapp pod(s) to initiate a restart of just this one component.

kubectl -n <NAMESPACE> delete pod <WEBAPP POD>

By deleting the webapp pod, the StatefulSet that backs the Webapp pod will automatically recreate it and the webapp pod will have the configuration updates.

Stopping the Appian site

The following steps will stop all components of the Appian site.

Because most Appian components are StatefulSets with PersistentVolumesClaims, the component data is persisted when shutting down Appian. The Appian site can then be restarted without data loss.

  1. Get the name of your Appian site.

    kubectl get -n <NAMESPACE> appians

    Output should be similar to:

    1
    2
    3
    
    NAME              URL                                  STATUS
    
    appian-k8s-appn   http://myappiansite.com   Ready
    
  2. If you intend to restart the Appian site, make sure you have a copy of the existing Appian custom resource definition somewhere on your computer before shutting down (for example, appian.yaml). You will need it to restart the site. You can use the following command to print out the current appian custom resource definition.

    kubectl -n <NAMESPACE> get appian <APPIAN NAME> -oyaml

    Copy the output and save as a YAML file.

  3. Delete the Appian site.

    kubectl delete -n <NAMESPACE> appian <APPIAN NAME>

    For example:

    kubectl delete -n my-appian-site appian appian-k8s-appn

    Shutdown can take some time and is a synchronous operation, so this command may appear to hang.

  4. Confirm the Appian site was deleted with the following commands.

    kubectl -n <NAMESPACE> get pods

    kubectl -n <NAMESPACE> get appians

    All Appian component pods should now be deleted. Output from running the get appians command should be:

    No resources found in <NAMESPACE> namespace.

If your site has issues shutting down, follow the steps in Troubleshooting site shutdown to debug.

Restarting the Appian site

Having stopped the Appian site, you can restart as follows.

  1. Make any desired changes to the Appian custom resource definition YAML file.

  2. Run kubectl apply to restart the site with the changes:

    kubectl apply -n <NAMESPACE> -f <PATH TO APPIAN CRD YAML>

  3. It will take about 20 minutes for the Appian site to fully recover. Check progress on the various Appian component pods with the following command.

    kubectl -n <NAMESPACE> get pods

    The STATUS of the Appian component pods will transition from Creating to Starting to Running. When the Appian site is ready, you should see all pods have READY of 1/1 and STATUS of Running, similar to the following.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    
    NAME                                     READY   STATUS    RESTARTS   AGE`
    
    appian-k8s-appn-data-server-0-0          1/1     Running   0          15m
    appian-k8s-appn-httpd-8658f7fdb7-k9f6j   1/1     Running   0          15m
    appian-k8s-appn-httpd-bf56974d4-crv4g    1/1     Running   0          15m
    appian-k8s-appn-kafka-0-0                1/1     Running   2          15m
    appian-k8s-appn-search-server-0-0        1/1     Running   2          15m
    appian-k8s-appn-service-manager-0-0      1/1     Running   3          15m
    appian-k8s-appn-webapp-0-0               1/1     Running   0          15m
    appian-k8s-appn-zookeeper-0-0            1/1     Running   0          15m
    mariadb-appian-mariadb-0                 1/1     Running   0          21m
    

If you have any trouble with creating the Appian site, see Troubleshooting site startup.

Restarting the webapp component

You may need to restart the webapp component in the course of updating configurations such as changes to customProperties.

To restart the webapp component, delete its pod(s).

kubectl -n <NAMESPACE> delete pod <WEBAPP POD>

After deleting, Kubernetes will immediately start a new Pod that will take on any configuration changes.

This type of restart is only safe to do for the webapp component. If you need to change the configuration specific to any other component, we recommend doing a site restart to apply the changes.

Fully deleting the Appian site

To fully delete the Appian site on Kubernetes, including all data, you will need to delete the PersistentVolumes that are attached to the StatefulSets.

  1. Follow the steps to Stop Appian.
  2. Get the existing PersistentVolumeClaims on the Appian namespace.

    kubectl -n <NAMESPACE> get PersistentVolumeClaim

  3. For each Appian component that has a PersistentVolumeClaim (PVC), delete it with the following command.

    kubectl -n <NAMESPACE> delete PersistentVolumeClaim <APPIAN COMPONENT PVC>

  4. Depending on how the PVC’s reclaim policy is set up, deleting the PersistentVolumeClaim will in turn delete the PersistentVolume. Check that the Appian component PersistentVolumes were deleted with the following command.

    kubectl -n <NAMESPACE> get PersistentVolume

    If any PersistentVolumes for Appian components still exist, you’ll want to delete each of them with the following command.

    kubectl -n <NAMESPACE> delete PersistentVolume <APPIAN COMPONENT PV>

Stopping the Appian operator

If you are fully deleting the Appian site, you may also want to stop the operator.

  1. Stop the Appian operator release in Helm.

    helm -n <NAMESPACE> delete appian-operator

  2. Check that the Appian operator deployments, replicasets, and pods are deleted.

    kubectl -n <NAMESPACE> get deployments,replicasets,pods

    You should get the output of:

    No resources found in <NAMESPACE> namespace.

Starting the Appian operator

To start the Appian operator, see the instructions to Create the Appian Operator.

Open in Github Built: Tue, Mar 28, 2023 (09:28:18 PM)

On This Page

FEEDBACK