Giter Club home page Giter Club logo

baetyl's Introduction

BAETYL v2

Baetyl-logo

build codecov Go Report Card License Stars

README_CN

Baetyl is an open edge computing framework of Linux Foundation Edge that extends cloud computing, data and service seamlessly to edge devices. It can provide temporary offline, low-latency computing services include device connection, message routing, remote synchronization, function computing, video capture, AI inference, status reporting, configuration ota etc.

Baetyl v2 provides a new edge cloud integration platform, which adopts cloud management and edge operation solutions, and is divided into Edge Computing Framework (this project) and Cloud Management Suite supports varius deployment methods. It can manage all resources in the cloud, such as nodes, applications, configuration, etc., and automatically deploy applications to edge nodes to meet various edge computing scenarios. It is especially suitable for emerging strong edge devices, such as AI all-in-one machines and 5G roadside boxes.

The main differences between v2 and v1 versions are as follows:

  • Edge and cloud frameworks have all evolved to cloud native, and already support running on K8S or K3S.
  • Introduce declarative design, realize data synchronization (OTA) through shadow (Report/Desire).
  • The edge framework currently supports Kube mode. Because it runs on K3S, the overall resource overhead is relatively large (1G memory); the Native mode is under development, which can greatly reduce resource consumption.
  • The edge framework will support edge node clusters in the future.

Architecture

Architecture

The Edge Computing Framework runs on Kubernetes at the edge node, manages and deploys all applications which provide various capabilities. Applications include system applications and common applications. All system applications are officially provided by Baetyl, and you do not need to configure them.

There are currently several system applications:

  • baetyl-init: responsible for activating the edge node to the cloud and initializing baetyl-core, and will exit after all tasks are completed.
  • baetyl-core: responsible for local node management (node), data synchronization with cloud (sync) and application deployment (engine).
  • baetyl-function: the proxy for all function runtime services, function invocations are passed through this module.

Currently the framework supports Linux/amd64, Linux/arm64, Linux/armv7, If the resources of the edge nodes are limited, consider to use the lightweight kubernetes: K3S.

Hardware requirements scale based on the size of your applications at edge. Minimum recommendations are outlined here.

  • RAM: 1GB Minimum
  • CPU: 1 Minimum

The Cloud Management Suite is responsible for managing all resources, including nodes, applications, configuration, and deployment. The realization of all functions is plug-in, which is convenient for function expansion and third-party service access, and provides rich applications. The deployment of the cloud management suite is very flexible. It can be deployed on public clouds, private cloud environments, and common devices. It supports K8S/K3S deployment, and supports single-tenancy and multi-tenancy.

The basic functions provided by the cloud management suite in this project are as follows:

  • Edge node management
    • Online installation of edge computing framework
    • Synchronization (shadow) between edge and cloud
    • Node information collection
    • Node status collection
    • Application status collection
  • Application deployment management
    • Container application
    • Function application
    • Node matching (automatic)
  • Configuration management
    • Common configuration
    • Function configuration
    • Secrets
    • Certificates
    • Registry credentials
  • Node provisioning management
    • Node batch management
    • Registration and activation

_The open source version contains the RESTful API of all the above functions, but does not include the front-end dashboard. _

Contact us

As the first open edge computing framework in China, Baetyl aims to create a lightweight, secure, reliable and scalable edge computing community that will create a good ecological environment. In order to create a better development of Baetyl, if you have better advice about Baetyl, please contact us:

Contributing

If you are passionate about contributing to open source community, Baetyl will provide you with both code contributions and document contributions. More details, please see: How to contribute code or document to Baetyl.

baetyl's People

Contributors

allen-lj avatar caiyesd avatar chensheng0 avatar dependabot[bot] avatar fan-zehui avatar hannatao avatar imshin avatar itakyubi avatar juneezee avatar kuailehaibin avatar lileding avatar ludanfeng avatar meteriox avatar miaow999 avatar sherlockblaze avatar t-hiroyoshi avatar two avatar wlwgcdxc avatar wusp avatar xcgogo avatar xiejingru avatar xumengdi01 avatar xuri avatar zddr avatar zhi123-max avatar zxxf18 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

baetyl's Issues

函数配置replica>=1,log中会一直报错不停重启

Is your feature request related to a problem? Please describe.
函数配置replica>=1,log中会一直报错不停重启
配置如下:
image

日志截图如下
image

Describe the solution you'd like
若函数不支持replica>=1的配置,建议启动时给出友好提示

建议函数计算支持同时配置多个functions,减少配置的繁琐程度

Is your feature request related to a problem? Please describe.
目前每个函数需要单独配置conf,有时还有code,并且在application.yml里都要配置service和volume,有些繁琐

Describe the solution you'd like
建议一个conf目录的service文件中可配置多个functions,在application.yml里只要做一次配置即可,比如类似这样
sql函数的配置
image

python函数的配置
image

