Skip to content

elmarx/ser2net

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ser2net docker-container

Docker container for ser2net.

e.g.: ghcr.io/elmarx/ser2net:4

builds daily the latest ser2net tag.

See all available tags.

Example

Given a file ser2net.yaml:

connection: &con01
  accepter: tcp,20108
  connector: serialdev,/dev/ttyACM0,115200n81,local
  options:
    kickolduser: true

Mount it to /etc/ser2net/ser2net.yaml, mount /dev/ttyACM0, and add the privileged flag.

Kubernetes

I run this in kubernetes. This is the essence of my deployment:

---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: ser2net
  namespace: default
spec:
  progressDeadlineSeconds: 600
  replicas: 1
  selector:
    matchLabels:
      app: ser2net
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: ser2net
    spec:
      containers:
        - image: ghcr.io/elmarx/ser2net:4.5.0
          imagePullPolicy: Always
          name: ser2net
          ports:
            - containerPort: 20108
          resources: {}
          securityContext:
            privileged: true
          volumeMounts:
            - mountPath: /etc/ser2net/ser2net.yaml
              mountPropagation: None
              name: config
              subPath: ser2net.yaml
            - mountPath: /dev/ttyACM0
              mountPropagation: None
              name: device
      nodeSelector:
        kubernetes.io/hostname: host-where-the-device-is-available
      volumes:
        - configMap:
            name: ser2net
          name: config
        - hostPath:
            path: /dev/ttyACM0
          name: device
---
apiVersion: v1
kind: Service
metadata:
  name: ser2net
spec:
  selector:
    app: ser2net
  ports:
    - protocol: TCP
      port: 20108
      targetPort: 20108
  type: NodePort
---
apiVersion: v1
data:
  ser2net.yaml: |
    connection: &con01
      accepter: tcp,20108
      connector: serialdev,/dev/ttyACM0,115200n81,local
      options:
        kickolduser: true
kind: ConfigMap
metadata:
  name: ser2net

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages