Deployment Workflow
15 minutesFirst Deployment
Now that your pipelines are configured, let’s walk through executing your first Smart Agent deployment.
Step 1: Navigate to Pipeline
- Go to Jenkins Dashboard
- Click on your Deploy-Smart-Agent pipeline
Step 2: Build with Parameters
Click Build with Parameters in the left sidebar
Review the default parameters:
- SMARTAGENT_ZIP_PATH: Verify path is correct
- REMOTE_INSTALL_DIR:
/opt/appdynamics/appdsmartagent - APPD_USER:
ubuntu(or your SSH user) - APPD_GROUP:
ubuntu - SSH_PORT:
22 - AGENT_NAME:
smartagent - LOG_LEVEL:
DEBUG
Adjust parameters if needed
Click Build
Tip
For your first deployment, consider testing on a single host by creating a separate credential with just one IP address.
Step 3: Monitor Pipeline Execution
After clicking Build, you’ll see:
- Build added to queue - Build number appears in Build History
- Click build number (e.g., #1) to view details
- Click Console Output to view real-time logs
Step 4: Understanding Console Output
The console output shows each stage of the deployment:
Key stages you’ll see:
- ✅ Preparation - Loads and validates host list
- ✅ Extract Smart Agent - Extracts ZIP file
- ✅ Configure Smart Agent - Creates config.ini
- ✅ Deploy to Remote Hosts - Deploys to each host
- ✅ Verify Installation - Checks Smart Agent status
Step 5: Review Results
After completion, you’ll see:
Success:
Partial Success:
Failure:
Verifying Installation
After a successful deployment, verify Smart Agent is running on target hosts.
Check Smart Agent Status
SSH into a target host and check the status:
Expected output:
List Installed Agents
Expected output:
Check Logs
Look for successful connection messages to the AppDynamics controller.
Verify in AppDynamics Controller
- Log into your AppDynamics Controller
- Navigate to Servers → Servers
- Look for your newly deployed hosts
- Verify Smart Agent is reporting metrics
Installing Additional Agents
Once Smart Agent is deployed, you can install specific agent types using the other pipelines.
Install Machine Agent
- Go to Install-Machine-Agent pipeline
- Click Build with Parameters
- Review parameters:
- AGENT_NAME:
machine-agent - SSH_PORT:
22
- AGENT_NAME:
- Click Build
The pipeline will SSH to each host and execute:
Install Database Agent
- Go to Install-Database-Agent pipeline
- Click Build with Parameters
- Configure database connection parameters
- Click Build
The pipeline will install and configure the Database Agent on all hosts.
Verify Agent Installation
After installing agents, verify they appear:
Expected output:
Common Deployment Scenarios
Scenario 1: Initial Deployment
Workflow:
- Run Deploy-Smart-Agent pipeline
- Wait for completion and verify
- Run Install-Machine-Agent if needed
- Run Install-Database-Agent if needed
Scenario 2: Update Smart Agent
To update Smart Agent to a new version:
- Download new Smart Agent ZIP
- Place it in Jenkins at configured path
- Run Deploy-Smart-Agent pipeline again
The pipeline automatically:
- Stops existing Smart Agent
- Removes old files
- Installs new version
- Restarts Smart Agent
Scenario 3: Add New Hosts
To add Smart Agent to new hosts:
- Update the
deployment-hostscredential in Jenkins - Add new IP addresses (one per line)
- Run Deploy-Smart-Agent pipeline
The pipeline will:
- Skip already-configured hosts (if idempotent)
- Deploy to new hosts only
Scenario 4: Complete Removal
To completely remove Smart Agent from all hosts:
- Go to Cleanup-All-Agents pipeline
- Click Build with Parameters
- Check the
CONFIRM_CLEANUPcheckbox - Click Build
Details
This will permanently delete /opt/appdynamics/appdsmartagent directory from all hosts. This action cannot be undone.
Troubleshooting Deployments
Build Fails at Preparation Stage
Symptom: Pipeline fails when loading host list
Cause: Missing or incorrect deployment-hosts credential
Solution:
- Go to Manage Jenkins → Credentials
- Verify
deployment-hostscredential exists - Check format (one IP per line, no commas)
- Ensure no trailing spaces
SSH Connection Failures
Symptom: “Permission denied” or “Connection refused” errors
Solutions:
Check security group:
Test SSH manually:
Verify SSH key:
- Ensure
ssh-private-keycredential is correct - Verify public key is in
~/.ssh/authorized_keyson target hosts
Smart Agent Fails to Start
Symptom: Deployment completes but Smart Agent not running
Solution:
Check logs on target host:
Common issues:
- Invalid access key: Check
account-access-keycredential - Network connectivity: Verify outbound HTTPS to Controller
- Permission issues: Ensure APPD_USER has correct permissions
Partial Deployment Success
Symptom: Some hosts succeed, others fail
Solution:
- Check Console Output - Identifies which hosts failed
- Investigate failed hosts - SSH and test manually
- Re-run pipeline - Jenkins tracks which hosts need retry
Pipeline Best Practices
1. Test on Single Host First
Always test new configurations on a single host before deploying to production:
2. Use Descriptive Build Descriptions
After triggering a build, add a description:
- Go to build page
- Click Edit Build Information
- Add description: “Production deployment - Q4 2024”
3. Monitor Build History
Regularly check build history for patterns:
- Failed builds
- Duration trends
- Error messages
4. Schedule Deployments During Maintenance Windows
For production systems:
- Use Jenkins scheduled builds
- Deploy during low-traffic periods
- Have rollback plan ready
5. Keep Credentials Updated
- Rotate SSH keys quarterly
- Update host lists as infrastructure changes
- Verify AppDynamics access key validity
Next Steps
Now let’s explore scaling and operational considerations for large deployments.