Giter VIP home page Giter VIP logo

gitpod-io / gitpod-eks-guide Goto Github PK

View Code? Open in Web Editor NEW
49.0 11.0 18.0 601 KB

This repo is being deprecated in favor of the single cluster reference architecture and the corresponding Terraform config.

Home Page: https://www.gitpod.io/docs/configure/self-hosted/latest/reference-architecture/single-cluster-ref-arch

License: MIT License

Shell 61.99% Dockerfile 1.13% Makefile 3.07% JavaScript 1.79% TypeScript 32.01%
gitpod aws-eks self-hosted

gitpod-eks-guide's Introduction

📣 [IMPORTANT] This repo is being deprecated in favor of the single cluster reference architecture and the corresponding Terraform config.

What?

We are deprecating this guide in favor of our reference architectures (specifically the single cluster variant) that include both a guided walk-through and a Terraform configuration.

Why?

From your feedback, we’ve learned that the guide has several shortcomings:

  • It is not obvious what the guide does: it is more a black box than a sensible starting point for creating the infrastructure that works for you.
  • One size fits all: it was not flexible enough if you wish to customize the infrastructure being created.
  • No incremental upgrades: If a version of a component changes, you’d have to recreate the infrastructure.

Due to the feedback above we’ve decided to move to a more open and industry-standard way of speaking about the recommended infrastructure in the form of our new reference architectures. These are descriptions of what the ideal infrastructure for Gitpod looks like depending on your circumstances. They include both a text version as well as a Terraform configuration that helps you create this infrastructure automatically - similarly to this guide. We believe these provide the following benefits:

  • They are based on a popular Infrastructure as Code (IaC) solution (Terraform), which should facilitate maintenance for you (and us) via features such as incremental upgrades.
  • They are easier to parse, as they are configuration files rather than a script. This should make customizations easier.
  • They provide a detailed walkthrough for those that do not want to use Terraform.
  • We already leverage these in our nightly testing to provide further validation and reliability of them when used to run Gitpod.

Impact?

Going forward, Gitpod will only officially support the reference architectures. If you can, we would advise you to switch towards using these - this would require you to recreate your infrastructure using the new Terraform configurations or guide. Staying on infrastructure created by this guide should work going forward, however, we cannot guarantee this in perpetuity.

—> The Reference Architectures are still in beta or alpha while we gather more feedback. Please do reach out to us on Discord or via support with any problems or feedback.


Running Gitpod in Amazon EKS

IMPORTANT This guide exists as a simple and reliable way of creating required AWS infrastructure. It is not designed to cater for every situation. If you find that it does not meet your exact needs, please fork this guide and amend it to your own needs.

This guide exists as a simple and reliable way of creating an environment in AWS (EKS) that Gitpod can be installed into. Upon completion, it will print the config for the resources created (including passwords) and create the necessary credential files that will allow you to connect the components created to your Gitpod instance during the next installation step.

Provision an EKS cluster

Before starting the installation process, you need:

  • An AWS account with Administrator access
  • AWS credentials set up. By default, those configs are present in $HOME/.aws/.
  • eksctl config file describing the cluster.
  • A .env file with basic details about the environment.
    • We provide an example of such file here.
  • Docker installed on your machine, or better, a Gitpod workspace :)

SSL Certificate

Create a public SSL/TLS certificate with AWS Certificate Manager, valid for the <domain>, *.ws.<domain> and *.<domain> Domain names.

Once the certificate is issued and verified, Update the CERTIFICATE_ARN field in the .env file accordingly.

Choose an Amazon Machine Image (AMI)

Please update the ami field in the eks-cluster.yaml file with the proper AMI ID for the region of the cluster.

Region AMI
us-west-1 ami-04e9afc0a981cac90
us-west-2 ami-009935ddbb32a7f3c
eu-west-1 ami-0f08b4b1a4fd3ebe3
eu-west-2 ami-05f027fd3d0187541
eu-central-1 ami-04a8127c830f27712
us-east-1 ami-076db8ca29c04327b
us-east-2 ami-0ad574da759c55c17

To start the installation, execute:

make install

Important: DNS propagation can take several minutes until the configured domain is available!

The whole process takes around forty minutes. In the end, the following resources are created:

  • an EKS cluster running Kubernetes v1.21

  • Kubernetes nodes using a custom AMI image:

    • Ubuntu 21.10
    • Linux kernel v5.13
    • containerd v1.5.8
    • runc: v1.0.1
    • CNI plugins: v0.9.1
    • Stargz Snapshotter: v0.10.0
  • ALB load balancer with TLS termination and re-encryption

  • RDS Mysql database

  • Two autoscaling groups, one for gitpod components and another for workspaces

  • In-cluster docker registry using S3 as storage backend

  • IAM account with S3 access (docker-registry and gitpod user content)

  • calico as CNI and NetworkPolicy implementation

  • cert-manager for self-signed SSL certificates

  • cluster-autoscaler

  • Jaeger operator - and Jaeger deployment for gitpod distributed tracing

  • metrics-server

  • A public DNS zone managed by Route53 (if ROUTE53_ZONEID env variable is configured)

Update Gitpod auth providers

Please check the OAuth providers integration documentation expected format.

We provide an example here. Fill it with your OAuth providers data.

make auth

We are aware of the limitation of this approach, and we are working to improve the helm chart to avoid this step.

Destroy the cluster and AWS resources

Remove Cloudformation stacks and EKS cluster running:

make uninstall

The command asks for a confirmation: Are you sure you want to delete: Gitpod, Services/Registry, Services/RDS, Services, Addons, Setup (y/n)?

Please make sure you delete the S3 bucket used to store the docker registry images!

gitpod-eks-guide's People

Contributors

adrienthebo avatar aledbf avatar csweichel avatar geomaciolek avatar ghuntley avatar leodido avatar lucasvaltl avatar nandajavarma avatar pothulapati avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gitpod-eks-guide's Issues

make install/uninstall errors out

I'm experiencing this:

make uninstall

Output:

sha256:c9d6f41bd10287c8aa9eb6e0150e7024f6dc5cbd034d8971cd79edbf889c045f
Using eksctl configuration file: eks-cluster.yaml
Using the AWS profile: ekspod
npm ERR! cb.apply is not a function

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2021-07-07T10_09_26_636Z-debug.log
Install for [ 'ts-node@latest' ] failed with code 1
Subprocess exited with error 1
make: *** [Makefile:20: uninstall] Error 1

I was not experiencing this on commit df7a61d yesterday.

It seems some uncaught installation/uninstallation error is happening, which in turn causes the cb.apply error.

CREATE_FAILED Custom::AWSCDK-EKS-HelmChart jaegerBaseClusterc

Bug description

while i install gitpod from latest Repo i got this error

9:07:41 PM | CREATE_FAILED | Custom::AWSCDK-EKS-HelmChart | jaegerBaseClusterc...ratorchart65DD0125
Received response status [FAILED] from custom resource. Message returned: Error: b'Release "jaeger-operator" does not exist. Installing
it now.\nmanifest_sorter.go:192: info: skipping unknown hook: "crd-install"\nError: timed out waiting for the condition\n'

Logs: /aws/lambda/Addons-AddonsjaegerBaseClusterEED1-Handler886CB40B-fBTaGMxfVlZI

at invokeUserFunction (/var/task/framework.js:95:19)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async onEvent (/var/task/framework.js:19:27)
at async Runtime.handler (/var/task/cfn-response.js:48:13) (RequestId: 4a0a8ff0-4d75-440a-942c-cd400ced58cc)

    new CustomResource (/gitpod/node_modules/@aws-cdk/core/lib/custom-resource.ts:36:21)
    \_ new HelmChart (/gitpod/node_modules/@aws-cdk/aws-eks/lib/helm-chart.ts:69:5)
    \_ ImportedCluster.addHelmChart (/gitpod/node_modules/@aws-cdk/aws-eks/lib/cluster.ts:347:12)
    \_ new Jaeger (/gitpod/lib/charts/jaeger.ts:12:35)
    \_ new AddonsStack (/gitpod/lib/addons.ts:23:9)
    \_ Object.<anonymous> (/gitpod/bin/provision.ts:35:16)
    \_ Module._compile (internal/modules/cjs/loader.js:1072:14)
    \_ Module.m._compile (/gitpod/node_modules/ts-node/src/index.ts:1310:23)
    \_ Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
    \_ Object.require.extensions.<computed> [as .ts] (/gitpod/node_modules/ts-node/src/index.ts:1313:12)
    \_ Module.load (internal/modules/cjs/loader.js:937:32)
    \_ Function.Module._load (internal/modules/cjs/loader.js:778:12)
    \_ Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
    \_ main (/gitpod/node_modules/ts-node/src/bin.ts:331:12)
    \_ Object.<anonymous> (/gitpod/node_modules/ts-node/src/bin.ts:482:3)
    \_ Module._compile (internal/modules/cjs/loader.js:1072:14)
    \_ Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
    \_ Module.load (internal/modules/cjs/loader.js:937:32)
    \_ Function.Module._load (internal/modules/cjs/loader.js:778:12)
    \_ Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
    \_ /usr/local/share/.config/yarn/global/node_modules/npx/node_modules/libnpx/index.js:268:14

❌ Addons failed: Error: The stack named Addons failed creation, it may need to be manually deleted from the AWS console: ROLLBACK_COMP LETE
at Object.waitForStackDeploy (/usr/local/share/.config/yarn/global/node_modules/aws-cdk/lib/api/util/cloudformation.ts:305:11)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at Object.deployStack (/usr/local/share/.config/yarn/global/node_modules/aws-cdk/lib/api/deploy-stack.ts:306:26)
at CdkToolkit.deploy (/usr/local/share/.config/yarn/global/node_modules/aws-cdk/lib/cdk-toolkit.ts:184:24)
at initCommandLine (/usr/local/share/.config/yarn/global/node_modules/aws-cdk/bin/cdk.ts:218:9)
The stack named Addons failed creation, it may need to be manually deleted from the AWS console: ROLLBACK_COMPLETE

image

Steps to reproduce

make install

Expected behavior

created successfully

Example repository

No response

Anything else?

No response

What is the need of custom AMI?

I'm trying to integrate this solution into existing infra, I'm only allowed to use AWS managed AMIs in that EKS cluster.
I was trying to understand what limitations of standard managed AMI are triggered the creation of the custom AMI.
Based on my experiments I understood that at least version of Containerd should be > 1.5 due to the registry host configs feature which is being used to setup registy-facade.
I did not get any further, is there any other limitations?

Creating Workspace after setup fail

Bug description

Dears,
any one face this error after install latest gitpod image

