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

chore: add vagrant configuration with complete dev environment #123

Merged
merged 2 commits into from
Oct 8, 2021

Conversation

jmickey
Copy link
Contributor

@jmickey jmickey commented Oct 8, 2021

What this PR does / why we need it:

PR adds a few things.

  1. Vagrantfile with fully scripted development environment setup
  2. Basic containerd configuration
  3. Adds .vagrant folder to gitignore

Release note:

Add Vagrantfile with Ubuntu Focal for dev environment

@github-actions github-actions bot added the size/s label Oct 8, 2021
@jmickey jmickey added the kind/documentation Documentation only label Oct 8, 2021
@codecov-commenter
Copy link

codecov-commenter commented Oct 8, 2021

Codecov Report

Merging #123 (e73148e) into main (ca14a16) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #123   +/-   ##
=======================================
  Coverage   40.09%   40.09%           
=======================================
  Files          32       32           
  Lines        1444     1444           
=======================================
  Hits          579      579           
  Misses        789      789           
  Partials       76       76           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7b5ff28...e73148e. Read the comment docs.

yitsushi
yitsushi previously approved these changes Oct 8, 2021
Copy link
Contributor

@yitsushi yitsushi left a comment

Choose a reason for hiding this comment

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

lgtm

Manual testing

  1. The selected box does not support libvirt
	config.vm.provider :libvirt do |libvirt|
		libvirt.connect_via_ssh = false
		libvirt.username = "root"
		libvirt.storage_pool_name = "vagrant"
	end
  1. Installed vbox
  2. Tried to do with vbox (vagrant up --provider=virtualbox)
  3. The virtual machine did not boot (vagrant timeout)
    checked with the vbox gui, something: invalid settings for graphics controller
  4. I assume it's working on mac ;)

Vagrantfile Outdated
Comment on lines 27 to 28
v.memory = 4096
v.cpus = 2
Copy link
Contributor

Choose a reason for hiding this comment

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

This one might be low later on, it's good now, but when we are creating 3 MicroVMs and configuring ak8s cluster on them, that 2 vpcu will be low and I think memory too.

Now it's fine, we can update later, just wanted mention it.

@yitsushi
Copy link
Contributor

yitsushi commented Oct 8, 2021

Updated the PR description with Release note to satisfy Release notes check.

Somehow the checker still does not see the code-block:

action failed: executing action function: no release-note code block found

@jmickey: can you try to force-push to the branch, maybe it can invalidate the cache. I assume it's cached and that's why it cries.

@jmickey
Copy link
Contributor Author

jmickey commented Oct 8, 2021

@yitsushi I added a libvirt provider. Feel free to give it a shot. The releasenote check is passing now.

@jmickey jmickey force-pushed the chore/add-vagrantfile branch from 45756bc to 1c77729 Compare October 8, 2021 09:42
@yitsushi
Copy link
Contributor

yitsushi commented Oct 8, 2021

@jmickey : I tried with my own snippet above, but the issue is the selected box does not support libvirt

config.vm.box = "ubuntu/focal64"

and I don't think there is a real value to add it and later hear "it's in there, but does not work, fix it"

The box you're attempting to add doesn't support the provider
you requested. Please find an alternate box or use an alternate
provider. Double-check your requested provider to verify you didn't
simply misspell it.

If you're adding a box from HashiCorp's Vagrant Cloud, make sure the box is
released.

Name: ubuntu/focal64
Address: https://vagrantcloud.com/ubuntu/focal64
Requested provider: [:libvirt]

@jmickey
Copy link
Contributor Author

jmickey commented Oct 8, 2021

Ah right you are. I can switch it to generic/ubuntu2004

@jmickey jmickey force-pushed the chore/add-vagrantfile branch from 1c77729 to c7d9265 Compare October 8, 2021 10:10
@jmickey
Copy link
Contributor Author

jmickey commented Oct 8, 2021

@yitsushi Switched to a ubuntu box that has libvirt compatibility, should be good now.

* Force libvirt to use NFS driver for the shared folder.
  It will install all necessary tools for it. If they are not installed
  it will use rsync for shared folders as a fallback, which is not
  bidirectional.
* On re-provisioning, unzip because it does not know what to do if the
  file is already there.

  Error:
  ```
  default: replace /usr/local/bin/firecracker? [y]es, [n]o, [A]ll, [N]one, [r]ename:  NULL
  default: (EOF or read error, treating as "[N]one" ...)
  ```
Copy link
Contributor

@yitsushi yitsushi left a comment

Choose a reason for hiding this comment

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

Manual test

  1. Changed storage pool name, because I use kvm for other things too, and with default it has conflicts, but that does not matter
  2. vagrant up
  3. Everything is working

Added commit: see commit message

@jmickey jmickey merged commit 12b503c into main Oct 8, 2021
@jmickey jmickey deleted the chore/add-vagrantfile branch October 8, 2021 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants