atlanticwave-sdx / sdx-lc

Local Controller of AtlanticWave SDX.
https://www.atlanticwave-sdx.net
MIT License
0 stars 2 forks source link

Interaction with Kytos #6

Closed YufengXin closed 2 years ago

YufengXin commented 2 years ago

Receiving the topology model and updates from Kytos via the API call (topology/post and topology/put). Publish into the RabbitMQ

Use a test installation of Kytos-ng for testing.

mcevik0 commented 2 years ago

Kytos-ng is installed to the VMs at RENCI (aw-sdx-lc-1, aw-sdx-lc-2, aw-sdx-lc3)

References for kytos-ng and docker-based deployment: [1] https://github.com/kytos-ng/kytos [2] https://kytos-ng.github.io/releases/2021.1/2022.1.html#6-have-a-docker-production-build-shipping-all-amlight-napps-with-tags [3] https://github.com/amlight/kytos-docker

By following [2] and [3], use an ansible task to copy a script and execute the script on the host (lc-1, lc-2, lc-3)

Screen Shot 2022-05-16 at 12 46 47 PM

mcevik0 commented 2 years ago

Virtual switches:

[root@aw-sdx-lc-5 ~]# ovs-vsctl show
7d63cd0b-e759-4112-8d0e-11f2dae4e096
    Bridge s1
        Controller "tcp:152.54.14.253:6653"
        Controller "ptcp:6654"
        fail_mode: secure
        Port s1
            Interface s1
                type: internal
        Port s1-eth2
            Interface s1-eth2
        Port s1-eth1
            Interface s1-eth1
    Bridge s2
        Controller "tcp:152.54.14.253:6653"
        Controller "ptcp:6655"
        fail_mode: secure
        Port s2
            Interface s2
                type: internal
        Port s2-eth2
            Interface s2-eth2
        Port s2-eth1
            Interface s2-eth1
    ovs_version: "2.17.1"

REST Endpoints can be used for "topology". (Kytos-NG is configured with listen_to=0.0.0.0 and docker forwards traffic into the container. REST Endpoints are wide-open to all IP addresses. )

dhcp152-54-9-189:RENCI mertcevik$ curl -s http://152.54.14.253:8181/api/kytos/topology/v3 / | jq . 
{
  "topology": {
    "links": {
      "cf0f4071be426b3f745027f5d22bc61f8312ae86293c9b28e7e66015607a9260": {
        "active": true,
        "enabled": true,
        "endpoint_a": {
          "active": true,
          "enabled": true,
          "id": "00:00:00:00:00:00:00:01:2",
          "link": "cf0f4071be426b3f745027f5d22bc61f8312ae86293c9b28e7e66015607a9260",
          "lldp": true,
          "mac": "6e:9b:38:c9:6b:ca",
          "metadata": {},
          "name": "s1-eth2",
          "nni": true,
          "port_number": 2,
          "speed": 1250000000,
          "switch": "00:00:00:00:00:00:00:01",
          "type": "interface",
          "uni": false
        },

Web UI is available at http://152.54.14.253:8181

Screen Shot 2022-05-20 at 4 15 23 PM

@jab1982 @YufengXin @congwang09 I added all information I have to this ticket and to the README file that I mentioned. Test setup is ready to work on the needs of the software components for topology model and updates.

congwang09 commented 2 years ago

I have started a Kytos mock server to test sdx-lc sending breakdown information to Kytos. https://github.com/atlanticwave-sdx/kytos-sdx-topology/blob/main/envsetup/sdx_lc_mock/flaskrun.sh One note is that, instead of 0.0.0.0/localhost, we should use the 192.168.X.X host IP, so that the app inside docker can talk to the mock Kytos server.