summaryrefslogtreecommitdiffstats
path: root/deploy/deploy.py
AgeCommit message (Collapse)AuthorFilesLines
2016-11-24Remove unused importsPeter Barabas1-1/+0
Change-Id: Icb51f3fdec962c6f92e27e63b57bc30e8e6c75bb Signed-off-by: Peter Barabas <peter.barabas@ericsson.com>
2016-08-24deploy: Delete old Fuel env if presentAlexandru Avadanii1-0/+15
In order to clean up old partitioning and boot entries on target nodes, before removing the Fuel Master, try ssh-ing into it and removing all environments/nodes. This is especially important for EFI systems, where old boot entries are left behind without a proper env delete, leading to target nodes failing to PXE boot on Fuel Master re-install. This change assumes that: - all Fuel Master information is unchanged between old and new deploy (fuel IP, password etc.); - Fuel Master is up and running, in a sane state (target nodes are also online), when deploy starts; Closes: ARMBAND-51 Change-Id: I7b61124ea9182ce2d599adcdedef03e0d8d67ed6 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
2016-07-08Merge "deploy: ISO rebuild: use -joliet-long names."Michal Skalski1-0/+1
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-06-17deploy: add support for multiple bridgesJosep Puigdemont1-3/+7
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-16Introducing collection of all fuel and stack deployment logs.Jonas Bjurel1-3/+12
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-15virtual_fuel: initial support for remote libvirtJosep Puigdemont1-0/+5
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-01Auto deploy corrections for Fuel 9.0Stefan K. Berg1-0/+0
- The auto deployer's detection of nodes being up corrected as "fuel node" now returns "1" instead of "True" to denote that the node is up. - The location of bootstrap_admin_node.sh has changed so the detection of whether the Fuel node installation needed a correction for the deployer not to throw an exit code and terminate prematurely. - Small fix: deploy.py is now executable (just a chmod change). Change-Id: I8fed7bafe6912f8b4278619bbdaa16577a82737b Signed-off-by: Stefan K. Berg <stefan.k.berg@ericsson.com>
2016-06-01Clean up after ourselvesPeter Barabas1-0/+2
Change-Id: Id7579ef618b8cd922de325d9dc1c0b7a6c5587a7 Signed-off-by: Peter Barabas <peter.barabas@ericsson.com>
2016-05-30Build system uplift to Fuel 9.0/MitakaStefan K. Berg1-0/+0
Switching to Fuel 9.0/Mitaka for the build system. Overhaul of the patching mechanism. As bootstrap_admin_node.sh has been transitioned into an RPM (fuel-support), the lazy designer found it more simple to patch that script during the Fuel build phase than at the OPNFV ISO generation. The patch mechanism has been changed to a normal context diff instead of the orig/modified file tuples previously used. Hopefully this will require fewer manual rebases (may the fuzz be with us!). Also the ks.cfg patching has transitioned to a context based ordinary patch for the same reasons, but this is as before taking place during OPNFV ISO generation. Patch naming made more descriptive. The reaping mechanism has been slightly modified due to a change in the naming of the node files when these are generated by the Fuel CLI. IMPORTANT 1: The package cache mechanism is currently disabled, it is only possible to install Fuel with a direct internet connection. This will be fixed in a later change set! IMPORTANT 2: All plugins has been disabled! As you have re-certified your plugin with Fuel 9.0, please re-enable it in build/Makefile! Change-Id: Ia918d16a74b68f89d178e06befe6e8a7a9367bf9 Signed-off-by: Stefan K. Berg <stefan.k.berg@ericsson.com>
2016-04-28Fix handling of relative ISO path on the CLIPeter Barabas1-3/+4
Change-Id: I32878726432c3d883f0b33bdd2c836b0770e734f Signed-off-by: Peter Barabas <peter.barabas@ericsson.com>
2016-03-11Add no_deploy_environment optionNikolas Hermanns1-3/+10
For development reason it is useable to have an option so that everything is done except the deploy of the openstack environment. Change-Id: I1f1b7f9c89ee8c9ceea96353e25a51eee53b955c
2016-03-07Fix deploy.py return codePeter Barabas1-2/+4
Fixes https://jira.opnfv.org/browse/FUEL-100 Change-Id: Ic2e01372778720cde84d83738d8b2c85b005124a Signed-off-by: Peter Barabas <peter.barabas@ericsson.com>
2016-02-24Add timeout option for deploymentPeter Barabas1-3/+8
Change-Id: I6f3f35680c9f90f99148865edf8ba905ecbb6c30 Signed-off-by: Peter Barabas <peter.barabas@ericsson.com>
2016-02-04Merge "Remove patching 'netmask' from isolinux.cfg"Jonas Bjurel1-22/+3
2016-02-04Remove patching 'netmask' from isolinux.cfgPeter Barabas1-22/+3
Change-Id: I7ba0c677b8a77b1239fcec4d0771af2b2cdddc01 Signed-off-by: Peter Barabas <peter.barabas@ericsson.com>
2016-02-03Properly clean up after SIGTERM (kill) and Ctrl-cPeter Barabas1-1/+28
Change-Id: Ibcd9bdda9aaebfd96d32a3efbc7a53f5428b5c91 Signed-off-by: Peter Barabas <peter.barabas@ericsson.com>
2016-01-26Fix boot parameters for Fuel 8Peter Barabas1-0/+14
Change-Id: I21a70728810571482ca2cc2264733dbca89058d6
2016-01-25Uplift deployment code for Fuel 8.0Peter Barabas1-2/+30
Change-Id: If784cbd7371133bd35e95004a11e9802660ac332 Signed-off-by: Peter Barabas <peter.barabas@ericsson.com>
2015-12-08Reaping improvements for Fuel 7Stefan K. Berg1-0/+1
In order to download the deployment information, the node id must be explicitly specified. The fuel setting commmand returns "ha_compact" as the mode for a cluster, but Fuel does itself not understand this when changing the settings - it needs to be named "ha". Added shebang for reap.py and deploy.py. Upped the default image sizes for the DHA template to match Fuel 7. Change-Id: I3ecacb83dc44454b90dedc98104658a16926dc1f Signed-off-by: Stefan K. Berg <stefan.k.berg@ericsson.com>
2015-11-27Restructcture of the directory layoutJonas Bjurel1-0/+321
Restructure of the directory layout due to move of Fuel into it's own repo JIRA: FUEL-85 Change-Id: I3647e1992a508f29dce06a5d6c790725c527f6f5 Signed-off-by: Jonas Bjurel <jonas.bjurel@ericsson.com>