Skip to content

Conversation

@butjar
Copy link
Contributor

@butjar butjar commented May 5, 2019

https://kitchen.ci/

Kitchen CI helps testing infrastructure code. Since ipmininet supports
various distributions kitchen.ci can help testing the provisioning
scripts.

https://kitchen.ci/

Kitchen CI helps testing infrastructure code. Since ipmininet supports
various distributions kitchen.ci can help testing the provisioning
scripts.
@butjar
Copy link
Contributor Author

butjar commented May 5, 2019

If you wanna try, you could install the ruby gem gem install kitchen-vagrant. However, for me installing chefdk from https://downloads.chef.io/chefdk always worked best.

If the installation works, you do a kitchen converge to run the install script on different distributions. The end-2-end tests can also be added.

@butjar
Copy link
Contributor Author

butjar commented May 5, 2019

Currently there are at least two issues with that PR:

  1. Fedora doesn't converge, because python is missing
  2. build_vm.sh script gets somehow stuck

I just created the PR to show you the kitchen workflow, so you can decide if it makes sense to add.

Copy link
Collaborator

@jadinm jadinm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could make sense. I don't know how to solve the build_vm.sh stucked however.
Maybe this is due to the updates of the grub which require user interactions.


provisioner:
name: shell
command: /opt/ipmininet/util/build_vm.sh
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
command: /opt/ipmininet/util/build_vm.sh
command: /opt/ipmininet/util/build_vm.sh && sudo pytest -v /opt/ipmininet

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kitchen supplies a config section (verifiers) for running tests https://kitchen.ci/docs/getting-started/writing-test/. Separating the provisioning and the tests. I suggest adding the tests there.


provisioner:
name: shell
command: sudo python /opt/ipmininet/util/install.py -a
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
command: sudo python /opt/ipmininet/util/install.py -a
command: if which apt; then sudo apt install -y python; elif which yum; then sudo yum install -y python; fi; sudo python /opt/ipmininet/util/install.py -iam && sudo pytest -v /opt/ipmininet

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This solves the problems for all platforms

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 for if which apt; then sudo apt install -y python; elif which yum; then sudo yum install -y python; fi; sudo python /opt/ipmininet/util/install.py -iam

For sudo pytest -v /opt/ipmininet see #31 (comment)

@@ -1,3 +1,5 @@
#!/usr/bin/env python
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not needed, I think
I would remove it

@jadinm
Copy link
Collaborator

jadinm commented Aug 7, 2019

This could make sense. I don't know how to solve the build_vm.sh stucked however.
Maybe this is due to the updates of the grub which require user interactions.

If this is due to that, adding export DEBIAN_FRONTEND=noninteractive at the start of the build_vm.sh would fix the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants