Skip to content
This repository has been archived by the owner on Sep 17, 2024. It is now read-only.

chore: decouple ansible install from execution #2163

Merged
merged 1 commit into from
Feb 22, 2022

Conversation

mdelapenya
Copy link
Contributor

What does this PR do?

It separates the single, current shell script execution for provisioning the stack VM in three parts:

  1. check if virtualenv is created if the .venv-installed file is not present, create virtualenv and create the file
  2. install Python and Ansible dependencies if the python-dependencies file is not present, install them and create the file
  3. execute the command passed to pyrun

We have added a retry logic for the first two scripts, so that we can control and locate possible network issues for each part of the provisioning code

Why is it important?

Decouple provisioning from execution

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have run the Unit tests (make unit-test), and they are passing locally
  • I have run the End-2-End tests for the suite I'm working on, and they are passing locally
  • I have noticed new Go dependencies (run make notice in the proper directory)

Follow-ups

As @adam-stokes mentioned, having a cache/mirror for the Ansible dependencies could improve the resiliency

@mdelapenya mdelapenya added Team:Automation Label for the Observability productivity team backport-v7.17.0 Automated backport with mergify backport-v8.0.0 Automated backport with mergify backport-v8.1.0 Automated backport with mergify priority:medium Important work, but not urgent or blocking. size:S less than 1 day triaged Triaged issues will end up in Backlog column in Robots GH Project labels Feb 22, 2022
@mdelapenya mdelapenya self-assigned this Feb 22, 2022
@mdelapenya mdelapenya requested review from a team and apmmachine and removed request for a team February 22, 2022 14:28
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2022-02-22T14:28:22.810+0000

  • Duration: 52 min 13 sec

Test stats 🧪

Test Results
Failed 0
Passed 253
Skipped 0
Total 253

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

@mdelapenya mdelapenya merged commit 8503f09 into elastic:main Feb 22, 2022
mergify bot pushed a commit that referenced this pull request Feb 22, 2022
mergify bot pushed a commit that referenced this pull request Feb 22, 2022
mdelapenya added a commit that referenced this pull request Feb 24, 2022
(cherry picked from commit 8503f09)

Co-authored-by: Manuel de la Peña <[email protected]>
mdelapenya added a commit that referenced this pull request Feb 24, 2022
(cherry picked from commit 8503f09)

Co-authored-by: Manuel de la Peña <[email protected]>
@mdelapenya mdelapenya deleted the fix-ansible-quotes branch March 9, 2022 06:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport-v7.17.0 Automated backport with mergify backport-v8.0.0 Automated backport with mergify backport-v8.1.0 Automated backport with mergify priority:medium Important work, but not urgent or blocking. size:S less than 1 day Team:Automation Label for the Observability productivity team triaged Triaged issues will end up in Backlog column in Robots GH Project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants