summaryrefslogtreecommitdiffstats
path: root/bootstrap/vagrant-onap
diff options
context:
space:
mode:
authorIdan Amit <ia096e@intl.att.com>2017-09-27 17:55:52 +0300
committerIdan Amit <ia096e@intl.att.com>2017-09-27 17:56:33 +0300
commit8e393c345738868330c73acbe25b04bcc69551d3 (patch)
tree648bd936dc478ba3680105c320edc0430cb555cc /bootstrap/vagrant-onap
parent54f5297fd7ff7ab8e3e60940203e1c691a0ce423 (diff)
vagrant-onap sdc script improvements
Fixed compile_repo mistake Added use in pull_dokcer_image is sdc script Added docker_login and docker_clean scripts to the copied scripts Change-Id: Iccd8a3084c5321754fce9cda14c3e0c4afb377c1 Issue-Id: INT-214 Signed-off-by: Idan Amit <ia096e@intl.att.com>
Diffstat (limited to 'bootstrap/vagrant-onap')
-rw-r--r--bootstrap/vagrant-onap/lib/sdc28
1 files changed, 17 insertions, 11 deletions
diff --git a/bootstrap/vagrant-onap/lib/sdc b/bootstrap/vagrant-onap/lib/sdc
index 9ec04b21b..058048960 100644
--- a/bootstrap/vagrant-onap/lib/sdc
+++ b/bootstrap/vagrant-onap/lib/sdc
@@ -40,7 +40,7 @@ function _setup_docker_aliases {
cat <<EOL > /root/.bash_aliases
alias dcls='/data/scripts/docker_clean.sh \$1'
alias dlog='/data/scripts/docker_login.sh \$1'
-alias rund='/data/scripts/docker_run.sh'
+alias drun='/data/scripts/docker_run.sh'
alias health='/data/scripts/docker_health.sh'
EOL
}
@@ -66,14 +66,16 @@ function compile_all_sdc_repos {
# get_sdc_images() - Function that retrieves the SDC docker images
function get_sdc_images {
if [[ "$build_image" == "True" ]]; then
- if [[ "$compile_repo" != "True" ]]; then
+ if [[ "$compile_repo" == "True" ]]; then
compile_src $sdc_src_folder
fi
build_docker_image $sdc_src_folder/sdc-docker-base
else
- for image in backend frontend elasticsearch kibana cassandra sanity; do
- pull_openecomp_image openecomp/sdc-$image
- done
+ if [["$pull_docker_image" == True]]; then
+ for image in backend frontend elasticsearch kibana cassandra sanity; do
+ pull_openecomp_image openecomp/sdc-$image
+ done
+ fi
fi
}
@@ -83,12 +85,16 @@ function install_sdc {
local MR_IP_ADDR='10.0.11.1'
_init_data_folders
- cp $sdc_src_folder/sdc-os-chef/environments/Template.json /data/environments
- cp $sdc_src_folder/sdc-os-chef/scripts/docker_run.sh /data/scripts
- cp $sdc_src_folder/sdc-os-chef/scripts/docker_health.sh /data/scripts
- chmod +x /data/scripts/docker_run.sh
- chmod +x /data/scripts/docker_health.sh
-
+ cp $sdc_src_folder/sdc-os-chef/environments/Template.json /data/environments
+ cp $sdc_src_folder/sdc-os-chef/scripts/docker_run.sh /data/scripts
+ cp $sdc_src_folder/sdc-os-chef/scripts/docker_health.sh /data/scripts
+ cp $sdc_src_folder/sdc-os-chef/scripts/docker_login.sh /data/scripts
+ cp $sdc_src_folder/sdc-os-chef/scripts/docker_clean.sh /data/scripts
+ chmod +x /data/scripts/docker_run.sh
+ chmod +x /data/scripts/docker_health.sh
+ chmod +x /data/scripts/docker_login.sh
+ chmod +x /data/scripts/docker_clean.sh
+
cat /data/environments/Template.json | sed "s/yyy/"$IP_ADDRESS"/g" > /data/environments/$ENV_NAME.json
sed -i "s/xxx/"$ENV_NAME"/g" /data/environments/$ENV_NAME.json
sed -i "s/\"ueb_url_list\":.*/\"ueb_url_list\": \""$MR_IP_ADDR","$MR_IP_ADDR"\",/g" /data/environments/$ENV_NAME.json