Browse Source

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
tags/7.0.0.0b2
Borne Mace 1 year ago
parent
commit
e751a7cc07

+ 6
- 3
contrib/dev/vagrant/Vagrantfile View File

@@ -15,10 +15,11 @@ end
15 15
 
16 16
 vagrant_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 19
 # they will be used by the bootstrap script to configure the nodes
20 20
 kolla_ansible_repo_path = File.expand_path(File.join(vagrant_dir, '..', '..', '..'))
21 21
 kolla_repo_path = File.expand_path(File.join(vagrant_dir, '..', '..', '..', '..', 'kolla'))
22
+kolla_cli_repo_path = File.expand_path(File.join(vagrant_dir, '..', '..', '..', '..', 'kolla-cli'))
22 23
 
23 24
 # Vagrantfile.custom contains user customization for the Vagrantfile
24 25
 # You shouldn't have to edit the Vagrantfile, ever.
@@ -181,6 +182,7 @@ Vagrant.configure(2) do |config|
181 182
   vagrant_shared_folder = "#{user_home}/sync"
182 183
   kolla_path = "#{user_home}/kolla"
183 184
   kolla_ansible_path = "#{user_home}/kolla-ansible"
185
+  kolla_cli_path = "#{user_home}/kolla-cli"
184 186
 
185 187
   # Next to the hostonly NAT-network there is a host-only network with all
186 188
   # nodes attached. Plus, each node receives a 3rd adapter connected to the
@@ -230,9 +232,10 @@ Vagrant.configure(2) do |config|
230 232
   # The operator controls the deployment
231 233
   config.vm.define "operator", primary: true do |admin|
232 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 236
     admin.vm.synced_folder kolla_ansible_repo_path, kolla_ansible_path, create:"True", type: get_default(:sync_method)
235 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 239
     admin.vm.synced_folder File.join(vagrant_dir, 'storage', 'operator'), "/data/host", create:"True", type: get_default(:sync_method)
237 240
     admin.vm.synced_folder File.join(vagrant_dir, 'storage', 'shared'), "/data/shared", create:"True", type: get_default(:sync_method)
238 241
     admin.vm.synced_folder ".", vagrant_shared_folder, disabled: true
@@ -253,7 +256,7 @@ Vagrant.configure(2) do |config|
253 256
         hostname = "#{node_type}0#{i}"
254 257
         config.vm.define hostname do |node|
255 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 260
           node.vm.synced_folder File.join(vagrant_dir, 'storage', node_type), "/data/host", create:"True", type: get_default(:sync_method)
258 261
           node.vm.synced_folder File.join(vagrant_dir, 'storage', 'shared'), "/data/shared", create:"True", type: get_default(:sync_method)
259 262
           node.vm.synced_folder ".", vagrant_shared_folder, disabled: true

+ 2
- 0
contrib/dev/vagrant/bootstrap.sh View File

@@ -10,6 +10,7 @@ VM=$1
10 10
 MODE=$2
11 11
 KOLLA_PATH=$3
12 12
 KOLLA_ANSIBLE_PATH=$4
13
+KOLLA_CLI_PATH=$5
13 14
 
14 15
 export http_proxy=
15 16
 export https_proxy=
@@ -175,6 +176,7 @@ function configure_operator {
175 176
 
176 177
     pip install ${KOLLA_ANSIBLE_PATH}
177 178
     pip install ${KOLLA_PATH}
179
+    pip install ${KOLLA_CLI_PATH}
178 180
 
179 181
     # Set selinux to permissive
180 182
     if [[ "$(getenforce)" == "Enforcing" ]]; then

+ 2
- 1
doc/source/contributor/vagrant-dev-env.rst View File

@@ -167,12 +167,13 @@ Find a location in the system's home directory and checkout Kolla repos:
167 167
 
168 168
 .. code-block:: console
169 169
 
170
+   git clone https://git.openstack.org/openstack/kolla-cli
170 171
    git clone https://git.openstack.org/openstack/kolla-ansible
171 172
    git clone https://git.openstack.org/openstack/kolla
172 173
 
173 174
 .. end
174 175
 
175
-Both repos must share the same parent directory so the bootstrap code can
176
+All repos must share the same parent directory so the bootstrap code can
176 177
 locate them.
177 178
 
178 179
 Developers can now tweak the Vagrantfile or bring up the default **all-in-one**

Loading…
Cancel
Save