summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBorne Mace <borne.mace@oracle.com>2018-04-19 12:36:31 -0700
committerBorne Mace <borne.mace@oracle.com>2018-04-19 14:44:01 -0700
commite751a7cc07a6bf3ea92b089292b14004ad40519f (patch)
tree482d98787615aad80ada2bb049331f438bb56d32
parentd6861961fbe26a5f021028d250b4c4466562fb40 (diff)
Added support for kolla-cli development
Updated the vagrant dev environment to include support for development and testing of the kolla-cli Change-Id: I1d8f66cced7f0a9cc37e3b296c5ae10ab989f736
Notes
Notes (review): Code-Review+2: Eduardo Gonzalez <dabarren@gmail.com> Code-Review+1: Mark Giles <mark.giles@oracle.com> Code-Review+2: Surya Prakash (spsurya) <singh.surya64mnnit@gmail.com> Code-Review+1: caoyuan <cao.yuan@99cloud.net> Workflow+1: Eduardo Gonzalez <dabarren@gmail.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Mon, 23 Apr 2018 08:45:39 +0000 Reviewed-on: https://review.openstack.org/562810 Project: openstack/kolla-ansible Branch: refs/heads/master
-rw-r--r--contrib/dev/vagrant/Vagrantfile9
-rw-r--r--contrib/dev/vagrant/bootstrap.sh2
-rw-r--r--doc/source/contributor/vagrant-dev-env.rst3
3 files changed, 10 insertions, 4 deletions
diff --git a/contrib/dev/vagrant/Vagrantfile b/contrib/dev/vagrant/Vagrantfile
index 4859ff1..5f852ac 100644
--- a/contrib/dev/vagrant/Vagrantfile
+++ b/contrib/dev/vagrant/Vagrantfile
@@ -15,10 +15,11 @@ end
15 15
16vagrant_dir = File.expand_path(File.dirname(__FILE__)) 16vagrant_dir = File.expand_path(File.dirname(__FILE__))
17 17
18# get kolla and kolla-ansibe repos path relative to current directory 18# get kolla, kolla-ansibe and kolla-cli repos path relative to current directory
19# they will be used by the bootstrap script to configure the nodes 19# they will be used by the bootstrap script to configure the nodes
20kolla_ansible_repo_path = File.expand_path(File.join(vagrant_dir, '..', '..', '..')) 20kolla_ansible_repo_path = File.expand_path(File.join(vagrant_dir, '..', '..', '..'))
21kolla_repo_path = File.expand_path(File.join(vagrant_dir, '..', '..', '..', '..', 'kolla')) 21kolla_repo_path = File.expand_path(File.join(vagrant_dir, '..', '..', '..', '..', 'kolla'))
22kolla_cli_repo_path = File.expand_path(File.join(vagrant_dir, '..', '..', '..', '..', 'kolla-cli'))
22 23
23# Vagrantfile.custom contains user customization for the Vagrantfile 24# Vagrantfile.custom contains user customization for the Vagrantfile
24# You shouldn't have to edit the Vagrantfile, ever. 25# You shouldn't have to edit the Vagrantfile, ever.
@@ -181,6 +182,7 @@ Vagrant.configure(2) do |config|
181 vagrant_shared_folder = "#{user_home}/sync" 182 vagrant_shared_folder = "#{user_home}/sync"
182 kolla_path = "#{user_home}/kolla" 183 kolla_path = "#{user_home}/kolla"
183 kolla_ansible_path = "#{user_home}/kolla-ansible" 184 kolla_ansible_path = "#{user_home}/kolla-ansible"
185 kolla_cli_path = "#{user_home}/kolla-cli"
184 186
185 # Next to the hostonly NAT-network there is a host-only network with all 187 # Next to the hostonly NAT-network there is a host-only network with all
186 # nodes attached. Plus, each node receives a 3rd adapter connected to the 188 # nodes attached. Plus, each node receives a 3rd adapter connected to the
@@ -230,9 +232,10 @@ Vagrant.configure(2) do |config|
230 # The operator controls the deployment 232 # The operator controls the deployment
231 config.vm.define "operator", primary: true do |admin| 233 config.vm.define "operator", primary: true do |admin|
232 admin.vm.hostname = "operator.local" 234 admin.vm.hostname = "operator.local"
233 admin.vm.provision :shell, path: PROVISION_SCRIPT, args: "operator #{MULTINODE ? 'multinode' : 'aio'} #{kolla_path} #{kolla_ansible_path}" 235 admin.vm.provision :shell, path: PROVISION_SCRIPT, args: "operator #{MULTINODE ? 'multinode' : 'aio'} #{kolla_path} #{kolla_ansible_path} #{kolla_cli_path}"
234 admin.vm.synced_folder kolla_ansible_repo_path, kolla_ansible_path, create:"True", type: get_default(:sync_method) 236 admin.vm.synced_folder kolla_ansible_repo_path, kolla_ansible_path, create:"True", type: get_default(:sync_method)
235 admin.vm.synced_folder kolla_repo_path, kolla_path, create:"True", type: get_default(:sync_method) 237 admin.vm.synced_folder kolla_repo_path, kolla_path, create:"True", type: get_default(:sync_method)
238 admin.vm.synced_folder kolla_cli_repo_path, kolla_cli_path, create:"True", type: get_default(:sync_method)
236 admin.vm.synced_folder File.join(vagrant_dir, 'storage', 'operator'), "/data/host", create:"True", type: get_default(:sync_method) 239 admin.vm.synced_folder File.join(vagrant_dir, 'storage', 'operator'), "/data/host", create:"True", type: get_default(:sync_method)
237 admin.vm.synced_folder File.join(vagrant_dir, 'storage', 'shared'), "/data/shared", create:"True", type: get_default(:sync_method) 240 admin.vm.synced_folder File.join(vagrant_dir, 'storage', 'shared'), "/data/shared", create:"True", type: get_default(:sync_method)
238 admin.vm.synced_folder ".", vagrant_shared_folder, disabled: true 241 admin.vm.synced_folder ".", vagrant_shared_folder, disabled: true
@@ -253,7 +256,7 @@ Vagrant.configure(2) do |config|
253 hostname = "#{node_type}0#{i}" 256 hostname = "#{node_type}0#{i}"
254 config.vm.define hostname do |node| 257 config.vm.define hostname do |node|
255 node.vm.hostname = "#{hostname}.local" 258 node.vm.hostname = "#{hostname}.local"
256 node.vm.provision :shell, path: PROVISION_SCRIPT, args: "#{hostname} multinode #{kolla_path} #{kolla_ansible_path}" 259 node.vm.provision :shell, path: PROVISION_SCRIPT, args: "#{hostname} multinode #{kolla_path} #{kolla_ansible_path} #{kolla_cli_path}"
257 node.vm.synced_folder File.join(vagrant_dir, 'storage', node_type), "/data/host", create:"True", type: get_default(:sync_method) 260 node.vm.synced_folder File.join(vagrant_dir, 'storage', node_type), "/data/host", create:"True", type: get_default(:sync_method)
258 node.vm.synced_folder File.join(vagrant_dir, 'storage', 'shared'), "/data/shared", create:"True", type: get_default(:sync_method) 261 node.vm.synced_folder File.join(vagrant_dir, 'storage', 'shared'), "/data/shared", create:"True", type: get_default(:sync_method)
259 node.vm.synced_folder ".", vagrant_shared_folder, disabled: true 262 node.vm.synced_folder ".", vagrant_shared_folder, disabled: true
diff --git a/contrib/dev/vagrant/bootstrap.sh b/contrib/dev/vagrant/bootstrap.sh
index fa9d463..51b8afb 100644
--- a/contrib/dev/vagrant/bootstrap.sh
+++ b/contrib/dev/vagrant/bootstrap.sh
@@ -10,6 +10,7 @@ VM=$1
10MODE=$2 10MODE=$2
11KOLLA_PATH=$3 11KOLLA_PATH=$3
12KOLLA_ANSIBLE_PATH=$4 12KOLLA_ANSIBLE_PATH=$4
13KOLLA_CLI_PATH=$5
13 14
14export http_proxy= 15export http_proxy=
15export https_proxy= 16export https_proxy=
@@ -175,6 +176,7 @@ function configure_operator {
175 176
176 pip install ${KOLLA_ANSIBLE_PATH} 177 pip install ${KOLLA_ANSIBLE_PATH}
177 pip install ${KOLLA_PATH} 178 pip install ${KOLLA_PATH}
179 pip install ${KOLLA_CLI_PATH}
178 180
179 # Set selinux to permissive 181 # Set selinux to permissive
180 if [[ "$(getenforce)" == "Enforcing" ]]; then 182 if [[ "$(getenforce)" == "Enforcing" ]]; then
diff --git a/doc/source/contributor/vagrant-dev-env.rst b/doc/source/contributor/vagrant-dev-env.rst
index 7443414..7ec683f 100644
--- a/doc/source/contributor/vagrant-dev-env.rst
+++ b/doc/source/contributor/vagrant-dev-env.rst
@@ -167,12 +167,13 @@ Find a location in the system's home directory and checkout Kolla repos:
167 167
168.. code-block:: console 168.. code-block:: console
169 169
170 git clone https://git.openstack.org/openstack/kolla-cli
170 git clone https://git.openstack.org/openstack/kolla-ansible 171 git clone https://git.openstack.org/openstack/kolla-ansible
171 git clone https://git.openstack.org/openstack/kolla 172 git clone https://git.openstack.org/openstack/kolla
172 173
173.. end 174.. end
174 175
175Both repos must share the same parent directory so the bootstrap code can 176All repos must share the same parent directory so the bootstrap code can
176locate them. 177locate them.
177 178
178Developers can now tweak the Vagrantfile or bring up the default **all-in-one** 179Developers can now tweak the Vagrantfile or bring up the default **all-in-one**