scottgchin / delta5_race_timer

Multi-node video transmitter race timer for drone racing
MIT License
159 stars 62 forks source link

Automated Rasberry Pi images #54

Open spuder opened 6 years ago

spuder commented 6 years ago

It would be nice to have a pre-built raspberry pi image.

pi-gen is the tool used to generate the pre built images on raspberrypi.org

https://github.com/RPi-Distro/pi-gen

scottgchin commented 6 years ago

Sorry if I'm a bit slow, but help me understand what this does? it creates an .img for easy installation?

spuder commented 6 years ago

Correct, so instead of people needing to install the software manually, they just download a .img to a sd card, plug it in and everything is up and running.

Some example projects that ship pre-built images for raspberry-pi.

octopi astrobox

I'm interested in helping with this.

spuder commented 6 years ago

The home assistant (hasbian) raspberry pi image is the best example. Steps to implement:

  1. Fork the pi-gen image (I'll do this in my own fork for now, eventually it may be best to move it under a delta 5 organization)
  2. Remove folders [stage 3,4,5] replace with own scripts to install and configure app
  3. setup travis-ci to build a new image based on a schedule/event (weekly?, on merge to master?, whenever you feel like it)
  4. Update documentation showing where to download images (hasbian images are 300-400mb which should be hostable on github)
  5. Profit??
scottgchin commented 6 years ago

Cool. I'll take a look at it when I get a chance. I already posted the latest image of my SD card on the facebook page to make it easier for people to install.

spuder commented 6 years ago

I've nearly got the automated images working. They are on my delta5 branch in my fork. The bulk of the script is in step 3

https://github.com/spuder/pi-gen/tree/delta5

It is copied from the home-assistant project

https://github.com/home-assistant/pi-gen

spuder commented 6 years ago

I've successfully got automated images building on my repo

https://github.com/spuder/pi-gen

./build-docker.sh

Depending on your internet speed, you will then have an image in about 30 minutes.

The image is idential to a stock raspbian with the following changes.

It will build a 456MB file. Use a program like etcher to drop it on an sd card, plug it in and wait 5 minutes and delta 5 will be running.

Next steps

spuder commented 6 years ago

I've got an image up on github. The biggest advantage to it is that it has UK keyboard and locale settings.

https://github.com/spuder/pi-gen/releases

scottgchin commented 6 years ago

Sorry about the delay, Just now starting to go through this. This looks pretty cool! So how is the image creation triggered? Is it each time there is a release?

spuder commented 6 years ago

That part still hasn’t been automated yet. Currently you need to install Docker and then run the build-docker.sh script.

I’ve manually uploaded two images to github so far

Depending on how frequently delta 5 is released will determine how to automate the raspberry pi image with Travis ci.

On Sat, Jan 13, 2018 at 07:00 scottgchin notifications@github.com wrote:

Sorry about the delay, Just now starting to go through this. This looks pretty cool! So how is the image creation triggered? Is it each time there is a release?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/scottgchin/delta5_race_timer/issues/54#issuecomment-357437595, or mute the thread https://github.com/notifications/unsubscribe-auth/AAOyzkH3g-pv2R4SWnV0xYp4J9pVnlvmks5tKLcQgaJpZM4RP9el .

h4rr21 commented 6 years ago

Hi spuder, I understand that part of the idea it's to make easy to deploy de code to the raspi.

But what about "https://resin.io" shouldn't be easy to deploy if delta5 runs in a docker container with resin.io rather than uploading a complete new image each time it releases a new one?

BTW I'm interested in helping to adopt CI tools in this project...

spuder commented 6 years ago

There may be a place for resin.io, however that is more intended for IOT projects. Delta 5 is very often run without internet access. Also delta5 doesn't run in a docker container currently, it only uses docker to build the image that goes on the SD card.

As far as I'm concerned, the raspberry pi images are working, you can get them here:

https://github.com/spuder/pi-gen/releases

Since delta 5 isn't releasing new versions very often, there isn't a need net for a more automated update process (yet).

h4rr21 commented 6 years ago

What's the login user and password? For this images?

spuder commented 6 years ago

It’s the default raspberry pi creds.

pi raspberry On Sun, Mar 4, 2018 at 12:41 h4rr21 notifications@github.com wrote:

What's the login user and password? For this images?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/scottgchin/delta5_race_timer/issues/54#issuecomment-370257334, or mute the thread https://github.com/notifications/unsubscribe-auth/AAOyzkPoisI-cjfmBUsGxhCIYQ8S6Qd3ks5tbENOgaJpZM4RP9el .

BoLtWD commented 5 years ago

There may be a place for resin.io, however that is more intended for IOT projects. Delta 5 is very often run without internet access. Also delta5 doesn't run in a docker container currently, it only uses docker to build the image that goes on the SD card.

As far as I'm concerned, the raspberry pi images are working, you can get them here:

https://github.com/spuder/pi-gen/releases

Since delta 5 isn't releasing new versions very often, there isn't a need net for a more automated update process (yet).

This is fantastic work to help someone get going as setting up the Pi can be daunting.