You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

In this document, we are planning to bring up three webpa modules talaria, scytale, tr1d1um in three different containers and checking the connectivity in them. This is documented based on the docker bringup in Ubuntu 24.04 machine

Pre-requisite

  • Install docker in your machine
$ docker --version
Docker version 27.5.1, build 27.5.1-0
  • Make sure docker compose plugin is working by checking below command, not docker-compose (this is old version v1)
$ docker compose version
Docker Compose version v2.36.2


Steps to bring up

Attached the required files in the wiki page webpa_docker_files.tgz . tree structure of the attachment is as follows

.
├── docker-compose.yaml
├── scytale
│   ├── Dockerfile
│   └── scytale.yaml
├── talaria
│   ├── Dockerfile
│   └── talaria.yaml
└── tr1d1um
    ├── Dockerfile
    └── tr1d1um.yaml


  •  Create a folder in your workspace you wish to run the webpa modules
  •  Extract the tarball attached here to your workspace
  •  Copy the docker-compose.yml file from the attachment to the folder you have created
  • Clone the talaria repo to your working folder 
    •  
      $ git clone https://github.com/xmidt-org/talaria <working folder name>  ( If the folder name is different, make sure the talaria is the folder name)
  •  Replace dockerfile and yaml from the attachment to the talaria folder
  •  Clone the scytale repo to your working folder
    •  $ git clone https://github.com/xmidt-org/scytale <working folder name>( If the folder name is different, make sure the scytale is the folder name)
  • Replace dockerfile and yaml from the attachment to the scytale folder
  • git clone tr1d1um module to the folder you have created
    • $ git clone https://github.com/xmidt-org/tr1d1um <working folder name> ( If the folder name is different, make sure the tr1d1um is the folder name)
  • Replace dockerfile and yaml from the attachment to the tr1d1um folder
  • Follow this steps for generating basic auth token WebPA (Xmidt) Ubuntu Reference Setup#Generatingaauthtoken and replace in all basic authentication 
  • Replace  your server IP in these sections 
./tr1d1um/tr1d1um.yaml:12:server: "<public IP>"
./tr1d1um/tr1d1um.yaml:305:targetURL: http://<public IP>:6300/api/v2
./talaria/talaria.yaml:9:server: "public IP"
./scytale/scytale.yaml:9:server: "public IP"
./scytale/scytale.yaml:214:  endpoints: ["http://<public IP>:8080/api/v3/device/send"]
./scytale/scytale.yaml:370:    - http://<public IP>:6300

  • Run docker compose 
$ docker compose up --build -d 
  •  check created containers  are running successfully
$ docker ps
CONTAINER ID   IMAGE     COMMAND                  CREATED      STATUS      PORTS                                                                                                      NAMES
57dd3ec297cb   tr1d1um   "/etc/tr1d1um/tr1d1um"   3 days ago   Up 3 days   0.0.0.0:6100-6103->6100-6103/tcp, :::6100-6103->6100-6103/tcp                                              tr1d1um
b8a3dc0d915b   scytale   "/etc/scytale/scytale"   3 days ago   Up 3 days   0.0.0.0:6300-6303->6300-6303/tcp, :::6300-6303->6300-6303/tcp                                              scytale
54082f1f8526   talaria   "/etc/talaria/talaria"   3 days ago   Up 3 days   0.0.0.0:6200-6204->6200-6204/tcp, :::6200-6204->6200-6204/tcp, 0.0.0.0:8080->8080/tcp, :::8080->8080/tcp   talaria


  • Verify docker images are created successfully
$ docker images
REPOSITORY   TAG       IMAGE ID       CREATED      SIZE
tr1d1um      latest    aa9d55a69a6c   3 days ago   71.2MB
scytale      latest    137bad8f272c   3 days ago   82.9MB
talaria      latest    884a6d178222   3 days ago   74.9MB


Note :  For this bringup, talaria port is modified to 8080, rest of the ports used are same as in the repo.

For errors, can be checked by $ docker logs <containerid>

Testing

GET Parameter

$ curl -H ''Authorization:Basic <AUTH_TOKEN>' -i http://<WEBPA-URL>/api/v2/device/mac:<DEVICE_MAC>/config?names=<PARAMETER>
e.g.
$ curl -H 'Authorization:Basic d2VicGFAMTIzNDU2Nzg5MA==' -i http://<WEBPA_SERVER_IP:6100>/api/v2/device/mac:aabbccddeeff/config?names=Device.DeviceInfo.ModelName


SET Parameter

$ curl -X PATCH https://<IP>:9003/api/v2/device/mac:<MAC>/config -d '{"parameters": [ {"dataType": 0, "name": "<TR181_PARAM>", "value": "<Value-to-Set>"}]}' -H 'Authorization:Basic <TOKEN>' e.g.
$ curl -X PATCH http://<IP>:6100/api/v2/device/mac:aabbccddeeff/config -d '{"parameters": [ {"dataType": 0, "name": "Device.WiFi.SSID.10001.SSID", "value": "Testing"}]}' -H 'Authorization:Basic d2VicGFAMTIzNDU2Nzg5MAo='

List of connected Devices

$ curl -H "<AUTH_TOKEN>" http://<IP>:8080/api/v2/devices
e.g. curl -H "Authorization: Basic d2VicGFAMTIzNDU2Nzg5MA==" http://<webpa_serverIP>:8080/api/v2/devices


AUTH_TOKEN       : Basic base64 encoded auth token or SAT (if enabled).

WEBPA-URL          : URL of Tr1d1um service in IP:PORT format.

DEVICE_MAC        :  MAC address of the CPE device.

PARAMETER         : GET/SET Parameter that need to be requested.

TODO: Modify to github location once CMFSupport ticket is resolved CMFSUPPORT-2791



  • No labels