feat: establish standalone Device Core repository
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
[Unit]
|
||||
Description=NODE.DC B2 VPS encrypted private backhaul
|
||||
After=network-online.target nodedc-b2-tailscaled.service
|
||||
Wants=network-online.target
|
||||
Requires=nodedc-b2-tailscaled.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=nodedc-backhaul
|
||||
Group=nodedc-backhaul
|
||||
ExecStart=/usr/bin/ssh -N -F /opt/nodedc-b2-vps/config/backhaul_ssh_config device-backhaul-target
|
||||
Restart=always
|
||||
RestartSec=3s
|
||||
NoNewPrivileges=yes
|
||||
PrivateTmp=yes
|
||||
PrivateDevices=yes
|
||||
ProtectSystem=strict
|
||||
ProtectHome=yes
|
||||
ProtectKernelTunables=yes
|
||||
ProtectKernelModules=yes
|
||||
ProtectControlGroups=yes
|
||||
RestrictSUIDSGID=yes
|
||||
LockPersonality=yes
|
||||
MemoryDenyWriteExecute=yes
|
||||
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
|
||||
SystemCallArchitectures=native
|
||||
MemoryMax=64M
|
||||
TasksMax=32
|
||||
LimitNOFILE=1024
|
||||
UMask=0077
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,48 @@
|
||||
[Unit]
|
||||
Description=NODE.DC B2 VPS bounded raw TCP relay
|
||||
After=network-online.target nodedc-b2-backhaul.service
|
||||
Wants=network-online.target
|
||||
Requires=nodedc-b2-backhaul.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=nodedc-relay
|
||||
Group=nodedc-relay
|
||||
WorkingDirectory=/opt/nodedc-b2-vps
|
||||
Environment=DEVICE_EDGE_RELAY_HEALTH_HOST=127.0.0.1
|
||||
Environment=DEVICE_EDGE_RELAY_HEALTH_PORT=18221
|
||||
Environment=DEVICE_EDGE_RELAY_INGRESS_ENABLED=true
|
||||
Environment=DEVICE_EDGE_RELAY_TCP_HOST=0.0.0.0
|
||||
Environment=DEVICE_EDGE_RELAY_TCP_PORT=9921
|
||||
Environment=DEVICE_EDGE_RELAY_UPSTREAM_HOST=127.0.0.1
|
||||
Environment=DEVICE_EDGE_RELAY_UPSTREAM_PORT=19921
|
||||
Environment=DEVICE_EDGE_RELAY_MAX_SESSIONS=128
|
||||
Environment=DEVICE_EDGE_RELAY_MAX_SESSIONS_PER_ADDRESS=16
|
||||
Environment=DEVICE_EDGE_RELAY_MAX_CONNECTIONS_PER_MINUTE_PER_ADDRESS=60
|
||||
Environment=DEVICE_EDGE_RELAY_MAX_TRACKED_SOURCE_ADDRESSES=4096
|
||||
Environment=DEVICE_EDGE_RELAY_MAX_BYTES_PER_DIRECTION=67108864
|
||||
Environment=DEVICE_EDGE_RELAY_SESSION_TIMEOUT_MS=300000
|
||||
Environment=DEVICE_EDGE_RELAY_SOURCE_POLICY=public-ipv4-only
|
||||
ExecStart=/opt/nodedc-b2-vps/runtime/node/bin/node /opt/nodedc-b2-vps/services/device-edge-relay/src/server.mjs
|
||||
Restart=always
|
||||
RestartSec=3s
|
||||
NoNewPrivileges=yes
|
||||
PrivateTmp=yes
|
||||
PrivateDevices=yes
|
||||
ProtectSystem=strict
|
||||
ProtectHome=yes
|
||||
ProtectKernelTunables=yes
|
||||
ProtectKernelModules=yes
|
||||
ProtectControlGroups=yes
|
||||
RestrictSUIDSGID=yes
|
||||
LockPersonality=yes
|
||||
MemoryDenyWriteExecute=no
|
||||
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
|
||||
SystemCallArchitectures=native
|
||||
MemoryMax=192M
|
||||
TasksMax=64
|
||||
LimitNOFILE=4096
|
||||
UMask=0077
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,36 @@
|
||||
[Unit]
|
||||
Description=NODE.DC B2 VPS private Tailscale transport
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=notify
|
||||
User=nodedc-edge
|
||||
Group=nodedc-edge
|
||||
RuntimeDirectory=nodedc-b2-vps
|
||||
RuntimeDirectoryMode=0750
|
||||
StateDirectory=nodedc-b2-vps/tailscale
|
||||
StateDirectoryMode=0700
|
||||
ExecStart=/opt/nodedc-b2-vps/runtime/tailscale/tailscaled --state=/var/lib/nodedc-b2-vps/tailscale/tailscaled.state --socket=/run/nodedc-b2-vps/tailscaled.sock --tun=userspace-networking --socks5-server=127.0.0.1:1055
|
||||
Restart=always
|
||||
RestartSec=3s
|
||||
NoNewPrivileges=yes
|
||||
PrivateTmp=yes
|
||||
PrivateDevices=yes
|
||||
ProtectSystem=strict
|
||||
ProtectHome=yes
|
||||
ProtectKernelTunables=yes
|
||||
ProtectKernelModules=yes
|
||||
ProtectControlGroups=yes
|
||||
RestrictSUIDSGID=yes
|
||||
LockPersonality=yes
|
||||
MemoryDenyWriteExecute=no
|
||||
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 AF_NETLINK
|
||||
SystemCallArchitectures=native
|
||||
MemoryMax=160M
|
||||
TasksMax=96
|
||||
LimitNOFILE=8192
|
||||
UMask=0077
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,50 @@
|
||||
[Unit]
|
||||
Description=NODE.DC provider-neutral Device Edge Core channel
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=nodedc-channel
|
||||
Group=nodedc-channel
|
||||
ExecStart=/opt/nodedc-b2-vps/runtime/node/bin/node /opt/nodedc-b2-vps/services/device-edge-channel/src/server.mjs
|
||||
Environment=DEVICE_EDGE_CHANNEL_HOST=0.0.0.0
|
||||
Environment=DEVICE_EDGE_CHANNEL_PORT=443
|
||||
Environment=DEVICE_EDGE_CHANNEL_HEALTH_HOST=127.0.0.1
|
||||
Environment=DEVICE_EDGE_CHANNEL_HEALTH_PORT=18222
|
||||
Environment=DEVICE_EDGE_CHANNEL_CONFIG_FILE=/var/lib/nodedc-b2-vps/channel-trust/runtime.json
|
||||
Environment=DEVICE_EDGE_CHANNEL_KEY_FILE=/var/lib/nodedc-b2-vps/channel-trust/edge-private-key.pem
|
||||
Environment=DEVICE_EDGE_CHANNEL_CERTIFICATE_FILE=/var/lib/nodedc-b2-vps/channel-trust/edge-certificate.pem
|
||||
Environment=DEVICE_EDGE_CHANNEL_CORE_TRUST_FILE=/var/lib/nodedc-b2-vps/channel-trust/core-certificate.pem
|
||||
Restart=always
|
||||
RestartSec=2
|
||||
TimeoutStartSec=20
|
||||
TimeoutStopSec=15
|
||||
NoNewPrivileges=yes
|
||||
PrivateTmp=yes
|
||||
PrivateDevices=yes
|
||||
ProtectSystem=strict
|
||||
ProtectHome=yes
|
||||
ProtectKernelTunables=yes
|
||||
ProtectKernelModules=yes
|
||||
ProtectKernelLogs=yes
|
||||
ProtectControlGroups=yes
|
||||
ProtectClock=yes
|
||||
ProtectHostname=yes
|
||||
RestrictSUIDSGID=yes
|
||||
RestrictRealtime=yes
|
||||
LockPersonality=yes
|
||||
MemoryDenyWriteExecute=no
|
||||
SystemCallArchitectures=native
|
||||
RestrictAddressFamilies=AF_INET AF_INET6
|
||||
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
|
||||
AmbientCapabilities=CAP_NET_BIND_SERVICE
|
||||
UMask=0077
|
||||
MemoryMax=128M
|
||||
MemorySwapMax=0
|
||||
CPUQuota=50%
|
||||
TasksMax=64
|
||||
LimitNOFILE=1024
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,62 @@
|
||||
[Unit]
|
||||
Description=NODE.DC provider-neutral Device Edge runtime
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=nodedc-channel
|
||||
Group=nodedc-channel
|
||||
ExecStart=/opt/nodedc-b2-vps/runtime/node/bin/node /opt/nodedc-b2-vps/vps/edge-process/device-edge-runtime.mjs
|
||||
Environment=DEVICE_EDGE_CHANNEL_HOST=0.0.0.0
|
||||
Environment=DEVICE_EDGE_CHANNEL_PORT=443
|
||||
Environment=DEVICE_EDGE_CHANNEL_HEALTH_HOST=127.0.0.1
|
||||
Environment=DEVICE_EDGE_CHANNEL_HEALTH_PORT=18222
|
||||
Environment=DEVICE_EDGE_CHANNEL_CONFIG_FILE=/var/lib/nodedc-b2-vps/channel-trust/runtime.json
|
||||
Environment=DEVICE_EDGE_CHANNEL_KEY_FILE=/var/lib/nodedc-b2-vps/channel-trust/edge-private-key.pem
|
||||
Environment=DEVICE_EDGE_CHANNEL_CERTIFICATE_FILE=/var/lib/nodedc-b2-vps/channel-trust/edge-certificate.pem
|
||||
Environment=DEVICE_EDGE_CHANNEL_CORE_TRUST_FILE=/var/lib/nodedc-b2-vps/channel-trust/core-certificate.pem
|
||||
Environment=DEVICE_GATEWAY_PROTOCOL_PROFILE_REF=arusnavi.b2.internal.v1
|
||||
Environment=DEVICE_GATEWAY_HEALTH_HOST=127.0.0.1
|
||||
Environment=DEVICE_GATEWAY_HEALTH_PORT=18221
|
||||
Environment=DEVICE_GATEWAY_TCP_HOST=0.0.0.0
|
||||
Environment=DEVICE_GATEWAY_TCP_PORT=9921
|
||||
Environment=DEVICE_GATEWAY_MAX_BUFFERED_BYTES=65536
|
||||
Environment=DEVICE_GATEWAY_MAX_AGGREGATE_BUFFERED_BYTES=33554432
|
||||
Environment=DEVICE_GATEWAY_MAX_SESSIONS=128
|
||||
Environment=DEVICE_GATEWAY_MAX_SESSIONS_PER_ADDRESS=16
|
||||
Environment=DEVICE_GATEWAY_MAX_CONNECTIONS_PER_MINUTE_PER_ADDRESS=60
|
||||
Environment=DEVICE_GATEWAY_MAX_TRACKED_SOURCE_ADDRESSES=2048
|
||||
Environment=DEVICE_GATEWAY_SESSION_TIMEOUT_MS=10000
|
||||
Restart=always
|
||||
RestartSec=2
|
||||
TimeoutStartSec=20
|
||||
TimeoutStopSec=15
|
||||
NoNewPrivileges=yes
|
||||
PrivateTmp=yes
|
||||
PrivateDevices=yes
|
||||
ProtectSystem=strict
|
||||
ProtectHome=yes
|
||||
ProtectKernelTunables=yes
|
||||
ProtectKernelModules=yes
|
||||
ProtectKernelLogs=yes
|
||||
ProtectControlGroups=yes
|
||||
ProtectClock=yes
|
||||
ProtectHostname=yes
|
||||
RestrictSUIDSGID=yes
|
||||
RestrictRealtime=yes
|
||||
LockPersonality=yes
|
||||
MemoryDenyWriteExecute=no
|
||||
SystemCallArchitectures=native
|
||||
RestrictAddressFamilies=AF_INET AF_INET6
|
||||
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
|
||||
AmbientCapabilities=CAP_NET_BIND_SERVICE
|
||||
UMask=0077
|
||||
MemoryMax=192M
|
||||
MemorySwapMax=0
|
||||
CPUQuota=75%
|
||||
TasksMax=128
|
||||
LimitNOFILE=1024
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user