Git Product home page Git Product logo

baetyl-cloud'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 and Cloud Management Suite (this project) 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 does not support native process mode currently. Since it runs on K3S, the overall resource overhead will increase.
  • The edge framework will support edge node clusters in the future.

Architecture

Architecture

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

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

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.

Installation

Please download the baetyl-cloud project before installation. We take the scripts/demo in the project as an example to demonstrate the steps. The cloud management suite and the edge computing framework are all installed on the same machine.

git clone https://github.com/baetyl/baetyl-cloud.git

Prepare database

Before installing baetyl-cloud, you should prepare a database(mysql or mariadb both meets the requirements)

Modify sync-server-address and init-server-address for table baetyl_property in the sql file scripts/sql/data.sql to set your own profile.

sync-server-address : https://${host-ip}:30005
init-server-address : https://${host-ip}:30003

Import the sql file scripts/sql/tables.sql to create tables and the file scripts/sql/data.sql to initialize settings.

Enter your database information in the setting file scripts/charts/baetyl-cloud/conf/cloud.yml

database:
type: "mysql"
url: "${database_username}:${database_password}@(${database_ip}:3306)/baetyl_cloud?charset=utf8&parseTime=true"

Install baetyl-cloud

Enter the directory where the baetyl-cloud project is located and execute the following commands.

# helm 3
cd scripts/charts
kubectl apply -f ./baetyl-cloud/apply/
helm install baetyl-cloud ./baetyl-cloud/

Make sure that baetyl-cloud is in the Running state, and you can also check the log for errors.

kubectl get pod
# NAME                            READY   STATUS    RESTARTS   AGE
# baetyl-cloud-57cd9597bd-z62kb   1/1     Running   0          97s

kubectl logs -f baetyl-cloud-57cd9597bd-z62kb

Create and install edge node

Call the RESTful API to create a node.

curl -d "{\"name\":\"demo-node\"}" -H "Content-Type: application/json" -X POST http://0.0.0.0:30004/v1/nodes
# {"namespace":"baetyl-cloud","name":"demo-node","version":"1931564","createTime":"2020-07-22T06:25:05Z","labels":{"baetyl-node-name":"demo-node"},"ready":false}

Obtain the online installation script of the edge node.

curl http://0.0.0.0:30004/v1/nodes/demo-node/init
# {"cmd":"curl -skfL 'https://0.0.0.0:30003/v1/active/setup.sh?token=f6d21baa9b7b2265223a333630302c226b223a226e6f6465222c226e223a2264656d6f2d6e6f6465222c226e73223a2262616574796c2d636c6f7564222c227473223a313539353430323132367d' -osetup.sh && sh setup.sh"}

Execute the installation script on the machine where baetyl-cloud is deployed.

curl -skfL 'https://0.0.0.0:30003/v1/active/setup.sh?token=f6d21baa9b7b2265223a333630302c226b223a226e6f6465222c226e223a2264656d6f2d6e6f6465222c226e73223a2262616574796c2d636c6f7564222c227473223a313539353430323132367d' -osetup.sh && sh setup.sh

Note:

1、 The K3s environment needs to be configured before the edge node installation. For details, please refer to k3s installation. K3s runs in Containerd runtime by default, when you want to switch to Docker runtime, please install Docker first, refer to docker installation

2、If you need to install an edge node on a device other than the machine where baetyl-cloud is deployed, please modify the database, change the node-address and active-address in the baetyl_property table to real addresses.

Check the status of the edge node. Eventually, two edge services will be in the Running state. You can also call the cloud RESTful API to view the edge node status. You can see that the edge node is online ("ready":true).

kubectl get pod -A
# NAMESPACE            NAME                                      READY   STATUS    RESTARTS   AGE
  baetyl-edge-system   baetyl-broker-78f897dd65-dg5hp            1/1     Running       0      75s
  baetyl-edge-system   baetyl-core-77976446d9-pzbt7              1/1     Running       0      89s
  baetyl-edge-system   baetyl-init-7fdd9bcf96-klbpt              1/1     Running       0      102s

curl http://0.0.0.0:30004/v1/nodes/demo-node
# {"namespace":"baetyl-cloud","name":"demo-node","version":"1939112",...,"report":{"time":"2020-07-22T07:25:27.495362661Z","sysapps":...,"node":...,"nodestats":...,"ready":true}

Integration with eKuiper

BIE has integrated eKuiper since v2.4.3. Now, you can deploy and run it with one click through BIE's system application For eKuiper:version 1.8.0-alpha.2, you only need to add 'baetyl-ekuiper' field to the sysApps field when the node is created or modified.

The eKuiper will connect to baetyl-broker by default, so that you can use baetyl-broker as an input source to leverage eKuiper s streaming data processing and rules engine capabilities for edge data.

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-cloud's People

Contributors

allen-lj avatar bigqianqianjiaojiao avatar boundray avatar chensheng0 avatar chensheng00 avatar dependabot[bot] avatar hannatao avatar icheems avatar ikingye avatar ingbyr avatar itakyubi avatar lileding avatar meteriox avatar miaow999 avatar xumengdi01 avatar yyang09 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

baetyl-cloud's Issues

v2.3.0版本无法创建job类型应用

目前试用了v2.3.0版本,遇到如下两个问题:
1、调用api创建job类型应用,然后实际创建的是deployment,且返回jobconfig与请求数据不一致,如下图所示:
2、app定时调度功能是否支持,目前从代码看是实现了的,但是好像缺失了从baetyl_cron_app表中读取未调度app的相应功能,这部分是需要自己实现吗?
image

通过二进制编译安装后运行出错!X509错误

参考 https://baetyl.io/docs/cn/latest/develop/build.html 进行源码编译


[root@s1 ~]# kubectl get pods --all-namespaces -s https://127.0.0.1:6443
NAMESPACE     NAME                                     READY   STATUS        RESTARTS         AGE
kube-system   svclb-traefik-mmzbg                      2/2     Running       2 (6d4h ago)     6d4h
kube-system   metrics-server-9cf544f65-rlqs8           1/1     Terminating   1 (6d4h ago)     6d4h
kube-system   traefik-786ff64748-m46ff                 1/1     Terminating   1 (6d4h ago)     6d4h
kube-system   local-path-provisioner-64ffb68fd-vxdtl   1/1     Terminating   1 (6d4h ago)     6d4h
kube-system   coredns-85cb69466-z2s26                  1/1     Terminating   1 (6d4h ago)     6d4h
kube-system   svclb-traefik-rzr4s                      2/2     Running       6 (4d21h ago)    6d4h
kube-system   svclb-traefik-fb46f                      2/2     Running       12 (4d21h ago)   6d4h
kube-system   metrics-server-9cf544f65-4d5j2           1/1     Running       8 (97m ago)      6d3h
kube-system   local-path-provisioner-64ffb68fd-x8h7r   1/1     Running       3 (97m ago)      4d21h

