Skip to content

Add Vagrant VMs & combine it with gitlab-ci #320

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

Merged
merged 1 commit into from
May 24, 2018
Merged

Add Vagrant VMs & combine it with gitlab-ci #320

merged 1 commit into from
May 24, 2018

Conversation

D4N
Copy link
Member

@D4N D4N commented May 22, 2018

This PR adds the vagrant boxes mentioned in #315.

Summary of the changes:

  • add Vagrantfile to contrib/vms
  • add custom provisioning via shell scripts
  • move gitlab-ci before_script: to ci/install_dependencies.sh which is also used by vagrant
  • change COPR setup on CentOS 7 (yum-plugin-copr does not seem to work)

@D4N D4N requested review from piponazo and clanmills May 22, 2018 20:06
Copy link
Collaborator

@clanmills clanmills left a comment

Choose a reason for hiding this comment

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

This looks like amazing work to me although I can't honestly assess the accuracy of those scripts. I have VMs on the Mac for fedora, arch, ubuntu and centos. If you'd like me to run those scripts and provide feedback, please ask and I'll get that done on Wednesday or Thursday.

Copy link
Collaborator

@piponazo piponazo left a comment

Choose a reason for hiding this comment

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

Great work @D4N !

I have worked with Vagrant before and I know how time-consuming this kind of task could be. It's a super valuable contribution and I am sure it will let us reproduce issues/bugs reported by users in different distributions.


case "$distro_id" in
'fedora')
dnf -y --refresh install gcc-c++ clang cmake make ccache expat-devel zlib-devel libssh-devel libcurl-devel gtest-devel which dos2unix
Copy link
Collaborator

Choose a reason for hiding this comment

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

[question] I noticed that you are installing gcc and clang in all the different distros. Are you using both in gitlab?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, I am. Gitlab builds every combination of gcc/clang, Release/Debug and shared/static library.

Please install [Vagrant](https://www.vagrantup.com/) and a supported provider
(e.g. libvirt, VirtualBox).

Choose a box from the above list and run:
Copy link
Collaborator

Choose a reason for hiding this comment

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

[suggestion] I think it would be good to indicate that the user has to run this command from the directory where the Vagrantfile is.

Copy link
Member Author

Choose a reason for hiding this comment

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

That's a good idea. I always do that automatically, so I just forgot.

@D4N D4N force-pushed the vagrant_vms branch 2 times, most recently from a71fc39 to 4e46a64 Compare May 22, 2018 23:20
@D4N
Copy link
Member Author

D4N commented May 22, 2018

@clanmills You don't have to run those scripts yourself. Vagrant is a tool that creates VMs for you, so in case you would like a fresh Fedora 28 vm, just do a cd contrib/vms/ && vagrant up Fedora and vagrant will build one for you. You can of course test the scripts, but it might mess up your VMs, so unless you are feeling adventorous, I wouldn't run them.

@piponazo Thanks, it was not too much work to get it running, since the major undertaking has been already done for the gitlab CI. Unfortunately it is not ready yet, as the OpenSUSE vm does not really work (it fails to install cmake..., don't know what to do there though as it requires user intervention) and I have not yet tested Archlinux.

@piponazo
Copy link
Collaborator

@D4N good to know. I can give a look to the OpenSUSE issue with CMake.

@D4N
Copy link
Member Author

D4N commented May 23, 2018

@piponazo You can give it a try. The issue is that there are some file package conflicts when installing cmake (and later with git too). I guess that it can be solved by upgrading the image before doing anything else (OpenSUSE Tumbleweed is a rolling release distro, so it can happen that they have to push breaking changes) via zypper --noconfirm up; zypper --noconfirm dup but I haven't tried that. I'll try the Archlinux VM & will maybe recheck the Fedora & Ubuntu VM.

@D4N D4N mentioned this pull request May 23, 2018
@D4N D4N force-pushed the vagrant_vms branch 2 times, most recently from dd312ff to 41cc2d2 Compare May 23, 2018 21:39
- add Vagrantfile to contrib/vms
- add custom provisioning via shell scripts
- move gitlab-ci before_script: to ci/install_dependencies.sh which is also used
  by vagrant
- change COPR setup on CentOS 7 (yum-plugin-copr does not seem to work)
@D4N
Copy link
Member Author

D4N commented May 23, 2018

I played around with OpenSUSE VM but couldn't get it to provision automatically, since zypper simply won't run a system upgrade non interactively when there are file conflicts (which currently occur). So I just added a quick how-to, which explains a few manual steps which fix the situation.

Unless there are complains, I'd merge this once the CI is green.

@D4N D4N merged commit de33dbc into master May 24, 2018
@D4N D4N deleted the vagrant_vms branch May 24, 2018 09:04
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.

3 participants