Upgrade the Virtual Appliance in Microsoft Azure

Upgrading the Virtual Appliance involves:

  • Backing up and deleting the hard disks of the existing virtual machines.
  • Deploying new virtual machines by using VHD 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 Microsoft Azure documentation. Splunk AppDynamics makes no representation as to the accuracy of Microsoft Azure documentation because Microsoft Azure controls its own documentation.

Follow the steps to upgrade the Virtual Appliance in Microsoft Azure.

Back Up the Virtual Appliance Data

Before you begin the upgrade, complete the following steps:

  1. Download the Virtual Appliance upgrade VHD file from the Downloads portal.
  2. Shut down the Virtual Appliance:
    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:
    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 Microsoft Azure for the Upgrade

To upgrade virtual machines in Azure, you must create a image and snapshot from the new VHD. However, you can use the same Resource Group, Network Security Group, Virtual Network, and Storage Account that you have created at the time of deployment. See Deploy and Configure Virtual Machines in Microsoft Azure.

Note: To use Azure CLI, you require the reference scripts. Download these script from the Splunk AppDynamics GitHub repository. Ensure to update or verify the configuration details in config.cfg such as tags, deployment configuration, and IP addresses. Run these scripts in the given order.

For more information about Azure CLI, see Azure CLI Documentation.

Azure ResourcesDescriptionReference Scripts
1Disk

Upload the VHD image to a storage account. Create a disk by using the URI of the VHD file.

05-azure-create-disk.sh
2Image Gallery

An image is a copy of the disk. Image gallery is a place where you can store and share the image to create multiple virtual machines.

  1. Create an image gallery.

  2. Update the shared image definition and version.

See

See Store and share images in an Azure Compute Gallery.

06-azure-image-gallery.sh

07-azure-shared-image-def.sh

08-azure-shared-image-version.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:

StepFilename
1Obtain the details of the virtual machine.01-azure-get-vm-details.sh
2Shutdown the virtual machine.02-azure-power-off-vm.sh
3Associate a NIC to the virtual machine03-azure-associate-dummy-nic.sh
4

Disassociate the NIC from the virtual machine.

Detach the data disk from the virtual machine.

04-azure-disassociate-nic-and-data-disk.sh
5Delete the virtual machine.05-azure-delete-vms.sh
6Create a virtual machine.06-azure-create-vms.sh

Verify whether the data directories exist in the following location:

/var/appd/data

Verify the Deployment Status

Verify the deployment of virtual machines:

  1. Verify whether the deployment of virtual machines are successful:
    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:
      appdctl cluster init <Node-2-IP> <Node-3-IP>
    2. Run the following command to verify the node status:
      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

      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:
      Insufficient Permissions to Access Microk8s

Restore Data in the Virtual Appliance

  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:
    appdcli run restore <backup_tar>
  3. Verify the PVC are in theBound state by running the following command:
    kubectl get pvc -A
  4. Start the following services:
    appdcli start appd [Profile]
    1. Splunk AppDynamics Services.
    2. Anomaly Detection Service.
    3. Secure Application Service.
  5. Restore self-signed CA ingress certificates.A prompt is displayed "Do you want to restore self-signed ingress certificates?" Enter 0 for No or 1 for Yes".
    • Choose 0 if you have configured the certificates for DNS.
    • Choose 1 to configure the certificates.
  6. Sometimes, MySQL Router pods might fail to start. In such cases, restart the services using the following commands:
    1. Stop the Splunk AppDynamics services.
      appdcli stop appd

      Wait for the pods to terminate.

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