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
  • Cloud-Init - autopilot install
  • Step 1: Clone helper scripts repository
  • Step 2: Download image to the assets directory
  • Step 3: Decompress image
  • Step 4: Add your Synpse project details and wi-fi credentials
  • Step 5: Generate image
  • Step 6: Write the image to an SD card

Was this helpful?

  1. Examples
  2. Preparing OS Images

Cloud-init (advanced)

This will explain how to build images in advanced mode using cloud-init as bootstrap method. This way allows to produce re-usable images for mass usage or configure your device without access to it

PreviousBuild a custom Raspberry Pi imageNextDynamic Templates

Last updated 3 years ago

Was this helpful?

Cloud-Init - autopilot install

Using this method you need bit more technical understanding how things works, but you get get your RPI running with no keyboard or mouse or even screen available to you. We will walk you through step by step how to do this. These scripts will work with any image, which supports cloud-init. But we recommend to use image.

Step 1: Clone helper scripts repository

Close our helper scripts repository:

$ git clone https://github.com/synpse-hq/image-tools && cd image-tools

Step 2: Download image to the assets directory

Download image into assets/images directory. This can be done manually or with make download-base

curl https://cdimage.ubuntu.com/releases/20.04.2/release/ubuntu-20.04.2-preinstalled-server-arm64+raspi.img.xz?_ga=2.31403323.502427891.1618417281-105156824.1616928492  -o assets/images/ubuntu-20.04.2.img.xz

Step 3: Decompress image

Extract image so we can use it:

unxz assets/images/ubuntu-20.04.2.img.xz

Step 4: Add your Synpse project details and wi-fi credentials

Create configuration for for you local home setup:

# copy env.example fine
cp env.example env

# update env file with your configuration
export HOSTNAME=synpse
export UNIX_USER=synpse
export UNIX_PASSWORD=<unix password of you choosing>
# generate ssh key for SSH access. You can generate one by running `go run ./hack/genssh`
export SSH_KEY=$(cat ./assets/id_rsa.pub)
export LOCALE="en_US.UTF-8"
export TIMEZONE="Europe/Vilnius"
export WIFI_ACCESS_POINT_NAME="<my_awesome_wifi_ssid>"
export WIFI_ACCESS_POINT_PASSWORD="<my_awesome_wifi_password>"

# get cloud.synpse.net project_id and registration_token for device registration
export AGENT_PROJECT=prj_xxxxxxxxxxxxxxxx
export AGENT_REGISTRATION_TOKEN=drt_xxxxxxxxxxxxxxxx

Step 5: Generate image

Generate cloud-init configuration and create pre-configured image for RPI:

make generate-image

Step 6: Write the image to an SD card

Once this done you can use any existing image "burning" tools to write this image into SD card.

We recommend to use one of these:

🛠️
Ubuntu 20.04.2 LTS
Rufus - Create bootable USB drives the easy wayRufus
Rufus
Logo
UNetbootin - Homepage and Downloads
UNetbootin
Logo