Request startWorkspace failed with message: 13 INTERNAL: cannot resolve workspace image: failed to do request: Head "https://registry.gitpod.yourcompany.com/v2/workspace-images/manifests/cf074bfb1bc0c95cbc61a47f9cba11e08c59422d224069be68f80160a3cf9e8e": dial tcp: lookup registry.gitpod.yourcompany.com on 10.100.0.10:53: no such host

Steps to reproduce

create a new workspace

Expected behavior

No response

Example repository

No response

Anything else?

No response

AWS Load balancer return 504

Bug description

After make install and after added loadbalancer endpoint to all three dns records, I've got 504.
What I've done is change .env file with my values.
I've changed:

  1. DOMAIN
  2. CERTIFICATE_ARN
  3. ROUTE53_ZONEID
  4. CONTAINER_REGISTRY_BUCKET

In eks-cluster.yaml I've just added ami for eu-west-1 and relatives availability zones
When I run kubectl get pods into gitpod-workspaces-Node EC2 I've got this error: Unable to connect to the server: EOF

Steps to reproduce

  1. change .env
  2. change eks-cluster.yaml.
  3. make install

That's all.
Most of the time, I've got 504

Expected behavior

Gitpod login page

Example repository

No response

Anything else?

No response

.kubeconfig file is not created during make install

I used my root aws credentials to deploy a gitpod cluster to us-east-2. It failed in the middle, complaining that the .kubeconfig file is a directory. I verified that an empty directory .kubeconfig was created in my current directory.

unable to write kubeconfig , please retry with 'eksctl utils write-kubeconfig -n gitpod': unable to read existing kubeconfig file ".kubeconfig": error loading config file ".kubeconfig": read .kubeconfig: is a directory

When I created the .kubeconfig file in the current directory manually using eksctl and ran make install again, it ran successfully.

Install gitpod-eks in China Ningxia region failed: Message returned: Error: b'Release "aws-load-balancer-controller" does not exist. Installing it now.\nError: timed out waiting for the condition\n'

Bug description

image

Steps to reproduce

aws region: cn-northwest-1
eks version: 1.21

make install

Starting install process...
Using eksctl configuration file: eks-cluster.yaml
Missing (optional) AWS profile.
Missing (optional) ROUTE53_ZONEID environment variable.
Please configure the CNAME with the URL of the load balancer manually.
 ⏳  Bootstrapping environment aws://318804062415/cn-northwest-1...
Trusted accounts for deployment: (none)
Trusted accounts for lookup: (none)
Using default execution policy of 'arn:aws-cn:iam::aws:policy/AdministratorAccess'. Pass '--cloudformation-execution-policies' to customize.
 ✅  Environment aws://318804062415/cn-northwest-1 bootstrapped (no changes).
****************************************************
*** Newer version of CDK is available [2.2.0]    ***
*** Upgrade recommended (npm install -g aws-cdk) ***
****************************************************
2021-12-16 05:06:48 [ℹ]  eksctl version 0.78.0-dev+8d2eec00.2021-12-15T10:48:00Z
2021-12-16 05:06:48 [ℹ]  using region cn-northwest-1
2021-12-16 05:06:48 [✔]  saved kubeconfig as ".kubeconfig"
daemonset.apps/aws-node patched (no change)
configmap/calico-config unchanged
customresourcedefinition.apiextensions.k8s.io/bgpconfigurations.crd.projectcalico.org configured
customresourcedefinition.apiextensions.k8s.io/bgppeers.crd.projectcalico.org configured
customresourcedefinition.apiextensions.k8s.io/blockaffinities.crd.projectcalico.org configured
customresourcedefinition.apiextensions.k8s.io/caliconodestatuses.crd.projectcalico.org configured
customresourcedefinition.apiextensions.k8s.io/clusterinformations.crd.projectcalico.org configured
customresourcedefinition.apiextensions.k8s.io/felixconfigurations.crd.projectcalico.org configured
customresourcedefinition.apiextensions.k8s.io/globalnetworkpolicies.crd.projectcalico.org configured
customresourcedefinition.apiextensions.k8s.io/globalnetworksets.crd.projectcalico.org configured
customresourcedefinition.apiextensions.k8s.io/hostendpoints.crd.projectcalico.org configured
customresourcedefinition.apiextensions.k8s.io/ipamblocks.crd.projectcalico.org configured
customresourcedefinition.apiextensions.k8s.io/ipamconfigs.crd.projectcalico.org configured
customresourcedefinition.apiextensions.k8s.io/ipamhandles.crd.projectcalico.org configured
customresourcedefinition.apiextensions.k8s.io/ippools.crd.projectcalico.org configured
customresourcedefinition.apiextensions.k8s.io/ipreservations.crd.projectcalico.org configured
customresourcedefinition.apiextensions.k8s.io/kubecontrollersconfigurations.crd.projectcalico.org configured
customresourcedefinition.apiextensions.k8s.io/networkpolicies.crd.projectcalico.org configured
customresourcedefinition.apiextensions.k8s.io/networksets.crd.projectcalico.org configured
clusterrole.rbac.authorization.k8s.io/calico-kube-controllers unchanged
clusterrolebinding.rbac.authorization.k8s.io/calico-kube-controllers unchanged
clusterrole.rbac.authorization.k8s.io/calico-node unchanged
clusterrolebinding.rbac.authorization.k8s.io/calico-node unchanged
daemonset.apps/calico-node configured
serviceaccount/calico-node unchanged
deployment.apps/calico-kube-controllers unchanged
serviceaccount/calico-kube-controllers unchanged
Warning: policy/v1beta1 PodDisruptionBudget is deprecated in v1.21+, unavailable in v1.25+; use policy/v1 PodDisruptionBudget
poddisruptionbudget.policy/calico-kube-controllers configured
2021-12-16 05:07:08 [ℹ]  eksctl version 0.78.0-dev+8d2eec00.2021-12-15T10:48:00Z
2021-12-16 05:07:08 [ℹ]  using region cn-northwest-1
2021-12-16 05:07:10 [ℹ]  nodegroup "workspaces" will use "ami-01ecefd03fc7c65bd" [AmazonLinux2/1.21]
2021-12-16 05:07:10 [ℹ]  nodegroup "services" will use "ami-01ecefd03fc7c65bd" [AmazonLinux2/1.21]
2021-12-16 05:07:11 [!]  retryable error (Throttling: Rate exceeded
        status code: 400, request id: 6cb875c4-0a94-453b-b257-2241592a9462) from cloudformation/DescribeStacks - will retry after delay of 8.019468838s
2021-12-16 05:07:20 [ℹ]  2 existing nodegroup(s) (services,workspaces) will be excluded
2021-12-16 05:07:20 [ℹ]  
2 sequential tasks: { fix cluster compatibility, no tasks 
}
2021-12-16 05:07:20 [ℹ]  checking cluster stack for missing resources
2021-12-16 05:07:21 [ℹ]  cluster stack has all required resources
2021-12-16 05:07:21 [ℹ]  no tasks
2021-12-16 05:07:21 [✔]  created 0 nodegroup(s) in cluster "gitpod"
2021-12-16 05:07:21 [✔]  created 0 managed nodegroup(s) in cluster "gitpod"
2021-12-16 05:07:22 [ℹ]  checking security group configuration for all nodegroups
2021-12-16 05:07:22 [ℹ]  all nodegroups have up-to-date cloudformation templates
[Warning at /Services/RDS/Gitpod/SecurityGroup] Ignoring Egress rule since 'allowAllOutbound' is set to true; To add customize rules, set allowAllOutbound=false on the SecurityGroup
Setup
Setup: deploying...

 ✅  Setup (no changes)

Outputs:
Setup.ClusterName = gitpod
Setup.OpenIdConnectProviderArn = arn:aws-cn:iam::318804062415:oidc-provider/oidc.eks.cn-northwest-1.amazonaws.com/id/D563E80E60861A769E8C85FA12DFA49E

Stack ARN:
arn:aws-cn:cloudformation:cn-northwest-1:318804062415:stack/Setup/11479e00-5ccd-11ec-8f5e-0655b24bb2fc
Addons
Addons: deploying...
[0%] start: Publishing 43079f879513e0d85eeb42ddfe71e5ead66edf1ee02c33bb165d7c2f926030c4:current
[9%] success: Published 43079f879513e0d85eeb42ddfe71e5ead66edf1ee02c33bb165d7c2f926030c4:current
[9%] start: Publishing 4129bbca38164ecb28fee8e5b674f0d05e5957b4b8ed97d9c950527b5cc4ce10:current
[18%] success: Published 4129bbca38164ecb28fee8e5b674f0d05e5957b4b8ed97d9c950527b5cc4ce10:current
[18%] start: Publishing e9882ab123687399f934da0d45effe675ecc8ce13b40cb946f3e1d6141fe8d68:current
[27%] success: Published e9882ab123687399f934da0d45effe675ecc8ce13b40cb946f3e1d6141fe8d68:current
[27%] start: Publishing ea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03e:current
[36%] success: Published ea17febe6d04c66048f3e8e060c71685c0cb53122abceff44842d27bc0d4a03e:current
[36%] start: Publishing c691172cdeefa2c91b5a2907f9d81118e47597634943344795f1a844192dd49c:current
[45%] success: Published c691172cdeefa2c91b5a2907f9d81118e47597634943344795f1a844192dd49c:current
[45%] start: Publishing 5d1f4d13388f418bc16c1def9b7b5bd5caa086c65d6ef83aa3a03eef62bc164f:current
[54%] success: Published 5d1f4d13388f418bc16c1def9b7b5bd5caa086c65d6ef83aa3a03eef62bc164f:current
[54%] start: Publishing f9e76121b6184d2613051d4ab85d393c07ea61775e315cad1bc7eb3a473dd021:current
[63%] success: Published f9e76121b6184d2613051d4ab85d393c07ea61775e315cad1bc7eb3a473dd021:current
[63%] start: Publishing 7989dd382e8c481d2fcbe1e0a516a5fd6b908cd340290c713dfb9af022b2a4c9:current
[72%] success: Published 7989dd382e8c481d2fcbe1e0a516a5fd6b908cd340290c713dfb9af022b2a4c9:current
[72%] start: Publishing 9c4fad835ec9c5ce50e9b3aabeed61375ecc0445ea689b82b13cd943e03ced9f:current
[81%] success: Published 9c4fad835ec9c5ce50e9b3aabeed61375ecc0445ea689b82b13cd943e03ced9f:current
[81%] start: Publishing 5993e242d5720bb39d492adef76a8a6c945b5326e88bbce414b75a9c68652b52:current
[90%] success: Published 5993e242d5720bb39d492adef76a8a6c945b5326e88bbce414b75a9c68652b52:current
[90%] start: Publishing 4723e10b8fcfa0fbc4dedaa75f4b87be39ea7618cf01021b9af496de07d23ae4:current
[100%] success: Published 4723e10b8fcfa0fbc4dedaa75f4b87be39ea7618cf01021b9af496de07d23ae4:current
Addons: creating CloudFormation changeset...
5:15:27 AM | CREATE_FAILED        | Custom::AWSCDK-EKS-HelmChart          | awsloadbalancerBas...ollerChart6F04131E
Received response status [FAILED] from custom resource. Message returned: Error: b'Release "aws-load-balancer-controller" does not exist. Installing it now.\nError: timed out waiting for the condition\n'

Logs: /aws/lambda/Addons-AddonsawsloadbalancerBaseCl-Handler886CB40B-6JNtn9RUNYFX

at invokeUserFunction (/var/task/framework.js:95:19)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async onEvent (/var/task/framework.js:19:27)
at async Runtime.handler (/var/task/cfn-response.js:48:13) (RequestId: a8169fee-a9c7-4a04-a2aa-fa01aaf3a566)

        new CustomResource (/gitpod/node_modules/@aws-cdk/core/lib/custom-resource.ts:36:21)
        \_ new HelmChart (/gitpod/node_modules/@aws-cdk/aws-eks/lib/helm-chart.ts:69:5)
        \_ ImportedCluster.addHelmChart (/gitpod/node_modules/@aws-cdk/aws-eks/lib/cluster.ts:392:12)
        \_ new AWSLoadBalancerController (/gitpod/lib/charts/load-balancer.ts:12:35)
        \_ new AddonsStack (/gitpod/lib/addons.ts:19:9)
        \_ Object.<anonymous> (/gitpod/bin/provision.ts:43:16)
        \_ Module._compile (node:internal/modules/cjs/loader:1101:14)
        \_ Module.m._compile (/gitpod/node_modules/ts-node/src/index.ts:1371:23)
        \_ Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
        \_ Object.require.extensions.<computed> [as .ts] (/gitpod/node_modules/ts-node/src/index.ts:1374:12)
        \_ Module.load (node:internal/modules/cjs/loader:981:32)
        \_ Function.Module._load (node:internal/modules/cjs/loader:822:12)
        \_ Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
        \_ main (/gitpod/node_modules/ts-node/src/bin.ts:331:12)
        \_ Object.<anonymous> (/gitpod/node_modules/ts-node/src/bin.ts:482:3)
        \_ Module._compile (node:internal/modules/cjs/loader:1101:14)
        \_ Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
        \_ Module.load (node:internal/modules/cjs/loader:981:32)
        \_ Function.Module._load (node:internal/modules/cjs/loader:822:12)
        \_ Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
        \_ node:internal/main/run_main_module:17:47


 ❌  Addons failed: Error: The stack named Addons failed creation, it may need to be manually deleted from the AWS console: ROLLBACK_COMPLETE
    at Object.waitForStackDeploy (/usr/local/lib/node_modules/aws-cdk/lib/api/util/cloudformation.ts:307:11)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at prepareAndExecuteChangeSet (/usr/local/lib/node_modules/aws-cdk/lib/api/deploy-stack.ts:351:26)
    at CdkToolkit.deploy (/usr/local/lib/node_modules/aws-cdk/lib/cdk-toolkit.ts:194:24)
    at initCommandLine (/usr/local/lib/node_modules/aws-cdk/bin/cdk.ts:267:9)
The stack named Addons failed creation, it may need to be manually deleted from the AWS console: ROLLBACK_COMPLETE
make: *** [install] Error 1

Expected behavior

No response

Example repository

No response

Anything else?

No response

Allow to user to toggle RDS

For basic testing and POCs RDS is overkill and adds significant time to deployment. Can we allow a user to opt-out of RDS via a setting in .env?

Error: No matching bindings found for serviceIdentifier: SubscriptionService

Bug description

when i update my Dockfile, set "GITPOD_VERSION="2022.01"

kubectl logs server-564c87959-858ln -c server

yarn run v1.22.15
$ node ./dist/src/main.js
{
    "@type": "type.googleapis.com/google.devtools.clouderrorreporting.v1beta1.ReportedErrorEvent",
    "serviceContext": {
        "service": "server",
        "version": "<ts-not-set>"
    },
    "component": "server",
    "severity": "WARNING",
    "time": "2022-02-21T05:34:16.599Z",
    "message": "Unable to load ChargebeeProviderOptions from: /chargebee/providerOptions"
}
{
    "component": "server",
    "severity": "INFO",
    "time": "2022-02-21T05:34:16.622Z",
    "message": "Initializing Jaeger Tracer with RemoteReporter and RemoteSampler(serviceName=server)",
    "loggedViaConsole": true
}
{
    "@type": "type.googleapis.com/google.devtools.clouderrorreporting.v1beta1.ReportedErrorEvent",
    "serviceContext": {
        "service": "server",
        "version": "<ts-not-set>"
    },
    "stack_trace": "Error: No matching bindings found for serviceIdentifier: SubscriptionService\n    at _validateActiveBindingCount (/app/node_modules/inversify/src/planning/planner.ts:113:23)\n    at _getActiveBindings (/app/node_modules/inversify/src/planning/planner.ts:91:5)\n    at _createSubRequests (/app/node_modules/inversify/src/planning/planner.ts:163:26)\n    at /app/node_modules/inversify/src/planning/planner.ts:197:17\n    at Array.forEach (<anonymous>)\n    at /app/node_modules/inversify/src/planning/planner.ts:196:26\n    at Array.forEach (<anonymous>)\n    at _createSubRequests (/app/node_modules/inversify/src/planning/planner.ts:167:20)\n    at /app/node_modules/inversify/src/planning/planner.ts:197:17\n    at Array.forEach (<anonymous>)\n    at /app/node_modules/inversify/src/planning/planner.ts:196:26\n    at Array.forEach (<anonymous>)\n    at _createSubRequests (/app/node_modules/inversify/src/planning/planner.ts:167:20)\n    at /app/node_modules/inversify/src/planning/planner.ts:197:17\n    at Array.forEach (<anonymous>)\n    at /app/node_modules/inversify/src/planning/planner.ts:196:26",
    "component": "server",
    "severity": "ERROR",
    "time": "2022-02-21T05:34:16.642Z",
    "message": "Error during startup or operation. Exiting.",
    "error": "Error: No matching bindings found for serviceIdentifier: SubscriptionService\n    at _validateActiveBindingCount (/app/node_modules/inversify/src/planning/planner.ts:113:23)\n    at _getActiveBindings (/app/node_modules/inversify/src/planning/planner.ts:91:5)\n    at _createSubRequests (/app/node_modules/inversify/src/planning/planner.ts:163:26)\n    at /app/node_modules/inversify/src/planning/planner.ts:197:17\n    at Array.forEach (<anonymous>)\n    at /app/node_modules/inversify/src/planning/planner.ts:196:26\n    at Array.forEach (<anonymous>)\n    at _createSubRequests (/app/node_modules/inversify/src/planning/planner.ts:167:20)\n    at /app/node_modules/inversify/src/planning/planner.ts:197:17\n    at Array.forEach (<anonymous>)\n    at /app/node_modules/inversify/src/planning/planner.ts:196:26\n    at Array.forEach (<anonymous>)\n    at _createSubRequests (/app/node_modules/inversify/src/planning/planner.ts:167:20)\n    at /app/node_modules/inversify/src/planning/planner.ts:197:17\n    at Array.forEach (<anonymous>)\n    at /app/node_modules/inversify/src/planning/planner.ts:196:26"
}

Steps to reproduce

when i update my Dockfile, set "GITPOD_VERSION="2022.01"

i have changed gitpod.yaml and add line:

1645434707(1)

run make install

...

kubectl get pod

...

kubectl logs server-564c87959-858ln -c server

Expected behavior

No response

Example repository

No response

Anything else?

No response

Used the instructions from this repo but can't run docker in workspace

Bug description

hello i followed the instructions on installing on eks using this repo,

everything works as it's supposed to be but when i try custom image on .gitpod.yml or simply run a "docker run -ti ubuntu" on the workspace terminal, i got this error :

docker: Error response from daemon: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: rootfs_linux.go:76: mounting "proc" to rootfs at "/proc" caused: mount through procfd: operation not permitted: unknown.
ERRO[0004] error waiting for container: context canceled

i tried rebuilding the builder image with different tags but can't make it work :'(

Steps to reproduce

make install this repository then create a workspace and try to run a container

Expected behavior

container starts and can use custom images on workspace

Example repository

have the issue with this repo:
https://github.com/gitpod-io/template-docker-compose

Anything else?

No response

eksctl command throws 'invalid memory address' error

Facing the following issue with while running make install:

Starting install process...
touch /Users/arslan/GitStart/gitpod-eks-guide/.kubeconfig
Using eksctl configuration file: eks-cluster.yaml
Missing (optional) AWS profile.
Missing (optional) ROUTE53_ZONEID environment variable.
Please configure the CNAME with the URL of the load balancer manually.
 ⏳  Bootstrapping environment aws://382358065587/us-west-1...
 ✅  Environment aws://382358065587/us-west-1 bootstrapped (no changes).
2021-08-19 23:25:18 [ℹ]  eksctl version 0.60.0
2021-08-19 23:25:18 [ℹ]  using region us-west-1
2021-08-19 23:25:19 [✔]  saved kubeconfig as ".kubeconfig"
daemonset.apps/aws-node patched (no change)
configmap/calico-config unchanged
customresourcedefinition.apiextensions.k8s.io/bgpconfigurations.crd.projectcalico.org configured
customresourcedefinition.apiextensions.k8s.io/bgppeers.crd.projectcalico.org configured
customresourcedefinition.apiextensions.k8s.io/blockaffinities.crd.projectcalico.org configured
customresourcedefinition.apiextensions.k8s.io/clusterinformations.crd.projectcalico.org configured
customresourcedefinition.apiextensions.k8s.io/felixconfigurations.crd.projectcalico.org configured
customresourcedefinition.apiextensions.k8s.io/globalnetworkpolicies.crd.projectcalico.org configured
customresourcedefinition.apiextensions.k8s.io/globalnetworksets.crd.projectcalico.org configured
customresourcedefinition.apiextensions.k8s.io/hostendpoints.crd.projectcalico.org configured
customresourcedefinition.apiextensions.k8s.io/ipamblocks.crd.projectcalico.org configured
customresourcedefinition.apiextensions.k8s.io/ipamconfigs.crd.projectcalico.org configured
customresourcedefinition.apiextensions.k8s.io/ipamhandles.crd.projectcalico.org configured
customresourcedefinition.apiextensions.k8s.io/ippools.crd.projectcalico.org configured
customresourcedefinition.apiextensions.k8s.io/kubecontrollersconfigurations.crd.projectcalico.org configured
customresourcedefinition.apiextensions.k8s.io/networkpolicies.crd.projectcalico.org configured
customresourcedefinition.apiextensions.k8s.io/networksets.crd.projectcalico.org configured
clusterrole.rbac.authorization.k8s.io/calico-kube-controllers unchanged
clusterrolebinding.rbac.authorization.k8s.io/calico-kube-controllers unchanged
clusterrole.rbac.authorization.k8s.io/calico-node unchanged
clusterrolebinding.rbac.authorization.k8s.io/calico-node unchanged
daemonset.apps/calico-node configured
serviceaccount/calico-node unchanged
deployment.apps/calico-kube-controllers unchanged
serviceaccount/calico-kube-controllers unchanged
poddisruptionbudget.policy/calico-kube-controllers unchanged
2021-08-19 23:25:39 [ℹ]  eksctl version 0.60.0
2021-08-19 23:25:39 [ℹ]  using region us-west-1
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x22522a9]

goroutine 1 [running]:
github.com/weaveworks/eksctl/pkg/eks.(*NodeGroupService).expandInstanceSelector(0xc0000b30a0, 0xc0003db620, 0xc000456380, 0x2, 0x2, 0x7ff6eac57c38, 0x7ff6ea9b1538, 0x20, 0x20, 0x7ff7118b05b8)
	github.com/weaveworks/eksctl/pkg/eks/nodegroup_service.go:207 +0x1a9
github.com/weaveworks/eksctl/pkg/eks.(*NodeGroupService).ExpandInstanceSelectorOptions(0xc0000b30a0, 0xc0000f8ac0, 0x2, 0x2, 0xc000456380, 0x2, 0x2, 0x0, 0xc000a895c0)
	github.com/weaveworks/eksctl/pkg/eks/nodegroup_service.go:139 +0x215
github.com/weaveworks/eksctl/pkg/actions/nodegroup.(*Manager).Create(0xc000a895c0, 0x10000010101, 0x38a0db0, 0xc000872020, 0xc000a895c0, 0x0)
	github.com/weaveworks/eksctl/pkg/actions/nodegroup/create.go:81 +0x4a2
github.com/weaveworks/eksctl/pkg/ctl/create.createNodeGroupCmd.func1(0xc00060a210, 0xc0009ae140, 0x101, 0x1, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0)
	github.com/weaveworks/eksctl/pkg/ctl/create/nodegroup.go:60 +0x3c5
github.com/weaveworks/eksctl/pkg/ctl/create.createNodeGroupCmdWithRunFunc.func1(0xc000998a00, 0xc000595270, 0x0, 0x1, 0x0, 0x0)
	github.com/weaveworks/eksctl/pkg/ctl/create/nodegroup.go:86 +0x106
github.com/spf13/cobra.(*Command).execute(0xc000998a00, 0xc000595250, 0x1, 0x1, 0xc000998a00, 0xc000595250)
	github.com/spf13/[email protected]/command.go:856 +0x472
github.com/spf13/cobra.(*Command).ExecuteC(0xc0005cbb80, 0xc000595120, 0x1, 0xc000a3ff70)
	github.com/spf13/[email protected]/command.go:974 +0x375
github.com/spf13/cobra.(*Command).Execute(...)
	github.com/spf13/[email protected]/command.go:902
main.main()
	github.com/weaveworks/eksctl/cmd/eksctl/main.go:77 +0x41b
make: *** [install] Error 2

(These logs are generated as a result of re-running the make install, the first run also failed with the same error)
It seems like the cluster is created but when I do kubectl get pods I don't see any pods in the cluster.

I haven't made many changes to the to the eks-cluster.yaml file given in the example here. Is there anyone else facing the same issue?

TODO

  • Use gitpod route53 domain (testing)
  • Allow to add auth providers after the helm chart is installed
  • Add external-dns and route53 to cdk stack (remove manual configuration after installation)
  • Uninstall cdk stacks and remove cloud resources
  • Migrate helm chart changes to gitpod.io https://github.com/aledbf/gitpod-chart-cleanup
  • Publish AMI in multiple regions (now only exists in us-west-2)
  • Make public AMI image
  • Add overview of the solution, like this one
  • Add license
  • Make repository public
  • Name of the registry bucket should be configurable or use one with the account id

ws-daemon stuck in pod initialization when using shiftfs

Bug description

I switched to shiftfs per gitpod-io/gitpod#6992 and got a little further but ws-daemon was not starting.

Describing the ws-daemon pod we can see:

<snip>
  shiftfs-module-loader:
    Container ID:   containerd://301603d063e2504c2de5d43d2a149369dfed0099cb816f1fe20422f34ebdf24b
    Image:          eu.gcr.io/gitpod-core-dev/build/shiftfs-module-loader:commit-b1a73b372191b23ddec0a56c7f00d3ce59712d16
    Image ID:       eu.gcr.io/gitpod-core-dev/build/shiftfs-module-loader@sha256:7443bc8f2a98c61fb05150e8ab2292038e0da65428fa4d3124284ca41274c098
    Port:           <none>
    Host Port:      <none>
    State:          Waiting
      Reason:       CrashLoopBackOff
    Last State:     Terminated
      Reason:       Error
      Exit Code:    10
      Started:      Thu, 02 Dec 2021 11:26:16 -0800
      Finished:     Thu, 02 Dec 2021 11:26:19 -0800
    Ready:          False
    Restart Count:  7
    Environment:    <none>
    Mounts:
      /usr/src_node from node-linux-src (ro)
      /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-hrs5j (to)
