-
Notifications
You must be signed in to change notification settings - Fork 58
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
Docs: Improve the steps to run e2e locally #354
Conversation
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.
Great updates!
lgtm |
@@ -35,8 +35,8 @@ Vagrant.configure("2") do |config| | |||
end | |||
end | |||
|
|||
config.vm.define "tests-e2e-ubuntu2004", autostart: false do |ubuntu| | |||
ubuntu.vm.box = "generic/ubuntu2004" | |||
config.vm.define "tests-e2e-ubuntu2204", autostart: false do |ubuntu| |
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.
Hi @ldoktor !
Actually in CI we are using both versions. With Ubuntu 20.04 we test the code that replaces containerd in the host (related to #288).
So maybe create a new entry for 22.04 instead?
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'm not really a Vagrant user and only wanted to keep things working. I can remove this commit if 2004 is still covered.
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.
hi @ldoktor , could you please add a new entry for 22.04 but leave the old one (20.04)?
I got a new workstation and I can give it a try with vagrant. The old laptop I had vagrant stop working after an update... :(
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 did that and while testing it the 22.04 worked well, the 20.04 failed with:
tests-e2e-ubuntu2004: export KUBECONFIG=/etc/kubernetes/admin.conf
tests-e2e-ubuntu2004:
tests-e2e-ubuntu2004: You should now deploy a pod network to the cluster.
tests-e2e-ubuntu2004: Run "kubectl apply -f [podnetwork].yaml" with one of the options listed at:
tests-e2e-ubuntu2004: https://kubernetes.io/docs/concepts/cluster-administration/addons/
tests-e2e-ubuntu2004:
tests-e2e-ubuntu2004: Then you can join any number of worker nodes by running the following on each as root:
tests-e2e-ubuntu2004:
tests-e2e-ubuntu2004: kubeadm join 192.168.122.246:6443 --token gldusw.fa2z20xf9j1n9ljm \
tests-e2e-ubuntu2004: --discovery-token-ca-cert-hash sha256:18a47d92ef101b8474ca6a868048f618a5b50fa1789f0ad148f6f630eab977cb
tests-e2e-ubuntu2004: namespace/kube-flannel created
tests-e2e-ubuntu2004: clusterrole.rbac.authorization.k8s.io/flannel created
tests-e2e-ubuntu2004: clusterrolebinding.rbac.authorization.k8s.io/flannel created
tests-e2e-ubuntu2004: serviceaccount/flannel created
tests-e2e-ubuntu2004: configmap/kube-flannel-cfg created
tests-e2e-ubuntu2004: daemonset.apps/kube-flannel-ds created
tests-e2e-ubuntu2004: node/ubuntu2004.localdomain untainted
tests-e2e-ubuntu2004: node/ubuntu2004.localdomain untainted
tests-e2e-ubuntu2004: node/ubuntu2004.localdomain labeled
tests-e2e-ubuntu2004: ::info:: Build and install the operator
tests-e2e-ubuntu2004: ::debug:: Add repo /home/vagrant/src/confidential-containers/operator to git's safe.directory
tests-e2e-ubuntu2004: test -s /home/vagrant/src/confidential-containers/operator/bin/controller-gen || GOBIN=/home/vagrant/src/confidential-containers/operator/bin go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.9.2
tests-e2e-ubuntu2004: /home/vagrant/src/confidential-containers/operator/bin/controller-gen rbac:roleName=manager-role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases
tests-e2e-ubuntu2004: /home/vagrant/src/confidential-containers/operator/bin/controller-gen: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /home/vagrant/src/confidential-containers/operator/bin/controller-gen)
tests-e2e-ubuntu2004: /home/vagrant/src/confidential-containers/operator/bin/controller-gen: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /home/vagrant/src/confidential-containers/operator/bin/controller-gen)
tests-e2e-ubuntu2004: make: *** [Makefile:109: manifests] Error 1
tests-e2e-ubuntu2004:
tests-e2e-ubuntu2004: ::error:: Testing failed with 2
==> tests-e2e-ubuntu2004: Attempting graceful shutdown of VM...
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.
I'll look into that tomorrow... (unless you already know what is wrong)
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.
It looks like my fault. I had it compiled on my machine, which got transferred to the vagrant machine and failed. Interesting finding, operator doesn't come with "make clean" :-/ (I'll consider adding it). Anyway I'll finish my testing and update this PR tomorrow.
we are running with 20.04 and 22.04 in CI, let's add the 22.04 to the vagrantfile to let users test their changes on either of those. Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
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.
Hi @ldoktor this looks like a nice improvement. Thanks a lot. lgtm, just left a few minor suggestions.
docs/DEVELOPMENT.md
Outdated
# Stop the machine | ||
kcli stop vm e2e | ||
# Start the machine | ||
kcli start vm e2e |
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.
nit: unless stopping and starting are mandatory here, I would suggest removing stop and start here. We could redirect users to full kcli documentation if necessary to learn more.
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.
My intention was to provide a subset of commands that are likely to be used by users when testing coco op (it's written in the heading "Some useful commands"). So I'd rather keep it here but if you insist I can remove it.
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 those type of instructions will make the document a little bigger and forces the reader to be selective about what should be coping and pasting during the tests.
If we left here only the essential commands, it would be better. The tutorial could be on how to reproduce the test and not on how to use kcli. We could point readers to the official page, reducing our chances of getting those commands deprecated (in case of a future syntax change).
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.
Fair enough, let me simplify it a bit :-)
docs/DEVELOPMENT.md
Outdated
kcli scp . e2e:~/operator -r | ||
``` | ||
|
||
Once you get familiar with these you can keep the machine around and only start/stop it when needed, eventually sync your repos to check the latest changes. See the `(3) Using workstation` section for details how to execute things (make sure to execute ``kcli ssh first to be inside the VM``) |
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.
Maybe adding the section reference link?
s/`(3) Using workstation`/[Using workstation](##using-workstation)/g ?
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.
yep
|
||
### Using workstation | ||
|
||
This is only recommended on disposable machines (or in VMs) as the scripts will change your system settings heavily and despite the support to clean the environment things will be messy afterwards. **You had been warned**. |
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 appreciate the warning! :) Super welcome! Maybe make it even more clear with a markdown warning?
> [!WARNING]
> ...
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.
and yep
Changes:
|
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.
Thanks @ldoktor !
Interesting, it looks like GH workflow hanged somehow during the cleanup... |
split the chapter about running e2e tests locally into 3 variants to fit more needs starting with the simplest way to get things done up to a local deployment to keep testing things regularly. Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
Changes:
|
Hi @beraldoleal ! Are you fine with those changes? Can I push the "merge" button? |
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.
Thank you @ldoktor for accommodating the suggestions.
Go for it! |
inspired by me trying to follow the documentation to set things up