Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
tingweiwang
/
kubeedge
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 6ae68531
authored
Jul 23, 2020
by
tingweiwang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix edgecore
1 parent
dc67e840
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
57 additions
and
12 deletions
roles/cloud/tasks/main.yml
roles/cloud/templates/cloudcore.service.j2
roles/edge/handles/main.yml
roles/edge/tasks/main.yml
roles/edge/templates/edge.service.j2 → roles/edge/templates/edgecore.service.j2
roles/edge/templates/moquuitto_port.conf.j2
roles/edge/vars/main.yaml
roles/cloud/tasks/main.yml
View file @
6ae6853
...
@@ -15,27 +15,29 @@
...
@@ -15,27 +15,29 @@
#- name: 拷贝生成kubeedge cloud 证书脚本
#- name: 拷贝生成kubeedge cloud 证书脚本
# copy: src=certgen.sh dest={{ KUBEEDGE_BASE }}
# copy: src=certgen.sh dest={{ KUBEEDGE_BASE }}
-
name
:
分发并渲染证书脚本
-
name
:
分发并渲染证书脚本
template
:
src=certgen.sh.j2 dest=
{{ KUBEEDGE_BASE }}
/certgen.sh mode=777
template
:
src=certgen.sh.j2 dest=
/etc/kubeedge
/certgen.sh mode=777
-
name
:
执行生成证书脚本
-
name
:
执行生成证书脚本
shell
:
sh
{{ KUBEEDGE_BASE }}
/certgen.sh stream
shell
:
sh
/etc/kubeedge
/certgen.sh stream
-
name
:
设置cloud iptables
-
name
:
设置cloud iptables
shell
:
iptables -t nat -A OUTPUT -p tcp --dport 10350 -j DNAT --to {{ MASTER_IP }}:10003
shell
:
iptables -t nat -A OUTPUT -p tcp --dport 10350 -j DNAT --to {{ MASTER_IP }}:10003
-
name
:
在k8s中创建设备模块以及设备CRD yaml文件
-
name
:
在k8s中创建设备模块以及设备CRD yaml文件
shell
:
kubectl apply -f /root/kubeedge/
kubeedge/roles/cloud/files/device_crds_yaml/devices/ && kubectl apply -f /root/kubeedge
/kubeedge/roles/cloud/files/device_crds_yaml/reliablesyncs/
shell
:
kubectl apply -f /root/kubeedge/
roles/cloud/files/device_crds_yaml/devices/ && kubectl apply -f /root
/kubeedge/roles/cloud/files/device_crds_yaml/reliablesyncs/
-
name
:
分发渲染配置cloud 配置文件
-
name
:
分发渲染配置cloud 配置文件
template
:
src=cloudcore.yaml.j2 dest=
{{ KUBEEDGE_BASE }}
/config/cloudcore.yaml
template
:
src=cloudcore.yaml.j2 dest=
/etc/kubeedge
/config/cloudcore.yaml
notify
:
restart cloudcore
notify
:
restart cloudcore
-
name
:
分发cloud二进制文件
-
name
:
分发cloud二进制文件
copy
:
src=cloud/cloudcore dest={{ KUBEEDGE_BASE }}/bin/cloudcore mode=777
copy
:
src=cloud/cloudcore dest=/etc/kubeedge/bin/cloudcore mode=777
-
name
:
分发渲染cloud service服务文件
-
name
:
分发渲染cloud service服务文件
template
:
src=cloudcore.service.j2 dest=/lib/systemd/system/cloudcore.service mode=777
template
:
src=cloudcore.service.j2 dest=/lib/systemd/system/cloudcore.service mode=777
-
name
:
生效service
shell
:
systemctl daemon-reload
-
name
:
设置开启启动cloud service
-
name
:
设置开启启动cloud service
service
:
name=cloudcore enabled=yes
service
:
name=cloudcore enabled=yes
roles/cloud/templates/cloudcore.service.j2
View file @
6ae6853
...
@@ -4,7 +4,7 @@ Description=cloudcore.service
...
@@ -4,7 +4,7 @@ Description=cloudcore.service
[Service]
[Service]
Type=simple
Type=simple
Restart=always
Restart=always
ExecStart=
{{ KUBEEDGE_BASE }}
/bin/cloudcore
ExecStart=
/etc/kubeedge
/bin/cloudcore
[Install]
[Install]
WantedBy=multi-user.target
WantedBy=multi-user.target
roles/edge/handles/main.yml
View file @
6ae6853
---
---
-
name
:
restart edgecore
-
name
:
restart edgecore
service
:
name=edgecore state=restarted
service
:
name=edgecore state=restarted
-
name
:
restart mosquitto
service
:
name=mosquitto state=restarted
roles/edge/tasks/main.yml
View file @
6ae6853
---
---
-
name
:
test
-
name
:
分发deb包到node节点的tmp目录
template
:
src=edgecore.yaml.j2 dest=/root/edgecore.yaml
copy
:
src=mosquitto/{{ item }} dest=/tmp/
with_items
:
-
libev4_1%3a4.22-1_amd64.deb
-
libuv1_1.8.0-1_amd64.deb
-
libwebsockets7_1.7.1-1_amd64.deb
-
mosquitto_1.6.10-0mosquitto1~xenial1_amd64.deb
-
name
:
安装mqtt服务
shell
:
dpkg -i {{ item }}
with_items
:
-
/tmp/libev4_1%3a4.22-1_amd64.deb
-
/tmp/libuv1_1.8.0-1_amd64.deb
-
/tmp/libwebsockets7_1.7.1-1_amd64.deb
-
/tmp/mosquitto_1.6.10-0mosquitto1~xenial1_amd64.deb
-
name
:
分发mosquitto port配置文件
template
:
src=moquuitto_port.conf.j2 dest=/etc/mosquitto/conf.d/port.conf
notify
:
restart mosquitto
-
name
:
启动mosquitto服务
service
:
name=mosquitto state=started enabled=yes
-
name
:
创建edge端配置目录
file
:
name={{ item }} state=directory
with_items
:
-
/etc/kubeedge//config/
-
/etc/kubeedge/bin/
-
name
:
分发edgecore 二进制文件
copy
:
src=edgecore dest=/etc/kubeedge/bin/edgecore mode=777
-
name
:
分发渲染edgecore配置文件
template
:
src=edgecore.yaml.j2 dest=/etc/kubeedge/config/edgecore.yaml
notify
:
restart edgecore
-
name
:
渲染分发edge core service开启启动文件
template
:
src=edgecore.service.j2 dest=/lib/systemd/system/edgecore.service mode=777
-
name
:
启动edgecore服务
service
:
name=edgecore state=started enabled=yes
roles/edge/templates/edge.service.j2
→
roles/edge/templates/edge
core
.service.j2
View file @
6ae6853
...
@@ -4,7 +4,7 @@ Description=cloudcore.service
...
@@ -4,7 +4,7 @@ Description=cloudcore.service
[Service]
[Service]
Type=simple
Type=simple
Restart=always
Restart=always
ExecStart=
{{KUBEEDGE_BASE}}
/edgecore #kubeedge安装目录,默认是/etc/kubeedge
ExecStart=
/etc/kubeedge/bin
/edgecore #kubeedge安装目录,默认是/etc/kubeedge
[Install]
[Install]
WantedBy=multi-user.target
WantedBy=multi-user.target
roles/edge/templates/moquuitto_port.conf.j2
0 → 100644
View file @
6ae6853
port 1883
listener 1884
roles/edge/vars/main.yaml
View file @
6ae6853
MASTER_IP
:
192.168
1
.137.201
MASTER_IP
:
192.168.137.201
CLOUD_TOKEN
:
08ce39b001305c78fcc96c3dceb65d9ab0b1ca8ff7fa2793f956b1c17af62fd7.eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1OTUyODM0NjV9.b4HXawgbUCGr0FW-hvvWFEhK-O_CzxhPpQWrL80TcS4
CLOUD_TOKEN
:
f9041f024c967f98c338502446aecc3afb2f285724cd40a57ce75248d600d373.eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1OTU1MTI4NjR9.M5tNrge_NeR8iV3qI4DyBbJ6MGogXaQurOwRMXzG4NU
SANDBOX_IMAGE
:
kubeedge/pause:3.1
SANDBOX_IMAGE
:
kubeedge/pause:3.1
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment