Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hypriot/device-init
Initialize a device on boot with user defined configuration
https://github.com/hypriot/device-init
Last synced: 5 days ago
JSON representation
Initialize a device on boot with user defined configuration
- Host: GitHub
- URL: https://github.com/hypriot/device-init
- Owner: hypriot
- License: mit
- Archived: true
- Created: 2016-02-04T14:09:19.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2018-05-29T21:28:44.000Z (over 6 years ago)
- Last Synced: 2024-08-01T12:24:30.421Z (3 months ago)
- Language: Go
- Homepage:
- Size: 2.25 MB
- Stars: 70
- Watchers: 13
- Forks: 17
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-starred - hypriot/device-init - Initialize a device on boot with user defined configuration (others)
README
# device-init
[![Build Status](https://travis-ci.org/hypriot/device-init.svg?branch=master)](https://travis-ci.org/hypriot/device-init)The `device-init` runs while booting your device and can customize some settings of the device.
To replace the `/boot/occidentalis.txt` (as we want this feature for more boards than the RPi) and to enhance the possibilities to customize the SD card image at first boot, we want to introduce this tool `device-init` that read customizations from the FAT partition `/boot/device-init.yaml` so it is easier to write it onto the SD card image.
* ☑ Set hostname
* ☑ Set WiFi SSID/PSK
* ☐ Set timezone
* ☐ Set locale
* ☐ Set static IP (see hypriot/device-init#6)
* ☑ Pull some docker images
* ☐ Install a list of DEB packages
* ☑ Run a custom script from /boot
* ...## The /boot/device-init.yaml
The `device-init` tool reads the file `/boot/device-init.yaml` to initialize several settings while booting your device.
### Hostname
```yaml
hostname: "black-pearl"
```### Wifi Settings
```yaml
wifi:
interfaces:
wlan0:
ssid: "MyNetwork"
password: "secret_password"
```### Docker Preload Images Settings
device-init can preload local image files into the Docker engine on boot.
Those images have to be exported via 'docker save image-name > image-name.tar'.
It is recommended to compress the output of 'docker save' with 'gzip image-name.tar' which results in a image-name.tar.gz file.```yaml
docker:
images:
- "/path/to/image-name.tar.gz"
- "/path/to/another-image-name.tar"
```### Run a Command
device-init can execute a list of commands on boot. e.g.:
```yaml
runcmd:
- "apt-get install package-name"
- "curl https://raw.githubusercontent.com/.../myscript.sh | sh"
```
Make sure that the command lines do not produce YAML syntax errors. You can check [here](http://www.yamllint.com/)### Hypriot Cluster-Lab
device-init can start the Hypriot Cluster-Lab on start up by setting the 'run_on_boot' option to 'true'.```
clusterlab:
service:
run_on_boot: "false"
```## Buy us a beer!
This FLOSS software is funded by donations only. Please support us to maintain and further improve it!