From 0cedf1dc636d2532eb818dd88c19106199500ac7 Mon Sep 17 00:00:00 2001 From: Tim Rozet Date: Tue, 5 Sep 2017 15:23:15 -0400 Subject: Remove deploy.sh and references Deploy is now pip/rpm installed as opnfv-deploy in /bin. Alternatively the deploy.py script can be invoked via python. The legacy deploy.sh was only being used for CI, which has now been updated to remove the need for the Apex repo containing ci/deploy.sh. Change-Id: I1fb93bd9de23a97a09bedb8ac014ef81955875f2 Signed-off-by: Tim Rozet --- apex/settings/deploy_settings.py | 4 ---- apex/settings/network_settings.py | 4 ---- build/bash_completion_apex | 2 +- ci/deploy.sh | 22 ---------------------- ci/dev_dep_check.sh | 7 +++---- contrib/simple_deploy.sh | 15 ++++----------- 6 files changed, 8 insertions(+), 46 deletions(-) delete mode 100755 ci/deploy.sh diff --git a/apex/settings/deploy_settings.py b/apex/settings/deploy_settings.py index c8e347b7..793e43ac 100644 --- a/apex/settings/deploy_settings.py +++ b/apex/settings/deploy_settings.py @@ -43,10 +43,6 @@ VALID_ODL_VERSIONS = ['carbon', 'nitrogen', 'master'] class DeploySettings(dict): """ This class parses a APEX deploy settings yaml file into an object - - Currently the parsed object is dumped into a bash global definition file - for deploy.sh consumption. This object will later be used directly as - deployment script move to python. """ def __init__(self, filename): if isinstance(filename, str): diff --git a/apex/settings/network_settings.py b/apex/settings/network_settings.py index 14870078..f6566834 100644 --- a/apex/settings/network_settings.py +++ b/apex/settings/network_settings.py @@ -35,10 +35,6 @@ class NetworkSettings(dict): The resulting object will be used later to generate network environment file as well as configuring post deployment networks. - - Currently the parsed object is dumped into a bash global definition file - for deploy.sh consumption. This object will later be used directly as - deployment script move to python. """ def __init__(self, filename): init_dict = {} diff --git a/build/bash_completion_apex b/build/bash_completion_apex index b3c963e3..59c6afb6 100644 --- a/build/bash_completion_apex +++ b/build/bash_completion_apex @@ -50,7 +50,7 @@ __apex_complete () { } # run completion setup -__apex_complete ./deploy.sh __deploy_main +__apex_complete ./deploy.py __deploy_main __apex_complete opnfv-deploy __deploy_main __apex_complete ./util.sh __util_main __apex_complete opnfv-util __util_main diff --git a/ci/deploy.sh b/ci/deploy.sh deleted file mode 100755 index 0ba0c74b..00000000 --- a/ci/deploy.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash -############################################################################## -# Copyright (c) 2015 Tim Rozet (Red Hat), Dan Radez (Red Hat) and others. -# -# 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 -############################################################################## - -# Deploy script to install provisioning server for OPNFV Apex -# author: Dan Radez (dradez@redhat.com) -# author: Tim Rozet (trozet@redhat.com) -# - -set -e -yum -y install python34 python34-devel libvirt-devel python34-pip python-tox ansible -mkdir -p /home/jenkins-ci/tmp -mv -f .build /home/jenkins-ci/tmp/ -pip3 install --upgrade --force-reinstall . -mv -f /home/jenkins-ci/tmp/.build . -opnfv-deploy $@ diff --git a/ci/dev_dep_check.sh b/ci/dev_dep_check.sh index 7a14563c..33f1319f 100755 --- a/ci/dev_dep_check.sh +++ b/ci/dev_dep_check.sh @@ -32,10 +32,9 @@ if ! sudo yum update -y ipxe-roms-qemu; then fi # check for other packages -for i in epel-release python34-PyYAML openvswitch libguestfs \ - libguestfs-tools-c libvirt-python python2-oslo-config \ - python2-debtcollector python34-devel libxslt-devel \ - libxml2-devel python-virtualbmc python34-jinja2 python34-pip \ +for i in epel-release openvswitch libguestfs \ + libguestfs-tools-c libvirt-python libxslt-devel \ + libxml2-devel ansible python34-pip \ rpm-build wget libvirt ntpdate; do # Make sure deploy deps are installed if ! rpm -q $i > /dev/null; then diff --git a/contrib/simple_deploy.sh b/contrib/simple_deploy.sh index 24b67904..d6d07f38 100755 --- a/contrib/simple_deploy.sh +++ b/contrib/simple_deploy.sh @@ -1,20 +1,13 @@ #!/bin/bash set -e apex_home=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/../ -export BASE=$apex_home/build -export LIB=$apex_home/lib -export IMAGES=$apex_home/.build/ -export PYTHONPATH=$PYTHONPATH:$apex_home/lib/python +export PYTHONPATH=$apex_home/apex:$PYTHONPATH $apex_home/ci/dev_dep_check.sh || true $apex_home/ci/clean.sh -pushd $apex_home/build -make clean -make undercloud -make overcloud-opendaylight -popd -pushd $apex_home/ci +pip3 install -r $apex_home/requirements.txt +pushd $apex_home/apex echo "All further output will be piped to $PWD/nohup.out" -(nohup ./deploy.sh -v -n $apex_home/config/network/network_settings.yaml -d $apex_home/config/deploy/os-odl-nofeature-noha.yaml &) +(nohup python3 deploy.py -v -n ../config/network/network_settings.yaml -d ../config/deploy/os-nosdn-nofeature-noha.yaml --deploy-dir ../build --lib-dir ../lib --image-dir ../.build &) [ -f nohup.out ] || sleep 3 tail -f nohup.out popd -- cgit 1.2.3-korg