Skip to content

Commit

Permalink
🎈 perf(k8s): deploy for multi platform
Browse files Browse the repository at this point in the history
  • Loading branch information
moelang committed May 21, 2021
1 parent 60adab9 commit 73b8bc0
Show file tree
Hide file tree
Showing 9 changed files with 94 additions and 75 deletions.
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "AutoTest"]
path = AutoTest
url = [email protected]:autocore-ai/ats-script.git
[submodule "Autoware"]
path = Autoware
url = [email protected]:autocore-ai/AutowareArchitectureProposal.git
Expand All @@ -7,6 +10,9 @@
[submodule "RSU"]
path = RSU
url = [email protected]:autocore-ai/RSU.git
[submodule "Utils/mcu"]
path = Utils/mcu
url = [email protected]:autocore-ai/pcu_mcu_hal.git
[submodule "Utils/zenoh"]
path = Utils/zenoh
url = [email protected]:autocore-ai/zenoh.git
Expand Down
1 change: 1 addition & 0 deletions AutoTest
Submodule AutoTest added at e42b09
2 changes: 1 addition & 1 deletion Autoware
2 changes: 1 addition & 1 deletion CloudViewer
Submodule CloudViewer updated 325 files
2 changes: 1 addition & 1 deletion RSU
1 change: 1 addition & 0 deletions Utils/mcu
Submodule mcu added at 5630e4
2 changes: 1 addition & 1 deletion Utils/zenoh
Submodule zenoh updated 96 files
+7 −2 .dockerignore
+37 −0 .github/workflows/build.yml
+3 −31 .github/workflows/ci.yml
+411 −237 Cargo.lock
+8 −3 Cargo.toml
+16 −5 Dockerfile
+10 −11 Jenkinsfile
+2 −2 backends/traits/Cargo.toml
+1 −1 gen_zenoh_deb.sh
+2 −2 plugins/example-plugin/Cargo.toml
+7 −6 plugins/zenoh-plugin-rest/Cargo.toml
+0 −0 plugins/zenoh-plugin-rest/examples/zenoh-net/zn_serve_sse.rs
+391 −0 plugins/zenoh-plugin-rest/src/lib.rs
+8 −8 plugins/zenoh-plugin-storages/Cargo.toml
+9 −4 plugins/zenoh-plugin-storages/src/backends_mgt.rs
+10 −5 plugins/zenoh-plugin-storages/src/lib.rs
+0 −0 plugins/zenoh-plugin-storages/src/memory_backend/mod.rs
+0 −0 plugins/zenoh-plugin-storages/src/storages_mgt.rs
+0 −432 plugins/zenoh-rest/src/lib.rs
+1 −1 rust-toolchain
+2 −2 zenoh-util/Cargo.toml
+0 −111 zenoh-util/src/collections/buffer_pool.rs
+3 −4 zenoh-util/src/collections/mod.rs
+108 −0 zenoh-util/src/collections/object_pool.rs
+8 −18 zenoh-util/src/collections/stack_buffer.rs
+4 −0 zenoh-util/src/core/zresult.rs
+21 −3 zenoh-util/src/lib_loader.rs
+13 −11 zenoh-util/src/net/mod.rs
+27 −1 zenoh-util/src/properties/config.rs
+4 −0 zenoh-util/src/sync/mod.rs
+4 −4 zenoh-util/tests/zresult.rs
+16 −11 zenoh/Cargo.toml
+132 −109 zenoh/benches/frame_codec.rs
+3 −3 zenoh/benches/tables_bench.rs
+1 −1 zenoh/docs/conf.py
+4 −4 zenoh/examples/zenoh-net/README.md
+54 −36 zenoh/examples/zenoh-net/zn_pub_shm.rs
+14 −0 zenoh/examples/zenoh-net/zn_pub_shm_thr.rs
+1 −1 zenoh/examples/zenoh-net/zn_storage.rs
+5 −0 zenoh/examples/zenoh-net/zn_sub_shm.rs
+19 −2 zenoh/examples/zenoh-net/zn_sub_shm_thr.rs
+4 −0 zenoh/src/bin/zenohd.rs
+4 −5 zenoh/src/lib.rs
+24 −15 zenoh/src/net/mod.rs
+2 −2 zenoh/src/net/plugins/mod.rs
+8 −0 zenoh/src/net/protocol/core/mod.rs
+33 −11 zenoh/src/net/protocol/io/arc_slice.rs
+3 −1 zenoh/src/net/protocol/io/codec.rs
+377 −181 zenoh/src/net/protocol/io/rbuf.rs
+249 −347 zenoh/src/net/protocol/io/shm.rs
+46 −0 zenoh/src/net/protocol/io/wbuf.rs
+29 −0 zenoh/src/net/protocol/link/locator.rs
+4 −0 zenoh/src/net/protocol/link/manager.rs
+9 −3 zenoh/src/net/protocol/link/mod.rs
+713 −0 zenoh/src/net/protocol/link/quic.rs
+32 −48 zenoh/src/net/protocol/link/tcp.rs
+59 −51 zenoh/src/net/protocol/link/tls.rs
+160 −204 zenoh/src/net/protocol/link/udp.rs
+52 −90 zenoh/src/net/protocol/link/unixsock_stream.rs
+2 −2 zenoh/src/net/protocol/proto/constants.rs
+31 −0 zenoh/src/net/protocol/proto/msg.rs
+8 −0 zenoh/src/net/protocol/proto/msg_reader.rs
+39 −0 zenoh/src/net/protocol/proto/msg_shm.rs
+3 −3 zenoh/src/net/protocol/session/authenticator/mod.rs
+23 −20 zenoh/src/net/protocol/session/authenticator/shm.rs
+11 −24 zenoh/src/net/protocol/session/mod.rs
+4 −4 zenoh/src/net/protocol/session/transport/defragmentation.rs
+9 −10 zenoh/src/net/protocol/session/transport/link/batch.rs
+11 −11 zenoh/src/net/protocol/session/transport/link/mod.rs
+16 −5 zenoh/src/net/protocol/session/transport/link/rx.rs
+12 −12 zenoh/src/net/protocol/session/transport/link/tx.rs
+29 −32 zenoh/src/net/protocol/session/transport/mod.rs
+20 −10 zenoh/src/net/protocol/session/transport/rx.rs
+5 −3 zenoh/src/net/protocol/session/transport/seq_num.rs
+5 −17 zenoh/src/net/protocol/session/transport/tx.rs
+27 −16 zenoh/src/net/routing/face.rs
+46 −17 zenoh/src/net/routing/network.rs
+513 −396 zenoh/src/net/routing/pubsub.rs
+301 −286 zenoh/src/net/routing/queries.rs
+219 −131 zenoh/src/net/routing/resource.rs
+104 −52 zenoh/src/net/routing/router.rs
+1 −1 zenoh/src/net/runtime/adminspace.rs
+19 −12 zenoh/src/net/runtime/mod.rs
+289 −155 zenoh/src/net/runtime/orchestrator.rs
+26 −29 zenoh/src/net/session.rs
+50 −0 zenoh/src/path.rs
+58 −1 zenoh/src/pathexpr.rs
+8 −0 zenoh/src/selector.rs
+1 −3 zenoh/src/values.rs
+245 −18 zenoh/tests/authenticator.rs
+13 −5 zenoh/tests/locators.rs
+17 −17 zenoh/tests/msg_codec.rs
+112 −4 zenoh/tests/session.rs
+97 −38 zenoh/tests/shm.rs
+10 −10 zenoh/tests/tables.rs
+123 −4 zenoh/tests/transport.rs
2 changes: 1 addition & 1 deletion Utils/zenoh-plugin-dds
Submodule zenoh-plugin-dds updated 12 files
+14 −0 .dockerignore
+37 −0 .github/workflows/build.yml
+20 −45 .github/workflows/rust.yml
+0 −1 .gitignore
+2,278 −0 Cargo.lock
+8 −2 Cargo.toml
+3 −5 Dockerfile
+47 −25 README.md
+0 −118 config.sh
+1 −1 rust-toolchain
+108 −30 src/bin/zenoh-bridge-dds.rs
+13 −1 src/lib.rs
151 changes: 81 additions & 70 deletions sdv_demo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ metadata:
labels:
app: autoware
spec:
replicas: 1
replicas: 2
selector:
matchLabels:
app: autoware
Expand All @@ -21,158 +21,169 @@ spec:
labels:
app: autoware
spec:
hostNetwork: true
nodeSelector:
app: autoware
volumes:
- name: volume
emptyDir: {}
containers:
- name: zenoh-bridge-dds
image: autocore/zenoh-bridge-dds:sdv
command: ["/bin/bash"]
args: ["-c", "export ROS_DOMAIN_ID=${HOSTNAME##*-} && /root/zenoh-plugin-dds/target/release/dzd --scope /demo/dds -m peer"]
- name: zenoh-plugin-dds
image: autocore/zenoh-plugin-dds:sdv
imagePullPolicy: Always
command: ["/bin/sh"]
args:
[
"-c",
"exec zenoh-bridge-dds --scope /demo/dds -m peer -d 2${POD_NAME##*-}",
]
env:
- name: RMW_IMPLEMENTATION
value: rmw_cyclonedds_cpp
- name: RUST_LOG
value: info
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
resources:
limits:
memory: "1Gi"
cpu: "2000m"
- name: sdk
image: autocore/autoware-architecture-proposal-sdk:sdv
imagePullPolicy: Always
volumeMounts:
- name: volume
mountPath: /AutowareArchitectureProposal
command: ["/bin/bash"]
args: ["-c", "export ROS_DOMAIN_ID=${HOSTNAME##*-} && cd /AutowareArchitectureProposal && source install/setup.bash && ros2 launch sdv_demo_launch sdv_demo.launch.xml"]
args:
[
"-c",
"export ROS_DOMAIN_ID=2${POD_NAME##*-} && cd /AutowareArchitectureProposal && source install/setup.bash && ros2 launch sdv_demo_launch sdv_demo.launch.xml",
]
env:
- name: RMW_IMPLEMENTATION
value: rmw_cyclonedds_cpp
- name: RMW_IMPLEMENTATION
value: rmw_cyclonedds_cpp
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
resources:
limits:
memory: "4Gi"
cpu: "4000m"
initContainers:
- name: exe
image: autocore/autoware-architecture-proposal-exe:sdv
imagePullPolicy: Always
command: ["/bin/sh"]
args: ["-c", "mv /AutowareArchitectureProposal/install /volume/"]
volumeMounts:
- name: volume
mountPath: /volume
- name: env
image: autocore/autoware-architecture-proposal-env:sdv
imagePullPolicy: Always
command: ["/bin/sh"]
args: ["-c", "mv /AutowareArchitectureProposal/env /volume/"]
volumeMounts:
- name: volume
mountPath: /volume
---
apiVersion: apps/v1
kind: StatefulSet
kind: Deployment
metadata:
name: rsu
name: storage
namespace: sdv
labels:
app: rsu
app: storage
spec:
replicas: 1
selector:
matchLabels:
app: rsu
serviceName: "sdv"
app: storage
template:
metadata:
labels:
app: rsu
app: storage
spec:
hostNetwork: true
nodeSelector:
app: host
containers:
- name: rsu
image: autocore/rsu:sdv
env:
- name: HOST_IP
valueFrom:
fieldRef:
fieldPath: status.hostIP
- name: RUST_LOG
value: info
- name: storage
image: eclipse/zenoh:latest
command: ["/bin/sh"]
args: ["-c", "exec /zenohd --mem-storage=/**"]
resources:
limits:
memory: "512Mi"
cpu: "500m"
ports:
- name: http
containerPort: 8000
protocol: TCP
---
apiVersion: apps/v1
kind: StatefulSet
kind: Deployment
metadata:
name: storage
name: rsu
namespace: sdv
labels:
app: storage
app: rsu
spec:
replicas: 1
selector:
matchLabels:
app: storage
serviceName: "sdv"
app: rsu
template:
metadata:
labels:
app: storage
app: rsu
spec:
hostNetwork: true
nodeSelector:
app: host
containers:
- name: storage
image: autocore/zenoh:sdv
ports:
- name: http
containerPort: 8000
protocol: TCP
- name: rsu
image: autocore/rsu:develop
imagePullPolicy: Always
resources:
limits:
memory: "512Mi"
cpu: "500m"
env:
- name: RUST_LOG
value: info
- name: HOST_IP
valueFrom:
fieldRef:
fieldPath: status.hostIP
- name: RUST_LOG
value: info
---
apiVersion: apps/v1
kind: StatefulSet
kind: Deployment
metadata:
name: autotest
namespace: sdv
labels:
app: autotest
spec:
replicas: 1
selector:
matchLabels:
app: autotest
serviceName: "sdv"
template:
metadata:
labels:
app: autotest
spec:
hostNetwork: true
nodeSelector:
app: autoware
app: host
containers:
- name: autotest
image: kaka1223/autotest:native
image: autocore/autotest:sdv
imagePullPolicy: Always
resources:
limits:
memory: "2Gi"
cpu: "2000m"
env:
- name: HOST_IP
valueFrom:
fieldRef:
fieldPath: status.hostIP
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: monitor
rules:
- apiGroups: [""]
resources: ["pods"]
verbs: ["list", "watch"]
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: monitor
subjects:
- kind: ServiceAccount
name: default
namespace: sdv
roleRef:
kind: ClusterRole
name: monitor
apiGroup: rbac.authorization.k8s.io

0 comments on commit 73b8bc0

Please sign in to comment.