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

Pull request environment #1704

Merged
merged 2 commits into from
Aug 10, 2023
Merged

Pull request environment #1704

merged 2 commits into from
Aug 10, 2023

Conversation

CDimonaco
Copy link
Member

@CDimonaco CDimonaco commented Aug 9, 2023

Description

This pr create the github workflows for creating and updating an ephimeral pull request environments.

Prerequisites

  • The pr should be authored by one of the web repository mantainers.
  • The pr should have the env label

Execution

The environment is created/updated when the prerequisities are met, the author of pr can suspend the environment update/creation simply removing the env label from pull request. When the label is attached again the environment gets synced.

The environment has the web project code from the pr branch, and as dependency wanda, with the rolling release container.

The web project is seeded with photofinish using the healthy-27-node-SAP-cluster scenario.

The databases, users and rabbit configuration are created and deleted on-demand.

When the pr is closed all the environment included his dependencies are deleted.

When the environment is deployed, is accessible on https://<prnumber>.prenv.trento.suse.com

How was this tested?

Act locally and manual triggering

@CDimonaco CDimonaco added the enhancement New feature or request label Aug 9, 2023
@CDimonaco CDimonaco self-assigned this Aug 9, 2023
@CDimonaco CDimonaco added the env Create an ephimeral environment for the pr branch label Aug 9, 2023
@CDimonaco
Copy link
Member Author

You can try the pr environment with this pr here: https://1704.prenv.trento.suse.com

@CDimonaco CDimonaco marked this pull request as ready for review August 9, 2023 09:01
Copy link
Contributor

@abravosuse abravosuse left a comment

Choose a reason for hiding this comment

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

Code apart, it looks good to me. I just would like to understand, when time comes, is how to install Trento Server based on a particular PR.

Copy link
Member

@nelsonkopliku nelsonkopliku left a comment

Choose a reason for hiding this comment

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

This is super! Thanks for the effort.
Just have a couple of things I need to better understand.

All the envs would be released on the same ec2, right? Not an ec2 for each PR.

Since agents are missing also the PR env is lacking in a couple of features - heartbeating and facts gathering.

No heartbeat means at most having some icons red/gray, but no facts gathering means always getting a timed out checks execution, limiting a bit the value of an env where we might also be interested in other checks execution scenarios other than timeout.

What about launching web and wanda containers in demo mode? It'd give us a more comprehensive experience.
At least until we are able to have also fake agents.

@CDimonaco
Copy link
Member Author

I prefer to not fake anything in this type of environment, this is not a demo type of env but more like a "development" environment online, so I want to directly use photofinish or attach real agent if i need one, or in case of fake one, this should be a direct action without automating it.

It's our development environment but online, so each action is performed by us without any automatic thingy

cc @dottorblaster wdyt?

@dottorblaster
Copy link
Contributor

@nelsonkopliku fair point! I'd like to have a stab at this as-is, I need it to test some reselect goodies. We can set MIX_ENV=demo for wanda in a subsequent iteration.

@dottorblaster dottorblaster merged commit 000a46e into main Aug 10, 2023
@dottorblaster dottorblaster deleted the pull_request_environment branch August 10, 2023 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request env Create an ephimeral environment for the pr branch
Development

Successfully merging this pull request may close these issues.

4 participants