In my previous workplace, I tried to build a java environment using vagrant and ansible after studying when building an environment that can be confirmed locally without an environment to verify in a remote environment, so I will share it. * The procedure is for mac environment only. Currently, iOS client side development is the main, and server side development (node.js is a little involved) is not done, so it is good to make it, but I myself can not utilize it at all. ,,,
Please install the following in advance.
$ brew install ansible
$ brew cask install vagrant
$ brew cask install virtualbox
Clone the source from here.
In the directory where the Vagrantfile is located
$ vagrant up
I think it will take some time, but if it finishes normally, access the following.
http://192.168.33.10:8080/sample/
The following war will be expanded.
ansible-vagrant-java
└ www
└ tomcat
└ webapps
└ sample-1.0.war
If you see the following error during setup
There are errors in the configuration of this machine. Please fix
the following errors and try again:
Vagrant:
* Unknown configuration section 'vbguest'.
*
Please install or reinstall vagrant-vbguest.
$ vagrant plugin uninstall vagrant-vbguest
$ vagrant plugin install vagrant-vbguest
Normally, I think that you can create an environment more easily with an IDE etc., but I think that you can use it as an environment where you can easily try it when there is no remote verification environment, so please use it if you like.
-[Summary] Vagrant command list -Vagrant command list or cheat sheet -Vagrant: Unknown configuration section called'vbguest'
Recommended Posts