Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
titlenetwork-cfg.json
{
    "apps" : {
        "org.onosproject.openstackinterface" : {
            "openstackinterface" : {
                 "neutronServer" : "http://10.243.139.46:9696/v2.0/",
                 "keystoneServer" : "http://10.243.139.46:5000/v2.0/",
                 "userName" : "admin",
                 "password" : "nova"
             }
        },
        "org.onosproject.openstacknode" : {
            "openstacknode" : {
                 "nodes" : [
                        {
                                "hostname" : "compute-01",
                                "type" : "COMPUTE",
                                "managementIp" : "10.203.25.244",
                                "dataIp" : "10.134.34.222",
                                "integrationBridge" : "of:00000000000000a1"
                        },
                        {
                                "hostname" : "compute-02",
                                "type" : "COMPUTE",
                                "managementIp" : "10.203.229.42",
                                "dataIp" : "10.134.34.223",
                                "integrationBridge" : "of:00000000000000a2"
                        },
                        {
                                "hostname" : "gateway-01",
                                "type" : "GATEWAY",
                                "managementIp" : "10.203.198.125",
                                "dataIp" : "10.134.33.208",
                                "integrationBridge" : "of:00000000000000a3",
                                "routerBridge" : "of:00000000000000b3"
                        },
                        {
                                "hostname" : "gateway-02",
                                "type" : "GATEWAY",
                                "managementIp" : "10.203.198.131",
                                "dataIp" : "10.134.33.209",
                                "integrationBridge" : "of:00000000000000a4",
                                "routerBridge" : "of:00000000000000b4"
                        }
                  ]
             }
        }
    },
    "devices" : {
        "of:00000000000000a1" : {
            "basic" : {
                "driver" : "sona"
            }
        },
        "of:00000000000000a2" : {
            "basic" : {
                "driver" : "sona"
            }
        },
        "of:00000000000000b3" : {
            "basic" : {
                "driver" : "softrouter"
            }
        },
        "of:00000000000000b4" : {
            "basic" : {
                "driver" : "softrouter"
            }
        }
    }
}
Note

We recommend you to place package this network-cfg.json together with ONOS by placing this file under "onos/package/config" when you package ONOS, since all OVS switches set its driver to "ovs" by default if there's no specific "devices" and "driver" settings in the network config. Once the driver is set to "ovs" it's hard to change it to "sona" or "softrouter" later. This might be improved soon.

...

Code Block
ONOS_APPS=drivers,openflow-base,openstackswitching,openstackRouting

 

3. Push the network config file to ONOS to add and bootstrap the nodes at once.Check all node state is COMPLETE.

Use openstack-node-check command for more detailed states of the node. Pushing network configuration triggers reinitialization of all nodes at once. It's no harm to reinitialize COMPLETE state node. If you want to reinitialize a particular compute node, use openstack-node-init command with hostname.

Code Block
titlehow to push network config
$ curl --user onos:
Code Block
curl --user onos:rocks -X POST -H "Content-Type: application/json" http://$onos-ip:8181/onos/v1/network/configuration/ -d @network-cfg.json

 

...

/onos/v1/network/configuration/ -d @network-cfg.json
Code Block
onos> openstack-nodes
hostname=compute-01, type=COMPUTE, managementIp=10.203.25.244, dataIp=10.134.34.222, intBridge=of:00000000000000a1, routerBridge=Optional.empty init=COMPLETE
hostname=compute-02, type=COMPUTE, managementIp=10.203.229.42, dataIp=10.134.34.223, intBridge=of:00000000000000a2, routerBridge=Optional.empty init=COMPLETE
hostname=gateway-01, type=GATEWAY, managementIp=10.203.198.125, dataIp=10.134.33.208, intBridge=of:00000000000000a3, routerBridge=Optional[of:00000000000000b3] init=COMPLETE
hostname=gateway-02, type=GATEWAY, managementIp=10.203.198.131, dataIp=10.134.33.209, intBridge=of:00000000000000a4, routerBridge=Optional[of:00000000000000b4] init=COMPLETE
Total 4 nodes

...

Note

If the existing VMs in the compute nodes does not detected automatically at the application start-up, try to push network config or run openstack-node-init to trigger port searching manually.

It's done. Enjoy.

 

CLIs

CommandUsageDescription
openstack-nodesopenstack-nodesShows the list of compute and gateway nodes that registered to openstack node service
openstack-node-checkopenstack-node-check [hosthame]Shows the state of each node bootstrap steps
openstack-node-initopenstack-node-init [hostname]

Try to re-initialize a given node. It's no harm to re-initialize already in COMPLETE state.

...