summaryrefslogtreecommitdiffstats
path: root/bootstrap/vagrant-onap
diff options
context:
space:
mode:
Diffstat (limited to 'bootstrap/vagrant-onap')
-rw-r--r--bootstrap/vagrant-onap/README.md14
-rw-r--r--bootstrap/vagrant-onap/Vagrantfile2
-rwxr-xr-xbootstrap/vagrant-onap/lib/config/env-vars2
-rwxr-xr-xbootstrap/vagrant-onap/lib/functions27
-rwxr-xr-xbootstrap/vagrant-onap/lib/sdc10
5 files changed, 41 insertions, 14 deletions
diff --git a/bootstrap/vagrant-onap/README.md b/bootstrap/vagrant-onap/README.md
index 1478ab4b2..1afe53361 100644
--- a/bootstrap/vagrant-onap/README.md
+++ b/bootstrap/vagrant-onap/README.md
@@ -59,11 +59,15 @@ current options include:
| vid | Virtual Infrastructure Development |
| vnfsdk | VNF SDK |
| vvp | VNF Validation Program |
-|:----------:|-------------------------------------|
-| all_in_one | All ONAP services in a VM |
-| testing | Unit Test VM |
-|:----------:|-------------------------------------|
-| openstack | OpenStack Deployment |
+
+| app_name | description |
+|:----------:|------------------------------------------|
+| all_in_one | All ONAP services in a VM (experimental) |
+| testing | Unit Test VM |
+
+| app_name | description |
+|:----------:|----------------------|
+| openstack | OpenStack Deployment |
#### Generating documentation
diff --git a/bootstrap/vagrant-onap/Vagrantfile b/bootstrap/vagrant-onap/Vagrantfile
index 779f07995..4b10392fd 100644
--- a/bootstrap/vagrant-onap/Vagrantfile
+++ b/bootstrap/vagrant-onap/Vagrantfile
@@ -493,7 +493,7 @@ Vagrant.configure("2") do |config|
# Set Sync Folder
nodeconfig.vm.synced_folder ".", "/vagrant", disabled: true
- nodeconfig.vm.synced_folder './opt', '/opt/', create: true, type: sync_type
+ nodeconfig.vm.synced_folder './opt', '/opt/onap/', create: true, type: sync_type
nodeconfig.vm.synced_folder './lib', '/var/onap/', create: true, type: sync_type
if !is_windows
nodeconfig.vm.synced_folder '~/.m2', '/root/.m2/', create: true
diff --git a/bootstrap/vagrant-onap/lib/config/env-vars b/bootstrap/vagrant-onap/lib/config/env-vars
index a55557ae7..7712de88e 100755
--- a/bootstrap/vagrant-onap/lib/config/env-vars
+++ b/bootstrap/vagrant-onap/lib/config/env-vars
@@ -1,7 +1,7 @@
#!/bin/bash
# Source code destination folder
-git_src_folder=/opt
+git_src_folder=/opt/onap
declare -A src_folders
src_folders=(
diff --git a/bootstrap/vagrant-onap/lib/functions b/bootstrap/vagrant-onap/lib/functions
index 79a80c6b0..f40761f59 100755
--- a/bootstrap/vagrant-onap/lib/functions
+++ b/bootstrap/vagrant-onap/lib/functions
@@ -293,6 +293,33 @@ function install_docker_compose {
fi
}
+# install_chefdk() - Install ChefDK package
+function install_chefdk {
+ local chefdk_version="2.4.17"
+
+ if is_package_installed chefdk; then
+ return
+ fi
+ pushd $(mktemp -d)
+ source /etc/os-release || source /usr/lib/os-release
+ case ${ID,,} in
+ *suse)
+ ;;
+ ubuntu|debian)
+ chefdk_pkg="chefdk_$chefdk_version-1_amd64.deb"
+ chefdk_url="https://packages.chef.io/files/stable/chefdk/$chefdk_version/ubuntu/$VERSION_ID/$chefdk_pkg"
+
+ wget $chefdk_url
+ dpkg -i $chefdk_pkg
+ apt-get install -f -y
+ ;;
+ rhel|centos|fedora)
+ rpm -Uvh "https://packages.chef.io/files/stable/chefdk/$chefdk_version/el/7/chefdk-$chefdk_version-1.el7.x86_64.rpm"
+ ;;
+ esac
+ popd
+}
+
# _install_ODL() - Download and Install OpenDayLight SDN controller
function _install_ODL {
if [ ! -d /opt/opendaylight/current ]; then
diff --git a/bootstrap/vagrant-onap/lib/sdc b/bootstrap/vagrant-onap/lib/sdc
index d17accf93..71a5fea86 100755
--- a/bootstrap/vagrant-onap/lib/sdc
+++ b/bootstrap/vagrant-onap/lib/sdc
@@ -50,16 +50,11 @@ function install_sdc {
popd
_init_data_folders
- cp ${src_folders[sdc]}/sdc-os-chef/environments/Template.json /data/environments
- cp ${src_folders[sdc]}/sdc-os-chef/scripts/docker_run.sh /data/scripts
- cp ${src_folders[sdc]}/sdc-os-chef/scripts/docker_health.sh /data/scripts
- cp ${src_folders[sdc]}/sdc-os-chef/scripts/docker_login.sh /data/scripts
- cp ${src_folders[sdc]}/sdc-os-chef/scripts/docker_clean.sh /data/scripts
- cp ${src_folders[sdc]}/sdc-os-chef/scripts/simulator_docker_run.sh /data/scripts
+ cp ${src_folders[sdc]}/sdc-os-chef/scripts/{docker_run.sh,docker_health.sh,docker_login.sh,docker_clean.sh,simulator_docker_run.sh} /data/scripts
chmod +x /data/scripts/*.sh
- cat /data/environments/Template.json | sed "s/yyy/"$IP_ADDRESS"/g" > /data/environments/$ENV_NAME.json
+ cat ${src_folders[sdc]}/sdc-os-chef/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
sed -i "s/\"fqdn\":.*/\"fqdn\": [\""$MR_IP_ADDR"\", \""$MR_IP_ADDR"\"]/g" /data/environments/$ENV_NAME.json
@@ -70,6 +65,7 @@ function install_sdc {
else
bash /data/scripts/docker_run.sh -e $ENV_NAME -r $docker_version -p $(echo $nexus_docker_repo | cut -d':' -f2)
fi
+ install_chefdk
}
# init_sdc() - Function that initialize SDC services