Prepare the Environment for Migration

To successfully migrate all data from Classic On-Premises to the Virtual Appliance, certain configurations must be performed on the source Controller and Events Service servers. Follow these steps to prepare your environment for migration:

  • Enterprise Console:

    After you upgrade Enterprise Console to 25.10, restart the Enterprise Console with the JVM config setting. For more information, see Restart Enterprise Console.

  • Source, Destination, and the NFS server are on the Same Network:

    Ensure that the Classic On-Premises Controller, EUM, Virtual Appliance, and NFS are on the same network so that they can have consistent access to one another during migration.

  • Add Migration User to the Super User Doer (sudo) list:

    Add the user account being used for migration to the sudo list on each host to enable passwordless sudo access to the migration tool.

    Example Commands:
    CODE
    sudo visudo -f /etc/sudoers.d/appduser
    appduser ALL=(ALL) NOPASSWD:ALL
    sudo chmod 440 /etc/sudoers.d/appduser
    In this example, appduser represents the user account used to log into the Controller and other hosts. Replace appduser with your actual username as needed.
  • Install NFS Client Packages and Verify NFS Server:

    Ensure that all Classic On-Premises and Virtual Appliance hosts have the necessary NFS client packages installed. Confirm that the NFS server is running on the NFS host. For more information, see Install the NFS Client Packages on Classic On-Premises.

  • Enable MySQL Binary Logging (bin-log):

    Enable bin-log in the MySQL server of Classic On-Premises Controller and EUM. See, Enable bin-log of the MySQL Server.

  • Set Up SSH Key Pairs:

    Set up SSH key pairs for all the components. These key pairs are required to enable secure communication among all the components.

    Note: Ensure that all the SSH keys exist under ~/.ssh on the Virtual Appliance node. The ~/.ssh/id_* files must have owner permissions (chmod 600).
    Copy the private and public keys for each component. Example SSH key pairs that you can add in the Virtual Appliance node:
    CODE
    ~/.ssh/id_classic_controller
    ~/.ssh/id_classic_events
    ~/.ssh/id_classic_eum
    ~/.ssh/id_classic_synth
    ~/.ssh/id_nfs
    ~/.ssh/id_va_ip1
    ~/.ssh/id_va_ip2
    ~/.ssh/id_va_ip3

    For classic On-Premises Controller host, Events Service host, and Virtual Appliance, add the public key corresponding to its private key in the authorized keys file (~/.ssh/authorized_keys).

    If you prefer not to share private keys with the hosts, you can alternatively generate an SSH key pair on your local machine by running the following command:
    CODE
    ssh-keygen -t rsa -b 4096 -C "your_email@example.com" -f ~/.ssh/my_custom_key
    Example of custom key-pairs:
    CODE
    ~/.ssh/my_custom_key
    ~/.ssh/my_custom_key.pub

These configurations establish the foundational infrastructure for the migration tool to operate efficiently, automating tasks such as mounting NFS shares, transferring data stores, and managing service restarts.

Restart Enterprise Console

Update the JVM config and restart the Enterprise Console:
  1. Access the Enterprise Console UI.
  2. Select the platform.
  3. Go to the Configuration tab.
  4. Navigate to Controller Settings > Appserver Configurations > JVM Options > JVM Config.
  5. In the JVM Config field, append the following content:
    CODE
    -Dappdynamics.disabled.classes=RSDWriterAndEventDataWriterPostProcessTimerTask,MetricDataOneMinPurgerTimerTask,MetricDataTenMinPurgerTimerTask,MetricDataSixtyMinPurgerTimerTask,TopSummaryStatsFiveMinTablePurgerTimerTask,TopSummaryStatsOneHourTablePurgerTimerTask,TopSummaryStatsHalfDayTablePurgerTimerTask,TopSummaryStatsDetailStringMapTablePurgerTimerTask,EntityHealthPurgerTimerTask
    This setting stops the background purging activity. And, it ensures uninterrupted data migration.
  6. Click Save.
    Note: After you save the configuration, the Controller restarts.

Enable bin-log of the MySQL Server

