Edited this particular as per requirements

This commit is contained in:
VISHAKH 2018-01-12 00:54:53 +05:30
parent 0f20c354d2
commit 702e7dfaad

25
Vagrantfile vendored
View file

@ -11,7 +11,7 @@ Vagrant.configure("2") do |config|
# https://docs.vagrantup.com. # https://docs.vagrantup.com.
# Every Vagrant development environment requires a box. You can search for # Every Vagrant development environment requires a box. You can search for
# boxes at https://atlas.hashicorp.com/search. # boxes at https://vagrantcloud.com/search.
config.vm.box = "centos/7" config.vm.box = "centos/7"
# Disable automatic box update checking. If you disable this, then # Disable automatic box update checking. If you disable this, then
@ -22,8 +22,14 @@ Vagrant.configure("2") do |config|
# Create a forwarded port mapping which allows access to a specific port # Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine. In the example below, # within the machine from a port on the host machine. In the example below,
# accessing "localhost:8080" will access port 80 on the guest machine. # accessing "localhost:8080" will access port 80 on the guest machine.
# NOTE: This will enable public access to the opened port
config.vm.network "forwarded_port", guest: 8080, host: 8484 config.vm.network "forwarded_port", guest: 8080, host: 8484
# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine and only allow access
# via 127.0.0.1 to disable public access
# config.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: "127.0.0.1"
# Create a private network, which allows host-only access to the machine # Create a private network, which allows host-only access to the machine
# using a specific IP. # using a specific IP.
# config.vm.network "private_network", ip: "192.168.33.10" # config.vm.network "private_network", ip: "192.168.33.10"
@ -37,11 +43,7 @@ Vagrant.configure("2") do |config|
# the path on the host to the actual folder. The second argument is # the path on the host to the actual folder. The second argument is
# the path on the guest to mount the folder. And the optional third # the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options. # argument is a set of non-required options.
# config.vm.synced_folder "../data", "/vagrant_data" config.vm.synced_folder ".", "/home/vagrant/sync", disabled: true
config.vm.synced_folder ".", "/vagrant", disabled: true
config.vm.provision :shell, path: "bootstrap.sh"
config.vm.provision :file, source: "target/spring-petclinic-1.4.2.jar", destination: "/tmp/spring-petclinic-1.4.2.jar", run: "always"
config.vm.provision :shell, inline: "java -jar /tmp/spring-petclinic-1.4.2.jar &", run: "always"
# Provider-specific configuration so you can fine-tune various # Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options. # backing providers for Vagrant. These expose provider-specific options.
@ -58,17 +60,12 @@ Vagrant.configure("2") do |config|
# View the documentation for the provider you are using for more # View the documentation for the provider you are using for more
# information on available options. # information on available options.
# Define a Vagrant Push strategy for pushing to Atlas. Other push strategies
# such as FTP and Heroku are also available. See the documentation at
# https://docs.vagrantup.com/v2/push/atlas.html for more information.
# config.push.define "atlas" do |push|
# push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME"
# end
# Enable provisioning with a shell script. Additional provisioners such as # Enable provisioning with a shell script. Additional provisioners such as
# Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the # Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
# documentation for more information about their specific syntax and use. # documentation for more information about their specific syntax and use.
# config.vm.provision "shell", inline: <<-SHELL config.vm.provision :shell path: "bootstrap.sh"
config.vm.provision :file, source: "target/spring-petclinic-1.4.2.jar", destination: "/tmp/spring-petclinic-1.4.2.jar", run: "always"
config.vm.provision :shell, inline: "java -jar/tmp/spring-petclinic-1.4.2.jar &", run: "always"
# apt-get update # apt-get update
# apt-get install -y apache2 # apt-get install -y apache2
# SHELL # SHELL