- Created by Akshay Sharma (Unlicensed) on Jul 03, 2018
You are viewing an old version of this page. View the current version.
Compare with Current View Page History
Version 1 Next »
On Agent server
- Create a folder at desired location to hold AgentDaemon and Tools agent code. For Example - On Windows D:\\Agents
- Set up environment variable INSIGHTS_AGENT_HOME pointing to above folder
- Create the following folders under the environment variable path $INSIGHTS_AGENT_HOME
AgentDaemon and
PlatformAgents
For example - D:\\Agents\\AgentDaemon and D:\\Agents\\PlatformAgents
- Provide executable and write permissions to these folders
- Download agentdaemon.zip from http://platform.cogdevops.com/insights_install/release/latest/agentdaemon.zip and extract it inside AgentDaemon folder. Make sure folder structure starts with "com" and not "agentdaemon"
- Update config.json for following highlighted fields
{
"baseExtractionPath": "$INSIGHTS_AGENT_HOME/PlatformAgents",
"insightsTimeZone": "Asia/Kolkata",
"loggingSetting": {
"logLevel": "WARN"
},
"mqConfig": {
"host": "127.0.0.1",
"password": "guest",
"user": "guest",
"exchange": "iSight",
"agentExchange":"iAgent"
},
"publish": {
"health": "AGENT.DAEMON.HEALTH"
},
"isDebugAllowed": false,
"subscribe": {
"agentPkgQueue": "INSIGHTS.AGENTS.PACKAGE"
},
"timeStampFormat": "%Y-%m-%dT%H:%M:%SZ",
"toolsTimeZone": "GMT"
}
Create AgentDaemon as service -
Unix OS
- Use installdaemonagent.sh to create OS specific AgentDaemon service and provide OS input while running the script.
- Service name is "InSightsDaemonAgent"
installdaemonagent.sh currently supports Linux, might need to update it based on OS types and versions.
Windows OS
- Install nssm utility on Agent server (which is part of Insights installation package )
- Run installdaemonagent.bat provided inside ..\\Agents\\AgentDaemon folder
- It will create Windows daemon agent service with name "DaemonAgent"
- Validate whether service has been installed and started successfully
On Application/Platform server (Tomcat)
Please note the docrootURL - http://platform.cogdevops.com/insights_install/release
server-config.json should be updated as follows -
- Add new section and change unzipPath parameter
- If your web server doesn't have permission to connect to docroot URL, then make isOnlineRegistration as false and provide offlineAgentPath path. This is offline agent registration
- Inside offlineAgentPath, create folder and give it some version like v1.0 or same version which you are planning to manually download from docroot url.
- Inside version folder create agent specific folders like "git", "jenkins", "jira" same as that of docroot
- Download individual agent zip from docroot and unzip them in respective agent folders
- Make sure folder structure is starting from com/cognizant/....
For Example typical structure assuming offlineAgentPath as "D://download//agents" --
"D:\\download\\agents\v1.0\git\com\cognizant..."
"D:\\download\\agents\v1.0\jenkins\com\cognizant..."
"agentDetails": {
"isOnlineRegistration" : true,
"docrootUrl":"http://platform.cogdevops.com/insights_install/release",
"offlineAgentPath" : "D://download//agents",
"unzipPath":"D://download",
"agentExchange" : "iAgent",
"agentPkgQueue" : "INSIGHTS.AGENTS.PACKAGE"
}
- Make sure that server-config.json has the following section
"messageQueue": {
"host": "localhost",
"user": "iSight",
"password": "iSight"
}
Deploy new PlatformService WAR
Run below SQL query to register Daemon Agent
Update highlighted value '{"key":"value"}' in below query with daemon config.json.
INSERT INTO public.agent_configuration(id, agent_id, agent_json, agent_key, agent_status, agent_version,data_update_supported, os_version, tool_category, tool_name,unique_key, update_date) VALUES (0, 0,'{"key":"value"}','daemon-1523257126' ,'' ,'' , FALSE,'' , 'DAEMONAGENT', 'AGENTDAEMON', 'daemon-1523257126', current_date);
- Register all required agents using Agent management tab in Admin screen
- Run latest new updated Insights Engine Jar
- Validate all agents are running successfully and collecting data
1. Stop all existing running agents
2. Very Important - Note down the time (including seconds) when you stopped individual agents. This time will be used while registering agents using UI.
3. Take backup of existing agent code including tracking.json
4. Let Insights Engine consume all queues data. Verify all the queues have 0 pending data
5. Shut down Insights Engine.
6. Undeploy PlatformService WAR
7. Take back up of AGENT_CONFIGURATION table in PostgreSQL
8. DELETE all records from AGENT_CONFIGURATION table in PostgreSQL after taking backup
9. Deploy new PlatformService WAR and verify it has created below new columns in AGENT_CONFIGURATION table -
- agent_key
- agent_status
- agent_version
- os_version
10. Run SQL DDL script –
ALTER TABLE public.agent_configuration ADD CONSTRAINT agentKeyUnique UNIQUE(unique_key);
11. Execute below SQL query in PostgreSQL to register Daemon Agent - (Do no change anything in this query)
Update highlighted value '{"key":"value"}' in below query with Daemon agent config.json.
INSERT INTO public.agent_configuration(id, agent_id, agent_json, agent_key, agent_status, agent_version,data_update_supported, os_version, tool_category, tool_name,unique_key, update_date) VALUES (0, 0,'{"key":"value"}','daemon-1523257126' ,'' ,'' , FALSE,'' , 'DAEMONAGENT', 'AGENTDAEMON', 'daemon-1523257126', current_date);
12. Follow Agent 2.0 installation steps
13. Register all required agents using Agent management tab in Admin screen.
- In this screen we will have the opportunity to edit the agent config json. Please make sure to get relevant fields from existing config json.
- While registering, startTime should be from the time which was noted down during stopping existing agents mentioned above in step #2
14. Run latest new updated Insights Engine Jar
15. Validate all agents are running successfully and collecting data as usual
16. We recommend to take latest artifacts for PlatformService.war and PlatformEngine.jar and UI app.
Top Section
- No labels