summaryrefslogtreecommitdiffstats
path: root/deploy
AgeCommit message (Collapse)AuthorFilesLines
2016-08-02Merge "Add functionality to generate a base DEA file"Michal Skalski2-5/+55
2016-08-02Merge "Make it possible to include files in templates"Michal Skalski2-0/+110
2016-08-02Merge "Refactor deploy-config.py"Michal Skalski1-96/+147
2016-08-02Add functionality to generate a base DEA filePeter Barabas2-5/+55
- Add template file for base DEA Change-Id: I8055087b992fdc9850852bad9fa07a4e4fde0085 Signed-off-by: Peter Barabas <peter.barabas@ericsson.com>
2016-08-01Make it possible to include files in templatesPeter Barabas2-0/+110
Change-Id: I45c42ac65cfbe6562f0035df3375a2231148e22e Signed-off-by: Peter Barabas <peter.barabas@ericsson.com>
2016-08-01Refactor deploy-config.pyPeter Barabas1-96/+147
- fix vertical whitespace - more consistent function naming - clean up file writes - break up some long lines - typo fixes - remove duplicate spaces - unify print's Change-Id: I5517747ef9f2e39ade7fb553ae2b1547fdf7b9e1 Signed-off-by: Peter Barabas <peter.barabas@ericsson.com>
2016-07-27Fix configuration for kvm scenarioMichal Skalski2-4/+38
JIRA: FUEL-157 Change-Id: I5baafd4395a2d298a24cccda042d5b43824ae7a0 Signed-off-by: Michal Skalski <mskalski@mirantis.com>
2016-07-26Merge "Fix default value for plugin metadata"Michal Skalski1-5/+2
2016-07-26Merge "Add ability to override node attributes"Michal Skalski1-2/+52
2016-07-22Add templating support for generating config filesPeter Barabas2-0/+446
- Remove unneeded method - Write result to a file and not STDOUT - Add documentation - Remove trailing whitespace - Documentation corrections Change-Id: I7532222d3512380c4f1129bd05dc2ba37b409dc2 Signed-off-by: Peter Barabas <peter.barabas@ericsson.com>
2016-07-22Add ability to override node attributesFedor Zhadaev1-2/+52
Fixes https://jira.opnfv.org/browse/FUEL-152 Change-Id: I444bf3aef54ffd53c53431e2795b11b10545f55f Signed-off-by: Fedor Zhadaev <fzhadaev@mirantis.com>
2016-07-20Fix default value for plugin metadataFedor Zhadaev1-5/+2
Fix typo which result in error while getting default metadata in case if it's not overridden in scenario. Fixes https://jira.opnfv.org/browse/FUEL-151 Change-Id: Ibf40f846919155e27da5dc1f778f72afee79ff12 Signed-off-by: Fedor Zhadaev <fzhadaev@mirantis.com>
2016-07-12Aligning machine type over Ubuntu and CentosStefan K. Berg12-12/+12
We have previously used "pc-1.0" as the qemu-kvm machine definition for virtual Fuel deploys. On Ubuntu this points to: pc-1.0 Standard PC (i440FX + PIIX, 1996) On CentOS 7 this machine definition does not exist, but there's a match in "pc": pc RHEL 7.0.0 PC (i440FX + PIIX, 1996) (alias of pc-i440fx-rhel7.0.0 So, finally, pc is also in Ubuntu: pc Ubuntu 14.04 PC (i440FX + PIIX, 1996) (alias of pc-i440fx-trusty) This change is about exploring whether moving to "pc" will make the auto deploy work on both platforms with the "pc" machine type. What still needs to be done in CentOS is to create a symlink from /usr/libexec/qemu-kvm and /usr/bin/kvm though. Change-Id: I1cce52a21075950cb59b75709b12d724d759e3e6 Signed-off-by: Stefan K. Berg <stefan.k.berg@ericsson.com>
2016-07-08Merge "deploy: ISO rebuild: use -joliet-long names."Michal Skalski1-0/+1
2016-07-08Merge changes from topic 'multiple-nics-for-fuel-vm'Michal Skalski2-11/+21
* changes: deploy: add support for multiple bridges virtual_fuel: prepare class to allow multiple bridges
2016-07-08deploy: ISO rebuild: use -joliet-long names.Alexandru Avadanii1-0/+1
Armband adds similar files, which tend to have long names and only differ in suffixes (e.g. DEBs for amd64 vs arm64). Previous change [1] fixed ISO build errors, but failed to address the deploy.py ISO rebuild (which modifies and recreates the ISO, calling mkisofs, which complains about clashing file indexes). This works around ISO rebuild error(s) like: "genisoimage: Error: ./ubuntu/pool/main/g/golang-gogoprotobuf/golang-gogoprotobuf\ -dev_0.0~git20150828.0.6cab0cc-1~u14.04+mos1_arm64.deb and ./ubuntu/pool/main/g/golang-gogoprotobuf/golang-gogoprotobuf\ -dev_0.0~git20150828.0.6cab0cc-1~u14.04+mos1_amd64.deb have the same Joliet name" [1] https://gerrit.opnfv.org/gerrit/#/c/14973/ Change-Id: If58a18ba46343a52ce6e9a0a6a0482c1a3079451 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
2016-07-04Plugin version is requiredMichal Skalski5-9/+19
Plugin version is required when plugin configuration is overwritten. Change-Id: I93af002ed5e994c90b9134f8c020a3822e81e42c Signed-off-by: Michal Skalski <mskalski@mirantis.com>
2016-07-04Modify the indent in fuel-odl_0.9.0.yaml.wu.zhihui1-142/+142
Change-Id: I15bb84c35c075037df23746b75b108e2d7b90ede Signed-off-by: wu.zhihui <wu.zhihui1@zte.com.cn>
2016-07-01[BGPVPN] Uplift plugin to MitakaNikolas Hermanns3-15/+37
Change-Id: I9db366806ec97b44b0e537ee2d4beb3c8a968b92 Signed-off-by: Nikolas Hermanns <nikolas.hermanns@ericsson.com>
2016-07-01Fix module versions for scenariosMichal Skalski6-7/+7
Change-Id: Ia5a5d008af717f9b2d0e7495bd2180cdad4075e8 Signed-off-by: Michal Skalski <mskalski@mirantis.com>
2016-06-30Use ODL Boron for SFCMichal Skalski5-578/+40
SFC scenario requires OpenDaylight Boron. ODL plugin will be built with both Beryllium and Boron. It will be possible to choose deployment with Boron instead of default Beryllium. Change-Id: I1abd22ddca16e710430accd40ad8359be1bd7132 Signed-off-by: Michal Skalski <mskalski@mirantis.com>
2016-06-30Uplift fuel and nshovs plugins configsNikolas Hermanns2-0/+194
Change-Id: I86cdef9d3e3337d1b16b9154c940f73b0a3d8567 Signed-off-by: Nikolas Hermanns <nikolas.hermanns@ericsson.com>
2016-06-26Add timeout for SCP operationsPeter Barabas1-2/+7
The default timeout for SCP is 5 seconds, which is not enough in some cases. Change-Id: If44669a96ea4b5ce33441eeea36b8cf66a1cdc4a Signed-off-by: Peter Barabas <peter.barabas@ericsson.com>
2016-06-20Override parameter attempts in Class Zte_Adapter.wu.zhihui1-2/+2
Give more attempts for zte hardware. Change-Id: I0906b6fe9e046ddd6436e5246494b89c812a40a2 Signed-off-by: wu.zhihui <wu.zhihui1@zte.com.cn>
2016-06-17add onos nofeature scenarion mapwuwb19893-0/+223
Change-Id: I5c7d9b712c66860bfbe923396e12641c17d439b5 Signed-off-by: wuwb1989 <wuwenbin2@huawei.com>
2016-06-17deploy: add support for multiple bridgesJosep Puigdemont2-4/+9
deploy.py: Some Fuel VMs may need more than one network interface. To be able to provide that, we now allow the user to specify the "-b" paramter (bridge) multiple times, creating a new NIC for each one of them. The NICs are created in the same order as they are given in the command line. There is no change in behavior from earlier versions, pxebr will still be the default bridge if none is specified in the command line. deploy.sh: To reflect the new capabilities of deploy.py, we introduce the possibility to specify -B more than once in deploy.sh, and honor that when calling deploy.py. We also make it possible to specify a comma separated list of bridges, as in: -B br1,br2. Change-Id: I1a0100f2cfe755ec6adfeedafb391c2357f46f51 Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com>
2016-06-17virtual_fuel: prepare class to allow multiple bridgesJosep Puigdemont1-8/+13
The VirtualFuel class has now two new methods: del_vm_nics: Deletes all interfaces from the VM. add_vm_nic: Adds a NIC to the VM, attached to the specified bridge. The following method has been deleted: set_vm_nic: implemented with the two new methods Apart from the deleted method, no functionality has been changed. This is just a small but necessary step towards adding support for configuring more than one NIC in the fuel VM. Change-Id: I9f02c8163dfb9768510e78d5d5e77a0bb43306fb Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com>
2016-06-17vitual_fuel: set_vm_nic() takes no parametersJosep Puigdemont1-1/+1
Fixes: https://jira.opnfv.org/browse/FUEL-148 Change-Id: Id5a1d710abf425e75b6ff9eaa7b372285e200702 Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com>
2016-06-16virtual_fuel: add XML tree as attribute of VirtualFuelJosep Puigdemont1-7/+14
With this patch, the VM XML definition tree is an attribute of the object, this way it can be used by all methods without having to re-read the file. Methods added: update_vm_template_file: Flushes the contents of the in-memory XML representation of the VM to the backing file. Change-Id: I18d3f606b0c02cd589cb0f657599e8b03b0e817e Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com>
2016-06-16Merge "ipmi_adapter: add delay to stabilize command action"Jonas Bjurel1-0/+1
2016-06-16ipmi_adapter: add delay to stabilize command actionJosep Puigdemont1-0/+1
We should allow the nodes some time to stabilize after sending a command to them. Currently we are checking the status too fast. Change-Id: I26a60d2bb6a43edbec842b727f825057e2778981 Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com>
2016-06-16Merge "Mask ipmitool credentials"Jonas Bjurel1-3/+4
2016-06-16Merge "Mask impitool credentials"Jonas Bjurel1-7/+15
2016-06-16Merge "Add command line argument masking for exec_cmd"Jonas Bjurel1-4/+19
2016-06-16Merge "Remove unused function: usage()"Jonas Bjurel1-7/+0
2016-06-16Mask impitool credentialsPeter Barabas1-7/+15
Change-Id: I0103082672259eaf4b1c2be8ca3a1236fc6137eb Signed-off-by: Peter Barabas <peter.barabas@ericsson.com>
2016-06-16Mask ipmitool credentialsPeter Barabas1-3/+4
Change-Id: I328432e6b30437e8a83065859cd80358d4c3c468 Signed-off-by: Peter Barabas <peter.barabas@ericsson.com>
2016-06-16Add command line argument masking for exec_cmdPeter Barabas1-4/+19
exec_cmd() now takes 2 additional optional arguments: mask_args and mask_str. The former expects an array of positions to mask, the latter expects a string to be used as mask. Change-Id: I445141a68929a0d2837e7692ce8b4d071154cfa7 Signed-off-by: Peter Barabas <peter.barabas@ericsson.com>
2016-06-16Merge "Introducing collection of all fuel and stack deployment logs."Jonas Bjurel6-31/+87
2016-06-16Introducing collection of all fuel and stack deployment logs.Jonas Bjurel6-31/+87
The purpose of this patch is to collect all available Fuel snapshots- and stack/node ldeployment logs for later off-line troubleshooting. The intention is that Jenkins, or other deployment robots will be able to collect all logs from the deployment and store it at some repository where developers can fetch it and perform off-line post deployment trouble-shooting. Following script arguments have been added: CI Arg changes: Added an argument to ci/deploy.sh: -L [Deploy log path and file name], E.g. -L ~/jenkins/deploy/deploy-888.log.tar.gz This will create an tar gzip archive at the path and filename pointed out. If -L is not specified, the log archive will be placed under the CI directory with the following name convention: deploy-YYMMDD-HHMMSS.log.tar.gz Fuel Internal deploy changes: Added an argument to ci/deploy.py -log [Deploy log path and file name], E.g. -log ~/jenkins/deploy/deploy-888.log.tar.gz This will create an tar gzip archive at the path and filename pointed out. If -log is not specified, the log archive will be placed under the CI directory with the following name convention: deploy-YYMMDD-HHMMSS.log.tar.gz READY TO MERGE! VERIFIED! Change-Id: Icb75d9d2e66bdd47f75dcca29071943444d5c823 Signed-off-by: Jonas Bjurel <jonas.bjurel@ericsson.com>
2016-06-16Remove unused function: usage()Peter Barabas1-7/+0
Change-Id: I648821262a7bfd77e59f4411380020c49306ff5e Signed-off-by: Peter Barabas <peter.barabas@ericsson.com>
2016-06-16Add missing package dependency: libyaml-devPeter Barabas1-1/+1
Change-Id: I058f6bc54e1c6b0a0c20eeaa2ea09f2f9a2e80ce Signed-off-by: Peter Barabas <peter.barabas@ericsson.com>
2016-06-15virtual_fuel: initial support for remote libvirtJosep Puigdemont4-5/+95
With this patch it should be possible to create a fuel VM on a remote libvirt server by properly defining the LIBVIRT_DEFAULT_URI [1] environment variable. If the variable is not defined, then there should be no percievable change in behaviour for the script. This patch introduces the ability to create volumes (images) on a remote libvirt host where the Fuel VM is to be deployed. For now the volumes are created by default in a pool named jenkins, but the idea is to allow this to be configured, probably in the POD's DHA file. Since all virsh commands honor LIBVIRT_DEFAULT_URI, we use this environment variable to detect wheter we should create a volume or not. The rationale being that the variable will only be set if the user wants to to do the VM deployment on a remote libvirt host. We need to create a volume because we can not rely on being able to access the remote server's file system directly. The images are then transferred to the libvirt host using virsh commands. All this could also be done using scp and a user directory on the host machine, but using pools allows us to take advantage of libvirt's policies and file permissions. CHANGE: when LIBVIRT_DEFAULT_URI is defined, the script will not check for the presence of the required PXE bridge. This will still be checked when the Fuel VM is started and the bridge not found, but this happens at a later point than it does today. CHANGE: before this patch, the file system image was named like the VM: vm_name.raw. This patch introduces a change and adds a timestamp suffix to the image: vm_name-timestamp.raw. This is so to avoid collisions with an image with the same name on the remote pool (two PODs may be using the same pool). It may also be useful to keep around old file system images. FIXME: This patch requires a pool named "jenkins" in the remote libvirt server, and it will fail if it is not present. This should be configurable. Notice though that we can still define LIBVIRT_DEFAULT_URI as "qemu:///system" to create the Fuel VM on the local host. [1] https://libvirt.org/remote.html#Remote_URI_reference Change-Id: I40925ed31337d3ad9cf505f284f5c3d14e9129a0 Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com>
2016-06-15virtual_fuel: make vm_template an attributeJosep Puigdemont1-6/+5
Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com>
2016-06-15virtual_fuel: factor out image creation into a methodJosep Puigdemont1-1/+6
Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com>
2016-06-15VirtualFuel: Add temp_dir and vm_name attributesJosep Puigdemont1-6/+9
These two variables are defined in one of the methods right now. They will be useful to other methods too, so we add them as attributes to the object here. Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com>
2016-06-15ipmi_adapter: simplify, retry if command failsJosep Puigdemont1-59/+42
The method get_node_state has been added to the the IpmiAdapter class. In addition, now the power on/off methods will try several times to perform their IPMI command before giving up, instead of bailing out at the first error. After the power on/off command is completed, the method will wait until the node is in the desired state. NOTE: a command could potentially take several minutes if the defaults are used; each IPMI command can take up to 1 minute, and there can be 3 commands issued per operation, one of them may be retried 20 times with the current defaults. Ideally we would use eventlet or something similar to allow each command a limited time to execute, instead: with eventlet.timeout.Timeout(seconds) as t: power_on/off_command Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com>
2016-06-15common.py: allow specifying number of attempts in exec_cmdJosep Puigdemont1-7/+17
Some commands executed by exec_cmd may fail because of a temporary cause, and it may be desirable to retry the same command several times until it succeeds. One example of this are the ipmitool commands, which may fail temorarily on some targets if they get too many requests simultaneously. In this patch three new optional parameters are introduced to the function signature, which do not break backward compatibility: attempts: which indicates how many times the command should be run if it returns a non-zero value*, and defaults to 1 (as today). delay: which indicates the delay in seconds between attempts, and defaults to 5 seconds. verbose: It will print the remaining attempts left for the current command if set to True. * It may be desirable to add yet another parameter to indicate what return value should be considered an error, but non-zero for now seems a reasonable default. Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com>
2016-06-15deploy: ipmi adapter: Add <port> config support.Alexandru Avadanii3-3/+8
Sometimes the IPMI lanplus protocol listens on a non-standard remote port, e.g. when target nodes are interfaced through a fake IPMI BMC application that listens on multiple ports on the same IP address. Therefore, allow setting IPMI port in the DHA using a new property named `ipmiPort`, and pass it along to `ipmitool` when set. CHANGE: get_access_info now also supports specifying the IPMI port to use with `ipmitool` by configuring the `ipmiPort` property in the DHA. hp_adapter.py: updated `get_access_info` return signature with the new (unused there) `ipmiport`. Change-Id: I620176bd7f466aa460518cf12d15ccbe86a22560 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
2016-06-15build and deploy onos plugin for fuel9wuwb19894-12/+50
Change-Id: I04dd8b4bdddc5678b158d7287c6ffc52d1bce135 Signed-off-by: wuwb1989 <wuwenbin2@huawei.com>