X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=blobdiff_plain;f=mep%2Fmepagent%2FREADME.md;h=f3ec851fc32f583f442002be0ae6a4e0d61a5d15;hb=37e5052b0d53c9137cba0b18f0d28f311826aba6;hp=b50520ed7970d3f7a5cea93c3381a99826c1ee6e;hpb=76872e65a918fe31c6b28efd288cef10a1bd806f;p=ealt-edge.git diff --git a/mep/mepagent/README.md b/mep/mepagent/README.md index b50520e..f3ec851 100644 --- a/mep/mepagent/README.md +++ b/mep/mepagent/README.md @@ -1,2 +1,57 @@ # mep_agent_lib Agent lib for mep service regsitration API + + +## Introduction + +MEP agent library and sample application is provide for quickly develop applications on MEP platform. +Code is devided in 2 part. +- SampleApp +- Service registration pkg. +- config file for setting application configuration +- docker file , build and k8s yaml files + +* SampleApp + - sample application for service regsitration to MEP + - contains main function and call service registration function from provided pkg + - It has config file for setting application configuration + +* pkg for service registration + - pkg can be used to register developer applications to MEP. + - support http and https connection to MEP + - configuration can be enabled/disbaled in config files when start mep agent + +## Configuration +mainly below configuration supported + - MEP GW details + - IP: IP of MEP Gateway + - HTTPS port: GW HTTPS proxy port + - HTTP port: GW HTTP proxy port + - App instance ID + - service registration sample data as per ETSI mp1 interface. + +## Usages +Developer who develp applications for MEP, can leverage sample application and pkg freamework to support mp1 interface for service registration. +In future this library can be extened to support all mp1 interface like discovery, service avaiibilty. +MEP support mp1 interfaces as per ETSI compliant. + +* Steps + - configure MEP GW IP and port in path meagent/SampleApp/conf/app_instance_info.yaml + - based on deplyment mode(development/production) provide HTTP/HTTPS port + - kong API GW run as K8s service, check corresponding port and config accordingly + - Kong has admin and proxy port. + - use proxy port and configure + - Build go applicaion with below cmd: + - cd mepagent/SampleApp + - CGO_ENABLED=0 go build -a -ldflags '-extldflags "-static"' src/main/main.go + - Build docker and push to docker + - sudo ./docker-build.sh + - Deploy Application + - In mep-k8s.yaml + - enable/disable ssl which is env. variable in k8s yaml file + - APP_SSL_MODE "1" to enable ssl. + - By default app run in normal mode. + - generate k8s secret with ca.crt file which is root CA used by MEP. + - MEP provide cert-manager and vault to automate it. Plz refer corresponding document. + +