Synpse
🤖 Devices⚡ ApplicationsTry Synpse!
  • Intro to Synpse
  • Start here
    • Quick Start (web user)
    • Quick Start (CLI)
  • Agent
    • Install
      • Raspberry Pi
      • Linux (Docker)
      • MacOS
      • NVIDIA Jetson
      • Headless (Ubuntu)
      • BeagleBoard AI
      • Bulk Provisioning
      • 🪄Beta - Universal Synpse image
      • Containerized agent
      • Configuration
    • Uninstall
  • CLI
    • Install & Usage
  • synpse core
    • Devices
      • Device Provisioning
      • HTTPS Tunnel Access
      • SSH Access
      • Device Labels
      • Environment Variables
      • Proxy Application Ports
      • OS & Architectures
      • Operations
      • Device API
    • Applications
      • Deploy
      • Secrets
      • Environment variables
      • Substitution (dynamic templates)
      • Volumes
      • Networking
      • Scheduling
      • Registry authentication
      • Using GPUs
      • Tips & Tricks
      • Logs and status
      • Application specification (API reference)
    • Account
      • Personal Access Tokens
      • Service (Robot) Accounts
      • Teams (Share Devices)
    • Monitoring (beta)
      • Device Monitoring
      • Application Monitoring
  • Manage
    • Projects
    • Namespaces
    • Quotas
  • Examples
    • 🏠Home Automation
      • Gladys Assistant
      • Home Assistant
    • 🛠️Preparing OS Images
      • Synpse CLI Builder
      • Build a custom Raspberry Pi image
      • Cloud-init (advanced)
    • 💡Dynamic Templates
    • ☁️Public Cloud IoT
      • AWS IoT Core
      • Azure IoT Hub
      • GCP IoT Core
    • 🚀Device management
      • VNC to remove devices
      • Ansible
  • On-prem Deployment
    • 🐳Docker Compose
    • 🌤️kubernetes
  • Resources
    • API Documentation
    • Deployment patterns
    • Security & Tech
Powered by GitBook
On this page
  • CLI
  • Examples
  • Example 1
  • Example 2
  • Example 3
  • Example 4

Was this helpful?

  1. synpse core
  2. Applications

Deploy

Application deployment is how you interact with your edge devices. Develop, run and manage your applications

PreviousApplicationsNextSecrets

Last updated 2 years ago

Was this helpful?

Applications in Synpse can contain one or more Docker containers. These containers can easily talk to each other and utilise all the regular Docker features that you are used to.

You can view a bunch of sample applications that are available here for inspiration. If you wish to deploy some specific app but not sure how, please drop us an email at hello@synpse.net or join our Discord channel and we will help you out!

CLI

To deploy first application use synpse application create CLI command.

synpse application create hello \
  --image="quay.io/synpse/hello-synpse-go:latest" 

To create or update an application from file use -f flag provide either URL or file location locally

synpse deploy \
  -f https://raw.githubusercontent.com/synpse-hq/hello-synpse-go/main/hello.yaml

​where application spec file is yaml file:

name: hello-synpse
scheduling:
  type: AllDevices
spec:
  containers:
    - name: hello
      image: quay.io/synpse/hello-synpse-go:latest
      ports:
        - 8090:8090

Examples

If you mapping docker run command into Synpse, this part will help you to understand mapping for the arguments

Example 1

Volumes and environment variables

sudo docker run --restart always -d --name homeassistant \
  -v /PATH_TO_YOUR_CONFIG:/config --device=/PATH_TO_YOUR_USB_STICK \
  -e TZ=Australia/Melbourne --net=host \
  ghcr.io/home-assistant/home-assistant:stable

Will translate to:

name: hassio
description: HASS
scheduling:
  type: AllDevices
spec:
  containers:
    - name: homeassistant
      image: ghcr.io/home-assistant/home-assistant:stable
      networkMode: host
      volumes:
        -/PATH_TO_YOUR_CONFIG:/config
        - /etc/localtime:/etc/localtime
      env:
        - name: TZ
          value: Australia/Melbourne
      devices:
        - hostPath: /PATH_TO_YOUR_USB_STICK
          containerPath: /PATH_TO_YOUR_USB_STICK
      restartPolicy:
        name: always

Example 2

A more complex command with arguments:

docker run -d -p 12101:12101 \
  --restart unless-stopped \
  -v "$HOME/.config/rhasspy/profiles:/profiles" \
  --device /dev/snd:/dev/snd \
  synesthesiam/rhasspy-server:latest \
  --user-profiles /profiles \
  --profile en

Will translate to:

name: Rhasspy deployment
description: Rhasspy open source voice assistant application deployment.
scheduling:
  type: AllDevices
spec:
  containers:
    - name: rhass
      image: synesthesiam/rhasspy-server:latest
      args:
        - --profile
        - en
        - --user-profiles
        - /profiles
      devices:
        - hostPath: /dev/snd
          containerPath: /dev/snd
      ports:
        - 12101:12101
      volumes:
        - /data/rhasspy/profiles:/profiles
      restartPolicy:
        name: unless-stopped

Example 3

Exec driver application running firefox in kiosk mode:

name: firefox-kiosk-exec
description: FireFox Kiosk application
scheduling:
  type: AllDevices
  selectors: {}
spec:
  execs:
    - name: exec
      command: firefox
      args:
        - https://synpse.net
      env:
        - name: DISPLAY
          value: :0
      restartPolicy: {}

Example 4

Exec driver with container in one application spec:

name: firefox-kiosk-exec
description: FireFox Kiosk application
scheduling:
  type: AllDevices
  selectors: {}
spec:
  containers:
    - name: hello
      image: quay.io/synpse/hello-synpse-go
      forcePull: true
      restartPolicy: {}
  execs:
    - name: exec
      command: firefox
      args:
        - https://synpse.net
      env:
        - name: DISPLAY
          value: :0
      restartPolicy: {}
💡
https://github.com/synpse-hq/synpse