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

Update docs for running tests against helm on EC2 #130

Merged
merged 3 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Test suites run in parallel by default using xdist. In some scenarios we might want to group tests in different suites together and run by the same worker.
Test suites run in parallel by default using xdist. In some scenarios we might want to group tests in different suites together and run them on the same worker.

For example, we want the same worker to run all tests that launch a workspace since we can launch only one workspace at a time in Gen3. Running them in parallel could break some of them if different tests are trying to run different operations on the same workspace.

Expand Down
26 changes: 26 additions & 0 deletions gen3-integration-tests/docs/howto/run_tests/on_helm_on_ec2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
We can run tests locally against a Gen3 instance running on an EC2 machine with helm as follows:

#### 1. Update SSH configuration, add a host like
```
Host ec2_helm
User <ec2-user>
Hostname <ec2-host>
ProxyJump <jumpbox-host>
IdentityFile <path-to-id-file-authorized-on-ec2-host>
```
_**Note**: ProxyJump is optional, to be added if a jump box is needed to connect to the EC2 host_

#### 2. Copy over kubernetes configuration
Copy over the contents of `~/.kube/config` to the local file. There are 3 sections here - cluster, context and user.
Note down the port used by the server (found in the cluster block)

_**Tip**: you can use [kubectx](https://github.com/ahmetb/kubectx) to manage multiple kubernetes clusters_


#### 3. Copy over the id files from .ssh to /var/root/.ssh
Sudo makes the ssh look for certificates in /var/root/.ssh

#### 4. Forward ports while connecting to the EC2 machine
sudo ssh -L <kube-config-port>:localhost:<kube-config-port> -L 443:localhost:443 -L 80:localhost:80 -L 6443:localhost:6443 -F <path-to-ssh-config> ec2_helm

_**Note**: sudo is needed to forward 80 and 443, and sudo sets the commands to run from root (not HOME), so the path to ssh config is needed_
Loading