Browse Source

Improve the setup scripts to support multi-nics

This commit improves the setup scripts to support multi-nics:
1. update kube_master playbook to read kubeadm init parameter from
   environment variable
2. add one note into development-environment-devstack doc

Change-Id: Ie5fa11cc0d0b1a4cf5bd388b80a12a3f00295788
changes/00/551200/8
Dong Ma 3 years ago
committed by Hunt Xu
parent
commit
92d96f514a
  1. 14
      doc/source/contributor/development-environment-devstack.rst
  2. 4
      tools/gate/kubeadm/playbook/roles/kube_master/tasks/main.yml

14
doc/source/contributor/development-environment-devstack.rst

@ -71,6 +71,18 @@ configuration:
.. end
.. note::
For multiple network cards, you need to update the Kubernetes apiserver's advertise address
to the address on the interface which is used to get to the default gateway by adding one
environment variable.
.. code-block:: console
export EXTRA_KUBEADM_INIT_OPTS="--apiserver-advertise-address <default-host-ip>"
.. end
Running devstack
----------------
@ -109,4 +121,4 @@ set up during devstack installation.
Qinling devstack script uses `kubeadm <https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/>`_
for Kubernetes installation, refer to ``tools/gate/kubeadm/setup_gate.sh`` for
more detailed information about Qinling devstack installation.
more detailed information about Qinling devstack installation.

4
tools/gate/kubeadm/playbook/roles/kube_master/tasks/main.yml

@ -15,7 +15,9 @@
ignore_errors: True
- name: Init master
shell: kubeadm init --pod-network-cidr=192.168.0.0/16 --kubernetes-version=1.9.3
vars:
extra_opts: "{{ lookup('env', 'EXTRA_KUBEADM_INIT_OPTS') }}"
shell: kubeadm init --pod-network-cidr=192.168.0.0/16 --kubernetes-version=1.9.3 {{ extra_opts }}
register: kubeadm_init
- fail:

Loading…
Cancel
Save