commit | 10b6256eec8bca13ca538b8b526f8ea0f6bbab7d | [log] [tgz] |
---|---|---|
author | Sapan Bhatia <gwsapan@gmail.com> | Mon Oct 09 18:05:35 2017 -0400 |
committer | Andy Bavier <andy@opennetworking.org> | Wed Oct 11 08:32:07 2017 -0700 |
tree | 8b42d4602e0d555af7faed2976521730eb7a7c3a | |
parent | 0a328e04ab9e1988a33f8e8d4df7a85dd42ac617 [diff] |
CORD-2050: Automatically bring up VMs for service instances Change-Id: I8cf7067fa1319c210c7ab638aa788fc179247933 (cherry picked from commit 81c8809c471995dbf9616d2753d8b5cd2f110413)
To onboard this service in your system, you can add the service to the mcord.yml
profile manifest:
xos_services: - name: vmme path: orchestration/xos_services/vmme keypair: mcord_rsa synchronizer: true
Once you have added the service, you will need to rebuild and redeploy the XOS containers from source. Login to the corddev
vm and cd /cord/build
$ ./gradlew -PdeployConfig=config/mcord_in_a_box.yml PIprepPlatform $ ./gradlew -PdeployConfig=config/mcord_in_a_box.yml :platform-install:buildImages $ ./gradlew -PdeployConfig=config/mcord_in_a_box.yml :platform-install:publish $ ./gradlew -PdeployConfig=config/mcord_in_a_box.yml :orchestration:xos:publish
Now the new XOS images should be published to the registry on prod
. To bring them up, login to the prod
VM and define these aliases:
$ CORD_PROFILE=$( cat /opt/cord_profile/profile_name ) $ alias xos-pull="docker-compose -p $CORD_PROFILE -f /opt/cord_profile/docker-compose.yml pull" $ alias xos-up="docker-compose -p $CORD_PROFILE -f /opt/cord_profile/docker-compose.yml up -d --remove-orphans" $ alias xos-teardown="pushd /opt/cord/build/platform-install; ansible-playbook -i inventory/head-localhost --extra-vars @/opt/cord/build/genconfig/config.yml teardown-playbook.yml; popd" $ alias compute-node-refresh="pushd /opt/cord/build/platform-install; ansible-playbook -i /etc/maas/ansible/pod-inventory --extra-vars=@/opt/cord/build/genconfig/config.yml compute-node-refresh-playbook.yml; popd"
To pull new images from the database and launch the containers, while retaining the existing XOS database, run:
$ xos-pull; xos-up
Alternatively, to remove the XOS database and reinitialize XOS from scratch, run:
$ xos-teardown; xos-pull; xos-launch; compute-node-refresh