summaryrefslogtreecommitdiffstats
path: root/deploy
diff options
context:
space:
mode:
Diffstat (limited to 'deploy')
-rw-r--r--deploy/README2
-rw-r--r--deploy/cloud/configure_environment.py11
-rw-r--r--deploy/cloud/configure_settings.py20
-rw-r--r--deploy/common.py5
-rw-r--r--deploy/dea.py3
-rwxr-xr-xdeploy/deploy.py32
-rw-r--r--deploy/fuel_patch/ks.cfg.patch28
-rw-r--r--deploy/install_fuel_master.py5
-rwxr-xr-xdeploy/reap.py9
-rw-r--r--deploy/templates/ericsson/virtual_environment/noha/vms/compute.xml8
-rw-r--r--deploy/templates/ericsson/virtual_environment/noha/vms/controller.xml8
-rw-r--r--deploy/templates/ericsson/virtual_environment/noha/vms/fuel.xml2
-rw-r--r--deploy/templates/intel/virtual_environment/noha/vms/compute.xml8
-rw-r--r--deploy/templates/intel/virtual_environment/noha/vms/controller.xml8
-rw-r--r--deploy/templates/intel/virtual_environment/noha/vms/fuel.xml2
-rw-r--r--deploy/templates/virtual_environment/vms/compute.xml8
-rw-r--r--deploy/templates/virtual_environment/vms/controller.xml8
-rw-r--r--deploy/templates/virtual_environment/vms/fuel.xml2
-rw-r--r--deploy/templates/virtual_environment_noha/vms/compute.xml8
-rw-r--r--deploy/templates/virtual_environment_noha/vms/controller.xml8
-rw-r--r--deploy/templates/virtual_environment_noha/vms/fuel.xml2
21 files changed, 107 insertions, 80 deletions
diff --git a/deploy/README b/deploy/README
index 167078bf8..7a3e09dc9 100644
--- a/deploy/README
+++ b/deploy/README
@@ -5,7 +5,7 @@ the following dependencies and python modules are required to be installed:
- for Ubuntu:
-sudo apt-get install -y libvirt-bin qemu-kvm python-pip fuseiso mkisofs
+sudo apt-get install -y libvirt-bin qemu-kvm python-pip fuseiso mkisofs genisoimage
sudo apt-get install -y python-dev libz-dev libxml2-dev libxslt-dev
sudo pip install pyyaml netaddr paramiko lxml scp pycrypto ecdsa
diff --git a/deploy/cloud/configure_environment.py b/deploy/cloud/configure_environment.py
index ed89fa600..1914d7e3e 100644
--- a/deploy/cloud/configure_environment.py
+++ b/deploy/cloud/configure_environment.py
@@ -46,14 +46,11 @@ class ConfigureEnvironment(object):
delete(self.yaml_config_dir)
create_dir_if_not_exists(self.yaml_config_dir)
env_name = self.dea.get_env_name()
- env_mode = self.dea.get_env_mode()
env_net_segment_type = self.dea.get_env_net_segment_type()
- log('Creating environment %s release %s, mode %s, network-mode neutron'
- ', net-segment-type %s'
- % (env_name, self.release_id, env_mode, env_net_segment_type))
- exec_cmd('fuel env create --name %s --release %s --mode %s '
- '--network-mode neutron --net-segment-type %s'
- % (env_name, self.release_id, env_mode, env_net_segment_type))
+ log('Creating environment %s release %s net-segment-type %s'
+ % (env_name, self.release_id, env_net_segment_type))
+ exec_cmd('fuel env create --name %s --release %s --net-segment-type %s'
+ % (env_name, self.release_id, env_net_segment_type))
if not self.env_exists(env_name):
err('Failed to create environment %s' % env_name)
diff --git a/deploy/cloud/configure_settings.py b/deploy/cloud/configure_settings.py
index 052634f99..b60a60fd1 100644
--- a/deploy/cloud/configure_settings.py
+++ b/deploy/cloud/configure_settings.py
@@ -54,12 +54,22 @@ class ConfigureSettings(object):
backup(settings_yaml)
settings = self.dea.get_property('settings')
# Copy fuel defined plugin_id's to user defined settings
+ # From Fuel 8.0 chosen_id was added because it is now
+ # possible to install many version of the same plugin
+ # but we will install only one version
for plugin in orig_dea['editable']:
- if 'metadata' in orig_dea['editable'][plugin] and 'plugin_id' in orig_dea['editable'][plugin]['metadata']:
- if not plugin in settings['editable']:
- settings['editable'][plugin] = orig_dea['editable'][plugin]
- else:
- settings['editable'][plugin]["metadata"]["plugin_id"] = orig_dea['editable'][plugin]["metadata"]["plugin_id"]
+ if 'metadata' in orig_dea['editable'][plugin]:
+ if 'plugin_id' in orig_dea['editable'][plugin]['metadata']:
+ if not plugin in settings['editable']:
+ settings['editable'][plugin] = orig_dea['editable'][plugin]
+ else:
+ settings['editable'][plugin]["metadata"]["plugin_id"] = orig_dea['editable'][plugin]["metadata"]["plugin_id"]
+ elif 'chosen_id' in orig_dea['editable'][plugin]['metadata']:
+ if not plugin in settings['editable']:
+ settings['editable'][plugin] = orig_dea['editable'][plugin]
+ else:
+ settings['editable'][plugin]['metadata']['chosen_id'] = orig_dea['editable'][plugin]['metadata']['chosen_id']
+ settings['editable'][plugin]['metadata']['versions'][0]['metadata']['plugin_id'] = orig_dea['editable'][plugin]['metadata']['versions'][0]['metadata']['plugin_id']
with io.open(settings_yaml, 'w') as stream:
yaml.dump(settings, stream, default_flow_style=False)
diff --git a/deploy/common.py b/deploy/common.py
index bc2787617..4b0561cd4 100644
--- a/deploy/common.py
+++ b/deploy/common.py
@@ -18,9 +18,8 @@ import stat
import errno
N = {'id': 0, 'status': 1, 'name': 2, 'cluster': 3, 'ip': 4, 'mac': 5,
- 'roles': 6, 'pending_roles': 7, 'online': 8}
-E = {'id': 0, 'status': 1, 'name': 2, 'mode': 3, 'release_id': 4,
- 'changes': 5, 'pending_release_id': 6}
+ 'roles': 6, 'pending_roles': 7, 'online': 8, 'group_id': 9}
+E = {'id': 0, 'status': 1, 'name': 2, 'release_id': 3, 'pending_release_id': 5}
R = {'id': 0, 'name': 1, 'state': 2, 'operating_system': 3, 'version': 4}
RO = {'name': 0, 'conflicts': 1}
CWD = os.getcwd()
diff --git a/deploy/dea.py b/deploy/dea.py
index 2d2b28ae8..b5b63f7cc 100644
--- a/deploy/dea.py
+++ b/deploy/dea.py
@@ -34,9 +34,6 @@ class DeploymentEnvironmentAdapter(object):
def get_env_name(self):
return self.get_property('environment')['name']
- def get_env_mode(self):
- return self.get_property('environment')['mode']
-
def get_env_net_segment_type(self):
return self.get_property('environment')['net_segment_type']
diff --git a/deploy/deploy.py b/deploy/deploy.py
index 8a4bfc40a..7635cedba 100755
--- a/deploy/deploy.py
+++ b/deploy/deploy.py
@@ -147,12 +147,15 @@ class AutoDeploy(object):
log('isolinux.cfg after: %s'
% exec_cmd('grep netmask %s' % isolinux))
+ iso_label = self.parse_iso_volume_label(self.iso_file)
+ log('Volume label: %s' % iso_label)
+
iso_linux_bin = 'isolinux/isolinux.bin'
exec_cmd('mkisofs -quiet -r -J -R -b %s '
'-no-emul-boot -boot-load-size 4 '
'-boot-info-table -hide-rr-moved '
- '-x "lost+found:" -o %s .'
- % (iso_linux_bin, new_iso))
+ '-x "lost+found:" -V %s -o %s .'
+ % (iso_linux_bin, iso_label, new_iso))
def update_fuel_isolinux(self, file):
with io.open(file) as f:
@@ -161,9 +164,34 @@ class AutoDeploy(object):
pattern = r'%s=[^ ]\S+' % key
replace = '%s=%s' % (key, val)
data = re.sub(pattern, replace, data)
+
+ netmask = self.fuel_conf['netmask']
+ data = self.append_kernel_param(data, 'netmask=%s' % netmask)
+
with io.open(file, 'w') as f:
f.write(data)
+ def append_kernel_param(self, data, kernel_param):
+ """Append the specified kernel parameter to a list of kernel
+ parameters. Do it only if it isn't already there.
+ """
+ data_final = ''
+ key = re.match(r'(.+?=)', kernel_param).group()
+
+ for line in data.splitlines():
+ data_final += line
+ if (re.search(r'append ', line) and
+ not re.search(key, line)):
+ data_final += ' ' + kernel_param
+ data_final += '\n'
+
+ return data_final
+
+ def parse_iso_volume_label(self, iso_filename):
+ label_line = exec_cmd('isoinfo -d -i %s | grep -i "Volume id: "' % iso_filename)
+ # cut leading text: 'Volume id: '
+ return label_line[11:]
+
def deploy_env(self):
dep = CloudDeploy(self.dea, self.dha, self.fuel_conf['ip'],
self.fuel_username, self.fuel_password,
diff --git a/deploy/fuel_patch/ks.cfg.patch b/deploy/fuel_patch/ks.cfg.patch
index 189695792..8c9cebc0f 100644
--- a/deploy/fuel_patch/ks.cfg.patch
+++ b/deploy/fuel_patch/ks.cfg.patch
@@ -1,19 +1,19 @@
-*** ks.cfg.orig Wed Apr 15 21:47:09 2015
---- ks.cfg Wed Apr 15 21:47:24 2015
+*** ks.cfg.orig 2016-01-25 08:56:16.406241267 +0100
+--- ks.cfg 2016-01-25 14:31:11.417761494 +0100
***************
-*** 35,41 ****
+*** 98,104 ****
default_drive=`echo ${drives} ${removable_drives} | awk '{print $1}'`
- installdrive="undefined"
-! forceformat="no"
- for I in `cat /proc/cmdline`; do case "$I" in *=*) eval $I;; esac ; done
-
- set ${drives} ${removable_drives}
---- 35,41 ----
+ installdrive=${installdrive:-undefined}
+! forceformat=${forceformat:-no}
+ for I in $(cat /proc/cmdline); do
+ case "$I" in
+ *=*)
+--- 98,104 ----
default_drive=`echo ${drives} ${removable_drives} | awk '{print $1}'`
- installdrive="undefined"
-! forceformat="yes"
- for I in `cat /proc/cmdline`; do case "$I" in *=*) eval $I;; esac ; done
-
- set ${drives} ${removable_drives}
+ installdrive=${installdrive:-undefined}
+! forceformat=${forceformat:-yes}
+ for I in $(cat /proc/cmdline); do
+ case "$I" in
+ *=*)
diff --git a/deploy/install_fuel_master.py b/deploy/install_fuel_master.py
index e3a7327c0..4f6a0527b 100644
--- a/deploy/install_fuel_master.py
+++ b/deploy/install_fuel_master.py
@@ -87,7 +87,7 @@ class InstallFuelMaster(object):
log('Found FUEL menu as PID %s, now killing it' % fuel_menu_pid)
self.ssh_exec_cmd('kill %s' % fuel_menu_pid, False)
- log('Wait until installation complete')
+ log('Wait until installation is complete')
self.wait_until_installation_completed()
log('Waiting for one minute for Fuel to stabilize')
@@ -117,6 +117,7 @@ class InstallFuelMaster(object):
plugin_files = []
with self.ssh as s:
for plugin_location in [PLUGINS_DIR, LOCAL_PLUGIN_FOLDER]:
+ s.exec_cmd('mkdir -p %s' % plugin_location)
r = s.exec_cmd('find %s -type f -name \'*.rpm\''
% plugin_location)
plugin_files.extend(r.splitlines())
@@ -130,7 +131,7 @@ class InstallFuelMaster(object):
'failed: %s' % (f, e))
def wait_for_node_up(self):
- WAIT_LOOP = 60
+ WAIT_LOOP = 240
SLEEP_TIME = 10
success = False
for i in range(WAIT_LOOP):
diff --git a/deploy/reap.py b/deploy/reap.py
index 72bfcee4c..dd5b242cf 100755
--- a/deploy/reap.py
+++ b/deploy/reap.py
@@ -75,8 +75,8 @@ DHA_2 = '''
'''
DISKS = {'fuel': '50G',
- 'controller': '60G',
- 'compute': '50G'}
+ 'controller': '100G',
+ 'compute': '100G'}
class Reap(object):
@@ -221,13 +221,8 @@ class Reap(object):
% (self.temp_dir, self.env_id))
network = self.read_yaml(network_file)
- # ha_compact not understood by Fuel when deploying...OD
- if self.env[E['mode']] == 'ha_compact':
- self.env[E['mode']] = 'ha'
-
env = {'environment':
{'name': self.env[E['name']],
- 'mode': self.env[E['mode']],
'net_segment_type':
network['networking_parameters']['segmentation_type']}}
self.write_yaml(self.dea_file, env)
diff --git a/deploy/templates/ericsson/virtual_environment/noha/vms/compute.xml b/deploy/templates/ericsson/virtual_environment/noha/vms/compute.xml
index fbef4bda7..063b23d98 100644
--- a/deploy/templates/ericsson/virtual_environment/noha/vms/compute.xml
+++ b/deploy/templates/ericsson/virtual_environment/noha/vms/compute.xml
@@ -57,19 +57,19 @@
<controller type='pci' index='0' model='pci-root'/>
<interface type='network'>
<source network='fuel1'/>
- <model type='virtio'/>
+ <model type='e1000'/>
</interface>
<interface type='network'>
<source network='fuel2'/>
- <model type='virtio'/>
+ <model type='e1000'/>
</interface>
<interface type='network'>
<source network='fuel3'/>
- <model type='virtio'/>
+ <model type='e1000'/>
</interface>
<interface type='network'>
<source network='fuel4'/>
- <model type='virtio'/>
+ <model type='e1000'/>
</interface>
<serial type='pty'>
<target port='0'/>
diff --git a/deploy/templates/ericsson/virtual_environment/noha/vms/controller.xml b/deploy/templates/ericsson/virtual_environment/noha/vms/controller.xml
index 3ff28218d..d30a95dcf 100644
--- a/deploy/templates/ericsson/virtual_environment/noha/vms/controller.xml
+++ b/deploy/templates/ericsson/virtual_environment/noha/vms/controller.xml
@@ -57,19 +57,19 @@
<controller type='pci' index='0' model='pci-root'/>
<interface type='network'>
<source network='fuel1'/>
- <model type='virtio'/>
+ <model type='e1000'/>
</interface>
<interface type='network'>
<source network='fuel2'/>
- <model type='virtio'/>
+ <model type='e1000'/>
</interface>
<interface type='network'>
<source network='fuel3'/>
- <model type='virtio'/>
+ <model type='e1000'/>
</interface>
<interface type='network'>
<source network='fuel4'/>
- <model type='virtio'/>
+ <model type='e1000'/>
</interface>
<serial type='pty'>
<target port='0'/>
diff --git a/deploy/templates/ericsson/virtual_environment/noha/vms/fuel.xml b/deploy/templates/ericsson/virtual_environment/noha/vms/fuel.xml
index 1a3286001..a693c96f9 100644
--- a/deploy/templates/ericsson/virtual_environment/noha/vms/fuel.xml
+++ b/deploy/templates/ericsson/virtual_environment/noha/vms/fuel.xml
@@ -67,7 +67,7 @@
<controller type='pci' index='0' model='pci-root'/>
<interface type='network'>
<source network='fuel1'/>
- <model type='virtio'/>
+ <model type='e1000'/>
</interface>
<serial type='pty'>
<target port='0'/>
diff --git a/deploy/templates/intel/virtual_environment/noha/vms/compute.xml b/deploy/templates/intel/virtual_environment/noha/vms/compute.xml
index fbef4bda7..063b23d98 100644
--- a/deploy/templates/intel/virtual_environment/noha/vms/compute.xml
+++ b/deploy/templates/intel/virtual_environment/noha/vms/compute.xml
@@ -57,19 +57,19 @@
<controller type='pci' index='0' model='pci-root'/>
<interface type='network'>
<source network='fuel1'/>
- <model type='virtio'/>
+ <model type='e1000'/>
</interface>
<interface type='network'>
<source network='fuel2'/>
- <model type='virtio'/>
+ <model type='e1000'/>
</interface>
<interface type='network'>
<source network='fuel3'/>
- <model type='virtio'/>
+ <model type='e1000'/>
</interface>
<interface type='network'>
<source network='fuel4'/>
- <model type='virtio'/>
+ <model type='e1000'/>
</interface>
<serial type='pty'>
<target port='0'/>
diff --git a/deploy/templates/intel/virtual_environment/noha/vms/controller.xml b/deploy/templates/intel/virtual_environment/noha/vms/controller.xml
index 3ff28218d..d30a95dcf 100644
--- a/deploy/templates/intel/virtual_environment/noha/vms/controller.xml
+++ b/deploy/templates/intel/virtual_environment/noha/vms/controller.xml
@@ -57,19 +57,19 @@
<controller type='pci' index='0' model='pci-root'/>
<interface type='network'>
<source network='fuel1'/>
- <model type='virtio'/>
+ <model type='e1000'/>
</interface>
<interface type='network'>
<source network='fuel2'/>
- <model type='virtio'/>
+ <model type='e1000'/>
</interface>
<interface type='network'>
<source network='fuel3'/>
- <model type='virtio'/>
+ <model type='e1000'/>
</interface>
<interface type='network'>
<source network='fuel4'/>
- <model type='virtio'/>
+ <model type='e1000'/>
</interface>
<serial type='pty'>
<target port='0'/>
diff --git a/deploy/templates/intel/virtual_environment/noha/vms/fuel.xml b/deploy/templates/intel/virtual_environment/noha/vms/fuel.xml
index 1a3286001..a693c96f9 100644
--- a/deploy/templates/intel/virtual_environment/noha/vms/fuel.xml
+++ b/deploy/templates/intel/virtual_environment/noha/vms/fuel.xml
@@ -67,7 +67,7 @@
<controller type='pci' index='0' model='pci-root'/>
<interface type='network'>
<source network='fuel1'/>
- <model type='virtio'/>
+ <model type='e1000'/>
</interface>
<serial type='pty'>
<target port='0'/>
diff --git a/deploy/templates/virtual_environment/vms/compute.xml b/deploy/templates/virtual_environment/vms/compute.xml
index cc60a2ad2..fa4ef5d8d 100644
--- a/deploy/templates/virtual_environment/vms/compute.xml
+++ b/deploy/templates/virtual_environment/vms/compute.xml
@@ -30,19 +30,19 @@
<controller type='pci' index='0' model='pci-root'/>
<interface type='network'>
<source network='fuel1'/>
- <model type='virtio'/>
+ <model type='e1000'/>
</interface>
<interface type='network'>
<source network='fuel2'/>
- <model type='virtio'/>
+ <model type='e1000'/>
</interface>
<interface type='network'>
<source network='fuel3'/>
- <model type='virtio'/>
+ <model type='e1000'/>
</interface>
<interface type='network'>
<source network='fuel4'/>
- <model type='virtio'/>
+ <model type='e1000'/>
</interface>
<serial type='pty'>
<target port='0'/>
diff --git a/deploy/templates/virtual_environment/vms/controller.xml b/deploy/templates/virtual_environment/vms/controller.xml
index 0a4b6937c..50950db17 100644
--- a/deploy/templates/virtual_environment/vms/controller.xml
+++ b/deploy/templates/virtual_environment/vms/controller.xml
@@ -30,19 +30,19 @@
<controller type='pci' index='0' model='pci-root'/>
<interface type='network'>
<source network='fuel1'/>
- <model type='virtio'/>
+ <model type='e1000'/>
</interface>
<interface type='network'>
<source network='fuel2'/>
- <model type='virtio'/>
+ <model type='e1000'/>
</interface>
<interface type='network'>
<source network='fuel3'/>
- <model type='virtio'/>
+ <model type='e1000'/>
</interface>
<interface type='network'>
<source network='fuel4'/>
- <model type='virtio'/>
+ <model type='e1000'/>
</interface>
<serial type='pty'>
<target port='0'/>
diff --git a/deploy/templates/virtual_environment/vms/fuel.xml b/deploy/templates/virtual_environment/vms/fuel.xml
index a9177f311..4e7c7fd2a 100644
--- a/deploy/templates/virtual_environment/vms/fuel.xml
+++ b/deploy/templates/virtual_environment/vms/fuel.xml
@@ -40,7 +40,7 @@
<controller type='pci' index='0' model='pci-root'/>
<interface type='network'>
<source network='fuel1'/>
- <model type='virtio'/>
+ <model type='e1000'/>
</interface>
<serial type='pty'>
<target port='0'/>
diff --git a/deploy/templates/virtual_environment_noha/vms/compute.xml b/deploy/templates/virtual_environment_noha/vms/compute.xml
index cc60a2ad2..fa4ef5d8d 100644
--- a/deploy/templates/virtual_environment_noha/vms/compute.xml
+++ b/deploy/templates/virtual_environment_noha/vms/compute.xml
@@ -30,19 +30,19 @@
<controller type='pci' index='0' model='pci-root'/>
<interface type='network'>
<source network='fuel1'/>
- <model type='virtio'/>
+ <model type='e1000'/>
</interface>
<interface type='network'>
<source network='fuel2'/>
- <model type='virtio'/>
+ <model type='e1000'/>
</interface>
<interface type='network'>
<source network='fuel3'/>
- <model type='virtio'/>
+ <model type='e1000'/>
</interface>
<interface type='network'>
<source network='fuel4'/>
- <model type='virtio'/>
+ <model type='e1000'/>
</interface>
<serial type='pty'>
<target port='0'/>
diff --git a/deploy/templates/virtual_environment_noha/vms/controller.xml b/deploy/templates/virtual_environment_noha/vms/controller.xml
index 0a4b6937c..50950db17 100644
--- a/deploy/templates/virtual_environment_noha/vms/controller.xml
+++ b/deploy/templates/virtual_environment_noha/vms/controller.xml
@@ -30,19 +30,19 @@
<controller type='pci' index='0' model='pci-root'/>
<interface type='network'>
<source network='fuel1'/>
- <model type='virtio'/>
+ <model type='e1000'/>
</interface>
<interface type='network'>
<source network='fuel2'/>
- <model type='virtio'/>
+ <model type='e1000'/>
</interface>
<interface type='network'>
<source network='fuel3'/>
- <model type='virtio'/>
+ <model type='e1000'/>
</interface>
<interface type='network'>
<source network='fuel4'/>
- <model type='virtio'/>
+ <model type='e1000'/>
</interface>
<serial type='pty'>
<target port='0'/>
diff --git a/deploy/templates/virtual_environment_noha/vms/fuel.xml b/deploy/templates/virtual_environment_noha/vms/fuel.xml
index a9177f311..4e7c7fd2a 100644
--- a/deploy/templates/virtual_environment_noha/vms/fuel.xml
+++ b/deploy/templates/virtual_environment_noha/vms/fuel.xml
@@ -40,7 +40,7 @@
<controller type='pci' index='0' model='pci-root'/>
<interface type='network'>
<source network='fuel1'/>
- <model type='virtio'/>
+ <model type='e1000'/>
</interface>
<serial type='pty'>
<target port='0'/>