diff options
author | Victor Morales <victor.morales@intel.com> | 2017-07-26 16:06:35 -0500 |
---|---|---|
committer | Victor Morales <victor.morales@intel.com> | 2017-07-26 16:06:35 -0500 |
commit | dd074806ad51761392a9cca3f1f04fbbebd3de22 (patch) | |
tree | 9088768b55bf307875369e7368f56c7e66149424 /bootstrap/vagrant-onap/tools | |
parent | 8805879b4dc92014381ba55b75955b295944ded6 (diff) |
Sync latest changes for vagrant-onap
Given some internal procedures was not possible to submit all the
changes. In the meantime, those changes were placed into an
non-official project. This change syncronizes the latest changes
into the official repository.
Issue-id: INT-17
Change-Id: Ia4125f4b70273401e4ed3cc1908d2e2ad7d1c2e9
Signed-off-by: Victor Morales <victor.morales@intel.com>
Diffstat (limited to 'bootstrap/vagrant-onap/tools')
-rwxr-xr-x | bootstrap/vagrant-onap/tools/get_repos.sh | 41 | ||||
-rwxr-xr-x | bootstrap/vagrant-onap/tools/run.sh | 17 | ||||
-rwxr-xr-x | bootstrap/vagrant-onap/tools/setup_openstack.sh | 23 |
3 files changed, 81 insertions, 0 deletions
diff --git a/bootstrap/vagrant-onap/tools/get_repos.sh b/bootstrap/vagrant-onap/tools/get_repos.sh new file mode 100755 index 000000000..7e531bd95 --- /dev/null +++ b/bootstrap/vagrant-onap/tools/get_repos.sh @@ -0,0 +1,41 @@ +#!/bin/bash + +repos=( +"aai/aai-data" "aai/aai-config" "aai/aai-service" "aai/data-router" "aai/logging-service" "aai/model-loader" "aai/resources" "aai/rest-client" "aai/router-core" "aai/search-data-service" "aai/sparky-be" "aai/sparky-fe" "aai/test-config" "aai/traversal" +"appc" "appc/deployment" +"ci-management" +"dcae" "dcae/apod" "dcae/apod/analytics" "dcae/apod/buildtools" "dcae/apod/cdap" "dcae/collectors" "dcae/collectors/ves" "dcae/controller" "dcae/controller/analytics" "dcae/dcae-inventory" "dcae/demo" "dcae/demo/startup" "dcae/demo/startup/aaf" "dcae/demo/startup/controller" "dcae/demo/startup/message-router" "dcae/dmaapbc" "dcae/operation" "dcae/operation/utils" "dcae/orch-dispatcher" "dcae/pgaas" "dcae/utils" "dcae/utils/buildtools" +"demo" +"ecompsdkos" +"mso" "mso/chef-repo" "mso/docker-config" "mso/libs" "mso/mso-config" +"ncomp" "ncomp/cdap" "ncomp/core" "ncomp/docker" "ncomp/maven" "ncomp/openstack" "ncomp/sirius" "ncomp/sirius/manager" "ncomp/utils" +"policy/common" "policy/docker" "policy/drools-applications" "policy/drools-pdp" "policy/engine" +"portal" +"sdc" "sdc/sdc-distribution-client" "sdc/sdc-titan-cassandra" "sdc/sdc_common" +"sdnc/adaptors" "sdnc/core" "sdnc/northbound" "sdnc/oam" "sdnc/plugins" +"testsuite" "testsuite/heatbridge" "testsuite/properties" "testsuite/python-testing-utils" +"ui" "ui/dmaapbc" +"vid" "vid/asdcclient") + +function git_clone_or_pull { + local repo=$1 + local folder="../opt/$1" + local mvn_build=$2 + if [ ! -d $folder ]; then + git clone https://git.onap.org/$repo $folder + fi + pushd $folder > /dev/null + git pull -q + if [ -f .gitreview ]; then + git review -s + fi + #if [ -f pom.xml ] && [ -n ${mvn_build+x} ]; then + #mvn clean -q install -U -DskipTests=true -Dmaven.test.skip=true -Dadditionalparam=-Xdoclint:none + #fi + popd > /dev/null +} + +for repo in ${repos[@]}; do + echo "Working on $repo repository..." + git_clone_or_pull $repo +done diff --git a/bootstrap/vagrant-onap/tools/run.sh b/bootstrap/vagrant-onap/tools/run.sh new file mode 100755 index 000000000..e192ba171 --- /dev/null +++ b/bootstrap/vagrant-onap/tools/run.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +case $1 in + "all_in_one" ) + export DEPLOY_MODE='all-in-one' ;; + "dns" | "mr" | "sdc" | "aai" | "mso" | "robot" | "vid" | "sdnc" | "portal" | "dcae" | "policy" | "appc" ) + export DEPLOY_MODE='individual' ;; + "testing" ) + export DEPLOY_MODE='testing' + export TEST_SUITE=${2:-*} + export TEST_CASE=${3:-*} + + rm -rf ../opt/ + rm -rf ~/.m2/;; +esac +vagrant destroy -f $1 +vagrant up $1 diff --git a/bootstrap/vagrant-onap/tools/setup_openstack.sh b/bootstrap/vagrant-onap/tools/setup_openstack.sh new file mode 100755 index 000000000..765ad9446 --- /dev/null +++ b/bootstrap/vagrant-onap/tools/setup_openstack.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +ubuntu_name=${OS_IMAGE:-"trusty-server-cloudimg-amd64-disk1"} +export OS_IMAGE=$ubuntu_name +ubuntu_glance=`openstack image list -c Name -f value | grep "$ubuntu_name"` +ubuntu_file=/tmp/ubuntu.img + +sec_group_name=${OS_SEC_GROUP:-"onap-ssh-secgroup"} +export OS_SEC_GROUP=$sec_group_name +sec_group_list=`openstack security group list -c Name -f value | grep "$sec_group_name"` + +if [[ -z $ubuntu_glance ]]; then + if [ ! -f $ubuntu_file ]; then + curl http://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-amd64-disk1.img -o "$ubuntu_file" + fi + + openstack image create --disk-format raw --container-format bare --public --file $ubuntu_file "$ubuntu_name" +fi + +if [[ -z $sec_group_list ]]; then + openstack security group create "$sec_group_name" + openstack security group rule create --protocol tcp --remote-ip 0.0.0.0/0 --dst-port 22:22 "$sec_group_name" +fi |