1 # Deploy an OpenDaylight Cluster
3 This repo provide a Vagrant file and a docker-compose.yml file so one can deploy an OpenDaylight cluster using VMs or containers.
7 The VMs / Containers are configured through the *config.properties* file.
11 - How many nodes to deploy?
13 - What OpenDaylight release to use?
14 Default is `Boron-SR2`.
15 - What features to install on startup?
16 Default are `odl-jolokia, odl-restconf, odl-mdsal-clustering`.
20 Virtual Machines are configured as follow:
26 - Bridge "en0: Wi-Fi (AirPort)"
27 - Static IP address: 192.168.50.15#{node_index}
29 To change the network configuration edit the Vagrantfile.
34 # from the root folder containing the Vagranfile access the virtual machine
37 # if you can't access odl-2 or odl-3, export the configured number of nodes and retry
46 Containers are configured as follow:
50 - Static IP address: 192.168.50.15#{node_index}
52 A specific network is created to hold the cluster networking into its own subnet. Run the following command to see how it's configured:
55 docker network inspect odl-cluster-network
58 - name: odl-cluster-network
59 - com.docker.network.bridge.enable_icc=true
60 - com.docker.network.bridge.enable_ip_masquerade=true
61 - subnet 192.168.50.0/24
62 - gateway 192.168.50.1
64 To see where the setup is at, run the command bellow. If the OpenDaylight CLI is shown, it means the node is ready.
67 docker exec odl-1 tail -f nohup.out
73 # list all running containers
76 # remove all containers
77 docker rm -f $(docker ps -q)
79 # delete odl-cluster-network
80 docker network rm odl-cluster-network
82 # execute a command in a container
83 docker exec <container_id|container_name> <command>
86 docker images odl-node
94 Execute the `setup_cluster.sh` script, and all should be ready within the next half hour, depending on your network.
97 ./scripts/setup_cluster.sh -p <docker|vagrant>
102 To create a cluster using containers, run the following:
105 ./scripts/setup_cluster.sh -p docker
110 A Postman collection is provided giving useful requests to ensure the cluster is correctly setup, and to gather info from it through Jolokia.
111 This Postman collection also provides requests to manage the cluster, leveraging the [cluster-admin.yang](https://github.com/opendaylight/controller/blob/master/opendaylight/md-sal/sal-cluster-admin-api/src/main/yang/cluster-admin.yang) RPCs.