From fc7309787489889aba9b8b0f338759610c0c15d3 Mon Sep 17 00:00:00 2001 From: Yasufumi Ogawa Date: Thu, 30 Jun 2022 19:31:59 +0900 Subject: [PATCH] Update config in tacker installer For a limitation of IP address range of hostonly network which was added in the recent update in VirtualBox [1], allowed only 192.168.56.0/21, the installer is terminated without you give appropriate IP addresses to your VMs. Forwarding port `10080` for HTTP is also invalid in security for some browsers. `20080` is valid for the restriction. This update is to update default values of IP address and port to be allowed. [1] https://www.virtualbox.org/manual/ch06.html#network_hostonly Closes-Bug: #1980312 Signed-off-by: Yasufumi Ogawa Change-Id: I7fbce874ce2445ea72e627e0ad6309062fac9292 --- doc/source/contributor/vagrant_devstack.rst | 6 ++--- vagrant/devstack/README.md | 24 ++++++++++++-------- vagrant/devstack/group_vars/all.yml | 4 ++-- vagrant/devstack/hosts | 8 +++---- vagrant/devstack/lib/machine.rb | 2 +- vagrant/devstack/samples/machines-2nodes.yml | 18 +++++---------- vagrant/devstack/samples/machines.yml | 8 +++---- 7 files changed, 33 insertions(+), 37 deletions(-) diff --git a/doc/source/contributor/vagrant_devstack.rst b/doc/source/contributor/vagrant_devstack.rst index f683fa67c..96b081d59 100644 --- a/doc/source/contributor/vagrant_devstack.rst +++ b/doc/source/contributor/vagrant_devstack.rst @@ -70,7 +70,7 @@ Setup Configuration File .. code-block:: console - $ ssh -F ssh_config controller + $ ssh -F /path/to/tacker/vagrant/devstack/ssh_config controller Setup ``machines.yml`` which is a config file defines parameters of each VM you deploy. @@ -155,7 +155,7 @@ describing how you configure the file. .. code-block:: console - $ ansible-playbook -i hosts site.yml + $ ansible-playbook -i hosts site.yaml After finished all tasks, you can login to the launched VMs. So, login to controller node and run ``stack.sh`` for installing OpenStack. @@ -167,7 +167,7 @@ if you customize it furthermore by yourself. .. code-block:: console - $ ssh stack@192.168.33.11 + $ ssh stack@192.168.56.11 $ cd devstack $ YOUR_FAVORITE_EDITOR local.conf $ ./stack.sh diff --git a/vagrant/devstack/README.md b/vagrant/devstack/README.md index 68d089d3f..1ac3d9749 100644 --- a/vagrant/devstack/README.md +++ b/vagrant/devstack/README.md @@ -1,4 +1,4 @@ -# vagrant-devstack +# Devstack Installer for Tacker ## What is this @@ -65,19 +65,23 @@ There are some parameters in `group_vars/all.yml` such as password on devstack or optional configurations. You don't need to update it usually. ```sh -$ ansible-playbook -i hosts site.yml +$ ansible-playbook -i hosts site.yaml ``` -After finished ansible's tasks, you can login to launched VMs. So, login to -controller node and run `stack.sh` for installing OpenStack. You will find that -`local.conf` is prepared for your environment by using its example. -See instruction how to configure `local.conf` described in -[DevStack Quick Start](https://docs.openstack.org/devstack/latest/) -if you customize it by yourself. +After finished ansible's tasks, you can login to launched VMs with hostname you +defined in `machines.yml`. +So, let's login to controller node and OpenStack. You will find that two +examples of `local.conf` are prepared in `$HOME/devstack` for your environment. + +* local.conf.example +* local.conf.kubernetes ```sh -$ ssh stack@192.168.33.11 +$ ssh stack@192.168.56.11 $ cd devstack -$ YOUR_FAVORITE_EDITOR local.conf +$ cp local.conf.kubernetes local.conf $ ./stack.sh ``` + +See instruction how to configure `local.conf` described in +[DevStack Quick Start](https://docs.openstack.org/devstack/latest/). diff --git a/vagrant/devstack/group_vars/all.yml b/vagrant/devstack/group_vars/all.yml index 56f56e325..36e2066a5 100644 --- a/vagrant/devstack/group_vars/all.yml +++ b/vagrant/devstack/group_vars/all.yml @@ -10,8 +10,8 @@ service_password: devstack service_token: devstack # compute nodes -service_host: 192.168.33.11 -floating_range: 192.168.33.128/25 +service_host: 192.168.56.11 +floating_range: 192.168.56.128/25 fixed_range: 10.4.128.0/20 # 2. Configure optional tools on controller node diff --git a/vagrant/devstack/hosts b/vagrant/devstack/hosts index 66e4ab425..578290b57 100644 --- a/vagrant/devstack/hosts +++ b/vagrant/devstack/hosts @@ -1,9 +1,9 @@ [ubuntu-focal.controller] -192.168.33.11 +192.168.56.11 [ubuntu-focal.compute] -#192.168.33.12 -#192.168.33.13 +#192.168.56.12 +#192.168.56.13 [centos-stream8.controller] -#192.168.33.11 +#192.168.56.14 diff --git a/vagrant/devstack/lib/machine.rb b/vagrant/devstack/lib/machine.rb index a76c6b67a..11ba221d7 100644 --- a/vagrant/devstack/lib/machine.rb +++ b/vagrant/devstack/lib/machine.rb @@ -9,7 +9,7 @@ class Machines < Array def initialize( hostname="controller", provider="virtualbox", box="ubuntu/focal64", nof_cpus=2, mem_size=4, disk_size=10, - private_ips=["192.168.33.11"], public_ips=nil, ssh_forward_x11=false, + private_ips=["192.168.56.11"], public_ips=nil, ssh_forward_x11=false, fwd_port_list=nil) @hostname = hostname @provider = provider diff --git a/vagrant/devstack/samples/machines-2nodes.yml b/vagrant/devstack/samples/machines-2nodes.yml index 9ba596103..ca9a2a8e8 100644 --- a/vagrant/devstack/samples/machines-2nodes.yml +++ b/vagrant/devstack/samples/machines-2nodes.yml @@ -7,17 +7,15 @@ machines: - hostname: controller provider: virtualbox box: ubuntu/focal64 - nof_cpus: 2 - mem_size: 4 - disk_size: 20 + nof_cpus: 4 + mem_size: 12 + disk_size: 50 private_ips: - - 192.168.33.11 + - 192.168.56.11 public_ips: fwd_port_list: - guest: 80 - host: 10080 - - guest: 6081 - host: 6081 + host: 20080 - hostname: compute provider: virtualbox @@ -26,10 +24,6 @@ machines: mem_size: 8 disk_size: 50 private_ips: - - 192.168.34.11 + - 192.168.56.12 public_ips: fwd_port_list: - - guest: 80 - host: 10081 - - guest: 6081 - host: 6081 diff --git a/vagrant/devstack/samples/machines.yml b/vagrant/devstack/samples/machines.yml index 8f7cf3c1c..16ec9ba42 100644 --- a/vagrant/devstack/samples/machines.yml +++ b/vagrant/devstack/samples/machines.yml @@ -9,13 +9,11 @@ machines: # Supported boxes are `ubuntu/focal64`, `centos/stream8`. box: ubuntu/focal64 nof_cpus: 4 - mem_size: 8 + mem_size: 12 disk_size: 50 private_ips: - - 192.168.33.11 + - 192.168.56.11 public_ips: fwd_port_list: - guest: 80 - host: 10080 - - guest: 6081 - host: 6081 + host: 20080