Closed lenada closed 9 years ago
Thanks for the contribution! Vagrantfile will certainly make it easier to try Jetpack out and to run tests. A couple remarks:
Please rename the provision/
directory to contrib/vagrant/
. I expect there will be more helper scripts in the future (at least a port Makefile to build a package, at least until Jetpack makes it into /usr/ports), and I'd like to avoid too many directories in the repository root. If the Ansible configuration is intended to be a general one rather than tied to the Vagrantfile, contrib/ansible/
may be a better name.
config.vm.private_network
is a good approach for a Vagrantfile in a public repository. Does anything break if you delete that line and go with the defaults (or whatever user set as default in ~/.vagrant.d/Vagrantfile
?file
provisioner to copy files, and then a shell script to set it up. I could be convinced otherwise, though./usr/local/bin/python
, to avoid polluting system directories, or is /usr/bin/python
hardcoded into Ansible?ifconfig
and kldload
, the interface and modules should also go to /etc/rc.conf
to work after restart (the settings are cloned_interfaces
+ ipv4_addrs_lo1
, kld_list
). Maybe it is possible to just set it in rc.conf
, and then use some rc script to bring the interface up and load modules?images/debootstrap/README.md
says, one should run debootstrap to create a rootfs tarball on a Linux system (unless you intend to add support for a cross-platform debootstrap, which would be nice).Shell nitpick: in provision/bootstrap_freebsd.sh
you could use set -e
at the beginning (fail whole script on non-zero exit code from command) rather than &&
ing the whole thing.
Just checked: if you add interface and modules to /etc/rc.conf
, you can run service netif start lo1
and service kld start
to configure it without a restart.
move to
contrib
done
I'm not sure hardcoding IP in config.vm.private_network is a good approach
to get the NFS mount from the host os into the guest os working I found no other way then specifiying config.vm.private_network
. 10.0.1.10
gets assigned to em1
, em0
is assigned "dynamically"
I'm not convinced that Ansible is needed (especially that installing Ansible needs a shell provisioning script anyway
I managed to get rid of the shell provisioning to pre-bootstrap ansible. the Python symlink is now also obsolete.
The big advantage of ansible - it is very easy to provision tasks in an idempotent fashion. I have restructured and split up the tasks for better readability and later reuse for other environments then the vagrant box.
Besides immediate ifconfig and kldload
went from the one-off approach to proper rc.conf
Debootstrap is not required
removed
Other than adding Ansible requirement to README, this is good to go.
Thank you!
I added a vagrant configuration & ansible provisioning. Can be tested with
$ vagrant up
Please provide some feedback wether some of the following things would make sense
Provision / run integration tests