Skip to content

Instantly share code, notes, and snippets.

@devopsbrett
Last active May 3, 2018 09:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save devopsbrett/7c385f5ff79fd0335daefec250fb5b97 to your computer and use it in GitHub Desktop.
Save devopsbrett/7c385f5ff79fd0335daefec250fb5b97 to your computer and use it in GitHub Desktop.
#!/bin/bash
DST=~/cord/build
TMP=/tmp/oai_scenario_backup/
mkdir -p /tmp/oai_scenario_backup $DST/platform-install/profile_manifests/ $DST/podconfig/
# Remove backup folder
#rm -rf $TMP
# Backup all old files
cp $DST/docker_images.yml $TMP
cp $DST/../.repo/manifests/default.xml $TMP
cp $DST/platform-install/roles/cord-profile/templates/public-net.yaml.j2 $TMP
# Copy new files into our target
cp docker_images.yml $DST/
cp manifest.xml $DST/../.repo/manifests/default.xml
cp mcord-oai.yml $DST/platform-install/profile_manifests/
cp mcord-oai-virtual.yml $DST/podconfig/
cp public-net.yaml.j2 $DST/platform-install/roles/cord-profile/templates/
cp oai-net.yaml.j2 $DST/platform-install/roles/cord-profile/templates/
cp mcord-oai-services.yml.j2 $DST/platform-install/roles/cord-profile/templates
cp mcord-oai-service-graph.yml.j2 $DST/platform-install/roles/cord-profile/templates
# Use custom version of vhss, vmme instead official
cd ~/cord/orchestration/xos_services
rm -rf vbbu vhss vmme vspgwc vspgwu
git clone https://github.com/aweimeow/vBBU vbbu
git clone https://github.com/aweimeow/vMME vmme
git clone https://github.com/aweimeow/vHSS vhss
git clone https://github.com/aweimeow/vspgwc vspgwc
git clone https://github.com/aweimeow/vspgwu vspgwu
# Checkout to target branch
for var in "vbbu"; do
cd $var;
git remote add opencord https://github.com/aweimeow/$var.git;
git checkout cord-4.1;
git pull opencord cord-4.1;
cd ..;
done
for var in "vspgwc" "vspgwu"; do
cd $var;
git remote add opencord https://github.com/aweimeow/$var.git;
git checkout cp_seperated;
git pull opencord cp_seperated;
cd ..;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment