-
Notifications
You must be signed in to change notification settings - Fork 30
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
DTT1 - PoC - Provision module #4665
Comments
Update
Creating Ansible playbooks for provision instances |
Update
Then I will share the playbooks and configurations |
Update
|
UpdateAfter several iterations on how to install each module, I arrived at the next solution, which seems the most successful because it is dynamic, reusable and flexible. We have the following inventory: This inventory is sectioned by host, and each host has all the data needed to connect and a list of components to install. Then the following was developed: Inventory:
Jenkinsfile:
Ansible class:
And provisioner:
As can be seen in the provisioner, it generates the playbooks dynamically according to the list obtained from the inventory.yaml, this inventory is the one that provides the allocation, adding the modules that you want to install. |
Update
|
UpdateAfter talking with the team we noticed that the provision module, in addition to installing packages, dependencies, etc. in particular cases, something that has to be installed in all cases is ansible on the VMs. Working on the installation of ansible, investigating how to do it dynamically on all systems/architectures, thinking beyond the PoC. |
Due to the installation of dependencies, Python modules and configurations on the generation of the Ansible Python module, the following is investigated:
Performed the necessary configurations and coding for installing dependencies on the Jenkins executor nodes and the generation and deletion of Python virtual environments. Installation per repository is configured for both RPM and Debian, as defined in the documentation. Existing tests were carried out locally:
Testing was performed in Jenkins to validate all integrations. The analysis of the grafana dashboards will continue. |
Update
It moves to on hold because everything has been developed for the PoC |
UpdateFind and error with de ansible execution, its executes a duplicate installation for Agent and Manager. |
UpdateAnalyzing the provision.py, and based on the premise that this module must be as flexible as possible since it must allow installing practically anything that is indicated, it was decided to use Jinja2 to render the yaml and make them more flexible and reusable. On the other hand, the Provision class was created, with the purpose of being reused by whoever needs it. This class is responsible for managing the facilities, whatever is needed. and the provision.py script is now limited to interpreting the inventory and instantiating the class for each host and for each component to be installed. Previously it was in charge of everything and the code was quite repetitive. New code: Script:
Class:
Pllabybook example:
As you can see, the code is much cleaner and shorter. Ejemplo de installation: Inventory:
Script execution:
|
Update statusFix problem with Jenkins user to execute pipeline: Jenkins log:
Moved to on hold due to wait team synchronization and integration with the other modules. |
The PoC was finalized and presented to the interested parties, the DTT work will continue from other issues. |
Review: #4524 (comment) |
Reviews answered at #4524 (comment) |
Description
This issue aims to design and create a PoC of the provision module.
This module is responsible for provisioning the infrastructure resources previously allocated.
This module will work as a black box where it will have a clear input and output.
For this PoC this module should:
The text was updated successfully, but these errors were encountered: