Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- echo this is the version ${SGW_VERSION}
- if [ ! -d ${WORKSPASE}/vhost]; then
- git clone -b centos6 http://gitlab.cisco.com/drm-he-ci/vagrant.git vhost
- cd vhost
- else
- cd vhost
- git pull
- fi
- name=cihost"$(date +%s)"
- cp -r vsphere_centos67 $name
- cd $name
- export VAGRANT_INSTANCE_NAME=$name
- vagrant up --provider=vsphere
- VAGRANT_INSTANCE_PATH="$(pwd)"
- vagrant ssh-config | grep -i hostname | awk '{print$2}' > ipaddress
- export VAGRANT_INSTANCE_IP=$(awk {print} ipaddress)
- echo Host IP is $VAGRANT_INSTANCE_IP
- cd ${WORKSPACE}
- #Apply puppet SK profile
- cat > configure.sh <<EOF
- #!/bin/bash
- cd /etc/puppet
- git pull
- cat > /etc/puppet/hieradata/override.json <<EOL
- { "sgw::version":"${SGW_VERSION}",
- "ecms::version":"1.8.2-0",
- "drms::version":"${DRMS_VERSION}",
- "keystore::version":"1.1.4-7",
- "tgs::version":"1.5.4-0",
- "upm::version":"5.67.1-0"
- }
- EOL
- puppet apply -e "include profile::new_repo"
- puppet apply -e "include profile::starter_kit"
- cp -r /opt/nds/mama/docs/sample/* /opt/nds/mama/etc/
- sed -i "1 i.*" /opt/nds/mama/etc/legal_commands_basic.cfg
- service nds_mama start
- EOF
- ssh root@$VAGRANT_INSTANCE_IP < configure.sh
- vmip=$VAGRANT_INSTANCE_IP
- #Change host IP
- sed -i s#sgw_1.1.host.*\$#sgw_1.1.host=$vmip# src/test/resources/config.properties
- sed -i s#drms.host.*\$#drms.host=$vmip# src/test/resources/config.properties
- sed -i s#ecms.host.*\$#ecms.host=$vmip# src/test/resources/config.properties
- sed -i s#tgs.host.*\$#tgs.host=$vmip# src/test/resources/config.properties
- sed -i s#keystore.host.*\$#keystore.host=$vmip# src/test/resources/config.properties
- sed -i s#upm.host.*\$#upm.host=$vmip# src/test/resources/config.properties
- cat > ${WORKSPACE}/params.properties <<EOF
- SGW_VERSION=${SGW_VERSION}
- VAGRANT_INSTANCE_PATH=$VAGRANT_INSTANCE_PATH
- EOF
- cat params.properties
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement