Commit 5939e80b authored by GARNIER Laurent's avatar GARNIER Laurent
Browse files

Update scripts and add a 2 and 4 CPU usage

parent 060067eb
Pipeline #114240 passed with stages
in 5 minutes and 54 seconds
......@@ -5,13 +5,14 @@ Vagrant.configure(2) do |config|
config.vm.box = "debian/buster64"
config.vm.provider "virtualbox" do |v|
v.memory = 6144
v.cpus = 4
v.memory = 4196
v.cpus = 2
end
config.vm.provision "bootstrap_ready", type: "ansible" do |ansible|
ansible.playbook = "allgo.yml"
ansible.verbose = true
end
config.ssh.forward_agent = true
config.ssh.forward_x11 = true
end
#Vagrant.require_version ">= 1.7.0"
Vagrant.configure(2) do |config|
config.vm.box = "debian/buster64"
config.vm.provider "virtualbox" do |v|
v.memory = 4196
v.cpus = 2
end
config.vm.provision "bootstrap_ready", type: "ansible" do |ansible|
ansible.playbook = "allgo.yml"
ansible.verbose = true
end
config.ssh.forward_agent = true
config.ssh.forward_x11 = true
end
#Vagrant.require_version ">= 1.7.0"
Vagrant.configure(2) do |config|
config.vm.box = "debian/buster64"
config.vm.provider "virtualbox" do |v|
v.memory = 6144
v.cpus = 4
end
config.vm.provision "bootstrap_ready", type: "ansible" do |ansible|
ansible.playbook = "allgo.yml"
ansible.verbose = true
end
config.ssh.forward_agent = true
config.ssh.forward_x11 = true
end
......@@ -47,10 +47,10 @@
# args:
# chdir: /home/vagrant/allgo/
# - name: Start dev-mysql
# command: ./bootstrap dev-mysql
# args:
# chdir: /home/vagrant/allgo/
- name: remove /dev/mysql
command: rm -rf /dev/data/mysql
args:
chdir: /home/vagrant/allgo/
# - name: Start dev-controller
# command: ./bootstrap dev-controller
......@@ -62,10 +62,10 @@
# args:
# chdir: /home/vagrant/allgo/
# - name: Start dev-django
# command: ./bootstrap dev-django
# args:
# chdir: /home/vagrant/allgo/
- name: Start all
command: ./bootstrap
args:
chdir: /home/vagrant/allgo/
# - name: Start dev-smtpsink
# command: ./bootstrap dev-smtpsink
......
#!/bin/sh -v
# Nettoyage d'un conteneur vagrand pour allgo
vagrant destroy -f
#!/bin/sh -v
# Lancement d'un conteneur vagrand pour allgo
# ___________________________ STEP 1 ______________________________________________________
brew upgrade; brew update
# ___________________________ STEP 2 ______________________________________________________
brew install ansible docker-compose
# ___________________________ STEP 3 ______________________________________________________
brew cask install vagrant
# ___________________________ STEP 4 ______________________________________________________
ansible-galaxy install geerlingguy.docker
# ___________________________ STEP 5 ______________________________________________________
#vagrant init
# ___________________________ STEP 6 ______________________________________________________
#vagrant destroy -f
# ___________________________ STEP 7 ______________________________________________________
# Check CPU numbers
if [[ $(sysctl -a | grep "machdep.cpu.core_count: 4") ]]; then
cp Vagrantfile-2CPU Vagrantfile
else
cp Vagrantfile-4CPU Vagrantfile
fi
vagrant up
# ___________________________ STEP 8 ______________________________________________________
bash ssh_tunnel.sh& sleep 10; open https://localhost:8443/
# ssh a la main
# !!__id_file__!! cat /tmp/ssh-config | grep IdentityFile | awk '{print $2}'
ssh -p 2222 -i !!__id_file__!! vagrant@localhost
#!/bin/bash
set -x
ssh_config=$(vagrant ssh-config > /tmp/ssh-config)
port=$(cat /tmp/ssh-config | grep Port | awk '{print $2}')
identity=$(cat /tmp/ssh-config | grep IdentityFile | awk '{print $2}')
local_port=8443
distant_port=443
ssh -N -p $port -i $identity vagrant@localhost -L $local_port:localhost:$distant_port
#!/bin/bash
set -x
lsof -ti:8443 | xargs kill -9
ssh_config=$(vagrant ssh-config > /tmp/ssh-config)
port=$(cat /tmp/ssh-config | grep Port | awk '{print $2}')
identity=$(cat /tmp/ssh-config | grep IdentityFile | awk '{print $2}')
local_port=8443
distant_port=443
ssh -N -p $port -i $identity vagrant@localhost -L $local_port:localhost:$distant_port
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment