Scott Baker | 5042166 | 2016-06-27 22:09:48 -0700 | [diff] [blame] | 1 | FN=$SETUPDIR/vtn-external.yaml |
| 2 | |
| 3 | rm -f $FN |
| 4 | |
| 5 | cat >> $FN <<EOF |
| 6 | tosca_definitions_version: tosca_simple_yaml_1_0 |
| 7 | |
| 8 | imports: |
| 9 | - custom_types/xos.yaml |
| 10 | |
| 11 | description: autogenerated node tags file for VTN configuration |
| 12 | |
| 13 | topology_template: |
| 14 | node_templates: |
| 15 | |
| 16 | service#ONOS_CORD: |
| 17 | type: tosca.nodes.ONOSService |
| 18 | requirements: |
| 19 | properties: |
| 20 | kind: onos |
| 21 | view_url: /admin/onos/onosservice/\$id$/ |
| 22 | no_container: true |
| 23 | rest_hostname: onos-cord |
| 24 | replaces: service_ONOS_CORD |
| 25 | |
| 26 | service#vtn: |
| 27 | type: tosca.nodes.VTNService |
| 28 | properties: |
| 29 | view_url: /admin/vtn/vtnservice/\$id$/ |
| 30 | privateGatewayMac: 00:00:00:00:00:01 |
| 31 | localManagementIp: 172.27.0.1/24 |
| 32 | ovsdbPort: 6641 |
| 33 | sshUser: root |
| 34 | sshKeyFile: /root/node_key |
| 35 | sshPort: 22 |
| 36 | xosEndpoint: http://xos/ |
| 37 | xosUser: padmin@vicci.org |
| 38 | xosPassword: letmein |
| 39 | replaces: service_vtn |
| 40 | |
| 41 | EOF |
| 42 | |
| 43 | NODES=$( bash -c "source $SETUPDIR/admin-openrc.sh ; nova host-list" |grep compute|awk '{print $2}' ) |
| 44 | I=0 |
| 45 | for NODE in $NODES; do |
| 46 | echo $NODE |
| 47 | cat >> $FN <<EOF |
| 48 | $NODE: |
| 49 | type: tosca.nodes.Node |
| 50 | |
| 51 | # VTN bridgeId field for node $NODE |
| 52 | ${NODE}_bridgeId_tag: |
| 53 | type: tosca.nodes.Tag |
| 54 | properties: |
| 55 | name: bridgeId |
| 56 | value: of:0000000000000001 |
| 57 | requirements: |
| 58 | - target: |
| 59 | node: $NODE |
| 60 | relationship: tosca.relationships.TagsObject |
| 61 | - service: |
| 62 | node: service#ONOS_CORD |
| 63 | relationship: tosca.relationships.MemberOfService |
| 64 | |
| 65 | # VTN dataPlaneIntf field for node $NODE |
| 66 | ${NODE}_dataPlaneIntf_tag: |
| 67 | type: tosca.nodes.Tag |
| 68 | properties: |
| 69 | name: dataPlaneIntf |
| 70 | value: fabric |
| 71 | requirements: |
| 72 | - target: |
| 73 | node: $NODE |
| 74 | relationship: tosca.relationships.TagsObject |
| 75 | - service: |
| 76 | node: service#ONOS_CORD |
| 77 | relationship: tosca.relationships.MemberOfService |
| 78 | |
| 79 | # VTN dataPlaneIp field for node $NODE |
| 80 | ${NODE}_dataPlaneIp_tag: |
| 81 | type: tosca.nodes.Tag |
| 82 | properties: |
| 83 | name: dataPlaneIp |
| 84 | value: 10.168.0.253/24 |
| 85 | requirements: |
| 86 | - target: |
| 87 | node: $NODE |
| 88 | relationship: tosca.relationships.TagsObject |
| 89 | - service: |
| 90 | node: service#ONOS_CORD |
| 91 | relationship: tosca.relationships.MemberOfService |
| 92 | |
| 93 | EOF |
| 94 | done |
| 95 | |
| 96 | cat >> $FN <<EOF |
| 97 | VTN_ONOS_app: |
| 98 | type: tosca.nodes.ONOSVTNApp |
| 99 | requirements: |
| 100 | - onos_tenant: |
| 101 | node: service#ONOS_CORD |
| 102 | relationship: tosca.relationships.TenantOfService |
| 103 | - vtn_service: |
| 104 | node: service#vtn |
| 105 | relationship: tosca.relationships.UsedByService |
| 106 | properties: |
Andy Bavier | 22bf6e3 | 2016-07-08 10:45:11 -0400 | [diff] [blame] | 107 | install_dependencies: http://mavenrepo:8080/repository/org/opencord/cord-config/1.0-SNAPSHOT/cord-config-1.0-SNAPSHOT.oar,http://mavenrepo:8080/repository/org/opencord/vtn/1.0-SNAPSHOT/vtn-1.0-SNAPSHOT.oar |
Scott Baker | 5042166 | 2016-06-27 22:09:48 -0700 | [diff] [blame] | 108 | dependencies: org.onosproject.drivers, org.onosproject.drivers.ovsdb, org.onosproject.openflow-base, org.onosproject.ovsdb-base, org.onosproject.dhcp |
| 109 | autogenerate: vtn-network-cfg |
| 110 | EOF |