github.com/cilium/cilium@v1.16.2/test/packet/README.md (about) 1 # Instructions to run CI tests in your own packet-net instances 2 3 1) Download terraform https://www.terraform.io/downloads.html 4 2) Get your API key by clicking in your user profile (top right corner) and 5 pick "API Keys" https://app.packet.net/login 6 3) Create an API Key with read/write permissions and give a description, 7 something like "CI private testing" 8 4) Store the private token as you will need it in the next steps 9 5) Go to the packet.net and pick or create a project ID 10 6) Generate your own SSH keys via `ssk-keygen` 11 7) Set the following env vars: 12 ``` 13 export TF_VAR_public_key_path="<SSH PUB KEY PATH>" 14 export TF_VAR_private_key_path="<SSH PRIV KEY PATH>" 15 export TF_VAR_metal_token="<TOKEN>" 16 export TF_VAR_metal_project_id="<PROJECT ID>" 17 # For europeans it's better to pick Amsterdam (ams1) or Toronto (yyz1) 18 export TF_VAR_metal_location="ams1" 19 export TF_VAR_metal_plan="c1.small.x86" 20 ``` 21 8) `terraform init` 22 9) `terraform apply` 23 10) After the VM is up and running you can check its IP with `terraform show` 24 11) SSH in to the public IP with `ssh -i <ssh-key-path> root@<publicIP>` 25 12) Checkout to the branch that you want to test `git checkout <my-faulty-branch>` 26 13) Run `screen` which will create a new terminal, this is helpful as you can leave your terminal while tests are running and come back again afterwards. 27 14) Enter the `test` directory with `cd test` 28 15) Run the ginkgo command to initialize the tests, for example: 29 `INTEGRATION_TESTS=true K8S_VERSION=1.14 ginkgo --focus="K8s" -v -- --cilium.showCommands --cilium.holdEnvironment=true` 30 16) Once tests are running and if you are running `screen`, you can leave the terminal 31 by typing `CTRL+a+d`, to resume again type `screen -r`