Skip to content

Commit b754fef

Browse files
committed
Add more samples
1 parent bfdd359 commit b754fef

File tree

3 files changed

+98
-8
lines changed

3 files changed

+98
-8
lines changed

sample/README.md

Lines changed: 35 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,37 @@
11
# flash sample configs
22

3-
- wifi-user-data.yml
4-
- insert WiFi SSID
5-
6-
- rainbow.yml
7-
- insert SSH public key
8-
- insert WiFi SSID and preshared key
9-
- attach Pimoroni Blinkt
10-
- flash, boot your Pi 3/0 - enjoy!
3+
Here you can find a collection of sample configurations to improve your
4+
first-boot experience using HypriotOS.
5+
6+
Beginning with HypriotOS 1.7.0 we have switched to [cloud-init]() which gives you much more power to customize your device automatically during the first initial boot.
7+
8+
## WiFi
9+
10+
Setup WiFi for your Raspberry Pi Zero or Pi 3 / 3 B+.
11+
12+
* [wifi-user-data.yml](./wifi-user-data.yml)
13+
* insert WiFi SSID
14+
15+
## SSH public key authentication
16+
17+
Setup your device with a different user account, remove default user and password.
18+
19+
* [ssh-pub-key.yml](./ssh-pub-key.yml)
20+
* adjust user name
21+
* insert SSH public key
22+
23+
## Static IP address
24+
25+
Setup your eth0 device with a static IP address.
26+
27+
* [static.yml](./static.yml)
28+
29+
## Hands-free Docker projects
30+
31+
Run a container as a service automatically.
32+
33+
* [rainbow.yml](./rainbow.yml)
34+
* insert SSH public key
35+
* insert WiFi SSID and preshared key
36+
* attach Pimoroni Blinkt
37+
* flash, boot your Pi 3/0 - enjoy!

sample/ssh-pub-key.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#cloud-config
2+
3+
hostname: pubkey
4+
manage_etc_hosts: true
5+
apt_preserve_sources_list: true
6+
7+
users:
8+
- name: foo # use any user name you like
9+
primary-group: users
10+
shell: /bin/bash
11+
sudo: ALL=(ALL) NOPASSWD:ALL
12+
groups: users,docker,adm,dialout,audio,plugdev,netdev,video
13+
ssh-import-id: None
14+
lock_passwd: true
15+
ssh-authorized-keys:
16+
- ssh-rsa AAAA....NN # insert your SSH public key ~/.ssh/id_rsa.pub here

sample/static.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
#cloud-config
2+
# vim: syntax=yaml
3+
#
4+
5+
# Set your hostname here, the manage_etc_hosts will update the hosts file entries as well
6+
hostname: static
7+
manage_etc_hosts: true
8+
# don't write debian.org into apt mirrors
9+
apt_preserve_sources_list: true
10+
11+
# You could modify this for your own user information
12+
users:
13+
- name: pirate
14+
gecos: "Hypriot Pirate"
15+
sudo: ALL=(ALL) NOPASSWD:ALL
16+
shell: /bin/bash
17+
groups: users,docker,video
18+
plain_text_passwd: hypriot
19+
lock_passwd: false
20+
ssh_pwauth: true
21+
chpasswd: { expire: false }
22+
23+
package_upgrade: false
24+
25+
# Static IP address
26+
write_files:
27+
- content: |
28+
persistent
29+
# Generate Stable Private IPv6 Addresses instead of hardware based ones
30+
slaac private
31+
32+
# static IP configuration:
33+
interface eth0
34+
static ip_address=192.168.1.31/24
35+
# static ip6_address=fd51:42f8:caae:d92e::ff/64
36+
static routers=192.168.1.1
37+
static domain_name_servers=192.168.1.1 8.8.8.8
38+
39+
path: /etc/dhcpcd.conf
40+
41+
# These commands will be ran once on first boot only
42+
runcmd:
43+
# Pickup the hostname changes
44+
- 'systemctl restart avahi-daemon'
45+
46+
# Activate WiFi interface
47+
# - 'ifup wlan0'

0 commit comments

Comments
 (0)