aboutsummaryrefslogtreecommitdiffstats
path: root/deploy
diff options
context:
space:
mode:
Diffstat (limited to 'deploy')
-rw-r--r--deploy/README8
-rw-r--r--deploy/config/dea_base.yaml13
-rw-r--r--deploy/config/labs/devel-pipeline/default/fuel/config/dea-pod-override.yaml9
-rw-r--r--deploy/config/labs/devel-pipeline/elx/fuel/config/dea-pod-override.yaml10
-rw-r--r--deploy/config/labs/devel-pipeline/huawei-ch/fuel/config/dea-pod-override.yaml9
-rw-r--r--deploy/config/plugins/fuel-bgpvpn_0.0.1.yaml9
-rw-r--r--deploy/config/plugins/fuel-nfvkvm_0.0.1.yaml9
-rw-r--r--deploy/config/plugins/fuel-nfvovs_0.0.1.yaml9
-rw-r--r--deploy/config/plugins/fuel-odl_0.0.1.yaml9
-rw-r--r--deploy/config/plugins/fuel-odl_0.0.2.yaml9
-rw-r--r--deploy/config/plugins/fuel-onos_0.0.1.yaml9
-rw-r--r--deploy/config/plugins/fuel-onos_0.0.2.yaml9
-rwxr-xr-xdeploy/deploy.py29
-rw-r--r--deploy/scenario/ha_odl-l2_bgpvpn_scenario_0.0.1.yaml2
-rw-r--r--deploy/scenario/no-ha_odl-l2_bgpvpn_scenario_0.0.1.yaml2
15 files changed, 140 insertions, 5 deletions
diff --git a/deploy/README b/deploy/README
index 7a3e09dc9..5067e7045 100644
--- a/deploy/README
+++ b/deploy/README
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# peter.barabas@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
======== PREREQUISITES ========
diff --git a/deploy/config/dea_base.yaml b/deploy/config/dea_base.yaml
index 7c56e4bae..d040b782f 100644
--- a/deploy/config/dea_base.yaml
+++ b/deploy/config/dea_base.yaml
@@ -1,8 +1,17 @@
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# jonas.bjurel@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
dea-base-config-metadata:
title: 'Deployment Environment Adapter Base configuration'
# DEA API version supported
- version: '0.2'
- created: 'Mon Jan 26 2016'
+ version: '0.3'
+ created: 'Tue Feb 2 2016'
comment: 'Rebased for Fuel 8'
environment:
net_segment_type: tun
diff --git a/deploy/config/labs/devel-pipeline/default/fuel/config/dea-pod-override.yaml b/deploy/config/labs/devel-pipeline/default/fuel/config/dea-pod-override.yaml
index eca91dfd8..60e0622b5 100644
--- a/deploy/config/labs/devel-pipeline/default/fuel/config/dea-pod-override.yaml
+++ b/deploy/config/labs/devel-pipeline/default/fuel/config/dea-pod-override.yaml
@@ -1,3 +1,12 @@
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# jonas.bjurel@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
dea-pod-override-config-metadata:
title: 'Deployment Environment Adapter POD override for Development Pipeline - Default version'
version: '0.3'
diff --git a/deploy/config/labs/devel-pipeline/elx/fuel/config/dea-pod-override.yaml b/deploy/config/labs/devel-pipeline/elx/fuel/config/dea-pod-override.yaml
index fdbe202d3..8ede3d683 100644
--- a/deploy/config/labs/devel-pipeline/elx/fuel/config/dea-pod-override.yaml
+++ b/deploy/config/labs/devel-pipeline/elx/fuel/config/dea-pod-override.yaml
@@ -1,3 +1,13 @@
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# stefan.k.berg@ericsson.com
+# jonas.bjurel@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
dea-pod-override-config-metadata:
title: 'Deployment Environment Adapter POD override for Development Pipeline - Ericsson ELX version'
version: '0.2'
diff --git a/deploy/config/labs/devel-pipeline/huawei-ch/fuel/config/dea-pod-override.yaml b/deploy/config/labs/devel-pipeline/huawei-ch/fuel/config/dea-pod-override.yaml
index a76dce65f..5a109948e 100644
--- a/deploy/config/labs/devel-pipeline/huawei-ch/fuel/config/dea-pod-override.yaml
+++ b/deploy/config/labs/devel-pipeline/huawei-ch/fuel/config/dea-pod-override.yaml
@@ -1,3 +1,12 @@
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# jonas.bjurel@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
dea-pod-override-config-metadata:
title: 'Deployment Environment Adapter POD override for Development Pipeline - Huawei-China version'
version: '0.2'
diff --git a/deploy/config/plugins/fuel-bgpvpn_0.0.1.yaml b/deploy/config/plugins/fuel-bgpvpn_0.0.1.yaml
index 05d351e11..94f17c126 100644
--- a/deploy/config/plugins/fuel-bgpvpn_0.0.1.yaml
+++ b/deploy/config/plugins/fuel-bgpvpn_0.0.1.yaml
@@ -1,3 +1,12 @@
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# jonas.bjurel@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
plugin-config-metadata:
title: BGPVPN fuel Plugin configuration template
version: 0.1
diff --git a/deploy/config/plugins/fuel-nfvkvm_0.0.1.yaml b/deploy/config/plugins/fuel-nfvkvm_0.0.1.yaml
index df59e551d..170424edb 100644
--- a/deploy/config/plugins/fuel-nfvkvm_0.0.1.yaml
+++ b/deploy/config/plugins/fuel-nfvkvm_0.0.1.yaml
@@ -1,3 +1,12 @@
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# jonas.bjurel@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
plugin-config-metadata:
title: NFV QEMU-KVM fuel Plugin configuration template
version: 0.1
diff --git a/deploy/config/plugins/fuel-nfvovs_0.0.1.yaml b/deploy/config/plugins/fuel-nfvovs_0.0.1.yaml
index 02b6bf856..fdaba2a21 100644
--- a/deploy/config/plugins/fuel-nfvovs_0.0.1.yaml
+++ b/deploy/config/plugins/fuel-nfvovs_0.0.1.yaml
@@ -1,3 +1,12 @@
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# jonas.bjurel@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
plugin-config-metadata:
title: NFV OVS fuel Plugin configuration template
version: 0.1
diff --git a/deploy/config/plugins/fuel-odl_0.0.1.yaml b/deploy/config/plugins/fuel-odl_0.0.1.yaml
index e1f743fbc..53c510557 100644
--- a/deploy/config/plugins/fuel-odl_0.0.1.yaml
+++ b/deploy/config/plugins/fuel-odl_0.0.1.yaml
@@ -1,3 +1,12 @@
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# jonas.bjurel@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
plugin-config-metadata:
title: OpenDaylight fuel Plugin configuration template
version: 0.1
diff --git a/deploy/config/plugins/fuel-odl_0.0.2.yaml b/deploy/config/plugins/fuel-odl_0.0.2.yaml
index a53e863c5..bd2ef5bb2 100644
--- a/deploy/config/plugins/fuel-odl_0.0.2.yaml
+++ b/deploy/config/plugins/fuel-odl_0.0.2.yaml
@@ -1,3 +1,12 @@
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# jonas.bjurel@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
plugin-config-metadata:
title: OpenDaylight fuel Plugin configuration template
version: 0.2
diff --git a/deploy/config/plugins/fuel-onos_0.0.1.yaml b/deploy/config/plugins/fuel-onos_0.0.1.yaml
index 48dfd2fe3..54ecdc0dc 100644
--- a/deploy/config/plugins/fuel-onos_0.0.1.yaml
+++ b/deploy/config/plugins/fuel-onos_0.0.1.yaml
@@ -1,3 +1,12 @@
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# jonas.bjurel@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
plugin-config-metadata:
title: ONOS fuel Plugin configuration template
version: 0.1
diff --git a/deploy/config/plugins/fuel-onos_0.0.2.yaml b/deploy/config/plugins/fuel-onos_0.0.2.yaml
index 66d26a129..1d0b54d04 100644
--- a/deploy/config/plugins/fuel-onos_0.0.2.yaml
+++ b/deploy/config/plugins/fuel-onos_0.0.2.yaml
@@ -1,3 +1,12 @@
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# jonas.bjurel@ericsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
plugin-config-metadata:
title: ONOS fuel Plugin configuration template
version: 0.2
diff --git a/deploy/deploy.py b/deploy/deploy.py
index 96cf14f26..bf0b39d42 100755
--- a/deploy/deploy.py
+++ b/deploy/deploy.py
@@ -13,8 +13,10 @@ import os
import io
import re
import sys
-import netaddr
import yaml
+import errno
+import signal
+import netaddr
from dea import DeploymentEnvironmentAdapter
from dha import DeploymentHardwareAdapter
@@ -38,6 +40,7 @@ FUEL_VM = 'fuel'
PATCH_DIR = 'fuel_patch'
WORK_DIR = '~/deploy'
CWD = os.getcwd()
+MOUNT_STATE_VAR = 'AUTODEPLOY_ISO_MOUNTED'
class cd:
@@ -118,6 +121,7 @@ class AutoDeploy(object):
self.patch(tmp_new_dir, new_iso)
except Exception as e:
exec_cmd('fusermount -u %s' % tmp_orig_dir, False)
+ os.environ.pop(MOUNT_STATE_VAR, None)
delete(self.tmp_dir)
err(e)
@@ -126,9 +130,11 @@ class AutoDeploy(object):
os.makedirs(tmp_orig_dir)
os.makedirs(tmp_new_dir)
exec_cmd('fuseiso %s %s' % (self.iso_file, tmp_orig_dir))
+ os.environ[MOUNT_STATE_VAR] = tmp_orig_dir
with cd(tmp_orig_dir):
exec_cmd('find . | cpio -pd %s' % tmp_new_dir)
exec_cmd('fusermount -u %s' % tmp_orig_dir)
+ os.environ.pop(MOUNT_STATE_VAR, None)
delete(tmp_orig_dir)
exec_cmd('chmod -R 755 %s' % tmp_new_dir)
@@ -336,7 +342,28 @@ def parse_arguments():
return kwargs
+def handle_signals(signal_num, frame):
+ signal.signal(signal.SIGINT, signal.SIG_IGN)
+ signal.signal(signal.SIGTERM, signal.SIG_IGN)
+
+ log('Caught signal %s, cleaning up and exiting.' % signal_num)
+
+ mount_point = os.environ.get(MOUNT_STATE_VAR)
+ if mount_point:
+ log('Unmounting ISO from "%s"' % mount_point)
+ # Prevent 'Device or resource busy' errors when unmounting
+ os.chdir('/')
+ exec_cmd('fusermount -u %s' % mount_point, True)
+ # Be nice and remove our environment variable, even though the OS would
+ # would clean it up anyway
+ os.environ.pop(MOUNT_STATE_VAR)
+
+ sys.exit(1)
+
+
def main():
+ signal.signal(signal.SIGINT, handle_signals)
+ signal.signal(signal.SIGTERM, handle_signals)
kwargs = parse_arguments()
d = AutoDeploy(**kwargs)
sys.exit(d.run())
diff --git a/deploy/scenario/ha_odl-l2_bgpvpn_scenario_0.0.1.yaml b/deploy/scenario/ha_odl-l2_bgpvpn_scenario_0.0.1.yaml
index a5f3fc5e2..3890286e4 100644
--- a/deploy/scenario/ha_odl-l2_bgpvpn_scenario_0.0.1.yaml
+++ b/deploy/scenario/ha_odl-l2_bgpvpn_scenario_0.0.1.yaml
@@ -58,7 +58,7 @@ dea-override-config:
environment:
mode: ha
net_segment_type: tun
- wanted_release: Kilo on Ubuntu 14.04
+ wanted_release: Liberty on Ubuntu 14.04
nodes:
- id: 1
interfaces: interfaces_1
diff --git a/deploy/scenario/no-ha_odl-l2_bgpvpn_scenario_0.0.1.yaml b/deploy/scenario/no-ha_odl-l2_bgpvpn_scenario_0.0.1.yaml
index 780d9746a..0eecc0bce 100644
--- a/deploy/scenario/no-ha_odl-l2_bgpvpn_scenario_0.0.1.yaml
+++ b/deploy/scenario/no-ha_odl-l2_bgpvpn_scenario_0.0.1.yaml
@@ -58,7 +58,7 @@ dea-override-config:
environment:
mode: ha
net_segment_type: tun
- wanted_release: Kilo on Ubuntu 14.04
+ wanted_release: Liberty on Ubuntu 14.04
nodes:
- id: 1
interfaces: interfaces_1