X-Git-Url: https://git.teslayout.com/public/public/public/?p=anna.git;a=blobdiff_plain;f=INSTALL_ADML_HTTP.md;h=973862be055f453b43c713d0281564581f07b404;hp=785c4dda77eb2ec0ecd7c81db9afb4ffcfc7f1d5;hb=c881c12ed7e116f1d43760a0d9873f860c10a357;hpb=af14877201a9856708ec43086a229777d9cb3da7 diff --git a/INSTALL_ADML_HTTP.md b/INSTALL_ADML_HTTP.md index 785c4dd..973862b 100644 --- a/INSTALL_ADML_HTTP.md +++ b/INSTALL_ADML_HTTP.md @@ -2,7 +2,7 @@ ## Deployment -Execute 'example/diameter/launcher/deploy-adml-http.sh' and follow instructions. +Execute this [script](./example/diameter/launcher/deploy-adml-http.sh) and follow instructions. ## Enabling HTTP2 Service @@ -14,8 +14,74 @@ To build the docker image, execute this script: ## Running docker image -> docker run --rm -d --network host --name adml-http anna-adml-http: +> docker run --rm -d -p 8074:8074 --name adml-http anna-adml-http: -## Monitoring ADML traces +Service port is **8074**. + +## Basic operations + +### Monitoring ADML traces + +> docker exec -it adml-http tail -F /opt/adml/launcher.trace + +### Checking available diameter dictionaries + +> docker exec -it adml-http ls -1 /opt/adml/stacks +> +> DictionaryGx.16777238.xml +> DictionaryRx.16777236.xml +> DictionarySy.16777302.xml +> diameter_base.0.xml + +### Configure diameter nodes + +You may use the *REST API* to load diameter services into *ADML*. This is the way to load stacks and nodes (origin hosts) in order to be up and running. + +For example, consider an Origin-Host acting as diameter client with the name: **afHost.afRealm.com** and also a node named **ownHostId.operatorRealm.com** acting as diameter server, both using the *Rx interface* ( **/stacks/DictionaryRx.16777236.xml)**. You could configure any number of stacks/nodes to setup different diameter interfaces even having proxy/relay/translation capabilities. + +You could load any number of services given by this [file specification](./example/diameter/launcher/resources/services_examples/services.dtd). Also, you could configure a single file and load together all the needed elements, for example: + +`` + `` + `` + `` +`` + +The REST API works with json format, then we shall use the [xml2json.py](./example/diameter/launcher/resources/rest_api/helpers/diameterJsonHelper/xml2json.py) tool to convert the previous one and insert on a node called "**servicesJson**": + +> { +> **"servicesJson": {** +> "services": { +> "node": [ +> { +> "@applicationId": "16777236", +> "@entity": "localhost:3868", +> "@originHost": "afHost.afRealm.com" +> }, +> { +> "@applicationId": "16777236", +> "@diameterServer": "localhost:3868", +> "@diameterServerSessions": "1", +> "@originHost": "ownHostId.operatorRealm.com" +> } +> ], +> "stack": { +> "@dictionary": "stacks/DictionaryRx.16777236.xml", +> "@fixMode": "Always", +> "@id": "16777236", +> "@ignoreFlagsOnValidation": "yes" +> } +> } +> **}** +> } + +Then, you could load the former *services.json* file: + +> nghttp -v -H ":method: POST" -d services.json http://localhost:8074/services + + + +## Component Test + +Read [this](./example/diameter/launcher/resources/rest_api/README.md). -> docker exec -it adml-http tail -F /opt/adml/launcher.trace \ No newline at end of file