Giter Site home page Giter Site logo

gloria1030's Introduction

Mep-Agent

License Jenkins

Introduction

Mep-Agent is a middleware that provides proxy services for third-party apps. It can help apps, which do not implement the ETSI interface to register to MEP, and realize app service registration and discovery. Mep-Agent will start at the same time as the application container, and read the content in the file conf/app_instance_info.yaml to automatically register the service.

MEP-Agent code directory

├─conf
├─docker
├─src
│  ├─config
│  ├─controllers
│  ├─main
│  ├─model
│  ├─router
│  ├─service
│  ├─test
│  └─util
└─views
    └─error

Above is the directory tree of MEP-Agent project, their usage is as belows:

  • conf: mep-agent config file
  • docker: dockerfile file
  • src: source code
    • config: config files
    • controllers: controller class
    • main: main method
    • model: model definition
    • router: route info
    • service: service logic
    • test: unit test
    • util: util tool file
  • views: pages

Build & Run

Mep-Agent is developed by the Go language and provides services in the form of a docker image. When it starts, it will read the configuration file and register the App to the MEP to realize service registration and discovery.

  • Build

    git clone from mep-agent master repo

    git clone https://gitee.com/edgegallery/mep-agent.git
    

    build the mep-agent image

    docker build -t mep-agent:latest -f docker/Dockerfile .
    
  • Run

    Prepare the certificate files and mepagent.properties, which contains ACCESS_KEY and SECRET_KEY, and run with

    docker run -itd --name mepagent \
      --cap-drop All \
      -e MEP_IP=<host IP> \ # host IP 为mep部署环境的IP地址
      -e MEP_APIGW_PORT=8443 \
      -e MEP_AUTH_ROUTE=mepauth \
      -e ENABLE_WAIT=true \
      -e AK=QVUJMSUMgS0VZLS0tLS0 \
      -e SK=DXPb4sqElKhcHe07Kw5uorayETwId1JOjjOIRomRs5wyszoCR5R7AtVa28KT3lSc \
      -e APPINSTID=5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f \
      -v /home/EG-LDVS/mepserver/ca.crt:/usr/mep/ssl/ca.crt:ro \
      -e "CA_CERT=/usr/mep/ssl/ca.crt" \
      -e "CA_CERT_DOMAIN_NAME=edgegallery" \
      -v /tmp/mepagent-conf/app_conf.yaml:/usr/mep/conf/app\_conf.yaml:ro \
      -v /home/EG-LDVS/mep-agent/conf/app_instance_info.yaml:/usr/mep/conf/app_instance_info.yaml:ro\ #可选, mep-agent默认自带一份样例app_instance_info.yaml用于注册
      edgegallery/mep-agent:latest
    

More details of the building and installation process please refer to HERE.

Notice

Mep-Agent is written in Go language. In order to minimize the image, it adopts the process of statically compiling and then packaging, without relying on the basic Go language image, which greatly reduces the size of the image.

gloria1030's People

Contributors

realmark1r8h avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.