</snip>

Then drilling into the logs for the shiftfs-module-loader init container.

+ mkdir -p /lib/modules/5.13.0-1006-aws
+ ln -s /usr/src_node/linux-headers-5.13.0-1006-aws /lib/modules/5.13.0-1006-aws/build
+ dkms install -m shiftfs -v 1.2 -k 5.13.0-1006-aws --kernelsourcedir /usr/src_node/linux-headers-5.13.0-1006-aws

Creating symlink /var/lib/dkms/shiftfs/1.2/source ->
                 /usr/src/shiftfs-1.2

DKMS: add completed.

Preparing kernel 5.13.0-1006-aws for module build:
(This is not compiling a kernel, just preparing kernel symbols)
Storing current .config to be restored when complete
Running Generic preparation routine
make mrproper...(bad exit status: 2)
/usr/sbin/dkms: line 1211: .config: Read-only file system
Warning: using /usr/src_node/linux-headers-5.13.0-1006-aws/.config
(I hope this is the correct config for this kernel)
make oldconfig...(bad exit status: 2)
make prepare-all...(bad exit status: 2)

Building module:
cleaning build area...
make -j4 KERNELRELEASE=5.13.0-1006-aws -C /usr/src_node/linux-headers-5.13.0-1006-aws M=/var/lib/dkms/shiftfs/1.2/build...(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.13.0-1006-aws (x86_64)
Consult /var/lib/dkms/shiftfs/1.2/build/make.log for more information.

Steps to reproduce

Use the current main of this guide. Switch to shiftfs by adding

yq e -i '.workspace.runtime.fsShiftMethod = "shiftfs"' "${CONFIG_FILE}"

to setup.sh & reinstall.

export KUBECONFIG=${PWD}/.kubeconfig
kubectl get pods
kubectl describe pods  ws-daemon-xxxxx

ws-daemon will not init and you can work around it with:

kubectl patch daemonset ws-daemon --type json -p='[{"op": "remove", "path": "/spec/template/spec/initContainers/3"}]'

Expected behavior

I expect that all pods will start and docker run whatever works.

Example repository

No response

Anything else?

No response

DNS Instructions

Please add dns configuration instructions. I'm struggling with accessing workspaces after I installed gitpod. Would be greate if you can include dns configuration instructions for those of us who're hosting gitpod in the cloud for our developers.

Here's what I've tried so far.

I've setup the CNAMES for gitpod.my-domain, *.gitpod.my-domain, ws.gitpod.my-domain, *.ws.gitpod.mydomain. None of them work.

AWS IAM Credentials to Provide

When deciding what IAM policies to assign to the gitpod auto create setup there is no details given. It is a little difficult to give full admin access as we have other items running in the AWS solution which could get affected and it would be risky to run

unable to write kubeconfig

I'm seething the following error after running make install:
2021-08-10 17:04:05 [!] unable to write kubeconfig , please retry with 'eksctl utils write-kubeconfig -n gitpod': unable to read existing kubeconfig file ".kubeconfig": error loading config file ".kubeconfig": read .kubeconfig: is a directory
2021-08-10 17:04:05 [ℹ] no tasks
2021-08-10 17:04:05 [✔] all EKS cluster resources for "gitpod" have been created
2021-08-10 17:06:07 [✖] parsing kubectl version string (upstream error: error: error loading config file ".kubeconfig": read .kubeconfig: is a directory
) / "0.0.0": Version string empty
2021-08-10 17:06:07 [ℹ] cluster should be functional despite missing (or misconfigured) client binaries
2021-08-10 17:06:07 [✔] EKS cluster "gitpod" in "us-east-2" region is ready

Things I've tried:

  • Installed kubectl and eksctl, as I thought maybe this was a dependency
  • Running eksctl utils write-kubeconfig -n gitpod (as prompt suggests)
    • Error: unable to fetch cluster status to determine operability: unable to describe cluster control plane: ResourceNotFoundException: No cluster found for name: gitpod.

Much appreciate any guidance here!

Don't fail on S3 bucket existence

Can we either update the uninstall to clear the bucket or not fail when it already exists. Its a frustrating experience given how long the cycle times are to test new versions only to forget to clear the bucket and fail a run 30 minutes in.

Custom ami and overrideBootstrapCommand problem. Nodes faile to create

apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig

metadata:
  name: cluster-1
  region: us-east-2

managedNodeGroups:
  - name: ide
    instanceType: m6i.xlarge
    minSize: 2
    maxSize: 3
    disableIMDSv1: false

    volumeSize: 100
    volumeType: gp3
    volumeIOPS: 6000
    volumeThroughput: 500
    ebsOptimized: true

    privateNetworking: true
    ami: ami-0ad574da759c55c17

    tags:
      k8s.io/cluster-autoscaler/enabled: "true"
      k8s.io/cluster-autoscaler/cluster-1: "owned"
      
    overrideBootstrapCommand: |
      #!/bin/bash
      /etc/eks/bootstrap.sh cluster-1

cluster.yaml file is working fine until I add overridebootstrap command. I am using eksctl version 0.84.0. Cluster is being created but nodes fail to create. Please help me with this. Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.