Automated Rasberry Pi images
spuder opened this issue · 14 comments
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
Sorry if I'm a bit slow, but help me understand what this does?
it creates an .img for easy installation?
The home assistant (hasbian) raspberry pi image is the best example. Steps to implement:
- 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)
- Remove folders [stage 3,4,5] replace with own scripts to install and configure app
- setup travis-ci to build a new image based on a schedule/event (weekly?, on merge to master?, whenever you feel like it)
- Update documentation showing where to download images (hasbian images are 300-400mb which should be hostable on github)
- Profit??
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.
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
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
I've got an image up on github. The biggest advantage to it is that it has UK keyboard and locale settings.
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?
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...
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).
What's the login user and password? For this images?
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.