-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Standardize and enhance agent installation, reinstallation, and update playbooks #103
Conversation
This commit significantly improves the existing Ansible playbook for reinstalling the SquirrelServersManager agent. Key enhancements include: - Implement NVM for consistent Node.js and npm installation - Improve error handling and checks for Node.js and npm - Enhance PM2 setup with log rotation and startup configuration - Implement more thorough cleaning of installation directory - Improve handling of environment variables and host ID - Refine build and start process for the agent These changes address several issues encountered during previous deployments, making the script more robust and reliable across various target devices.
Hi @rtuszik . Thanks very much for your contribution. My code is not very DRY right now regarding the playbooks, could you consider also implementing your changes to the |
Hi @SquirrelDeveloper. |
…ality - Add NVM installation and configuration for consistent Node.js management - Improve Node.js and npm version checks and installations - Implement Git installation check and conditional installation - Use shell module with NVM sourcing for npm and PM2 commands - Enhance error handling and reporting throughout the playbook - Add PM2 update step for better process management - Include final execution status report for improved feedback - Standardize directory cleaning and file management tasks - Ensure consistent environment setup across fresh installs and reinstalls
… _installAgent.yml - Add NVM directory variable for consistent Node.js management - Implement Node.js and npm version verification and display - Replace raw commands with shell module for npm and PM2 operations - Improve error handling in npm, build, and PM2 start tasks - Standardize directory cleaning using file module - Add PM2 update step after agent installation - Include execution status report at the end of playbook - Ensure all shell commands source NVM before execution
@SquirrelDeveloper, done. Updated _installAgent.yml and _updateAgent.yml to match _reinstallAgent.yml. All three playbooks are now in sync. |
@rtuszik Thank you very much for your contribution, I will test it asap |
@rtuszik Thanks a lot. You can either update the PR or will merge the new one. On a side note, it got me deep, deep into an Ansible/NVM rabbit hole though. |
True. Worked fine for me so I missed that part. Just merged the changes. I agree, there is lots of room for improvement. Just hopped on to make it functional and make it work for now. |
791957a
into
SquirrelCorporation:master
Changes
Why
The previous script encountered issues during deployments on various target devices. These enhancements aim to improve reliability and consistency across different environments.
How
Testing