https://github.com/jsiebens/rpi-cloud-init
A Raspbian / Raspberry Pi OS image with cloud-init pre-installed
https://github.com/jsiebens/rpi-cloud-init
cloud-init packer raspberry-pi raspberrypi raspbian
Last synced: 6 months ago
JSON representation
A Raspbian / Raspberry Pi OS image with cloud-init pre-installed
- Host: GitHub
- URL: https://github.com/jsiebens/rpi-cloud-init
- Owner: jsiebens
- License: mit
- Created: 2020-05-30T15:46:43.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2023-07-13T17:20:15.000Z (over 2 years ago)
- Last Synced: 2025-04-08T21:35:41.935Z (10 months ago)
- Topics: cloud-init, packer, raspberry-pi, raspberrypi, raspbian
- Language: Shell
- Homepage:
- Size: 19.5 KB
- Stars: 22
- Watchers: 3
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cloud-init on a Raspberry Pi

This repository contains Packer templates and scripts to build a Raspbian / Raspberry Pi OS image with [cloud-init](https://cloud-init.io/) pre-installed.
> cloud-init: Cloud images are operating system templates and every instance starts out as an identical clone of every other instance. It is the user data that gives every cloud instance its personality and cloud-init is the tool that applies user data to your instances automatically.
This setup includes the following image:
- __rpi-cloud-init.img__: a image with cloud-init pre-installed.
## How to use this image
1. Download the image of the latest [release](https://github.com/jsiebens/rpi-cloud-init/releases) or build the image.
2. Flash the image to an SD card.
3. Customize the /boot/user-data with e.g. hostname, authorized ssh keys, ...
4. Insert the SD card into the Raspberry Pi and power it up.
## Building the images
This project includes a Vagrant file and some scripts to build the images in an isolated environment.
To use the Vagrant environment, start by cloning this repository:
```
git clone https://github.com/jsiebens/rpi-cloud-init
cd rpi-cloud-init
```
Next, start the Vagrant box and ssh into it:
```
vagrant up
vagrant ssh
```
When connected with the Vagrant box, run `build.sh` in the `/vagrant` directory:
```
cd /vagrant
./build.sh
```