application.yml
image

make images报错

Pulling repository docker.io/library/golang
Tag alpine as builder not found in repository docker.io/library/golang
make[1]: *** [openedge-hub-image] 错误 1
make[1]:正在离开目录 `/home/chenjinyu/openedge/go/src/github.com/baidu/openedge/openedge-hub'
make: *** [openedge-hub-image] 错误 2
在make images报这个错,请问怎么解决呢?

openedge_function can only been triggered by local mqtt client

Currently according to user guide, MQTT client can access openedge_function via openedge_hub.
The data path is: MQTT client -> openedge_hub -> openedge_function -> openedge_hub->MQTT Client

if the MQTT client wants to access openedge_funcation via baidu_iothub, it will not work
The expected data path is: MQTT client -> iothub -> openedge_remote_mqtt -> openedge_hub->openedge_function.

函数计算执行报错

Describe the bug
函数计算执行报错,具体日志如下
image

image

To Reproduce
函数计算部分的配置如下(缩进有些问题):
application.yml文件
services:
- name: function-manager
image: cp01-caas-registry.epc.baidu.com:8000/iottest/openedge-function-manager:latest
replica: 1
mounts:
- name: function-manager-conf
path: etc/openedge
readonly: true
- name: function-manager-log
path: var/log/openedge
- name: function-sayhi
image: cp01-caas-registry.epc.baidu.com:8000/iottest/openedge-function-python27:latest
replica: 0
mounts:
- name: function-sayhi-conf
path: etc/openedge
readonly: true
- name: function-sayhi-code
path: var/db/openedge/function-sayhi
readonly: true
volumes:
# function
- name: function-manager-conf
path: var/db/openedge/function-manager-conf
- name: function-manager-log
path: var/db/log/openedge/function-manager-log
- name: function-sayhi-conf
path: var/db/openedge/function-sayhi-conf
- name: function-sayhi-code
path: var/db/openedge/function-sayhi-code

var/db/openedge/function-manager-conf/service.yml文件
hub:
address: tcp://openedge_hub:8963
username: test
password: test
rules:
- clientid: rule-e1iluuac15
subscribe:
topic: python/function/test
qos: 1
function:
name: sayhi
publish:
topic: python/function/result

var/db/openedge/function-sayhi-conf/service.yml文件
functions:
- name: 'sayhi'
handler: 'sayhi.handler'
codedir: 'var/db/openedge/function-sayhi'

openedge stop optimization

  1. Wait all resources release finish when stop openedge
  2. openedge stop
    2019/03/12 16:59:05 Unable send signal to the daemon: open /var/run/openedge.pid: no such file or directory

函数环境变量设置不生效

Describe the bug
RT,在docker模式中出现,native模式还没测试是否有此问题,设置如下
image

docker inspect截图如下
image

在教程中针对python运行时编写python脚本返回rpc error: code = Unknown desc = Exception

Describe the bug
参考https://openedge.tech/docs/customize/How-to-write-a-python-script-for-python-runtime
编写Python脚本引入第三方库时,无法得到正常返回值。

localfunc/module.yml

hub:
  address: tcp://localhub:1883
  username: test
  password: hahaha
rules:
  - id: rule-e1iluuac1
    subscribe:
      topic: t
      qos: 1
    compute:
      function: sayhi
    publish:
      topic: t/hi
      qos: 1
  - id: rule-get
    subscribe:
      topic: get
      qos: 1
    compute:
      function: getheader
    publish:
      topic: get/header
      qos: 1
functions:
  - id: func-nyeosbbch
    name: 'sayhi'
    runtime: 'python27'
    handler: 'sayhi.handler'
    codedir: 'var/db/openedge/module/func-nyeosbbch'
    entry: "hub.baidubce.com/openedge/openedge-function-runtime-python27:0.1.1"
    env:
      USER_ID: acuiot
    instance:
      min: 0
      max: 10
      timeout: 1m
      cpu:
        cpus: 0.5
      memory:
        limit: 50m
  - id: func-get
    name: 'getheader'
    runtime: 'python27'
    handler: 'getheader.handler'
    codedir: 'var/db/openedge/module/func-get'
    entry: "hub.baidubce.com/openedge/openedge-function-runtime-python27:0.1.1"
    env:
      USER_ID: acuiot
    instance:
      min: 0
      max: 10
      timeout: 1m
      cpu:
        cpus: 0.5
      memory:
        limit: 50m
logger:
  path: var/log/openedge/localfunc/localfunc.log
  console: true
  level: "debug"

func-get/getheader.py

#!/usr/bin/env python
import requests

def handler(event, context):
    """
    data: {"action": "A"}
    """
    if 'action' in event:
        if event['action'] == 'A':
            r = requests.get('https://openedge.tech')
            if str(r.status_code) == '200':
                event['info'] = r.headers
            else:
                event['info'] = 'exception found'
        else:
            event['info'] = 'action error'

    else:
        event['error'] = 'action not found'

    return event

if __name__ == "__main__":
    event = {"action": "A"}
    print handler(event, None)```

