Skip to content
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

Upgade workflow #1375

Merged
merged 70 commits into from
Nov 26, 2023
Merged

Upgade workflow #1375

merged 70 commits into from
Nov 26, 2023

Conversation

gurevichdmitry
Copy link
Collaborator

@gurevichdmitry gurevichdmitry commented Oct 2, 2023

Summary of your changes

This PR introduces an upgrade testing workflow designed to facilitate the testing of upgrades from the previously released version to the current development or build candidate (BC) version.

The workflow comprises three primary jobs:

  1. Init: This job calculates the latest released version based on the provided user input. For example, if the user specifies version 8.11.0, the output will be 8.10.4.

    Previous Version

  2. Deploy: This job initiates the create environment workflow (reused) responsible for deploying the ELK stack version, installing KSPM, CSPM, and CNVM integrations along with agents, and conducting sanity checks on findings retrieved.

Deploy

  1. Upgrade: This job manages the upgrade process with the following key steps:

    • Upgrades the ELK version (e.g., 8.10.4 to 8.11.0). At this point, agents are still on version 8.10.4. Sanity checks are performed to verify findings retrieval for agents with version 8.10.4.
      Upgrade Version

    • Upgrades Kubernetes type agents (unmanaged and EKS) by overriding the image for the daemon set.
      Kubernetes

    • Upgrades Linux type agents CSPM AWS, CSPM GCP, and CNVM AWS by executing the Fleet upgrade API.
      Linux

    • Performs sanity checks for all upgraded agents when their version is updated to 8.11.0.
      Checks

During the implementation of the upgrade workflow, several changes were made:

  • A new upgrade-environment workflow was added.
  • The test-environment workflow was updated.
  • Code related to installing integrations was refactored.
  • A CNVM issue was fixed, ensuring the correct template is used when installing CNVM on non-latest versions.
  • The Fleet API wrapper was extended with new functionality.

The latest run can be found here.

Screenshot/Data

Related Issues

Checklist

  • I have added tests that prove my fix is effective or that my feature works
  • I have added the necessary README/documentation (if appropriate)

@mergify
Copy link

mergify bot commented Oct 2, 2023

This pull request does not have a backport label. Could you fix it @gurevichdmitry? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v./d./d./d is the label to automatically backport to the 8./d branch. /d is the digit
    NOTE: backport-skip has been added to this pull request.

@mergify mergify bot added the backport-skip label Oct 2, 2023
@github-actions
Copy link

github-actions bot commented Oct 2, 2023

📊 Allure Report - 💚 No failures were reported.

Result Count
🟥 Failed 0
🟩 Passed 39
⬜ Skipped 1

Copy link

mergify bot commented Nov 13, 2023

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b upgade-workflow upstream/upgade-workflow
git merge upstream/main
git push upstream upgade-workflow

.github/workflows/upgrade-environment.yml Show resolved Hide resolved
deploy/test-environments/fleet_api/src/api/common_api.py Outdated Show resolved Hide resolved
deploy/test-environments/fleet_api/src/api/common_api.py Outdated Show resolved Hide resolved
deploy/test-environments/fleet_api/src/package_policy.py Outdated Show resolved Hide resolved
deploy/test-environments/fleet_api/src/package_policy.py Outdated Show resolved Hide resolved
dev-docs/Cloud-Env-Upgrade.md Outdated Show resolved Hide resolved
dev-docs/Cloud-Env-Upgrade.md Outdated Show resolved Hide resolved
Copy link

mergify bot commented Nov 23, 2023

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b upgade-workflow upstream/upgade-workflow
git merge upstream/main
git push upstream upgade-workflow

.ci/scripts/get-released-version.sh Outdated Show resolved Hide resolved
.ci/scripts/get-released-version.sh Outdated Show resolved Hide resolved
@@ -19,13 +19,16 @@ on:
required: true
description: "Stack version: For released/BC version use 8.x.y, for SNAPSHOT use 8.x.y-SNAPSHOT"
default: "8.10.0"
type: string
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please update the default version to 8.11?

@gurevichdmitry gurevichdmitry merged commit 3df384b into elastic:main Nov 26, 2023
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants