Upgrade the Virtual Appliance in AWS

Upgrading the Virtual Appliance involves:

  • Backing up and deleting the hard disks of the existing virtual machines.
  • Deploying new virtual machines by using AMI image.
  • Restoring the backup to their hard disks.
  • Attaching the new hard disks to the older virtual machines

Splunk AppDynamics On-Premises Virtual Appliance provides the reference script that helps in upgrading the Virtual Appliance.

Note: This document contains links to AWS documentation. Splunk AppDynamics makes no representation as to the accuracy of AWS documentation because AWS controls its own documentation.

Follow steps to upgrade the Virtual Appliance in AWS.

Back Up the Virtual Appliance Data

Before you begin the upgrade, complete the following steps:

  1. Download the Virtual Appliance upgrade AMI file from the Downloads portal.
  2. Shut down the Virtual Appliance:
    CODE
    appdcli stop secapp
    appdcli stop aiops
    appdcli stop appd
    <<Wait for pods to terminate before deleting operators>>
    appdcli stop operators
  3. Run the backup command:
    CODE
    appdcli run backup
    This command generates a <backup_tar> file with all the necessary data.
  4. Copy the backup file outside of the cluster.

Prepare the AWS Environment for the Upgrade

To upgrade virtual machines in AWS, you must create the image and snapshot from the new AMI. However, you can use the same AWS profile, VPC, S3 Bucket, and IAM role that you created at the time of deployment. See Deploy and Configure Virtual Machines in AWS.

Note:

To use AWS CLI, you require reference scripts. Download these script from the Splunk AppDynamics GitHub repository. In config.cfg, ensure to update or verify the configuration details such as tags, deployment configuration, and IP addresses. Run the scripts in the given order. For more information about AWS CLI, see AWS CLI Documentation.

To create virtual machines in AWS, you must use the m5a.4xlarge instance type. See M5a instances.

AWS Resources Description Reference Scripts
1 Image

Upload the Splunk AppDynamics image in the S3 bucket that generates the AMI for Virtual Appliance. See Uploading objects.

05-aws-upload-image.sh
2 Snapshot

Snapshots help in using the AMI that you have uploaded to S3 bucket. Complete the following steps to obtain an AMI ID:

  1. Import the snapshot.
  2. Register the snapshot.
Note: The AMI ID is used to create virtual machines.

06-aws-import-snapshot.sh

07-aws-register- snapshot.sh

Upgrade the Virtual Appliance

Note: Download the upgrade script from the Splunk AppDynamics GitHub repository. We recommend that you run the scripts in the given order.

Run the upgrade scripts in the given order:

Step Filename
1 Obtain the details of the virtual machine. 01-aws-get-vm-details.sh
2 Shutdown the virtual machine. 02-aws-terminate-vms.sh
3 Check status of the virtual machine. 03-aws-get-vm-status.sh
4 Create a virtual machine. 04-aws-create-vms.sh

Verify the Deployment Status

Verify the deployment of virtual machines:

  1. Verify whether the deployment of virtual machines are successful:
    CODE
    appdctl show boot
    Note: Ensure the status of the services in each node. If any service appears as Failed, restart that virtual machine. You might have to redeploy the virtual machine if it is still failing.
  2. Create a three-node cluster:
    1. Run the following command in the primary node and specify the IP address of the peer nodes:
      CODE
      appdctl cluster init <Node-2-IP> <Node-3-IP>
    2. Run the following command to verify the node status:
      CODE
      appdctl show cluster
      microk8s status
      Ensure that the output displays the Running status as true for the nodes that are part of the cluster.

      Sample Output

      CODE
      NODE           | ROLE  | RUNNING 
      ----------------+-------+---------
       10.0.0.1:19001 | voter | true    
       10.0.0.2:19001 | voter | true    
       10.0.0.3:19001 | voter | true
      Note: You must re-login to the terminal if the following error appears:
      CODE
      Insufficient Permissions to Access Microk8s

Restore Data in the Virtual Appliance

Verify whether the data directories exist in the following location:

CODE
/var/appd/data
  1. Copy the <backup_tar> file to one of the cluster nodes that is generated earlier. See Prerequisites.
  2. Run the following command to restore the persistent volumes specifications:
    CODE
    appdcli run restore <backup_tar>
  3. Verify the PVC are in the Bound state by running the following command:
    CODE
    kubectl get pvc -A
  4. Start the following services:
    CODE
    appdcli start appd [Profile]
    1. Splunk AppDynamics Services.
    2. Anomaly Detection Service.
    3. Secure Application Service.
  5. Sometimes, MySQL Router pods might fail to start. In such cases, restart the services using the following commands:
    1. Stop the Splunk AppDynamics services.
      CODE
      appdcli stop appd

      Wait for the pods to terminate.

    2. Stop the operators:
      CODE
      appdcli stop operators
    3. Start the Splunk AppDynamics services:
      CODE
      appdcli start appd <profile>
After the upgrade, the cluster uses the existing data disk and becomes functional.