目录结构:
.
├── bin
│   └── openedge
├── etc
│   └── openedge
│       └── openedge.yml
└── var
    ├── db
    │   └── openedge
    │       ├── module
    │       │   ├── func-get
    │       │   │   ├── __init__.py
    │       │   │   ├── certifi
    │       │   │   ├── chardet
    │       │   │   ├── getheader.py
    │       │   │   ├── idna
    │       │   │   ├── module.yml
    │       │   │   ├── requests
    │       │   │   └── urllib3
    │       │   ├── func-nyeosbbch
    │       │   │   ├── __init__.py
    │       │   │   ├── module.yml
    │       │   │   └── sayhi.py
    │       │   ├── localfunc
    │       │   │   └── module.yml
    │       │   ├── localhub
    │       │   │   └── module.yml
    │       │   └── module.yml
    │       └── volume
    │           ├── func-get
    │           ├── func-nyeosbbch
    │           ├── localfunc
    │           └── localhub
    │               ├── msgqos1.db
    │               ├── offset.db
    │               └── session.db
    ├── log
    │   └── openedge
    │       ├── func-get
    │       │   └── getheader.log
    │       ├── func-nyeosbbch
    │       │   ├── sayhi.log
    │       │   └── sayhi.log.2019-01-29_09
    │       ├── localfunc
    │       │   └── localfunc.log
    │       ├── localhub
    │       │   └── localhub.log
    │       └── openedge.log
    └── run
        └── openedge.sock


