Skip to content
Snippets Groups Projects
Commit a7a91375 authored by OMOND Antoine's avatar OMOND Antoine
Browse files

Ajout Vagrantfile + README

parents
No related branches found
No related tags found
No related merge requests found
/.idea
.vagrant/
# Commandes vagrant
`vagrant up`: monter toutes les VM définies dans le `Vagrantfile`.\
`vagrant destroy`: détruire toutes les VM définies dans le `Vagrantfile`.\
`vagrant up/destroy <args>`: monter/détruire la ou les VMs spécifiées.
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
# Doc: https://docs.vagrantup.com.
config.vm.box = "http://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64-vagrant.box"
config.vm.provider "virtualbox" do |vb|
vb.cpus = 2
vb.memory = "512"
end
# Boxes list: https://vagrantcloud.com/search.
# Address should be in the valid range: 192.168.56.0/21 https://www.virtualbox.org/manual/ch06.html#network_hostonly
# Can be modified in /etc/vbox/networks.conf
# All VMs need to be in the same private network to communicate
config.vm.define "frontend" do |frontend|
frontend.vm.hostname = "frontend"
frontend.vm.network "private_network", ip: "192.168.56.20"
frontend.vm.network "forwarded_port", guest: 22, host: 3221
frontend.vm.network "forwarded_port", guest: 8080, host: 9090
frontend.ssh.port = 3221
end
config.vm.define "pc" do |productcatalogservice|
productcatalogservice.vm.hostname = "productcatalogservice"
productcatalogservice.vm.network "private_network", ip: "192.168.56.21"
productcatalogservice.vm.network "forwarded_port", guest: 22, host: 3222
productcatalogservice.ssh.port = 3222
end
config.vm.define "rc" do |recommandation|
recommandation.vm.hostname = "recommandation"
recommandation.vm.network "private_network", ip: "192.168.56.22"
recommandation.vm.network "forwarded_port", guest: 22, host: 3223
recommandation.ssh.port = 3223
end
config.vm.define "ct" do |cart|
cart.vm.hostname = "cart"
cart.vm.network "private_network", ip: "192.168.56.23"
cart.vm.network "forwarded_port", guest: 22, host: 3224
cart.ssh.port = 3224
end
# 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,
# 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: 80, host: 8080
# 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
# using a specific IP.
# config.vm.network "private_network", ip: "192.168.33.10"
# Create a public network, which generally matched to bridged network.
# Bridged networks make the machine appear as another physical device on
# your network.
# config.vm.network "public_network"
# Share an additional folder to the guest VM. The first 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
# argument is a set of non-required options.
# config.vm.synced_folder "../data", "/vagrant_data"
# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options.
# Example for VirtualBox:
#
#
# View the documentation for the provider you are using for more
# information on available options.
# Enable provisioning with a shell script. Additional provisioners such as
# Ansible, Chef, Docker, Puppet and Salt are also available. Please see the
# documentation for more information about their specific syntax and use.
# config.vm.provision "shell", inline: <<-SHELL
# apt-get update
# apt-get install -y apache2
# SHELL
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment