chore: move tools to the inception directory

This commit is contained in:
Glenn Y. Rolland 2024-07-16 13:41:08 +02:00
parent 4bd6979e38
commit a24ad92e98
9 changed files with 61 additions and 10 deletions

View file

@ -1,4 +1,6 @@
zip:
zip -r kubernetes--lab.zip Vagrantfile provision.sh
zip: clean
zip -r devops--openstack--lab.zip Vagrantfile provision/ README.md
clean:
rm -f devops--openstack--lab.zip

View file

@ -2,18 +2,21 @@
## Setup the virtual machine
On the host machine
On the host machine, start the virtual machine:
vagrant up --provider=libvirt
Export the SSH configuration
vagrant ssh-config > ~/.ssh/config
## Setup tunnels
On the host machine
On the host machine (for students with a VM + devstack)
ssh -L 8081:192.168.56.21:80 vagrant@control -N
On your local machine
On your local machine (for students with a specific bare metal installation)
ssh -L8081:127.0.0.1:8081 debian@xxxx -N
@ -21,11 +24,19 @@ Then open your favorite web browser on the following address:
http://localhost:8081/dashboard/
## Setup CLI tools
sudo apt-get install python3-pip
sudo pip3 install python-openstackclient
# for a specific component (nova, neutron, etc.)
sudo pip3 install python-COMPONENTclient
## Setup proxy (for openstack CLI)
On the host machine
ssh -L 3128 vagrant@control -N
ssh -D 3128 vagrant@control -N
export https_proxy=socks5://localhost:3128
export http_proxy=socks5://localhost:3128
@ -35,7 +46,6 @@ The verify with the CLI:
openstack image list
## References
* https://opendev.org/openstack/devstack-vagrant

View file

@ -21,6 +21,11 @@ Vagrant.configure('2') do |config|
# config.vm.synced_folder '../../exercises', '/vagrant/exercises' #, type: 'nfs', mount_options: ['actimeo=2']
# config.vm.synced_folder '../../config', '/vagrant/config' #, type: 'nfs', mount_options: ['actimeo=2']
config.trigger.before :up do |trigger|
trigger.info = "Setup host bridges network config"
trigger.run = {path: "provision/local.sh"}
end
config.vm.define 'control' do |machine|
machine.vm.hostname = 'control'
@ -30,11 +35,18 @@ Vagrant.configure('2') do |config|
machine.vm.network 'forwarded_port', guest: 80, host: 1080, host_ip: '127.0.0.1'
# machine.vm.network 'public_network', bridge: 'dummy0', auto_config: false
# machine.vm.network 'public_network', dev: 'br25', type: 'bridge', auto_config: false
machine.vm.network 'private_network', ip: '192.168.56.21', name: 'vagrant0'
machine.vm.network 'private_network', ip: '192.168.57.21', name: 'vagrant1'
machine.vm.network 'private_network', ip: '192.168.58.21', name: 'vagrant2'
#
# REF
# machine.vm.network 'private_network', ip: '192.168.56.21', name: 'vagrant0' # , auto_config: false
# machine.vm.network 'private_network', ip: '192.168.57.21', name: 'vagrant1' # , auto_config: false
# machine.vm.network 'private_network', ip: '192.168.58.21', name: 'vagrant2' # , auto_config: false
machine.vm.network 'public_network', ip: '192.168.56.21', dev: "os0", :mode => "bridge", :type => "bridge", auto_config: false
machine.vm.network 'public_network', ip: '192.168.57.21', dev: "os1", :mode => "bridge", :type => "bridge", auto_config: false
machine.vm.network 'public_network', ip: '192.168.58.21', dev: "os2", :mode => "bridge", :type => "bridge", auto_config: false
end
config.vm.provision 'shell', name: 'provision/remote_network', path: 'provision/remote_network.sh', privileged: true
config.vm.provision 'shell', name: 'provision/base', path: 'provision/base.sh', privileged: true
config.vm.provision 'shell', name: 'provision/openstack', path: 'provision/openstack.sh', privileged: false
config.vm.provision 'shell', inline: 'echo SUCCESS'

View file

@ -0,0 +1,9 @@
#!/bin/sh
sudo ip link add os0 type bridge || true
sudo ip link add os1 type bridge || true
sudo ip link add os2 type bridge || true
sudo ip link set os0 up || true
sudo ip link set os1 up || true
sudo ip link set os2 up || true

View file

@ -0,0 +1,15 @@
#!/bin/sh
set -e
ip link set eth1 up || true
ip link set eth2 up || true
ip link set eth3 up || true
ip addr add 192.168.56.21/24 dev eth1 || true
ip addr add 192.168.57.21/24 dev eth2 || true
ip addr add 192.168.58.21/24 dev eth3 || true
ip route add 192.168.56.0/24 dev eth1 || true
ip route add 192.168.57.0/24 dev eth2 || true
ip route add 192.168.58.0/24 dev eth3 || true
echo 'SUCCESS(remote_network)'

2
vm-1.kayobe/URL.txt Normal file
View file

@ -0,0 +1,2 @@
https://docs.openstack.org/kayobe/latest/contributor/vagrant.html

1
vm-1.kayobe/kayobe Submodule

@ -0,0 +1 @@
Subproject commit a46b78e594b996444e4498db04daf8ad50e544ca