Enabling binary logging (bin-logs) on MySQL servers is required when migrating from classic on-prem Controller and EUM to the Virtual Appliance (VA).

  1. Log in to your Classic On-Premises Controller and EUM.
  2. Update the db.cnf file in the following path:
    Controller
    CODE
    {HOME}/controller/db/db.cnf
    EUM
    CODE
    {HOME}/EUM/mysql/db.cnf
    1. Add the following entries in [mysqld].
      CODE
      [mysqld]
      server-id=1
      log_bin=/var/log/mysql/mysql-bin.log
      max_binlog_size=100M
      binlog_format=ROW
      binlog_expire_logs_seconds=864000
    2. Comment the skip-log-bin line:
      CODE
      # inhibit mysql bin-logging - on in mysql8 by default, making for lots of log files
      #skip-log-bin
    3. Update the following configuration to ensure durability:
      CODE
      sync_binlog=1
    4. Enable gtid mode to ensure the Virtual Appliance configuration is compatible with the Classic Controller:
      CODE
      gtid_mode=ON
      enforce_gtid_consistency=ON
  3. Create a bin log directory in the location that you mentioned in the log-bin configuration:
    CODE
    sudo mkdir -p /var/log/mysql
    sudo chown <MySQL-User>:<MySQL-User> /var/log/mysql
    sudo chmod 755 /var/log/mysql

    You can verify that <MySQL-User> updated in the EUM server:

    CODE
    ps -aef | grep mysql
    CODE
    <MySQL-User> 3121036 3120247  0 07:19 pts/0    00:00:00 grep --color=auto mysql
    <MySQL-User> 3350551       1  0 Sep15 ?        00:00:00 /bin/sh bin/mysqld_safe --defaults-file=/home/<MySQL-User>/AppDynamics/EUM/mysql/db.cnf
    <MySQL-User> 3351465 3350551  0 Sep15 ?        00:28:29 /home/<MySQL-User>/AppDynamics/EUM/mysql/bin/mysqld --defaults-file=/home/<MySQL-User>/AppDynamics/EUM/mysql/db.cnf --basedir=/home/<MySQL-User>/AppDynamics/EUM/mysql --datadir=/home/<MySQL-User>/AppDynamics/EUM/data --plugin-dir=/home/<MySQL-User>/AppDynamics/EUM/mysql/lib/plugin --log-error=/home/<MySQL-User>/AppDynamics/EUM/mysql/logs/database.log --open-files-limit=2048 --pid-file=/home/<MySQL-User>/AppDynamics/EUM/mysql/mysql.pid --socket=/home/<MySQL-User>/AppDynamics/EUM/mysql/mysql.sock --port=3388
  4. (Conditional) Stop the EUM server:
    CODE
    bin/eum.sh stop
  5. Run the following commands to restart the MySQL service.
    Note: You may observe some data loss when restaring the MySQL service.
    1. Stop the MySQL service:
      Controller
      Navigate to the Controller path and stop the Controller database.
      CODE
      cd {HOME}/controller/bin
      ./controller.sh stop

      For high-availability deployment, see Start or Stop the Controller.

      EUM
      1. Set the JAVA_HOME if it is not already set.

      2. Go to the directory where MySQL service is running and stop the service:

        CODE
        ./orcha-master -d mysql.groovy -p ../../playbooks/mysql-orcha/stop-mysql.orcha -o ../conf/orcha.properties -c local

      Alternatively, you can do the following:

      List the MySQL processes and terminate those processes in EUM:

      1. List the MySQL processes using the following command:
        CODE
        ps -aef | grep mysql

        Example List:

        CODE
        appduser 3350551       1  0 Sep15 ?        00:00:00 /bin/sh bin/mysqld_safe --defaults-file=/home/appduser/AppDynamics/EUM/mysql/db.cnf
        appduser 3351465 3350551  0 Sep15 ?        00:28:29 /home/appduser/AppDynamics/EUM/mysql/bin/mysqld --defaults-file=/home/appduser/AppDynamics/EUM/mysql/db.cnf --basedir=/home/appduser/AppDynamics/EUM/mysql --datadir=/home/appduser/AppDynamics/EUM/data --plugin-dir=/home/appduser/AppDynamics/EUM/mysql/lib/plugin --log-error=/home/appduser/AppDynamics/EUM/mysql/logs/database.log --open-files-limit=2048 --pid-file=/home/appduser/AppDynamics/EUM/mysql/mysql.pid --socket=/home/appduser/AppDynamics/EUM/mysql/mysql.sock --port=3388
      2. Navigate to the EUM processor path and stop the EUM server.

        CODE
        cd {HOME}/EUM/eum-processor/bin
        ./eum.sh stop
      3. Terminate the MySQL processes:

        CODE
        kill -15 <process-id>
        Example:
        CODE
        kill -15 3350551
        kill -15 3351465
    2. Start the MySQL service.
      Controller
      Start the Controller database.
      CODE
      cd {HOME}/controller/bin
      ./controller.sh start

      For high-availability deployment, see Start or Stop the Controller.

      EUM
      1. Start the MySQL service:

        CODE
        ./orcha-master -d mysql.groovy -p ../../playbooks/mysql-orcha/start-mysql.orcha -o ../conf/orcha.properties -c local
        CODE
        ~/AppDynamics/EUM/mysql$bin/mysqld_safe --defaults-file={HOME}/EUM/mysql/db.cnf
      2. Start the EUM server:

        CODE
        cd {HOME}/EUM/eum-processor 
        ./bin/eum.sh start
  6. Log in to the MySQL server and verify whether the bin-log setting is enabled:
    Example:
    Controller
    CODE
    {HOME}/appdynamics/platform/controller/db/bin/mysql -u <user> -P <port> -—socket={HOME}/appdynamics/platform/controller/db/mysql.sock -p <password>
    EUM
    CODE
    {HOME}/AppDynamics/EUM/mysql/bin/mysql -u <user> -P <port> -—socket={HOME}/AppDynamics/EUM/mysql/mysql.sock -p <password>

    Sample Output:

    CODE
    mysql> SHOW VARIABLES LIKE 'log_bin';
    +---------------+-------+
    | Variable_name | Value |
    +---------------+-------+
    | log_bin       | ON    |
    +---------------+-------+
    1 row in set (0.00 sec)

Install the NFS Client Packages on Classic On-Premises

Run the following commands to install the NFS client packages on Classic On-Premises Environment:
Linux Flavor Command
  • Red Hat

  • CentOS

  • Amazon

CODE
sudo yum install nfs-utils
Fedora
CODE
sudo dnf install nfs-utils
  • Ubuntu

  • Debain

CODE
sudo apt update && sudo apt install nfs-common
SLES12 and SLES15
CODE
sudo zypper install nfs-utils

Set Up the NFS Server

Run the following commands to install the NFS server:
AlmaLinux
CODE
dnf install nfs-utils
Ubuntu
CODE
sudo apt install nfs-kernel-server