[root@s1 ~]# cd scripts/native
[root@s1 ~]# make
[root@s1 ~]# kubectl apply -f ./apply/
[root@s1 ~]# kubectl config view --raw
[root@s1 ~]# vim  conf/conf.yml
[root@s1 ~]# vim conf/kubeconfig.yml
[root@s1 ~]#  ../../output/baetyl-cloud -c ./conf/conf.yml

启动成功

{"level":"info","ts":1641971828.6166356,"caller":"plugin/register.go:35","msg":"plugin is registered","plugin":"awss3"}
{"level":"info","ts":1641971828.616691,"caller":"plugin/register.go:35","msg":"plugin is registered","plugin":"database"}
{"level":"info","ts":1641971828.6167073,"caller":"plugin/register.go:35","msg":"plugin is registered","plugin":"decryption"}
{"level":"info","ts":1641971828.6167123,"caller":"plugin/register.go:35","msg":"plugin is registered","plugin":"defaultauth"}
{"level":"info","ts":1641971828.6167276,"caller":"plugin/register.go:35","msg":"plugin is registered","plugin":"defaultcsrf"}
{"level":"info","ts":1641971828.616733,"caller":"plugin/register.go:35","msg":"plugin is registered","plugin":"defaultlicense"}
{"level":"info","ts":1641971828.6167412,"caller":"plugin/register.go:35","msg":"plugin is registered","plugin":"defaultlocker"}
{"level":"info","ts":1641971828.616746,"caller":"plugin/register.go:35","msg":"plugin is registered","plugin":"defaultpki"}
{"level":"info","ts":1641971828.6167521,"caller":"plugin/register.go:35","msg":"plugin is registered","plugin":"defaultsign"}
{"level":"info","ts":1641971828.6167567,"caller":"plugin/register.go:35","msg":"plugin is registered","plugin":"defaulttask"}
{"level":"info","ts":1641971828.616764,"caller":"plugin/register.go:35","msg":"plugin is registered","plugin":"defaulttx"}
{"level":"info","ts":1641971828.623592,"caller":"plugin/register.go:35","msg":"plugin is registered","plugin":"kube"}
{"level":"info","ts":1641971828.6236148,"caller":"plugin/register.go:35","msg":"plugin is registered","plugin":"kubernetes"}
{"level":"info","ts":1641971828.6236305,"caller":"plugin/register.go:35","msg":"plugin is registered","plugin":"httplink"}
{"level":"info","ts":1641971828.6236374,"caller":"plugin/register.go:35","msg":"plugin is registered","plugin":"rsasign"}
 Version: git-54c3757
Revision: git-54c3757
{"level":"info","ts":1641971828.6236682,"caller":"context/context.go:104","msg":"to load config file","file":"./conf/conf.yml"}
{"level":"debug","ts":1641971828.6256144,"caller":"context/context.go:157","msg":"context is created","file":"./conf/conf.yml","conf":{"cert":{"ca":"var/lib/baetyl/system/certs/ca.pem","key":"var/lib/baetyl/system/certs/key.pem","cert":"var/lib/baetyl/system/certs/crt.pem","name":"","insecureSkipVerify":false,"clientAuthType":0},"function":{"address":"https://baetyl-function.baetyl-edge-system:50011","timeout":30000000000,"keepalive":30000000000,"maxIdleConns":100,"idleConnTimeout":90000000000,"tlsHandshakeTimeout":10000000000,"expectContinueTimeout":1000000000,"ca":"var/lib/baetyl/system/certs/ca.pem","key":"var/lib/baetyl/system/certs/key.pem","cert":"var/lib/baetyl/system/certs/crt.pem","name":"","insecureSkipVerify":false,"clientAuthType":0},"broker":{"address":"ssl://baetyl-broker.baetyl-edge-system:50010","username":"","password":"","clientid":"","cleansession":false,"timeout":30000000000,"keepalive":30000000000,"maxReconnectInterval":180000000000,"maxCacheMessages":10,"disableAutoAck":false,"subscriptions":[],"ca":"var/lib/baetyl/system/certs/ca.pem","key":"var/lib/baetyl/system/certs/key.pem","cert":"var/lib/baetyl/system/certs/crt.pem","name":"","insecureSkipVerify":false,"clientAuthType":0},"logger":{"level":"debug","encoding":"json","filename":"","compress":false,"maxAge":15,"maxSize":50,"maxBackups":15,"encodeTime":"","encodeLevel":""}}}
{"level":"info","ts":1641971828.625744,"caller":"context/run.go:34","msg":"service starting","args":["../../output/baetyl-cloud","-c","./conf/conf.yml"],"pwd":"/root/baetyl-cloud/scripts/native"}
{"level":"debug","ts":1641971828.6259973,"caller":"baetyl-cloud/main.go:42","msg":"cloud config","cfg":{"initServer":{"port":":9003","readTimeout":30000000000,"writeTimeout":30000000000,"shutdownTime":3000000000,"Certificate":{"ca":"./certs/server_ca.crt","key":"./certs/server.key","cert":"./certs/server.crt","name":"","insecureSkipVerify":false,"clientAuthType":0}},"adminServer":{"port":":9004","readTimeout":30000000000,"writeTimeout":30000000000,"shutdownTime":3000000000,"Certificate":{"ca":"","key":"","cert":"","name":"","insecureSkipVerify":false,"clientAuthType":0}},"misServer":{"port":":9006","readTimeout":30000000000,"writeTimeout":30000000000,"shutdownTime":3000000000,"Certificate":{"ca":"","key":"","cert":"","name":"","insecureSkipVerify":false,"clientAuthType":0},"authToken":"baetyl-cloud-token","tokenHeader":"baetyl-cloud-token","userHeader":"baetyl-cloud-user"},"logger":{"level":"debug","encoding":"json","filename":"","compress":false,"maxAge":15,"maxSize":50,"maxBackups":15,"encodeTime":"","encodeLevel":""},"task":{"batchNum":100,"lockExpiredTime":60,"scheduletime":30,"concurrentNum":10,"queueLength":100},"lock":{"expireTime":5},"cronJobs":[],"cache":{"expirationDuration":600000000000},"template":{"path":"./templates"},"plugin":{"pubsub":"defaultpubsub","pki":"defaultpki","auth":"defaultauth","license":"defaultlicense","resource":"kube","shadow":"database","index":"database","batch":"databaseext","record":"databaseext","callback":"databaseext","appHistory":"database","objects":[],"functions":[],"property":"database","module":"database","synclinks":["httplink"],"locker":"defaultlocker","task":"defaulttask","sign":"defaultsign","dm":"databaseext","tx":"defaulttx","cron":"database","csrf":"defaultcsrf","jwt":"defaultjwt"}}}
[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
 - using env:   export GIN_MODE=release
 - using code:  gin.SetMode(gin.ReleaseMode)

[GIN-debug] GET    /health                   --> github.com/baetyl/baetyl-cloud/v2/server.Health (1 handlers)
... 部分省略  ...
[GIN-debug] GET    /health                   --> github.com/baetyl/baetyl-cloud/v2/server.Health (1 handlers)
[GIN-debug] GET    /v1/active/:resource      --> github.com/baetyl/baetyl-cloud/v2/common.WrapperRaw.func1 (3 handlers)
[GIN-debug] GET    /v1/init/:resource        --> github.com/baetyl/baetyl-cloud/v2/common.WrapperRaw.func1 (3 handlers)
{"level":"info","ts":1641971828.6639307,"caller":"baetyl-cloud/main.go:85","msg":"init  server starting"}


开启客户端调试

curl -d "{"name":"demo-node"}" -H "Content-Type: application/json" -X POST http://0.0.0.0:9004/v1/nodes

{"code":"UnknownError","message":"Get \"https://127.0.0.1:6443/apis/cloud.baetyl.io/v1alpha1/namespaces/baetyl-cloud/nodes\": x509: certificate signed by unknown authority","requestId":""}

服务端日志

{"level":"info","ts":1641971895.5600188,"caller":"baetyl-cloud/main.go:85","msg":"init  server starting"}
{"level":"info","ts":1641971901.7832885,"caller":"server/handler.go:36","msg":"start request","requestId":"","method":"GET","url":"/v1/nodes/demo-node/init","clientip":"127.0.0.1"}
{"level":"debug","ts":1641971901.7871697,"caller":"utils/trace.go:14","msg":"GetNode","plugin":"kube","cost":0.003848191}
{"level":"error","ts":1641971901.7871997,"caller":"service/node.go:106","msg":"get node failed","error":"Get \"https://127.0.0.1:6443/apis/cloud.baetyl.io/v1alpha1/namespaces/baetyl-cloud/nodes/demo-node\": 
x509: certificate signed by unknown authority","stacktrace":"github.com/baetyl/baetyl-cloud/v2/service.(*NodeServiceImpl).Get\n\t/root/baetyl-cloud/service/node.go:106\ngithub.com/baetyl/baetyl-cloud/v2/api.(*API).GenInitCmdFromNode\n\t/root/baetyl-cloud/api/node.go:403\ngithub.com/baetyl/baetyl-cloud/v2/common.Wrapper.func1\n\t/root/baetyl-cloud/common/context.go:219\ngithub.com/gin-gonic/gin.(*Context).Next\n\t/root/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165\ngithub.com/baetyl/baetyl-cloud/v2/server.LoggerHandler\n\t/root/baetyl-cloud/server/handler.go:52\ngithub.com/gin-gonic/gin.(*Context).Next\n\t/root/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165\ngithub.com/baetyl/baetyl-cloud/v2/server.RequestIDHandler\n\t/root/baetyl-cloud/server/handler.go:31\ngithub.com/gin-gonic/gin.(*Context).Next\n\t/root/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165\ngithub.com/gin-gonic/gin.(*Engine).handleHTTPRequest\n\t/root/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:489\ngithub.com/gin-gonic/gin.(*Engine).ServeHTTP\n\t/root/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:445\nnet/http.serverHandler.ServeHTTP\n\t/usr/lib/golang/src/net/http/server.go:2868\nnet/http.(*conn).serve\n\t/usr/lib/golang/src/net/http/server.go:1933"}
{"level":"error","ts":1641971901.787734,"caller":"common/context.go:221","msg":"failed to handler request","requestId":"","error":"Get \"https://127.0.0.1:6443/apis/cloud.baetyl.io/v1alpha1/namespaces/baetyl-cloud/nodes/demo-node\":
 x509: certificate signed by unknown authority","stacktrace":"github.com/baetyl/baetyl-cloud/v2/common.Wrapper.func1\n\t/root/baetyl-cloud/common/context.go:221\ngithub.com/gin-gonic/gin.(*Context).Next\n\t/root/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165\ngithub.com/baetyl/baetyl-cloud/v2/server.LoggerHandler\n\t/root/baetyl-cloud/server/handler.go:52\ngithub.com/gin-gonic/gin.(*Context).Next\n\t/root/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165\ngithub.com/baetyl/baetyl-cloud/v2/server.RequestIDHandler\n\t/root/baetyl-cloud/server/handler.go:31\ngithub.com/gin-gonic/gin.(*Context).Next\n\t/root/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165\ngithub.com/gin-gonic/gin.(*Engine).handleHTTPRequest\n\t/root/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:489\ngithub.com/gin-gonic/gin.(*Engine).ServeHTTP\n\t/root/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:445\nnet/http.serverHandler.ServeHTTP\n\t/usr/lib/golang/src/net/http/server.go:2868\nnet/http.(*conn).serve\n\t/usr/lib/golang/src/net/http/server.go:1933"}
{"level":"error","ts":1641971901.7877574,"caller":"common/context.go:184","msg":"process failed.","requestId":"","stacktrace":"github.com/baetyl/baetyl-cloud/v2/common.PopulateFailedResponse\n\t/root/baetyl-cloud/common/context.go:184\ngithub.com/baetyl/baetyl-cloud/v2/common.Wrapper.func1\n\t/root/baetyl-cloud/common/context.go:222\ngithub.com/gin-gonic/gin.(*Context).Next\n\t/root/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165\ngithub.com/baetyl/baetyl-cloud/v2/server.LoggerHandler\n\t/root/baetyl-cloud/server/handler.go:52\ngithub.com/gin-gonic/gin.(*Context).Next\n\t/root/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165\ngithub.com/baetyl/baetyl-cloud/v2/server.RequestIDHandler\n\t/root/baetyl-cloud/server/handler.go:31\ngithub.com/gin-gonic/gin.(*Context).Next\n\t/root/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165\ngithub.com/gin-gonic/gin.(*Engine).handleHTTPRequest\n\t/root/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:489\ngithub.com/gin-gonic/gin.(*Engine).ServeHTTP\n\t/root/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:445\nnet/http.serverHandler.ServeHTTP\n\t/usr/lib/golang/src/net/http/server.go:2868\nnet/http.(*conn).serve\n\t/usr/lib/golang/src/net/http/server.go:1933"}
{"level":"info","ts":1641971901.787797,"caller":"server/handler.go:53","msg":"finish request","requestId":"","status":"500","latency":0.004484081}


请问如何下发edgex foundry服务

在2.2release中提到了对edgex foundry的支持,可以通过baetyl的云端管理套件,向边缘侧下发完整的EdgeX 14个服务,下发的EdgeX服务将由baetyl提交部署并统一监测信息与云端进行信息同步。实现步骤有好兄弟赐教一二吗

could not pull image when installed with helm v3

install baetyl-cloud with helm install baetyl-cloud ./scripts/charts/baetyl-cloud/ failed with events:

image

it's reported that the image doesn't exist.

currently I'm using aliyun's image speeder service.

无法安装边缘节点

依照快速安装教程安装后,无法创建node

root@mq-228 ~/i/baetyl-cloud# curl -d "{\"name\":\"demo-node\"}" -H "Content-Type: application/json" -X POST http://0.0.0.0:30004/v1/nodes                                     master
{"code":"UnknownError","message":"nodes.cloud.baetyl.io \"demo-node\" is forbidden: User \"system:serviceaccount:default:baetyl-cloud\" cannot get resource \"nodes\" in API group \"cloud.baetyl.io\" in the namespace \"baetyl-cloud\"","requestId":""}

日志信息:

root@mq-228 ~/i/baetyl-cloud# k logs baetyl-cloud-c5db777d6-cfff7                                                                                                              master
{"level":"info","ts":1596682079.0830908,"caller":"plugin/register.go:34","msg":"plugin is registered","plugin":"minio"}
{"level":"info","ts":1596682079.0832982,"caller":"plugin/register.go:34","msg":"plugin is registered","plugin":"database"}
{"level":"info","ts":1596682079.0833375,"caller":"plugin/register.go:34","msg":"plugin is registered","plugin":"defaultauth"}
{"level":"info","ts":1596682079.0833712,"caller":"plugin/register.go:34","msg":"plugin is registered","plugin":"defaultlicense"}
{"level":"info","ts":1596682079.0834126,"caller":"plugin/register.go:34","msg":"plugin is registered","plugin":"defaultpki"}
{"level":"info","ts":1596682079.0896316,"caller":"plugin/register.go:34","msg":"plugin is registered","plugin":"kubernetes"}
Version:      v2.0.0
Git revision: git-3140996
Go version:   go1.13.5
{"level":"debug","ts":1596682079.0912743,"caller":"context/context.go:123","msg":"context is created","file":"/etc/baetyl/cloud.yml","conf":{"http":{"address":"http://baetyl-function:80","timeout":30000000000,"keepalive":30000000000,"maxIdleConns":100,"idleConnTimeout":90000000000,"tlsHandshakeTimeout":10000000000,"expectContinueTimeout":1000000000,"ca":"","key":"","cert":"","name":"","insecureSkipVerify":false},"mqtt":{"address":"tcp://baetyl-broker:1883","username":"","password":"","clientid":"","cleansession":false,"timeout":30000000000,"keepalive":30000000000,"maxReconnectInterval":180000000000,"maxCacheMessages":10,"disableAutoAck":false,"subscriptions":[],"ca":"","key":"","cert":"","name":"","insecureSkipVerify":false},"logger":{"level":"debug","encoding":"json","filename":"","compress":false,"maxAge":15,"maxSize":50,"maxBackups":15}}}
{"level":"info","ts":1596682079.0916722,"caller":"context/run.go:34","msg":"service starting","args":["baetyl-cloud","-c","/etc/baetyl/cloud.yml"],"pwd":"/"}
{"level":"debug","ts":1596682079.092409,"caller":"src/main.go:32","msg":"cloud config","cfg":{"activeServer":{"port":":9003","readTimeout":30000000000,"writeTimeout":30000000000,"shutdownTime":3000000000,"Certificate":{"ca":"/etc/certs/server_ca.crt","key":"/etc/certs/server.key","cert":"/etc/certs/server.crt","name":"","insecureSkipVerify":false}},"adminServer":{"port":":9004","readTimeout":30000000000,"writeTimeout":30000000000,"shutdownTime":3000000000,"Certificate":{"ca":"","key":"","cert":"","name":"","insecureSkipVerify":false}},"nodeServer":{"port":":9005","readTimeout":30000000000,"writeTimeout":30000000000,"shutdownTime":3000000000,"Certificate":{"ca":"/etc/certs/client_ca.crt","key":"/etc/certs/server.key","cert":"/etc/certs/server.crt","name":"","insecureSkipVerify":false},"commonName":"common-name"},"logger":{"level":"debug","encoding":"json","filename":"","compress":false,"maxAge":15,"maxSize":50,"maxBackups":15},"plugin":{"pki":"defaultpki","auth":"defaultauth","license":"defaultlicense","shadow":"database","objects":[],"functions":[],"modelStorage":"kubernetes","databaseStorage":"database"}}}
[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
 - using env:	export GIN_MODE=release
 - using code:	gin.SetMode(gin.ReleaseMode)

[GIN-debug] GET    /health                   --> github.com/baetyl/baetyl-cloud/server.health (1 handlers)
[GIN-debug] GET    /v1/configs/:name         --> github.com/baetyl/baetyl-cloud/common.Wrapper.func1 (4 handlers)
[GIN-debug] PUT    /v1/configs/:name         --> github.com/baetyl/baetyl-cloud/common.Wrapper.func1 (4 handlers)
[GIN-debug] DELETE /v1/configs/:name         --> github.com/baetyl/baetyl-cloud/common.Wrapper.func1 (4 handlers)
[GIN-debug] POST   /v1/configs               --> github.com/baetyl/baetyl-cloud/common.Wrapper.func1 (4 handlers)
[GIN-debug] GET    /v1/configs               --> github.com/baetyl/baetyl-cloud/common.Wrapper.func1 (4 handlers)
[GIN-debug] GET    /v1/configs/:name/apps    --> github.com/baetyl/baetyl-cloud/common.Wrapper.func1 (4 handlers)
[GIN-debug] GET    /v1/registries/:name      --> github.com/baetyl/baetyl-cloud/common.Wrapper.func1 (4 handlers)
[GIN-debug] PUT    /v1/registries/:name      --> github.com/baetyl/baetyl-cloud/common.Wrapper.func1 (4 handlers)
[GIN-debug] POST   /v1/registries/:name/refresh --> github.com/baetyl/baetyl-cloud/common.Wrapper.func1 (4 handlers)
[GIN-debug] DELETE /v1/registries/:name      --> github.com/baetyl/baetyl-cloud/common.Wrapper.func1 (4 handlers)
[GIN-debug] POST   /v1/registries            --> github.com/baetyl/baetyl-cloud/common.Wrapper.func1 (4 handlers)
[GIN-debug] GET    /v1/registries            --> github.com/baetyl/baetyl-cloud/common.Wrapper.func1 (4 handlers)
[GIN-debug] GET    /v1/registries/:name/apps --> github.com/baetyl/baetyl-cloud/common.Wrapper.func1 (4 handlers)
[GIN-debug] GET    /v1/secrets/:name         --> github.com/baetyl/baetyl-cloud/common.Wrapper.func1 (4 handlers)
[GIN-debug] PUT    /v1/secrets/:name         --> github.com/baetyl/baetyl-cloud/common.Wrapper.func1 (4 handlers)
[GIN-debug] DELETE /v1/secrets/:name         --> github.com/baetyl/baetyl-cloud/common.Wrapper.func1 (4 handlers)
[GIN-debug] POST   /v1/secrets               --> github.com/baetyl/baetyl-cloud/common.Wrapper.func1 (4 handlers)
[GIN-debug] GET    /v1/secrets               --> github.com/baetyl/baetyl-cloud/common.Wrapper.func1 (4 handlers)
[GIN-debug] GET    /v1/secrets/:name/apps    --> github.com/baetyl/baetyl-cloud/common.Wrapper.func1 (4 handlers)
[GIN-debug] GET    /v1/nodes/:name           --> github.com/baetyl/baetyl-cloud/common.Wrapper.func1 (4 handlers)
[GIN-debug] GET    /v1/nodes/:name/apps      --> github.com/baetyl/baetyl-cloud/common.Wrapper.func1 (4 handlers)
[GIN-debug] GET    /v1/nodes/:name/stats     --> github.com/baetyl/baetyl-cloud/common.Wrapper.func1 (4 handlers)
[GIN-debug] PUT    /v1/nodes/:name           --> github.com/baetyl/baetyl-cloud/common.Wrapper.func1 (4 handlers)
[GIN-debug] DELETE /v1/nodes/:name           --> github.com/baetyl/baetyl-cloud/common.Wrapper.func1 (4 handlers)
[GIN-debug] POST   /v1/nodes                 --> github.com/baetyl/baetyl-cloud/common.Wrapper.func1 (5 handlers)
[GIN-debug] GET    /v1/nodes                 --> github.com/baetyl/baetyl-cloud/common.Wrapper.func1 (4 handlers)
[GIN-debug] GET    /v1/nodes/:name/deploys   --> github.com/baetyl/baetyl-cloud/common.Wrapper.func1 (4 handlers)
[GIN-debug] GET    /v1/nodes/:name/init      --> github.com/baetyl/baetyl-cloud/common.Wrapper.func1 (4 handlers)
[GIN-debug] GET    /v1/apps/:name            --> github.com/baetyl/baetyl-cloud/common.Wrapper.func1 (4 handlers)
[GIN-debug] PUT    /v1/apps/:name            --> github.com/baetyl/baetyl-cloud/common.Wrapper.func1 (4 handlers)
[GIN-debug] DELETE /v1/apps/:name            --> github.com/baetyl/baetyl-cloud/common.Wrapper.func1 (4 handlers)
[GIN-debug] POST   /v1/apps                  --> github.com/baetyl/baetyl-cloud/common.Wrapper.func1 (4 handlers)
[GIN-debug] GET    /v1/apps                  --> github.com/baetyl/baetyl-cloud/common.Wrapper.func1 (4 handlers)
[GIN-debug] GET    /v1/register              --> github.com/baetyl/baetyl-cloud/common.Wrapper.func1 (4 handlers)
[GIN-debug] POST   /v1/register              --> github.com/baetyl/baetyl-cloud/common.Wrapper.func1 (4 handlers)
[GIN-debug] PUT    /v1/register/:batchName   --> github.com/baetyl/baetyl-cloud/common.Wrapper.func1 (4 handlers)
[GIN-debug] DELETE /v1/register/:batchName   --> github.com/baetyl/baetyl-cloud/common.Wrapper.func1 (4 handlers)
[GIN-debug] GET    /v1/register/:batchName   --> github.com/baetyl/baetyl-cloud/common.Wrapper.func1 (4 handlers)
[GIN-debug] GET    /v1/register/:batchName/init --> github.com/baetyl/baetyl-cloud/common.Wrapper.func1 (4 handlers)
[GIN-debug] GET    /v1/register/:batchName/download --> github.com/baetyl/baetyl-cloud/common.WrapperRaw.func1 (4 handlers)
[GIN-debug] POST   /v1/register/:batchName/generate --> github.com/baetyl/baetyl-cloud/common.Wrapper.func1 (4 handlers)
[GIN-debug] POST   /v1/register/:batchName/record --> github.com/baetyl/baetyl-cloud/common.Wrapper.func1 (4 handlers)
[GIN-debug] PUT    /v1/register/:batchName/record/:recordName --> github.com/baetyl/baetyl-cloud/common.Wrapper.func1 (4 handlers)
[GIN-debug] DELETE /v1/register/:batchName/record/:recordName --> github.com/baetyl/baetyl-cloud/common.Wrapper.func1 (4 handlers)
[GIN-debug] GET    /v1/register/:batchName/record/:recordName --> github.com/baetyl/baetyl-cloud/common.Wrapper.func1 (4 handlers)
[GIN-debug] GET    /v1/register/:batchName/record --> github.com/baetyl/baetyl-cloud/common.Wrapper.func1 (4 handlers)
[GIN-debug] POST   /v1/callback              --> github.com/baetyl/baetyl-cloud/common.Wrapper.func1 (4 handlers)
[GIN-debug] PUT    /v1/callback/:callbackName --> github.com/baetyl/baetyl-cloud/common.Wrapper.func1 (4 handlers)
[GIN-debug] DELETE /v1/callback/:callbackName --> github.com/baetyl/baetyl-cloud/common.Wrapper.func1 (4 handlers)
[GIN-debug] GET    /v1/callback/:callbackName --> github.com/baetyl/baetyl-cloud/common.Wrapper.func1 (4 handlers)
[GIN-debug] POST   /v1/namespace             --> github.com/baetyl/baetyl-cloud/common.Wrapper.func1 (4 handlers)
[GIN-debug] GET    /v1/namespace             --> github.com/baetyl/baetyl-cloud/common.Wrapper.func1 (4 handlers)
[GIN-debug] DELETE /v1/namespace             --> github.com/baetyl/baetyl-cloud/common.Wrapper.func1 (4 handlers)
[GIN-debug] GET    /v1/sysconfig/:type/:key  --> github.com/baetyl/baetyl-cloud/common.Wrapper.func1 (4 handlers)
[GIN-debug] GET    /v1/sysconfig/:type       --> github.com/baetyl/baetyl-cloud/common.Wrapper.func1 (4 handlers)
[GIN-debug] GET    /v1/functions             --> github.com/baetyl/baetyl-cloud/common.Wrapper.func1 (4 handlers)
[GIN-debug] GET    /v1/objects               --> github.com/baetyl/baetyl-cloud/common.Wrapper.func1 (4 handlers)
{"level":"info","ts":1596682079.1134431,"caller":"src/main.go:44","msg":"admin server starting"}
[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
 - using env:	export GIN_MODE=release
 - using code:	gin.SetMode(gin.ReleaseMode)

[GIN-debug] GET    /health                   --> github.com/baetyl/baetyl-cloud/server.health (1 handlers)
[GIN-debug] POST   /v1/sync/report           --> github.com/baetyl/baetyl-cloud/common.Wrapper.func1 (4 handlers)
[GIN-debug] POST   /v1/sync/desire           --> github.com/baetyl/baetyl-cloud/common.Wrapper.func1 (4 handlers)
[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
 - using env:	export GIN_MODE=release
 - using code:	gin.SetMode(gin.ReleaseMode)

{"level":"info","ts":1596682079.1283972,"caller":"src/main.go:53","msg":"node server starting"}
[GIN-debug] GET    /health                   --> github.com/baetyl/baetyl-cloud/server.health (1 handlers)
[GIN-debug] POST   /v1/active/               --> github.com/baetyl/baetyl-cloud/common.Wrapper.func1 (3 handlers)
[GIN-debug] GET    /v1/active/:resource      --> github.com/baetyl/baetyl-cloud/common.WrapperRaw.func1 (3 handlers)
{"level":"info","ts":1596682079.1288095,"caller":"src/main.go:62","msg":"active server starting"}
{"level":"info","ts":1596682335.004345,"caller":"server/handler.go:34","msg":"start request","requestId":"","method":"POST","url":"/v1/nodes","clientip":"10.42.1.1"}
{"level":"info","ts":1596682335.004684,"caller":"server/handler.go:43","msg":"request body","requestId":"","body":"{\"name\":\"demo-node\"}"}
{"level":"error","ts":1596682335.0167212,"caller":"service/node.go:70","msg":"get node failed","error":"nodes.cloud.baetyl.io \"demo-node\" is forbidden: User \"system:serviceaccount:default:baetyl-cloud\" cannot get resource \"nodes\" in API group \"cloud.baetyl.io\" in the namespace \"baetyl-cloud\"","stacktrace":"github.com/baetyl/baetyl-cloud/service.(*nodeService).Get\n\t/go/src/service/node.go:70\ngithub.com/baetyl/baetyl-cloud/api.(*API).CreateNode\n\t/go/src/api/node.go:96\ngithub.com/baetyl/baetyl-cloud/common.Wrapper.func1\n\t/go/src/common/context.go:167\ngithub.com/gin-gonic/gin.(*Context).Next\n\t/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:161\ngithub.com/baetyl/baetyl-cloud/server.loggerHandler\n\t/go/src/server/handler.go:50\ngithub.com/gin-gonic/gin.(*Context).Next\n\t/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:161\ngithub.com/baetyl/baetyl-cloud/server.requestIDHandler\n\t/go/src/server/handler.go:29\ngithub.com/gin-gonic/gin.(*Context).Next\n\t/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:161\ngithub.com/gin-gonic/gin.(*Engine).handleHTTPRequest\n\t/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:409\ngithub.com/gin-gonic/gin.(*Engine).ServeHTTP\n\t/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:367\nnet/http.serverHandler.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2802\nnet/http.(*conn).serve\n\t/usr/local/go/src/net/http/server.go:1890"}
{"level":"error","ts":1596682335.0170224,"caller":"common/context.go:169","msg":"failed to handler request","requestId":"","error":"nodes.cloud.baetyl.io \"demo-node\" is forbidden: User \"system:serviceaccount:default:baetyl-cloud\" cannot get resource \"nodes\" in API group \"cloud.baetyl.io\" in the namespace \"baetyl-cloud\"","stacktrace":"github.com/baetyl/baetyl-cloud/common.Wrapper.func1\n\t/go/src/common/context.go:169\ngithub.com/gin-gonic/gin.(*Context).Next\n\t/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:161\ngithub.com/baetyl/baetyl-cloud/server.loggerHandler\n\t/go/src/server/handler.go:50\ngithub.com/gin-gonic/gin.(*Context).Next\n\t/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:161\ngithub.com/baetyl/baetyl-cloud/server.requestIDHandler\n\t/go/src/server/handler.go:29\ngithub.com/gin-gonic/gin.(*Context).Next\n\t/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:161\ngithub.com/gin-gonic/gin.(*Engine).handleHTTPRequest\n\t/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:409\ngithub.com/gin-gonic/gin.(*Engine).ServeHTTP\n\t/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:367\nnet/http.serverHandler.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2802\nnet/http.(*conn).serve\n\t/usr/local/go/src/net/http/server.go:1890"}
{"level":"error","ts":1596682335.0171359,"caller":"common/context.go:134","msg":"process failed.","requestId":"","stacktrace":"github.com/baetyl/baetyl-cloud/common.PopulateFailedResponse\n\t/go/src/common/context.go:134\ngithub.com/baetyl/baetyl-cloud/common.Wrapper.func1\n\t/go/src/common/context.go:170\ngithub.com/gin-gonic/gin.(*Context).Next\n\t/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:161\ngithub.com/baetyl/baetyl-cloud/server.loggerHandler\n\t/go/src/server/handler.go:50\ngithub.com/gin-gonic/gin.(*Context).Next\n\t/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:161\ngithub.com/baetyl/baetyl-cloud/server.requestIDHandler\n\t/go/src/server/handler.go:29\ngithub.com/gin-gonic/gin.(*Context).Next\n\t/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:161\ngithub.com/gin-gonic/gin.(*Engine).handleHTTPRequest\n\t/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:409\ngithub.com/gin-gonic/gin.(*Engine).ServeHTTP\n\t/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:367\nnet/http.serverHandler.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2802\nnet/http.(*conn).serve\n\t/usr/local/go/src/net/http/server.go:1890"}
{"level":"info","ts":1596682335.0173151,"caller":"server/handler.go:51","msg":"finish request","requestId":"","status":"500","latency":0.012589823}

缺失template导致无法创建函数应用

创建函数应用需要根据运行时获取到对应template,例如 baetyl-python3-program.yml,但是目前这些文件并没有提供,导致无法创建函数应用。

func generateProgramOfFunctionService(api *API, service *specV1.Service, app *specV1.Application) (*specV1.Configuration, error) {
	generatedConfigName, err := getGenProgramNameOfFunctionService(app, service.Name)
	if err != nil {
		return nil, err
	}

	config := &specV1.Configuration{}
	tempalteName := fmt.Sprintf("baetyl-%s-program.yml", service.FunctionConfig.Runtime)
	params := map[string]interface{}{
		"Namespace":  app.Namespace,
		"ConfigName": generatedConfigName,
	}

	err = api.Template.UnmarshalTemplate(tempalteName, params, config)
	if err != nil {
		return nil, errors.Trace(err)
	}
	return config, nil
}

image
image

部署运行相关问题

能否将部署运行的过程写的详细一点,按照现有的部署起来太难了,很多错误

namespace 是否可以暴露给接口?

现在namespace 应该只能设置一个,可否暴漏给接口,可以在接口中指定在哪个namespace 中创建/获取配置呢,这样的话一个cloud 可以做到不同项目或者用户的资源隔离。

边缘节点部署失败

依照文档的k8s安装过程,
云边分别部署在两台机器上,创建好节点后,在边缘端部署失败,请问是什么原因
2

安装baetyl时容器启动错误

{"level":"info","ts":1648805659.362636,"caller":"context/context.go:104","msg":"to load config file","file":"/etc/baetyl/cloud.yml"}
{"level":"debug","ts":1648805659.3631146,"caller":"context/context.go:157","msg":"context is created","file":"/etc/baetyl/cloud.yml","conf":{"cert":{"ca":"var/lib/baetyl/system/certs/ca.pem","key":"var/lib/baetyl/system/certs/key.pem","cert":"var/lib/baetyl/system/certs/crt.pem","name":"","insecureSkipVerify":false,"clientAuthType":0},"function":{"address":"https://baetyl-function.baetyl-edge-system:50011","timeout":30000000000,"keepalive":30000000000,"maxIdleConns":100,"idleConnTimeout":90000000000,"tlsHandshakeTimeout":10000000000,"expectContinueTimeout":1000000000,"ca":"var/lib/baetyl/system/certs/ca.pem","key":"var/lib/baetyl/system/certs/key.pem","cert":"var/lib/baetyl/system/certs/crt.pem","name":"","insecureSkipVerify":false,"clientAuthType":0},"broker":{"address":"ssl://baetyl-broker.baetyl-edge-system:50010","username":"","password":"","clientid":"","cleansession":false,"timeout":30000000000,"keepalive":30000000000,"maxReconnectInterval":180000000000,"maxCacheMessages":10,"disableAutoAck":false,"subscriptions":[],"ca":"var/lib/baetyl/system/certs/ca.pem","key":"var/lib/baetyl/system/certs/key.pem","cert":"var/lib/baetyl/system/certs/crt.pem","name":"","insecureSkipVerify":false,"clientAuthType":0},"logger":{"level":"debug","encoding":"json","filename":"","compress":false,"maxAge":15,"maxSize":50,"maxBackups":15,"encodeTime":"","encodeLevel":""}}}
{"level":"info","ts":1648805659.3633091,"caller":"context/run.go:34","msg":"service starting","args":["baetyl-cloud","-c","/etc/baetyl/cloud.yml"],"pwd":"/"}
{"level":"debug","ts":1648805659.3638144,"caller":"src/main.go:42","msg":"cloud config","cfg":{"initServer":{"port":":9003","readTimeout":30000000000,"writeTimeout":30000000000,"shutdownTime":3000000000,"Certificate":{"ca":"/etc/certs/server_ca.crt","key":"/etc/certs/server.key","cert":"/etc/certs/server.crt","name":"","insecureSkipVerify":false,"clientAuthType":0}},"adminServer":{"port":":9004","readTimeout":30000000000,"writeTimeout":30000000000,"shutdownTime":3000000000,"Certificate":{"ca":"","key":"","cert":"","name":"","insecureSkipVerify":false,"clientAuthType":0}},"misServer":{"port":":9006","readTimeout":30000000000,"writeTimeout":30000000000,"shutdownTime":3000000000,"Certificate":{"ca":"","key":"","cert":"","name":"","insecureSkipVerify":false,"clientAuthType":0},"authToken":"baetyl-cloud-token","tokenHeader":"baetyl-cloud-token","userHeader":"baetyl-cloud-user"},"logger":{"level":"debug","encoding":"json","filename":"","compress":false,"maxAge":15,"maxSize":50,"maxBackups":15,"encodeTime":"","encodeLevel":""},"task":{"batchNum":100,"lockExpiredTime":60,"scheduletime":30,"concurrentNum":10,"queueLength":100},"lock":{"expireTime":5},"cache":{"expirationDuration":600000000000},"template":{"path":"/etc/templates"},"plugin":{"pubsub":"defaultpubsub","pki":"defaultpki","auth":"defaultauth","license":"defaultlicense","resource":"kube","shadow":"database","index":"database","batch":"databaseext","record":"databaseext","callback":"databaseext","appHistory":"database","objects":[],"functions":[],"property":"database","module":"database","synclinks":["httplink"],"locker":"defaultlocker","task":"database","sign":"defaultsign","dm":"databaseext","tx":"defaulttx"}}}
{"level":"error","ts":1648805659.3751168,"caller":"plugin/register.go:50","msg":"failed to create plugin","error":"Error 1045: Access denied for user 'root'@'10.244.1.33' (using password: YES)","errorVerbose":"Error 1045: Access denied for user 'root'@'10.244.1.33' (using password: YES)\ngithub.com/baetyl/baetyl-go/v2/errors.Trace\n\t/go/pkg/mod/github.com/baetyl/baetyl-go/[email protected]/errors/error.go:33\ngithub.com/baetyl/baetyl-cloud/v2/plugin/database.NewDB\n\t/go/src/plugin/database/db.go:58\ngithub.com/baetyl/baetyl-cloud/v2/plugin/database.New\n\t/go/src/plugin/database/db.go:45\ngithub.com/baetyl/baetyl-cloud/v2/plugin.GetPlugin\n\t/go/src/plugin/register.go:48\ngithub.com/baetyl/baetyl-cloud/v2/service.NewIndexService\n\t/go/src/service/index.go:37\ngithub.com/baetyl/baetyl-cloud/v2/service.NewApplicationService\n\t/go/src/service/application.go:50\ngithub.com/baetyl/baetyl-cloud/v2/service.NewAppCombinedService\n\t/go/src/service/resource.go:23\ngithub.com/baetyl/baetyl-cloud/v2/api.NewAPI\n\t/go/src/api/api.go:38\nmain.main.func1\n\t/go/src/main.go:46\ngithub.com/baetyl/baetyl-go/v2/context.Run\n\t/go/pkg/mod/github.com/baetyl/baetyl-go/[email protected]/context/run.go:35\nmain.main\n\t/go/src/main.go:35\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:203\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1357","stacktrace":"github.com/baetyl/baetyl-cloud/v2/plugin.GetPlugin\n\t/go/src/plugin/register.go:50\ngithub.com/baetyl/baetyl-cloud/v2/service.NewIndexService\n\t/go/src/service/index.go:37\ngithub.com/baetyl/baetyl-cloud/v2/service.NewApplicationService\n\t/go/src/service/application.go:50\ngithub.com/baetyl/baetyl-cloud/v2/service.NewAppCombinedService\n\t/go/src/service/resource.go:23\ngithub.com/baetyl/baetyl-cloud/v2/api.NewAPI\n\t/go/src/api/api.go:38\nmain.main.func1\n\t/go/src/main.go:46\ngithub.com/baetyl/baetyl-go/v2/context.Run\n\t/go/pkg/mod/github.com/baetyl/baetyl-go/[email protected]/context/run.go:35\
nmain.main\n\t/go/src/main.go:35\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:203"}
{"level":"error","ts":1648805659.3752084,"caller":"context/run.go:37","msg":"service has stopped with error","error":"Error 1045: Access denied for user 'root'@'10.244.1.33' (using password: YES)","errorVerbose":"Error 1045: Access denied for user 'root'@'10.244.1.33' (using password: YES)\ngithub.com/baetyl/baetyl-go/v2/errors.Trace\n\t/go/pkg/mod/github.com/baetyl/baetyl-go/[email protected]/errors/error.go:33\ngithub.com/baetyl/baetyl-cloud/v2/plugin/database.NewDB\n\t/go/src/plugin/database/db.go:58\ngithub.com/baetyl/baetyl-cloud/v2/plugin/database.New\n\t/go/src/plugin/database/db.go:45\ngithub.com/baetyl/baetyl-cloud/v2/plugin.GetPlugin\n\t/go/src/plugin/register.go:48\ngithub.com/baetyl/baetyl-cloud/v2/service.NewIndexService\n\t/go/src/service/index.go:37\ngithub.com/baetyl/baetyl-cloud/v2/service.NewApplicationService\n\t/go/src/service/application.go:50\ngithub.com/baetyl/baetyl-cloud/v2/service.NewAppCombinedService\n\t/go/src/service/resource.go:23\ngithub.com/baetyl/baetyl-cloud/v2/api.NewAPI\n\t/go/src/api/api.go:38\nmain.main.func1\n\t/go/src/main.go:46\ngithub.com/baetyl/baetyl-go/v2/context.Run\n\t/go/pkg/mod/github.com/baetyl/baetyl-go/[email protected]/context/run.go:35\nmain.main\n\t/go/src/main.go:35\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:203\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1357","stacktrace":"github.com/baetyl/baetyl-go/v2/context.Run\n\t/go/pkg/mod/github.com/baetyl/baetyl-go/[email protected]/context/run.go:37\nmain.main\n\t/go/src/main.go:35\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:203"}

查了很久没有找到原因,不知道有大神能否看出端倪

快速安装报错

 curl -d "{\"name\":\"demo-node\"}" -H "Content-Type: application/json" -X POST http://172.20.0.2:30004/v1/nodes
{"code":"UnknownError","message":"nodes.cloud.baetyl.io \"demo-node\" is forbidden: User \"system:serviceaccount:default:baetyl-cloud\" cannot get resource \"nodes\" in API group \"cloud.baetyl.io\" in the namespace \"baetyl-cloud\"","requestId":""}

关于新版本的api咨询

您好,在阅读了2.2版本的文档和相关openapi后,自己在本地搭建运行起来了,自己有一些问题需要咨询一下:

  1. 文档中支持edgexfoundry 完整服务的下发。经过自己家的实践,通过openapi应用接口 从baetyl-cloud端成功 下发了所有相关的服务,经查看 边缘baetyl端是每个服务创建了相应的pod在运行,这时候就遇到服务间的通讯问题。edgexfoundry官方是通过docker-compose来运行,服务间的通讯默认是通过 “容器服务名”+“端口” 来实现通讯的。在baetyl的边端运行就会出现服务之间访问问题。 (目前我采用的方式是 将所有edgex服务共享主机网络,都配置通过localhost来通讯,不是知否还有其他方式 ? )

  2. v2.2版本发布说明中,“新增了对已部署应用的远程调试、远程日志查看的API定义”,请问下这个功能怎么使用,使用文档中没有相应的说明

非常感谢

Suggested Improvement: Modify the Implementation of eventTrigger to Use a List

Suggested Improvement: Modify the Implementation of eventTrigger to Use a List

I would like to propose a change in the implementation of eventTrigger from a map to a list. This modification would allow for the execution of different functions for the same event. Currently, the implementation uses a map, which makes it impossible to perform different actions on the same event. For example, when dealing with the shadowCreateOrUpdateTrigger event, there might be a need to update a cache and also send a message to a message queue. With the current implementation, it would require registering two separate events to achieve this functionality.

By transitioning to a list-based approach, it becomes feasible to execute multiple actions for a single event, providing greater flexibility and efficiency in handling event-triggered tasks.

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.