![image](https://user-images.githubusercontent.com/3654864/51964703-460bef80-24a2-11e9-81c3-60a933c8c5e1.png)

**OS-platform (please complete the following information):**
 - OS:  Darwin
 - OpenEdge Version [0.1.1]

**Additional context**
希望可以找到可以运行错误的日志,docker运行时一闪而过,日志看不到。

直接build.sh 编译出错等

  1. trans/mqtt/config.go:35:51 QOS类型错误
for i, s := range c.Subscriptions {
		output[i] = packet.Subscription{Topic: s.Topic, QOS: s.QOS}
}

trans/mqtt/launcher.go:35:3

func (l *Launcher) Launch(urlString string) (transport.Server, error) {
	urlParts, err := url.ParseRequestURI(urlString)
	if err != nil {
		return nil, err
	}

        // 下方return语句, 返回值和参数都不对. 
	switch urlParts.Scheme {
	case "tcp", "mqtt":
		return transport.NewNetServer(urlParts.Host)
	case "tls", "ssl", "mqtts":
		return transport.NewSecureNetServer(urlParts.Host, l.TLSConfig)
	case "ws":
		return transport.NewWebSocketServer(urlParts.Host)
	case "wss":
		return transport.NewSecureWebSocketServer(urlParts.Host, l.TLSConfig)
	}
	return nil, transport.ErrUnsupportedProtocol
}

还有很多...

在云端进行本地函数计算模块的配置时的问题

Describe the bug
在进行云端操作创建本地函数计算模块配置一项是不是不能在云端进行函数路由的配置,我已经在CFC页面创建了函数
screenshot from 2019-01-21 15-57-41

但是在创建函数路由的时候还是无法识别到我创建的函数
screenshot from 2019-01-21 16-02-09

请问这个什么问题,是否能有更详细的说明,这中间该怎么操作,因为关于这一部分的操作描述都很省略
screenshot from 2019-01-21 16-04-25
screenshot from 2019-01-21 16-04-42

remote配置replica=0,instance无法启动;replica>1连接不停断连重连

Describe the bug
remote配置replica=0,instance无法启动
主程序的日志中只看到了一条相关日志
image

remote配置replica=2,hub和remote的连接都在不停的断连再重连,看上去像是连接已经建立后,又再次用相同的client id去把之前的连接踢掉
image
wireshark抓包,每次connect返回的connack都是连接成功
image

To Reproduce
remote配置
image

linux master server sock addr is invalid

Describe the bug
linux master server sock addr is invalid, file

master/master.go

c.Server = "unix://var/run/openedge.sock"

should be corrected as

c.Server = "unix:///var/run/openedge.sock"

按官方部署过程中mqttremote模块没有启动

Describe the bug
我按照官方的教程在本地部署其他模块都能正常启动,但mqttremote模块没有启动,使用的是docker模式部署的,请问这是什么原因?
系统是Ubuntu18.04,
screenshot from 2019-01-18 15-13-15
docker版本
screenshot from 2019-01-18 15-17-37

why secret based authentication in baidu iothub mqtt connection need username?

When i config remotehub module in openedge.
I found if i want to remote connec to baiddu iothub base on cetificate, I not only need to config cert path, but also need to config username.
It is different from aws iot or azuer iot.

==module.yml========================
name: remotehub
hub:
address: tcp://localhub:1883
username: test
password: hahaha
remotes:

  • name: remote2
    address: ssl://xxxxx.mqtt.iot.gz.baidubce.com:1884
    clientid: 31231231231sdfasdfasdf
    username: xxxxx/remotehub
    ca: var/db/openedge/module/remotehub/cert-1111/ca.pem
    cert: var/db/openedge/module/remotehub/cert-1111/client.pem
    key: var/db/openedge/module/remotehub/cert-1111/client.key
    timeout: 30s
    interval: 1m
    keepalive: 30s
    meta:
    name: remote2
    resourceId: cert-uag3c6udo
    rules:
  • id: rule-rcg3k6ytq
    hub:
    subscriptions:
    - topic: t1
    qos: 1
    remote:
    name: remote2
    subscriptions:
    - topic: t2
    qos: 1
    ===================

树莓派3B openedge -w example/docker 错误

root@raspberrypi:/usr/local/go/src/github.com/baidu/openedge# openedge -w example/docker
DEBU[2018-12-28T18:09:13+08:00] work dir: /usr/local/go/src/github.com/baidu/openedge/example/docker openedge=master
INFO[2018-12-28T18:09:13+08:00] network (835d9d5851b5:openedge) exists mode=docker openedge=master
WARN[2018-12-28T18:09:17+08:00] failed to prepare entries error="Error response from daemon: pull access denied for openedge-hub, repository does not exist or may require 'docker login';Error response from daemon: pull access denied for openedge-function, repository does not exist or may require 'docker login';" mode=docker openedge=master
INFO[2018-12-28T18:09:20+08:00] container started cid=f6ddd03911f2 module=localhub openedge=master
INFO[2018-12-28T18:09:20+08:00] resident module (localhub) started mode=docker openedge=master
WARN[2018-12-28T18:09:20+08:00] failed to create container error="Error response from daemon: NanoCPUs can not be set, as your kernel does not support CPU cfs period/quota or the cgroup is not mounted" module=localfunc openedge=master
WARN[2018-12-28T18:09:20+08:00] failed to create container again error="Error response from daemon: NanoCPUs can not be set, as your kernel does not support CPU cfs period/quota or the cgroup is not mounted" module=localfunc openedge=master
ERRO[2018-12-28T18:09:20+08:00] failed to start resident module (localfunc) error="Error response from daemon: NanoCPUs can not be set, as your kernel does not support CPU cfs period/quota or the cgroup is not mounted" mode=docker openedge=master
failed to start master: Error response from daemon: NanoCPUs can not be set, as your kernel does not support CPU cfs period/quota or the cgroup is not mounted
INFO[2018-12-28T18:09:20+08:00] resident module (localfunc) stopped mode=docker openedge=master
INFO[2018-12-28T18:09:21+08:00] container exited: { 2} cid=f6ddd03911f2 module=localhub openedge=master
INFO[2018-12-28T18:09:21+08:00] container stopped cid=f6ddd03911f2 module=localhub openedge=master
INFO[2018-12-28T18:09:21+08:00] container removed cid=f6ddd03911f2 module=localhub openedge=master
INFO[2018-12-28T18:09:21+08:00] resident module (localhub) stopped mode=docker openedge=master
INFO[2018-12-28T18:09:21+08:00] all resident modules stopped mode=docker openedge=master
INFO[2018-12-28T18:09:21+08:00] all temporary modules stopped mode=docker openedge=master

native模式运行没问题

函数多instance及timeout特性不符合预期

Describe the bug
函数多instance及timeout特性不符合预期

To Reproduce
某python函数配置多个实例以及timeout,配置如下
image

向source topic中依次发送4条消息
消息1:异常消息,发送后能够触发函数除0错误
消息2:异常消息,发送后触发函数执行超时
消息3:异常消息,发送后触发函数执行超时
消息4:正常消息,发送后能有正常返回

Expected behavior
函数最大实例为3,预期发完4条消息后能立马收到消息1和消息4的执行结果
然后超时后,也就是10s后能收到消息2和消息3执行超时的结果

但实际执行过程中,如果发消息的间隔设置为1s或更少,整个过程只收到了一条消息
{"errorMessage":"[400] Error response from daemon: Conflict. The container name "/function-sayhi.f0" is already in use by container "696608d3b83c14a5e8744215522cd4a6b5090e436b9052174afdd2e0fdc656fb". You have to remove (or rename) that container to be able to reuse that name.","errorType":"*errors.errorString","functionMessage":{"Topic":"python/function/test","Payload":"eyJleGNlcHRpb24iOiJleGNlcHRpb24ifQ==","FunctionName":"sayhi","FunctionInvokeID":"3c4cf8cf-8810-4bb7-8173-5764692ae3fd"}} from topic python/function/result
日志如下:4个红框为4条消息
image

发消息间隔设置为3s,能收到第一条预期中的错误消息,后续没有消息
{"errorMessage":"rpc error: code = Unknown desc = Exception calling application: integer division or modulo by zero","errorType":"*status.statusError","functionMessage":{"Topic":"python/function/test","Payload":"eyJleGNlcHRpb24iOiJleGNlcHRpb24ifQ==","FunctionName":"sayhi","FunctionInvokeID":"65443b32-a830-40d7-8c6d-0b28e55de1ed"}}
日志如下:4个红框为4条消息,可以看到第一条消息重试了几次之后发送了结果
image

其他消息未找到发送结果的日志,只找到processor停止的日志
image

本地与云端连接测试时出现消息循环

Describe the bug
在测试云端与本地连接的阶段已经成功连通云端与本地的连接,测试时通过MQTTBox连接本地local-hub使用MQTT.fx连接天工云,本地只运行两个模块local-hub和remote模块,remote模块连接天工云并订阅远程的 't' 主题,连接本地local-hub订阅 'topic' 主题,测试阶段使用MQTTBox发送消息到云端MQTT.fx可以正常接收,但使用MQTT.fx发送 't' 主题消息时,本地接收的消息一直循环,使用天工云网站的测试连接发送消息也是同样的结果。
配置与循环界面截图如下
remote配置
screenshot from 2019-01-24 14-06-20
local-hub配置
screenshot from 2019-01-24 14-07-56
消息循环
screenshot from 2019-01-24 11-24-14
使用天工云测试也出现循环
screenshot from 2019-01-24 14-13-01

关于官方模块中视频模块的请求

您好,请问能否提供一下官方本地视频接入模块的测试样例,目前在云端与本地进行测试,其他的模块都可以进行测试,如计算模块可以测试函数,local-hub可以通过MQTTBox进行测试,但视频接入模块却没找到相关的测试案例说明,不知道这个模块该如何进行测试,希望能够提供一下相关的说明,谢谢您!

mqttbox connect localhub failed

Describe the bug

I follow the official document to try to test mqtt connection to localhub .

mqtt box report "bad user name or password".

the localhub's log as follow:

time="2019-01-16T08:54:32Z" level=error msg="username (test) or password not permitted" client=3e0b1aaa-5851-4019-a767-1d1895fe16df1547628486150 module=localhub mqtt=session
time="2019-01-16T08:54:32Z" level=info msg="session closing, messages (unack): 0" client=3e0b1aaa-5851-4019-a767-1d1895fe16df1547628486150 module=localhub mqtt=session
time="2019-01-16T08:54:32Z" level=debug msg="will message removed: id=" component=recorder module=localhub
time="2019-01-16T08:54:32Z" level=info msg="session closed, messages (unack): 0" client=3e0b1aaa-5851-4019-a767-1d1895fe16df1547628486150 module=localhub mqtt=session
time="2019-01-16T08:54:33Z" level=debug msg="received: <Connect ClientID="3e0b1aaa-5851-4019-a767-1d1895fe16df1547628486150" KeepAlive=10 Username="test" Password="be178c0543eb17f5f3043021c9e5fcf30285e557a4fc309cce97ff9ca6182912" CleanSession=true Will=nil Version=4>" module=localhub mqtt=session
time="2019-01-16T08:54:33Z" level=error msg="username (test) or password not permitted" client=3e0b1aaa-5851-4019-a767-1d1895fe16df1547628486150 module=localhub mqtt=session
time="2019-01-16T08:54:33Z" level=info msg="session closing, messages (unack): 0" client=3e0b1aaa-5851-4019-a767-1d1895fe16df1547628486150 module=localhub mqtt=session
time="2019-01-16T08:54:33Z" level=debug msg="will message removed: id=" component=recorder module=localhub
time="2019-01-16T08:54:33Z" level=info msg="session closed, messages (unack): 0" client=3e0b1aaa-5851-4019-a767-1d1895fe16df1547628486150 module=localhub mqtt=session
time="2019-01-16T08:54:34Z" level=debug msg="received: <Connect ClientID="3e0b1aaa-5851-4019-a767-1d1895fe16df1547628486150" KeepAlive=10 Username="test" Password="be178c0543eb17f5f3043021c9e5fcf30285e557a4fc309cce97ff9ca6182912" CleanSession=true Will=nil Version=4>" module=localhub mqtt=session
time="2019-01-16T08:54:34Z" level=error msg="username (test) or password not permitted" client=3e0b1aaa-5851-4019-a767-1d1895fe16df1547628486150 module=localhub mqtt=session
time="2019-01-16T08:54:34Z" level=info msg="session closing, messages (unack): 0" client=3e0b1aaa-5851-4019-a767-1d1895fe16df1547628486150 module=localhub mqtt=session
time="2019-01-16T08:54:34Z" level=debug msg="will message removed: id=" component=recorder module=localhub
time="2019-01-16T08:54:34Z" level=info msg="session closed, messages (unack): 0" client=3e0b1aaa-5851-4019-a767-1d1895fe16df1547628486150 module=localhub mqtt=session
time="2019-01-16T08:54:35Z" level=debug msg="received: <Connect ClientID="3e0b1aaa-5851-4019-a767-1d1895fe16df1547628486150" KeepAlive=10 Username="test" Password="be178c0543eb17f5f3043021c9e5fcf30285e557a4fc309cce97ff9ca6182912" CleanSession=true Will=nil Version=4>" module=localhub mqtt=session
time="2019-01-16T08:54:35Z" level=error msg="username (test) or password not permitted" client=3e0b1aaa-5851-4019-a767-1d1895fe16df1547628486150 module=localhub mqtt=session
time="2019-01-16T08:54:35Z" level=info msg="session closing, messages (unack): 0" client=3e0b1aaa-5851-4019-a767-1d1895fe16df1547628486150 module=localhub mqtt=session
time="2019-01-16T08:54:35Z" level=debug msg="will message removed: id=" component=recorder module=localhub
time="2019-01-16T08:54:35Z" level=info msg="session closed, messages (unack): 0" client=3e0b1aaa-5851-4019-a767-1d1895fe16df1547628486150 module=localhub mqtt=session

To Reproduce
Steps to reproduce the behavior:

  1. start OpenEdge
    image

  2. config mqttbox
    image

  3. See error
    image

OS-platform (please complete the following information):

  • OS: [ Linux(raspberrypi)]
  • CPU: [armv7]
  • OpenEdge Version [0.1.1]

localhub configuration
var/db/openedge/module/localhub/model.yml

image

Nice to have a customer module example in cpp

Is your feature request related to a problem? Please describe.
Openedge framework is really nice, and easy to be ported to embedded system.
I really like the architecture in stead of kubernetes. And this is what I'm look for.
In most of the edge device, computing resources are limited.
Some heavy task, like video analysis, even the rtmp module is less efficiency.
In most of these case, people will use hardware accelerator to create their module on different platform, still c++ is the dominate language.

Describe the solution you'd like
An opensource project probably be hard to cover all these hardware platform, but a c++ example will be good enough to guide user to create their own customize module.

But anyway, openedge team is doing pretty good job. Congratulations!

openedge -w example/docker/ 报错

root@raspberrypi:/usr/local/gowork/src/github.com/baidu/openedge# openedge -w example/docker/
Error: unknown shorthand flag: 'w' in -w
Usage:
openedge [command]

Available Commands:
help Help about any command
start start openedge on background
stop stop openedge and all services
version Show the OpenEdge version information

Flags:
-h, --help help for openedge

Use "openedge [command] --help" for more information about a command.

2019/03/29 13:54:41 unknown shorthand flag: 'w' in -w

参照从源码编译文档入门,docker 镜像生成成功,make install正常,运行程序就是上面这段,请问是我那一部分没有操作对吗?

example sayhi seems not work

By using sayhi in the example, tried function computing , but failed with ""errorMessage": "rpc error: code = Unknown desc = Exception calling application","

checked every step i have done, not find any clues, please help , thanks

openedge编译问题,make depends时godep restore出错

我在搭建openedge平台的过程中遇到了下面的问题:

编译openedge时make depends时godep restore出错,报以下错误:

godep: error downloading dep (golang.org/x/crypto/ssh/terminal): unrecognized import path "golang.org/x/crypto/ssh/terminal"

godep: error downloading dep (golang.org/x/net/context): unrecognized import path "golang.org/x/net/context"

godep: error downloading dep (golang.org/x/net/context/ctxhttp): unrecognized import path "golang.org/x/net/context/ctxhttp"

godep: error downloading dep (golang.org/x/net/http/httpguts): unrecognized import path "golang.org/x/net/http/httpguts"

godep: error downloading dep (golang.org/x/net/http2): unrecognized import path "golang.org/x/net/http2"

godep: error downloading dep (golang.org/x/net/http2/hpack): unrecognized import path "golang.org/x/net/http2/hpack"

godep: error downloading dep (golang.org/x/net/idna): unrecognized import path "golang.org/x/net/idna"

godep: error downloading dep (golang.org/x/net/internal/socks): unrecognized import path "golang.org/x/net/internal/socks"

也尝试了网上提供的各种方法,但是还是没有解决

make编译出错

make编译的时候报下面的错误

GO openedge

github.com/baidu/openedge/module

module/flag.go:60:30: flag.CommandLine.Output undefined (type *flag.FlagSet has no field or method Output, but does have flag.output)

Hi3559A native mode error

wanna try to run on Hi3559A dev board, some errors ocurred when starting openedge, do I miss some configs?

~ # openedge
DEBU[1970-01-01T01:44:01Z] work dir: /usr/local openedge=master
INFO[1970-01-01T01:44:01Z] entry (map[bin/openedge-hub:{} bin/openedge-function:{}]) prepared mode=native openedge=master
DEBU[1970-01-01T01:44:01Z] bin/openedge-hub [localhub -c /usr/local/var/db/openedge/module/localhub/module.yml] mode=native openedge=master
INFO[1970-01-01T01:44:01Z] resident module (localhub) started mode=native openedge=master
DEBU[1970-01-01T01:44:01Z] bin/openedge-function [localfunc -c /usr/local/var/db/openedge/module/localfunc/module.yml] mode=native openedge=master
INFO[1970-01-01T01:44:01Z] resident module (localfunc) started mode=native openedge=master
INFO[1970-01-01T01:44:01Z] all resident modules started mode=native openedge=master
DEBU[1970-01-01T01:44:01Z] module starting module=localfunc
DEBU[1970-01-01T01:44:01Z] next reconnect dispatcher=mqtt module=localfunc
ERRO[1970-01-01T01:44:01Z] failed to create new client dispatcher=mqtt error="dial tcp :1883: connect: invalid argument" module=localfunc
DEBU[1970-01-01T01:44:01Z] delay reconnect: 500ms dispatcher=mqtt module=localfunc
DEBU[1970-01-01T01:44:01Z] task of routing message (Q0) begins component=sink module=localhub sink="$rule/msgqos0"
DEBU[1970-01-01T01:44:01Z] task of processing message from channel (Q1) begins component=rule module=localhub target="$rule/topic"
DEBU[1970-01-01T01:44:01Z] task of processing message from channel (Q1) begins component=rule module=localhub target="$rule/msgqos0"
DEBU[1970-01-01T01:44:01Z] task of waiting acknowledge begins component=rule module=localhub target="$rule/msgqos0"
DEBU[1970-01-01T01:44:01Z] task of processing message from channel (Q0) begins component=rule module=localhub target="$rule/msgqos0"
DEBU[1970-01-01T01:44:01Z] task of waiting acknowledge begins component=rule module=localhub target="$rule/topic"
DEBU[1970-01-01T01:44:01Z] task of routing message (Q1) begins with offset=1 component=sink module=localhub sink="$rule/topic"
DEBU[1970-01-01T01:44:01Z] task of processing message from channel (Q0) begins component=rule module=localhub target="$rule/topic"
DEBU[1970-01-01T01:44:01Z] 1 offset(s) persisted: map[$rule/topic:0] component=broker module=localhub
DEBU[1970-01-01T01:44:01Z] next reconnect dispatcher=mqtt module=localfunc
ERRO[1970-01-01T01:44:01Z] failed to create new client dispatcher=mqtt error="dial tcp :1883: connect: invalid argument" module=localfunc
DEBU[1970-01-01T01:44:01Z] delay reconnect: 1s dispatcher=mqtt module=localfunc
DEBU[1970-01-01T01:44:02Z] next reconnect dispatcher=mqtt module=localfunc
ERRO[1970-01-01T01:44:02Z] failed to create new client dispatcher=mqtt error="dial tcp :1883: connect: invalid argument" module=localfunc
DEBU[1970-01-01T01:44:02Z] delay reconnect: 2s dispatcher=mqtt module=localfunc
DEBU[1970-01-01T01:44:04Z] next reconnect dispatcher=mqtt module=localfunc
ERRO[1970-01-01T01:44:04Z] failed to create new client dispatcher=mqtt error="dial tcp :1883: connect: invalid argument" module=localfunc
DEBU[1970-01-01T01:44:04Z] delay reconnect: 4s dispatcher=mqtt module=localfunc
DEBU[1970-01-01T01:44:08Z] next reconnect dispatcher=mqtt module=localfunc
ERRO[1970-01-01T01:44:08Z] failed to create new client dispatcher=mqtt error="dial tcp :1883: connect: invalid argument" module=localfunc
DEBU[1970-01-01T01:44:08Z] delay reconnect: 8s dispatcher=mqtt module=localfunc
DEBU[1970-01-01T01:44:16Z] next reconnect dispatcher=mqtt module=localfunc
ERRO[1970-01-01T01:44:16Z] failed to create new client dispatcher=mqtt error="dial tcp :1883: connect: invalid argument" module=localfunc
DEBU[1970-01-01T01:44:16Z] delay reconnect: 16s dispatcher=mqtt module=localfunc
DEBU[1970-01-01T01:44:32Z] next reconnect dispatcher=mqtt module=localfunc
ERRO[1970-01-01T01:44:32Z] failed to create new client dispatcher=mqtt error="dial tcp :1883: connect: invalid argument" module=localfunc

add new running mode on k3s

add new running mode on k3s, introduce features from k3s, for example support tp run service cross devices.

use "make images" or "make image"

when I use make images, it reports : make: *** No rule to make target 'images'. Stop.
image

when I use make image, this cmd successfully.
image

which cmd is right?

进程模式openedge无法启动

Describe the bug
进程模式openedge无法启动
日志截图如下
image

var/run/openedge/services目录如下
image

To Reproduce
application.yml配置如下,其中openedge-hub的bin文件在var/db/openedge/openedge-hub目录下
image

localhub-conf/service.yml配置如下
image

When start bin/openedge , Get "failed to create master: listen unix var/run/openedge.sock: bind: address already in use" error!

[root@localhost OpenEdge]# bin/openedge
DEBU[2019-01-16T05:48:30-05:00] work dir: /home/OpenEdge openedge=master
INFO[2019-01-16T05:48:30-05:00] network (23f72b44b7cd:openedge) exists mode=docker openedge=master
INFO[2019-01-16T05:48:30-05:00] all resident modules stopped mode=docker openedge=master
INFO[2019-01-16T05:48:30-05:00] all temporary modules stopped mode=docker openedge=master
failed to create master: listen unix var/run/openedge.sock: bind: address already in use

DEL var/run/openedge.sock file and can SKIP this error.

根据文档尝试本地快速部署失败

根据“帮助文档 > 产品文档 > 智能边缘Baidu IntelliEdge > 本地快速部署”步骤

  1. 智能边缘控制台内完成了以下步骤
    1. 新建核心并下载程序包
    2. 新建官方模块配置(没有配置函数路由和远程连接)
    3. 生成配置及下发
  2. 解压本站下载的openedge-linux-amd64-0.1.1.tar.gz并拷入控制台生成的key/pem及新建核心的配置文件
  3. 尝试启动OpenEdge,失败。下载更早的0.1.0版尝试,现象一样。
xxx:~/bie$ bin/openedge -w .
INFO[2019-01-02T17:43:34+08:00] network (bdacae1d0cd8:openedge) exists        mode=docker openedge=master
WARN[2019-01-02T17:43:44+08:00] failed to prepare entries                     error="Error response from daemon: Get https://hub.baidubce.com/v2/: net/http: TLS handshake timeout;Error response from daemon: Get https://hub.baidubce.com/v2/: net/http: TLS handshake timeout;Error response from daemon: Get https://hub.baidubce.com/v2/: net/http: TLS handshake timeout;Error response from daemon: Get https://hub.baidubce.com/v2/: net/http: TLS handshake timeout;" mode=docker openedge=master
WARN[2019-01-02T17:43:44+08:00] failed to create container                    error="Error: No such image: hub.baidubce.com/openedge/openedge-hub:0.1.1" module=myBieLocalHub openedge=master
WARN[2019-01-02T17:43:44+08:00] failed to create container again              error="Error: No such image: hub.baidubce.com/openedge/openedge-hub:0.1.1" module=myBieLocalHub openedge=master
ERRO[2019-01-02T17:43:44+08:00] failed to start resident module (myBieLocalHub)  error="Error: No such image: hub.baidubce.com/openedge/openedge-hub:0.1.1" mode=docker openedge=master
failed to start master: Error: No such image: hub.baidubce.com/openedge/openedge-hub:0.1.1
INFO[2019-01-02T17:43:44+08:00] resident module (myBieLocalHub) stopped       mode=docker openedge=master
INFO[2019-01-02T17:43:44+08:00] all resident modules stopped                  mode=docker openedge=master
INFO[2019-01-02T17:43:44+08:00] all temporary modules stopped                 mode=docker openedge=master

环境描述:

硬件:AMD64
OS:Ubuntu 18.04

Docker:
------
Client:
 Version:           18.09.0
 API version:       1.39
 Go version:        go1.10.4
 Git commit:        4d60db4
 Built:             Wed Nov  7 00:49:01 2018
 OS/Arch:           linux/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          18.09.0
  API version:      1.39 (minimum version 1.12)
  Go version:       go1.10.4
  Git commit:       4d60db4
  Built:            Wed Nov  7 00:16:44 2018
  OS/Arch:          linux/amd64
  Experimental:     false

Module directory isolation

/usr/local
├── etc
│   └── openedge
│       └── openedge.yml
└── var
    ├── run
    │   └── openedge.sock
    ├── log
    │   └── openedge
    │       ├── func-nyeosbbch
    │       │   └── sayhi.log
    │       ├── localfunc
    │       │   └── localfunc.log
    │       ├── localhub
    │       │   └── localhub.log
    │       └── openedge.log
    └── db
        └── openedge
            ├── volume
            │    └── localhub
            │        ├── msgqos1.db
            │        ├── offset.db
            │        └── session.db
            └── module
                ├── module.yml
                ├── func-nyeosbbch
                │   ├── __init__.py
                │   ├── sayhi.py
                │   └── sayhi.pyc
                ├── localfunc
                │   └── module.yml
                └── localhub
                    └── module.yml

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.