During development, easy and quick deployment/installation was a constant factor we had in mind. For this reason, we prepared a Docker file that will create a container and have everything up and running in just a few minutes. Although Docker is a very powerful tool, not everyone has it installed. In this case, you can also run the utility through the basic Node.js server.
The utility can be deployed using one of many Google Cloud Platform services such as Cloud Run, Compute Engine and a few others. It can also be deployed using a standard Docker setup, or basic Node.js environment. Below I will go over the steps for each method so you too can have it up and running in just a few minutes.
First, you will need to clone our repository from https://github.com/optimizca/appdtools. After this, all installation commands will be run from inside the /appdtools/node-appdynamics-api folder.
Google Cloud Platform
To work with GCP services, most will require an image in the container registry first. To build your container image run this command:
gcloud builds submit –tag gcr.io/<GCP_PROJECT_ID>/<IMAGE_NAME>
Running the utility under Google’s Compute Engine will first require a firewall rule to be setup, allowing traffic towards the utility.
gcloud compute firewall-rules create <RULE_NAME> –target-tags <TAG> –allow tcp:3005
After the firewall rule is in place you can create the compute instance with the following command.
gcloud compute instances create-with-container <INSTANCE_NAME> — tags <TAG> –container-image gcr.io/<GCP_PROJECT_ID>/<IMAGE_NAME>
Cloud Run is the fastest deployment option, only requiring one command to setup.
gcloud run deploy <SERVICE_NAME> –image gcr.io/<GCP_PROJECT_ID>/<IMAGE_NAME> –port 3005 –platform managed
The utility can also be deployed using a basic Docker setup, which only involves 2 commands. First, you will need to build the docker image. *Don’t forget the last period in the command, it’s important.
sudo docker build -t <IMAGE_NAME> .
Once the image is built, you can run it using this command.
sudo docker run -p <EXPOSED_ACCESS_PORT>:3005 -d –name <CONTAINER_NAME> <IMAGE_NAME>
If the above options don’t fit your environment, you can also deploy the utility using only Node.js. First, install the npm dependencies.
Then start the utility using this command.
To login to the utility, you will need to provide the account name of your AppDynamics controller, and a checkbox to indicate if your controller is running as SAAS. This way, we can use your controller for authentication, and you can reuse the same username/password combo.
- List all Dashboards in CSV – Creates a CSV file with all dashboards in the controller
- List all Users in CSV – Creates a CSV file with all users and their groups/roles
- List Health Rules in CSV – Creates a CSV file with all health rules from a specific application
- Import JSON Dashboards – Allows users to import a local JSON dashboard file to the controller
- Export or Transfer Dashboards – Allows users to export multiple dashboard JSON files to their local system, or transfer dashboards to another controller.
- Export or Transfer Health Rules – Allows users to export multiple health rule XML files to their local system, or transfer health rules to another controller.
- Analytics – Allows users to query the AppDynamics Analytics API and save results as CSV files.