Skip to content

TotalCross/totalcross-torizon-ew

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Base scripts and resources to make containers for Torizon with TotalCross. #EmbeddedWorld version!

Disclaimer

This is a repository for Totalcross insiders for production of Torizon containers. There is some scripts and helpers to make it easely.

Repository topology

To understand repository workflow you need that:

totalcross-torizon/
├─ bin/
├─ gen/
│   ├─ src/main/java/com/totalcross/
│   │  ├─ HelloWorld.java
│   │  └─ RunHelloWorldApplication.java
│   ├─ build.sh
│   ├─ chime.mp3
│   └─ pom.xml
├─ build.sh
├─ deploy.sh
├─ docker-compose.yaml
├─ Dockerfile
└─ README.md

A brief description:

  • /bin/ contains the application binaries to be executed;
  • /gen/ is used to build TotalCross applications, you need to have TOTALCROSSKEY=<your-key-number> and TOTALCROSSSDK=<path-to-your-valid-sdk> at your environment variables. See more of TotalCross here!
  • /build.sh script to build totalcross/app docker image;
  • /deploy.sh execute with IP as argument to transfer docker-compose.yaml to Torizon.

Development workflow

Follow the steps:

  1. Make some changes at Dockerfile;

  2. Build new totalcross/app docker image:

$ ./build.sh

    (Optional) Create a tag with you don't want use latest tag:

$ docker tag <newest id> totalcross/app:<tag>
  1. Push your changes (latest):
$ docker push totalcross/app:<tag>

    WARNING: be careful with stable tags

  1. Make some changes at docker-compose.yaml;

  2. scp changes to Torizon:

$ ./deploy.sh <host ip>
  1. In host (Torizon) pull:
$ docker pull totalcross/app:<tag>
  1. Run your application:
$ docker-compose up -d
  1. Show the logs:
$ docker-compose logs
  1. Shutdown:
$ docker-compose down

Debug

After docker-compose up -d if you got a black screen:

  1. Verify your docker process:
$ docker-ps
  1. Kill your broken application docker image process by id:
$ docker kill <docker id>
  1. Enter in docker image terminal:
docker run —rm -it -v /tmp:/tmp -v /var/run/dbus/ -v /dev/dri:/dev/dri -u root totalcross/app:latest

About

Base scripts and resources to make containers for Torizon with TotalCross. #EmbeddedWorld version!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published