5.2. Seva Store - User Guide

5.2.1. Overview

Seva Store is TI developed Demo Gallery Tool which allows users to Download and Install demos on the go. Developers can host their Demos as Docker Images on any public Docker Registry and link them to Seva Design Gallery. The Seva Design Gallery interacts with the Seva Control Center to easily launch demos from a predetermined source using docker-compose. The Seva Control Center is built using Flutter and Go. To know more on how Seva Control Center exactly works refer this.

All of the necessary equipment requirement and instructions are provided here.

5.2.2. Hardware Prerequisites

  • TI AM69 SK

  • PC (Windows or Linux, to use serial terminal console)

  • HDMI Monitor (to view the Demo on Display)

  • Ethernet Cable (to connect AM69 SK to internet)

  • Keyboard (to enter proxy settings if working under VPN)

  • Mouse (to control the Demo)

  • SD card (minimum 16GB)

5.2.3. How to Launch Seva Store via TI Apps Launcher

The TI Apps Launcher demo launches on Linux startup. To Launch Seva Store via TI Apps Launcher follow the below instructions.

  1. Flash an SD card with the tisdk-default-image. User can download the tisdk-default-image-j784s4-evm.wic.xz image from the SDK download page. Connect the Display, Ethernet Cable, Mouse & keyboard and Power on the board after inserting an SD card. The TI Apps Launcher will launch when the AM69 SK is fully booted.

../../_images/ti-apps-launcher-j7.png
  1. Once started, you will see an IP Address on the bottom left corner of TI Apps Launcher as shown below. This means your board is successfully connected to Internet.

../../_images/ip-addr.jpg

Note

If you have connected the AM69 SK to a proxy network, then before launching Seva Store you need to configure Docker and System proxies once per SD Card. To set proxy settings you can click on the Settings button from the Left Hand Side Menu and provide the necessary HTTPS & NO PROXY inputs and click Set Proxy button. Then, continue with Step 3.

../../_images/webproxy-settings.jpg
  1. After you see an IP Address, Click on the Seva Store button from the Left Hand Side Menu to launch Seva Store.

../../_images/seva-store-icon.jpg
  1. Click on the Launch Button which you see in centre.

../../_images/seva-launch-button.jpg
  1. Once you click the Launch Button, Chromium browser launches in full screen with Seva Control Centre in first tab as shown in the figure below.

../../_images/seva-control-center.png

Note

It takes approximately 3-4 seconds for Chromium browser to launch.

  1. The Seva Control Centre has a widget in centre which shows the information of Demo you have selected from the Seva Design Gallery. Since, it’s a first launch it displayed No app selected.

../../_images/no-app-selected.jpg
  1. To Launch a Demo, you first need to visit the Seva Design Gallery. For that you need to click on the Bottom Right Store Icon as shown in Image below.

../../_images/playstore-icon.jpg
  1. The Seva Design Gallery page launches in the second tab of the browser as shown below.

  1. Currently we have the Thermostat Demo Docker Image hosted on Seva Design Gallery. To launch the Thermostat Demo, click on the Launch Button as shown below.

../../_images/demo-launch.jpg

  1. After Clicking Launch Button, you will see a popup which asks user to switch to the first tab (i.e. Seva Control Centre) to run the Demo.

../../_images/seva-design-gallery-popup.png

  1. The Centre Widget of Seva Control Centre which displayed No app selected earlier in Step 6 will show the information of demo you have selected now (i.e Thermostat Demo).

../../_images/demo-widget.jpg

  1. Click on the Start Icon which you see on the Centre Widget to start the Thermostat Demo as shown in the image below.

../../_images/thermostat-demo-start-icon.jpg

13. Once you click the Start Icon the Seva Control Centre will run the docker-compose file and start pulling the Thermostat Demo from ghcr.io to launch it. The Seva Control Centre will show the Downloading Icon as shown in the image below.

../../_images/seva-buffering.png

Note

The Thermostat Demo Docker Image that we provide is around 2.3 GB. Hence, docker pull time may vary based on your internet speed provided to TI AM69 SK.

  1. Once the Docker Image of Thermostat Demo is pulled, the Seva Control Centre will auto launch the demo in full screen as shown below.

../../_images/thermostat-demo.png
  1. To close Thermostat Demo and come back to Seva Store, click on the cross icon as shown below.

../../_images/close-thermostat.jpg
  1. To launch another demo, you can follow from Step 6.

  2. To close the Seva Store Application and return back to TI Apps Launcher, close the Chromium browser.

5.2.4. How to Launch Seva Store on Host Browser

Note

Launching Seva Store on host browser is possible only if the AM69 SK and host PC are connected to the same local network.

  1. Flash an SD card with the tisdk-default-image. User can download the tisdk-default-image-j784s4-evm.wic.xz image from the SDK downloads page. Connect the Display, Ethernet Cable, Mouse & keyboard and Power on the board after inserting an SD card. The TI Apps Launcher will launch when the AM69 SK is fully booted. Take a note of the IP address you see on the bottom left corner of TI Apps Launcher as it will be needed to launch Seva Store on host browser.

  2. On host PC, launch your preferred browser and enter http://<your-board-ip-address>:8000/.

  3. Refer Step 6 to Step 17 from How to Launch Seva Store via TI Apps Launcher to understand how to use Seva Store to Launch a Demo.

5.2.5. How to Create & Host a Docker Image for your Demo

How to Create a Docker Image of your Demo

Docker can build images automatically by reading the instructions from a Dockerfile. A Dockerfile is a text document that contains all the commands a user could call on the command line to assemble an image. For more details on how to create a Docker Image you can refer Thermostat Demo Dockerfile.

How to Host a Docker Image of your Demo

After building a Docker Image, to host it you can use a Docker Registry. A Docker registry is a storage and distribution system for named Docker images. A Docker registry is organized into Docker repositories, where a repository holds all the versions of a specific image. The same image might have multiple different versions, identified by their tags. The registry allows Docker users to pull images locally, as well as push new images to the registry (given adequate access permissions when applicable).

5.2.6. How to add your Demos in Seva Store

Once you have your Demo Docker Image hosted on a Docker Registry, you can refer the following steps to add you Demo in Seva Store,

  1. For backend, create a new directory with the naming convention as app_your-demo-name_demo and create two new files named metadata.json and docker-compose.yml under the same directory. For reference you can check out Thermostat Demo Metadata and Thermostat Demo Docker Compose File. Once you have both the files tested at your end, create a PR on seva-apps.

  2. For frontend, once your PR on seva-apps is merged, to populate your Demo on Seva Store’s Design Gallery you need to create a PR on seva-design-gallery to add a div class for your Demo. You can refer the following template for the same.

<div class="ti_p-col-4">
  <div class="card bg-light mb-3 mt-3 h-100 d-flex flex-column align-items-start u-boxShadow-2 u-cardBorder-top-red">
    <p class="label">Your Organization Name</p>
    <img class="animated-gif" src="images/<A_GIF_image_for_your_demo>.gif" class="card-img-top" alt="...">
    <p class="lead text"> Your Demo Name </p>
    <p class="lead text" style="font-size: 14px;">Few Lines Description for your Demo</p>
    <footer>
      <input type="button" value="Launch" onclick="seva_send_message('app_your-demo-name_demo');" />
    </footer>
  </div>
</div>
  1. Once your above both PR’s are merged, you will have your Demo added on Seva Store.

5.2.7. Contact Us

If you need any further assistance, reach out to us on E2E.