This article explains how to move a Controller from one folder to another.
Table of Contents
What you need to know before you begin
Step 1. Preparation
Step 2. Stop Controller processes
Step 3. Move the Controller to your target folder
Step 4. Delete and add services
Step 5. Modify files to reflect the new path
Step 6. Re-start the Controller
Reference
What you need to know before you begin
These instructions assume the host has a simple Controller installation, with the database, Controller, reporting and embedded events service on the same host.
You can use these instructions with version 4.3 with the Controller installer, or with versions 4.4+ with Enterprise Console (EC). For versions 4.4+ using the EC, extra steps might be required in order to rediscover all services.
High Availability (HA) re-configuration will require additional assistance from the Systems Team.
Step 1. Preparation
Make sure none of the Controller's services are up and running.
Common considerations
Unless it’s impossible to do so, it’s best to back up the Controller first, to avoid unexpected losses
Make sure the target folder’s disk configuration is done according to AppDynamics' System Requirements and Supported Environments guidelines
Make sure the user has the permissions to read, write, and execute in the target folder
Rename the existing <controller-dir>/logs folder
Create a new <controller-dir>/logs folder
Step 2. Stop Controller processes
Stop the Controller processes using the following instructions, depending on whether you’re working in Linux or Windows OS.
Linux OS
$ <controller-dir>/bin/stopController.sh $ <controller-dir>/bin/controller.sh stop-events-service $ ps -ef| grep -i appd | grep -v grep | grep -v ssh
The output of the last command should not have running processes related to the controller installation.
Windows OS
Stop Reporting Service
Stop Events Service
Stop Controller Service
Stop Database Service
Step 3. Move the Controller to your target folder
Move the Controller from folder A to folder B using the following instructions, depending on whether you’re working in Linux or Windows OS.
Linux OS
$ cp -r <controller-source-dir> <controller-target-dir>
Remove any old references for AppD related services
Windows OS
robocopy Controller-Source-Dir controller-target-dir /e /copyall
Step 4. Delete and add services
Delete and add services as follow:
Delete existing services (check Windows Service Manager for the exact names):
sc delete " AppDynamics Controller Application Server "
sc delete " AppDynamics Database "
sc delete " AppDynamics Events Service API Store XXXXX "
sc delete " appdynamicsreportingservice.exe "
Add 3 services back:
AppDynamics Controller Application Server
sc create " AppDynamics Controller Application Server " binPath= < controller-target-dir> \appserver\glassfish\ domains\domain1\bin\AppDynamicsDomain1Service.exe" DisplayName= "AppDynamics Controller Application Server" start= auto
sc description " AppDynamics Controller Application Server " "AppDynamics Application Server"
AppDynamics Database
sc create " AppDynamics Database " binPath= "<controller-target-dir> \db\bin\mysqld.exe --defaults-file=\"<controller-target-dir> \db\db.cnf\" \"AppDynamics Database\"" DisplayName= "AppDynamics Database"
sc description " AppDynamics Database " "MySQL Database"
AppDynamics Reporting Service
sc create "appdynamicsreportingservice.exe" binPath = " Controller-Target-Dir \reporting_service\reports\daemon\appdynamicsreportingservice.exe" DisplayName= " AppDynamics Reporting Service " start= auto
sc description "appdynamicsreportingservice.exe" " AppDynamics report generation service ."
The AppDynamics Events Service needs special care: install it using the following steps:
cd <controller-target-dir> \events_service
bin\events-service.exe service-install -p conf\events-service-api-store.properties --auto-start
Step 5. Modify files to reflect the new path
Modify the following files with the new file path, as appropriate to your operating system.
Common files
<controller-target-dir> /.install4j/pref_jre.cfg
<controller-target-dir>/.install4j/response.varfile
<controller-target-dir>/appserver/glassfish/domains/domain1/bin/AppDynamicsDomain1Service.xml
<controller-target-dir>/appserver/glassfish/domains/domain1\config/domain.xml
<controller-target-dir>/db/db.cnf
<controller-target-dir>/events_service/conf/events-service-api-store.properties
<controller-target-dir>/events_service/conf/events-service-api-store.yml
<controller-target-dir>/events_service/conf/events-service.vmoptions
<controller-target-dir>/reporting_service/reports/config/default-config.json
<controller-target-dir>/reporting_service/reports/daemon/appdynamicsreportingservice.xml
Linux OS files
<controller-target-dir>/appserver/glassfish/config/asenv.conf
<controller-target-dir>/reporting_service/reports/bin/reports-service.sh
Windows OS files
<controller-target-dir>/appserver/glassfish/config/asenv.bat
<controller-target-dir>/reporting_service/reports/bin/reports-service.bat
Step 6. Restart the Controller
Restart the Controller using the relevant process below, according to your OS
Linux OS
$ <controller-dir> /bin/startController.sh
Windows OS
Start Database Service
Start Controller Service
Start Reporting Service
Start Events Service
Reference
System Requirements and Supported Environments
Storage Disk I/O Requirements in Controller System Requirements
... View more