• ...
  • SDK
  • Yocto
  • ...
  • ...
  • tools
  • debug
  • package
  • deploy
  • debug

Deploy a SimpleSwitch™ package#

When using the SDK, it is recommended to deploy using the

$ simpleswitch-deploy-package simpleswitch-example <board_ip> -u --start

If you built your package with the SDK, given you used simpleswitch-example as package name

$ cd ${BUILD_DIR}/tmp/deploy/images/qemux86-64
$ scp simpleswitch-example.ext4 root@<board_ip>:/apps
$ scp simpleswitch-example.simpleswitchpackage root@<board_ip>:/apps/simpleswitch-manifest.yaml
$ ssh root@<board_ip> reboot

Please note this will override the simpleswitch-manifest.yaml file and discard any package previously installed. To install a new application without removing the previous one, manifests must be concatenated

$ cat simpleswitch-example.simpleswitchpackage | ssh root@<board_ip> tee -a /apps/simpleswitch-manifest.yaml

With QEMU#

When using QEMU, simply copy the SimpleSwitch™ package files in the apps folder instead

$ cd ${BUILD_DIR}/tmp/deploy/images/qemux86-64
$ cp simpleswitch-example.ext4 <vm_name>_apps
$ cp simpleswitch-example.simpleswitchpackage <vm_name>_apps/simpleswitch-manifest.yaml
$ # Note ``<vm_name>_apps`` might be in a subdirectory if the tar.bz2 bundle was extracted in a subdirectory
$ sudo setfacl -m u:libvirt-qemu:rwx <vm_name>_apps/simpleswitch-example.ext4
$ virsh -c qemu:///system reboot <vm_name>

Note

One can check how to bundle and use a QEMU VM from our libvirt VM bundle tool section.

Detailed usage of simpleswitch-deploy-package#

$ simpleswitch-deploy-package --help
Usage: simpleswitch-deploy-package [options] package target_address
Options:
        -u|--allow-update               # Allow to reuse files from the previous build.
        -w|--work-dir                   # Set the output directory.
        -s|--start                      # Start the application after deployment.