Synpse CLI Builder

Synpse CLI has build in CLI helper to build images for you devices. It can help to build re-usable image for you to use in multiple devices. Build once and reuse on all your devices.

Currently CLI builder support only Linux systems

Pre-requisites:

  1. Linux based machine (Ubuntu subsystem for Windows does not work)

  2. Synpse CLI installed and logged into Synpse Cloud

  3. CLI must be run as privileged user as builds are using mount to build the image

After build image startup might take 10-15 minutes for updates and install of the latest binaries. Time might wary based on your internet speed.

Getting started

Chose base image you want to use for your build. If you don't find base images you would like, let us know in Discord to see what we can do about this!

synpse machine-images list-base
OS      IMAGE                                               NAME                               ARCHITECTURE  
ubuntu  ubuntu-20.04.3-preinstalled-server-arm64+raspi.img  Ubuntu Server 20.04.2 LTS (ARM64)  arm64         
ubuntu  ubuntu-20.04.3-preinstalled-server-armhf+raspi.img  Ubuntu Server 20.04.2 LTS (ARM32)  arm32         

Run build command with build parameters (parameters can be found by executing synpse build -h )

synpse build \
--hostname "synpse-edge" \
--image ubuntu-20.04.3-preinstalled-server-arm64+raspi.img \
--image-output $(pwd)/images \
--wifi-name WIFI_SSID_NAME \
--wifi-password $WIFI_PASSWORD

If --project-id or--registration-token is not provided CLI attempt to get default default provisioning token for the project configured in CLI. User must have access to read Device Provisioning Tokens in RBAC

If --unixUser is not provided synpse user will be created

Build using config file

You can also build image using configuration file

synpse build --config-file config.yaml

Where config.yaml is example bellow:


---
builderConfig:
  image: ubuntu-20.04.2-preinstalled-server-arm64+raspi.img
  outputDir: /home/user/images
synpseConfig:
  controllerURI: https://cloud.synpse.net/api
  projectID: prj_1qtJj73NFMHm0QoRj2uPWxxxxxx
  registrationToken: drt_1qtJj55aIhGiMrXs5BDAvxxxxx
hostConfig:
  hostname: synpse-edge
  unixUser: synpse
  sshKey: ssh-rsa ABCD
  #locale: en_US.UTF-8
  #timezone: Europe/Vilnius
  networks:
    - wifiAccessPointName: WIFI_SSID
      wifiAccessPointPassword: Wifi_Password

Last updated