Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automated Rasberry Pi images #54

Open
spuder opened this issue Jan 1, 2018 · 14 comments
Open

Automated Rasberry Pi images #54

spuder opened this issue Jan 1, 2018 · 14 comments

Comments

@spuder
Copy link

spuder commented Jan 1, 2018

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
Copy link
Owner

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

@spuder
Copy link
Author

spuder commented Jan 1, 2018

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
Copy link
Author

spuder commented Jan 4, 2018

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
Copy link
Owner

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
Copy link
Author

spuder commented Jan 4, 2018

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
Copy link
Author

spuder commented Jan 5, 2018

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.

  • source is cloned to /opt/delta5
  • dedicated user to run service
  • locale = US not GB (still buggy)
  • nginx reverse proxy to forward port 80 to 5000
  • i2c kernel modules

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

  • Transfer git repo to delta 5 project ownership
  • setup travis-ci to build images every time delta 5 has a new release
  • document how to use

@spuder
Copy link
Author

spuder commented Jan 9, 2018

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
Copy link
Owner

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
Copy link
Author

spuder commented Jan 13, 2018 via email

@h4rr21
Copy link

h4rr21 commented Feb 1, 2018

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
Copy link
Author

spuder commented Feb 1, 2018

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
Copy link

h4rr21 commented Mar 4, 2018

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

@spuder
Copy link
Author

spuder commented Mar 4, 2018 via email

@BoLtWD
Copy link

BoLtWD commented Sep 27, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants