-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[installer-preview] add werft flags for triggering self-hosted preview #12229
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
Conversation
/werft run with-sh-preview cluster=k3s 👍 started the job as gitpod-build-nvn-sh-preview-flag.1 |
/werft run with-sh-preview cluster=k3s channel=unstable 👍 started the job as gitpod-build-nvn-sh-preview-flag.2 |
0d26880
to
ee23ab0
Compare
a10a300
to
4a59015
Compare
hey @nandajavarma ! Thx for this PR - can you give more context on the goal behind it? is this a new way to run automated tests or do you intend to improve dev loops? I'm asking to understand if this is related to https://www.notion.so/gitpod/Gitpod-Preview-Environments-65606379c3724734b28115cc3e48a13c :) |
Hey @meysholdt ! Yes! it is related to the RFC, yes. The goal of this PR is to do 2 things: 1) being able to start-up preview setups from PRs to improve the dev velocity especially for the self-hosted team and 2) workflow to create and delete replicated licence that can be used to try out newer changes. Once this PR is merged, folks should be able to comment |
4a59015
to
c0175ce
Compare
started the job as gitpod-build-nvn-sh-preview-flag.12 because the annotations in the pull request description changed |
/werft run with-sh-preview cluster=k3s 👍 started the job as gitpod-build-nvn-sh-preview-flag.14 |
@adrienthebo since this is not a part of main yet, the flags as comment doesn't work yet. You will have to follow the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe I've found an issue - though it might be outside of the juristiction of this pull request. Error is as follows (from gitpod-self-hosted-installer-tests-head.77)
k3s
Error: Activated service account credentials for: [[email protected]]
Fetching cluster endpoint and auth data.
ERROR: (gcloud.container.clusters.get-credentials) ResponseError: code=404, message=Not found: projects/sh-automated-tests/zones/europe-west1-d/clusters/gp-nvn-sh-prev-k3s.
No cluster named 'gp-nvn-sh-prev-k3s' in sh-automated-tests.
Activated service account credentials for: [[email protected]]
CommandException: No URLs matched: gs://nightly-tests/tf-state/nvn-sh-prev-k3s-kubeconfig
╷
│ Error: Error, failed to create instance sql-nvn-sh-prev-k3s: googleapi: Error 409: The Cloud SQL instance already exists. When you delete an instance, you can't reuse the name of the deleted instance until one week from the deletion date., instanceAlreadyExists
│
│ with module.k3s.google_sql_database_instance.gitpod,
│ on ../infra/modules/k3s/main.tf line 175, in resource "google_sql_database_instance" "gitpod":
│ 175: resource "google_sql_database_instance" "gitpod" {
│
╵
make: *** [Makefile:129: k3s-standard-cluster] Error 1
Trying to send slack alert
tracing warning: No slice span by name create-gcp-infra
aks
AKS is failing, again looks unrelated
Error: ╷
│ Error: creating Cluster: (Managed Cluster Name "gitpod-test-nor-primary-nvnshprevaks" / Resource Group "gitpod-test-nor-nvnshprevaks"): containerservice.ManagedClustersClient#CreateOrUpdate: Failure sending request: StatusCode=400 -- Original Error: Code="UnsupportedAliasMinorVersion" Message="1.21 is not a supported Kubernetes version. To see our supported AKS version list please visit https://docs.microsoft.com/azure/aks/supported-kubernetes-versions?tabs=azure-cli for more details."
│
│ with module.aks.azurerm_kubernetes_cluster.k8s,
│ on ../infra/modules/aks/kubernetes.tf line 17, in resource "azurerm_kubernetes_cluster" "k8s":
│ 17: resource "azurerm_kubernetes_cluster" "k8s" {
│
╵
make: *** [Makefile:97: aks-standard-cluster] Error 1
Trying to send slack alert
tracing warning: No slice span by name create-azure-infra
eks
Error: ╷
│ Error: expected length of name_prefix to be in the range (1 - 38), got service-nvn-sh-prev-eks-eks-node-group-
│
│ with module.eks.module.eks.module.eks_managed_node_group["Services"].aws_iam_role.this[0],
│ on .terraform/modules/eks.eks/modules/eks-managed-node-group/main.tf line 426, in resource "aws_iam_role" "this":
│ 426: name_prefix = var.iam_role_use_name_prefix ? "${local.iam_role_name}-" : null
│
╵
make: *** [Makefile:89: eks-standard-cluster] Error 1
Trying to send slack alert
tracing warning: No slice span by name create-aws-infra
GKE
Error: ╷
│ Error: Error, failed to create instance sql-gp-nvn-sh-prev-gke-dBnz: googleapi: Error 400: Invalid request: instance name (sql-gp-nvn-sh-prev-gke-dBnz)., invalid
│
│ with module.gke.google_sql_database_instance.gitpod[0],
│ on ../infra/modules/gke/main.tf line 160, in resource "google_sql_database_instance" "gitpod":
│ 160: resource "google_sql_database_instance" "gitpod" {
│
╵
make: *** [Makefile:68: gke-standard-cluster] Error 1
Trying to send slack alert
tracing warning: No slice span by name create-gcp-infra
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As noted in an earlier comment, we have test failures on all platforms that prevent this from reliably working out of the gate. I've opened https://github.com/gitpod-io/gitpod/pull/12321/files targeting this branch with the fixups, let's give those fixes a try (or equivalent changes) and see if that improves the reliability. Looking forward to getting this merged!
Dismissing blocker as changes have landed so others can potentially land a review
97d0480
to
51b7899
Compare
51b7899
to
ab443ff
Compare
68e3e38
to
9288929
Compare
4ffbce1
to
3d09922
Compare
9288929
to
a13f1bb
Compare
3d09922
to
31a334d
Compare
fc9fc8c
to
c5c9c9a
Compare
31a334d
to
76ace16
Compare
76ace16
to
e38107c
Compare
@adrienthebo All the dependent PRs has been reviewed and merged. Can we try and merge this one ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/hold
Looks good. I have one question - if the answer is "no", then feel free to remove the hold and get this merged
@@ -35,4 +35,14 @@ for i in $(gsutil ls gs://nightly-tests/tf-state); do | |||
export TF_VAR_TEST_ID=$TF_VAR_TEST_ID | |||
|
|||
make cleanup cloud=$cloud | |||
|
|||
CUSTOMERID=$(replicated customer ls --app "${REPLICATED_APP}" | grep "$TF_VAR_TEST_ID" | awk '{print $1}') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any way of making this a function that can be invoked? This is a repetition of what's in .github/workflows/delete-kots-channel.yml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we ideally could, but I don't know if it is much of an optimization considering it means we will have to pass the API token, license name and in the very near future appname since I have an issue open to use gitpod-dev as published channel. Do you mind if I think about this better when I deal with that issue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Absolutely - let's get it merged
/unhold |
Description
This PR adds a
werft
flag to create self-hosted preview environments from PRs. The idea is that, users will be able to make the following comment to the PR and a werft job will get triggered from the build job (with status written back to Github) creating a preview environment:The above command will do the following:
If the user wants to test on cluster other than
k3s
, they can run:The created cluster will be deleted in 10 hours.
Related Issue(s)
Fixes #7824
How to test
Currently, since this change is not merged with
main
, one cannot add comments to the PR to trigger the builds. Instead you will have to open a gitpod workspace from this PR and run:Release Notes
Documentation
Werft options: