Code Monkey home page Code Monkey logo

image-builder-rpi's Introduction

rpi-golang

Docker image containing GOLANG that is compatible to the Raspberry Pi.

Build the Docker Image

make build

Run the Docker Image and get version of installed GOLANG

make version

Push Docker Image to Docker Hub

  • First, use a docker login with username, password and email address
  • Second, push Docker Image to the official Docker Hub
make push

image-builder-rpi's People

Contributors

bltavares avatar dieterreuter avatar firecyberice avatar glensc avatar govinda-fichtner avatar kraeml avatar marclennox avatar mathiasrenner avatar mdzw avatar michaelkoetter avatar moul avatar proffan avatar rhuss avatar stefanscherer avatar troyfontaine avatar yonatan-schultz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

image-builder-rpi's Issues

Prepare next HypriotOS release "Blackbeard"

This is the task list for the next HypriotOS release "Blackbeard" for all Raspberry Pi models. Docker is preparing a major release with Docker Engine 1.12 and is also updating all the other tools, so we'll update HypriotOS to use all the new Docker tools as soon as possible. All changes should be done in single pull requests in order to keep them small and independently.

  • prepare ReleaseNotes for HypriotOS 1.0.0-rc1, #126
  • update Linux kernel 4.4.15, hypriot/rpi-kernel#25
    • add Linux kernel 4.4.15 packages, #106
  • update docker-engine 1.12.1-rc1, #124
  • update docker-engine 1.12.1-rc2, #128
  • update docker-engine 1.12.1, #130
  • update docker-machine 0.8.0, hypriot/arm-machine#4
    • add docker-machine_0.8.0-30_armhf.deb, #111
  • update docker-compose 1.8.0, hypriot/arm-compose#9
    • add docker-compose_1.8.0-61_armhf.deb, #116
  • update device-init 0.1.8, hypriot/device-init#23
    • add docker-init_0.1.8_armhf.deb, #115
  • update roots 1.0.0-rc1, #121
  • update rootfs 1.0.0, #129
  • ensure compatibility with Docker install.sh, #117
    • add lsb-release package, #118
  • clean APT cache and lists to reduce SD image size, #120
    • this saves approx. 220 MByte in total
  • update RPI raw image to v0.2.2, #122
  • remove package libraspberrypi-doc_*_armhf.deb, #123
    • this saves approx. 30 MByte in total
  • don't install linux-headers to save disk space, #128
  • OPTIONAL: remove hypriot-cluster-lab, #125
    • remove hypriot-cluster-lab package
    • remove pre-installed consul image
    • remove pre-installed swarm image
    • this saves approx. 10 MByte in total
  • NO/maybe later: switching to overlay2 storage driver, for details read https://docs.docker.com/engine/userguide/storagedriver/overlayfs-driver/

Add version number in sd card zip filename

The downloadable SD card image should also have the version numer in its filename.

If someone downloads it and later on another version all files stack up in his download folder with any version number.

WiFi firmware missing

In comparison with the old Hector release some DEB packages are missing:

We could add these in builder/build.sh with

export APT_PACKAGES="firmware-atheros
                     firmware-brcm80211
                     firmware-libertas
                     firmware-ralink
                     firmware-realtek"

but these must be installed from a raspbian repo instead of the debian repo.

Switching SD card between RPi's: eth1: renamed from eth0

When I boot a RPi with the v0.4.0 SD card image, shutdown and plug the SD card into another RPi, then the network does not work.

In /var/log/messages I see a message like

eth1: renamed from eth0

Probably due to the different MAC addresses of the RPi's

Ensure compatibility with Docker install.sh

Right now it's not possible to install the official Docker .deb package for ARMHF with the recommend way. The reason behind is that the Docker install.sh depends on the lsb_release command, which is currently not available in HypriotOS.

Fix: Installing the Debian package lsb-release should fix this issue.

docker-machine will hang docker daemon

Ok the symptom is that with build 0.5.14, this image converted to using /etc/docker/daemon.json for its configuration and /etc/systemd/system/docker.service has a generic /usr/bin/docker start line.

This is because the main docker-machine does not respect the daemon.json logic and will add it's own command line options and by design the daemon will not start. See docker/machine#3062.

Reproduce by:

If you run docker-machine -d generic against this image with docker-machine 0.6 that is in docker for mac, it does not know about daemon.json and instead adds its configuration in the command line of /etc/systemd/system/docker.service.

This is the specific behavior of the docker daemon (see https://docs.docker.com/engine/reference/commandline/daemon/) so right now the -H options in the command line conflict with the fd:// option and overlay is specified in both.

When the command line and the daemon.json exist, docker will refuse to start. As an aside, if you are using Docker for Mac beta, it does not update any of the command line utilities, so you need to install Docker Toolbox for Mac to get the latest or run the latest installation scripts

The fix: document that if you use docker-machine you must remove daemon.json before running docker-machine create

Docker related kernel options should be double-checked again

Just run the latest check-config.sh script against the v0.4.0, there are maybe a few kernel options we should check and adding it if this is possible.

These settings should be checked:

Optional Features:
- CONFIG_CGROUP_PIDS: missing
- CONFIG_CGROUP_HUGETLB: missing (note: this one is not available in kernel 4.1.x)

Complete check output:

./check-config.sh
info: reading kernel config from /proc/config.gz ...

Generally Necessary:
- cgroup hierarchy: properly mounted [/sys/fs/cgroup]
- CONFIG_NAMESPACES: enabled
- CONFIG_NET_NS: enabled
- CONFIG_PID_NS: enabled
- CONFIG_IPC_NS: enabled
- CONFIG_UTS_NS: enabled
- CONFIG_DEVPTS_MULTIPLE_INSTANCES: enabled
- CONFIG_CGROUPS: enabled
- CONFIG_CGROUP_CPUACCT: enabled
- CONFIG_CGROUP_DEVICE: enabled
- CONFIG_CGROUP_FREEZER: enabled
- CONFIG_CGROUP_SCHED: enabled
- CONFIG_CPUSETS: enabled
- CONFIG_MEMCG: enabled
- CONFIG_KEYS: enabled
- CONFIG_MACVLAN: enabled (as module)
- CONFIG_VETH: enabled (as module)
- CONFIG_BRIDGE: enabled (as module)
- CONFIG_BRIDGE_NETFILTER: enabled (as module)
- CONFIG_NF_NAT_IPV4: enabled (as module)
- CONFIG_IP_NF_FILTER: enabled (as module)
- CONFIG_IP_NF_TARGET_MASQUERADE: enabled (as module)
- CONFIG_NETFILTER_XT_MATCH_ADDRTYPE: enabled (as module)
- CONFIG_NETFILTER_XT_MATCH_CONNTRACK: enabled (as module)
- CONFIG_NF_NAT: enabled (as module)
- CONFIG_NF_NAT_NEEDED: enabled
- CONFIG_POSIX_MQUEUE: enabled

Optional Features:
- CONFIG_USER_NS: enabled
- CONFIG_SECCOMP: enabled
- CONFIG_CGROUP_PIDS: missing
- CONFIG_MEMCG_KMEM: enabled
- CONFIG_MEMCG_SWAP: enabled
- CONFIG_MEMCG_SWAP_ENABLED: enabled
- CONFIG_BLK_CGROUP: enabled
- CONFIG_IOSCHED_CFQ: enabled
- CONFIG_BLK_DEV_THROTTLING: enabled
- CONFIG_CGROUP_PERF: enabled
- CONFIG_CGROUP_HUGETLB: missing
- CONFIG_NET_CLS_CGROUP: enabled (as module)
- CONFIG_CGROUP_NET_PRIO: enabled
- CONFIG_CFS_BANDWIDTH: enabled
- CONFIG_FAIR_GROUP_SCHED: enabled
- CONFIG_RT_GROUP_SCHED: enabled
- CONFIG_EXT3_FS: enabled
- CONFIG_EXT3_FS_XATTR: enabled
- CONFIG_EXT3_FS_POSIX_ACL: enabled
- CONFIG_EXT3_FS_SECURITY: enabled
- CONFIG_EXT4_FS: enabled
- CONFIG_EXT4_FS_POSIX_ACL: enabled
- CONFIG_EXT4_FS_SECURITY: enabled
- Storage Drivers:
  - "aufs":
    - CONFIG_AUFS_FS: missing
  - "btrfs":
    - CONFIG_BTRFS_FS: enabled (as module)
  - "devicemapper":
    - CONFIG_BLK_DEV_DM: enabled (as module)
    - CONFIG_DM_THIN_PROVISIONING: enabled (as module)
  - "overlay":
    - CONFIG_OVERLAY_FS: enabled (as module)
  - "zfs":
    - /dev/zfs: missing
    - zfs command: missing
    - zpool command: missing

Allow firstboot customizations like setting hostname, WiFi etc.

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 image at first boot, we want to introduce a tool "device-init" that read customizations from the FAT partition /boot so it is easier to write it onto the SD image.

  • Set hostname
  • Set WiFi SSID/PSK
  • Set timezone
  • Set locale
  • Set static IP (see hypriot/flash#25)
  • ...

Add initial support of device-init into the RPi SD card image and update the flash script.

Kernel panic on a RPi1

Flashing 0.0.12 and booting a RPi1 with it leads to a Kernel panic.
Maybe we missed something to build it really for ARMv6.

Old version of docker-compose is installed

In v0.4.0 there is still an old version 1.6.0-27 of docker-compose installed.

Command "dpkg -l docker-compose"
  stdout
    should match /ii  docker-compose/
  stdout
    should match /1.6.2-28/ (FAILED - 37)
  exit_status
    should eq 0

Run root FS as read-only?

Just discovered hypriot, nice work getting Docker to play nicely on a RasPi! 👍 .

I am I developer on the OpenEnergyMonitor Project, we currently use a RasPi3 with root FS in read-only for robust long-term operation. In testing we found SD cards hit their RW limit and failed in less then 12 months when used for logging application.

My questions is can the hypriot SD card images work with root FS in read-only? Do you have any any experience / recommendations for running Docker on RaPi with read-only root FS? I have documented the steps taken to make raspbian read-only here and our full SD card build guide here.

I first posed this question on Gitter chat, @firecyberice suggested I open an issue here. In a tweet @DieterReuter suggested this should be possible. Ram disks will be needed, we currently have the following setup

tmpfs           /tmp            tmpfs   nodev,nosuid,size=30M,mode=1777 0  0
tmpfs           /var/log        tmpfs   nodev,nosuid,size=50M,mode=1777 0  0
tmpfs           /var/lib/dhcp   tmpfs   nodev,nosuid,size=1M,mode=1777 0  0
tmpfs           /var/lib/openhab tmpfs  nodev,nosuid,size=40M,mode=1777 0  0
proc            /proc           proc    defaults 0 0
/dev/mmcblk0p1  /boot           vfat    defaults,noatime,nodiratime 0 2
/dev/mmcblk0p2  /               ext4    defaults,ro,noatime,nodiratime,errors=remount-ro 0 1
/dev/mmcblk0p3  /home/pi/data   ext2    defaults,rw,noatime,nodiratime,errors=remount-ro 0 2

/home/pi/data is mounted as RW then everything else is RO or tmpfs. Our pre-built SD card images can be downloaded if you're interested how this works. We have had RaspberryPi's running without a hitch for other 3 years constantly data logging using this setup.

Name of apt hypriot.list

Should we use another name for this apt source in https://github.com/hypriot/image-builder-rpi/blob/master/build.sh#L70 ?

echo 'deb https://packagecloud.io/Hypriot/rpi/debian/ jessie main' > /etc/apt/sources.list.d/hypriot.list

All the other docker tools are in Hypriot/Schatzkiste and eg. docker-machine-hypriot uses exactly the same name to insert the Schatzkiste apt source.

See https://github.com/hypriot/machine/blob/v0.4.1-hypriot/libmachine/provision/hypriot.go#L135 for docker-machine-hypriot 0.4.1

Test failing for `HYPRIOT_OS_VERSION="v0.7.2"`

One of the integrations tests for v0.4.0 is failing.

File "/etc/os-release"
  should be file
  should be owned by "root"
  content
    should match /HYPRIOT_OS="HypriotOS\/armhf"/
  content
    should match /HYPRIOT_OS_VERSION="v0.7.2"/ (FAILED - 1)
  content
    should match /HYPRIOT_DEVICE="Raspberry Pi"/
  content
    should match /HYPRIOT_IMAGE_VERSION=/

Correct version is currently HYPRIOT_OS_VERSION="v0.8.1".

Add pirate user to the "video" group

If camera is enabled, it won't work by default as users need to be added to this group. This will also reduce friction from new adopters trying to use the camera

Docker Engine uses devicemapper instead of overlay

With v0.5.15 the docker engine uses devicemapper instead of overlay.

Even with an entry overlay in /etc/modules it still defaults to devicemapper.
So we have to add this into the systemd config file, but NOT daemon.json.

Raspberry Pi 3 : exec error format

This my configuration :

Version

Client:
 Version:      1.10.3
 API version:  1.22
 Go version:   go1.4.3
 Git commit:   20f81dd
 Built:        Thu Mar 10 22:23:48 2016
 OS/Arch:      linux/arm

Server:
 Version:      1.10.3
 API version:  1.22
 Go version:   go1.4.3
 Git commit:   20f81dd
 Built:        Thu Mar 10 22:23:48 2016
 OS/Arch:      linux/arm

Info

Containers: 1
 Running: 0
 Paused: 0
 Stopped: 1
Images: 1
Server Version: 1.10.3
Storage Driver: overlay
 Backing Filesystem: extfs
Execution Driver: native-0.2
Logging Driver: json-file
Plugins: 
 Volume: local
 Network: bridge null host
Kernel Version: 4.1.19-v7+
Operating System: Raspbian GNU/Linux 8 (jessie)
OSType: linux
Architecture: armv7l
CPUs: 4
Total Memory: 925.8 MiB
Name: raspberrypi
ID: 3IUI:UFVJ:JPD5:3NPV:E6DW:R5QE:DYUJ:MWKG:TLFF:2OTR:HIKQ:VUBA
Debug mode (server): true
 File Descriptors: 11
 Goroutines: 21
 System Time: 2016-04-19T17:11:40.218621927Z
 EventsListeners: 0
 Init SHA1: 0db326fc09273474242804e87e11e1d9930fb95b
 Init Path: /usr/lib/docker/dockerinit
 Docker Root Dir: /var/lib/docker
WARNING: No memory limit support
WARNING: No swap limit support
WARNING: No oom kill disable support
WARNING: No cpu cfs quota support
WARNING: No cpu cfs period support

This an example of my error I found every time I tried to use docker on my raspberry pi 3

docker run --name redis -d redis
4d5d10532da96203e514432c5526e137bc25785cd6d015282f3aed605f52a733
docker: Error response from daemon: Cannot start container 4d5d10532da96203e514432c5526e137bc25785cd6d015282f3aed605f52a733: [9] System error: exec format error.

No matter the image i tried to run. it is showing the same error message.

Rpi will freeze when trying to run container

I have recently installed Hypriot 0.8 on my Rpi 1 and then I tried running a container on it, more specifically an rTorrent server, initially it seemed that it was runnig stable but once the server had a couple of files downloaded in it, it would not stay up for more than a few minutes. The pi would simply stop responding all together and I had to pull the power cable to reset it and this would happen every time.

Once I installed raspbian lite on the pi and then installed docker from the hypriot repository, the exact same image has been now running for a few days without any issues (As it was before when it was installed directly on the host which was also a raspbian before).

I thought I would leave this information here as it may help debugging the issue. Attached is a zip files with most files needed for building the image.

rTorrent.zip

Not supplied in the attachment is the crt and key files (Generated using sha256ECDSA), dhparam.pem and .htpasswd (Created it from another machine)

Even though I do not believe this was the actual issue I was also using a CIFS volume plugin, more specifically https://github.com/ContainX/docker-volume-netshare although I did not use their armhf release because it did not work so I compiled it myself on the pi with go (I can supply the binary if you weould like).

The command used to start the pi was prety much this one (I used some extra environment variables but omitted here since they do not matter for tyhe issue)

/usr/bin/docker run --name rtorrent -p 443:443 -p 9881-9999:9881-9999 -v /home/pirate/rtorrent/rutorrent_data:/home/rtorrent/rutorrent/rutorrent/share/users -v /home/pirate/rtorrent/session:/home/rtorrent/.session --volume-driver=cifs -v 172.1.1.1/MyData:/home/rtorrent/download/ rtorrent

Some of the data on the command is obviously fake and needs to be replaced with real data

I hope this helps to find and debug the issue

docker-machine-hypriot 0.4.1 findings

I've tried to use docker-machine-hypriot v0.4.1 to connect to the new HypriotOS v0.1.1 to check if it's compatible. After some several errors and reflashing to have a first boot experience again and again I found a way with additional options.

Reproduce

What I did:

  1. Add my SSH pub key to the new machine,
  2. then run docker-machine with
  3. the IP of the RPi
  4. and the username pirate as the root login is disabled
  5. and the overlay storage driver as the default aufs isn't available on RPi
$ ssh-copy-id [email protected]
$ docker-machine-hypriot create -d hypriot --hypriot-ip-address 192.168.10.23 --hypriot-ssh-user pirate --engine-storage-driver overlay hypriotos

Findings

Some interesting aspect can be found in the debug output (see below for all details):

  • the additional keys in /etc/os-release result in a warning:
Couldn't set key HYPRIOT_OS, no corresponding struct field found
Couldn't set key HYPRIOT_TAG, no corresponding struct field found
  • The RPi is detected as debian and not raspbian. So our hypriot provisioner in that static docker-machine-hypriot binary isn't used, but the standard (Intel-only tested) debian provisioner.
found compatible host: debian
  • As a result it would use the following script if docker wasn't installed already:
if ! type docker; then curl -sSL https://get.docker.com | sh -; fi
  • It writes a new config to /etc/systemd/system/docker.service but it still uses the -d option. So this old docker-machine binary won't work with Docker 1.10.
  • The docker daemon does not start as the standard storage driver uses aufs and does not fit our RPi drivers. S
$ sudo tail -50 /var/log/syslog
Jan 31 08:25:18 black-pearl systemd[1]: Starting docker.service...
Jan 31 08:25:18 black-pearl systemd[1]: Failed to reset devices.list on /system.slice: Invalid argument
Jan 31 08:25:18 black-pearl systemd[1]: Started docker.service.
Jan 31 08:25:18 black-pearl docker[1725]: Warning: '-d' is deprecated, it will be removed soon. See usage.
Jan 31 08:25:18 black-pearl docker[1725]: time="2016-01-31T08:25:18Z" level=warning msg="please use 'docker daemon' instead."
Jan 31 08:25:24 black-pearl docker[1725]: time="2016-01-31T08:25:24.416688572Z" level=fatal msg="Error starting daemon: error initializing graphdriver: driver not supported"
Jan 31 08:25:24 black-pearl systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
Jan 31 08:25:24 black-pearl systemd[1]: Unit docker.service entered failed state.

Debug output

Here is the complete debug output:

$ ssh-copy-id [email protected]
/usr/local/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/local/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
[email protected]'s password: 

Number of key(s) added:        1

Now try logging into the machine, with:   "ssh '[email protected]'"
and check to make sure that only the key(s) you wanted were added.

~
$ docker-machine-hypriot -D create -d hypriot --hypriot-ip-address 192.168.10.23 --hypriot-ssh-user pirate --engine-storage-driver overlay hypriotos
Importing SSH key...
IP: 192.168.10.23
Getting to WaitForSSH function...
Testing TCP connection to: 192.168.10.23:22
Using SSH client type: external
About to run SSH command:
exit 0
&{/usr/bin/ssh [/usr/bin/ssh -o PasswordAuthentication=no -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -i /Users/stefan/.docker/machine/machines/hypriotos/id_rsa -p 22 [email protected] exit 0] []  <nil> <nil> <nil> [] <nil> <nil> <nil> <nil> false [] [] [] [] <nil>}
SSH cmd err, output: <nil>: 
Using SSH client type: external
About to run SSH command:
cat /etc/os-release
&{/usr/bin/ssh [/usr/bin/ssh -o PasswordAuthentication=no -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -i /Users/stefan/.docker/machine/machines/hypriotos/id_rsa -p 22 [email protected] cat /etc/os-release] []  <nil> <nil> <nil> [] <nil> <nil> <nil> <nil> false [] [] [] [] <nil>}
SSH cmd err, output: <nil>: PRETTY_NAME="Debian GNU/Linux 8 (jessie)"
NAME="Debian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=debian
HOME_URL="http://www.debian.org/"
SUPPORT_URL="http://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
HYPRIOT_OS="HypriotOS/armhf"
HYPRIOT_TAG="v0.6.1"

Couldn't set key HYPRIOT_OS, no corresponding struct field found
Couldn't set key HYPRIOT_TAG, no corresponding struct field found
found compatible host: debian
installing sudo
Using SSH client type: external
About to run SSH command:
if ! type sudo; then apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y sudo; fi
&{/usr/bin/ssh [/usr/bin/ssh -o PasswordAuthentication=no -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -i /Users/stefan/.docker/machine/machines/hypriotos/id_rsa -p 22 [email protected] if ! type sudo; then apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y sudo; fi] []  <nil> <nil> <nil> [] <nil> <nil> <nil> <nil> false [] [] [] [] <nil>}
SSH cmd err, output: <nil>: sudo is /usr/bin/sudo

setting hostname
Using SSH client type: external
About to run SSH command:
sudo hostname hypriotos && echo "hypriotos" | sudo tee /etc/hostname
&{/usr/bin/ssh [/usr/bin/ssh -o PasswordAuthentication=no -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -i /Users/stefan/.docker/machine/machines/hypriotos/id_rsa -p 22 [email protected] sudo hostname hypriotos && echo "hypriotos" | sudo tee /etc/hostname] []  <nil> <nil> <nil> [] <nil> <nil> <nil> <nil> false [] [] [] [] <nil>}
SSH cmd err, output: <nil>: sudo: unable to resolve host black-pearl
sudo: unable to resolve host hypriotos
hypriotos

Using SSH client type: external
About to run SSH command:
if grep -xq 127.0.1.1.* /etc/hosts; then sudo sed -i 's/^127.0.1.1.*/127.0.1.1 hypriotos/g' /etc/hosts; else echo '127.0.1.1 hypriotos' | sudo tee -a /etc/hosts; fi
&{/usr/bin/ssh [/usr/bin/ssh -o PasswordAuthentication=no -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -i /Users/stefan/.docker/machine/machines/hypriotos/id_rsa -p 22 [email protected] if grep -xq 127.0.1.1.* /etc/hosts; then sudo sed -i 's/^127.0.1.1.*/127.0.1.1 hypriotos/g' /etc/hosts; else echo '127.0.1.1 hypriotos' | sudo tee -a /etc/hosts; fi] []  <nil> <nil> <nil> [] <nil> <nil> <nil> <nil> false [] [] [] [] <nil>}
SSH cmd err, output: <nil>: sudo: unable to resolve host hypriotos
127.0.1.1 hypriotos

installing base packages
Using SSH client type: external
About to run SSH command:
sudo apt-get update
&{/usr/bin/ssh [/usr/bin/ssh -o PasswordAuthentication=no -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -i /Users/stefan/.docker/machine/machines/hypriotos/id_rsa -p 22 [email protected] sudo apt-get update] []  <nil> <nil> <nil> [] <nil> <nil> <nil> <nil> false [] [] [] [] <nil>}
SSH cmd err, output: <nil>: Get:1 http://security.debian.org jessie/updates InRelease [63.1 kB]
Ign http://httpredir.debian.org jessie InRelease
Get:2 http://httpredir.debian.org jessie-updates InRelease [136 kB]
Get:3 http://security.debian.org jessie/updates/main Sources [110 kB]
Hit http://httpredir.debian.org jessie Release.gpg
Get:4 http://security.debian.org jessie/updates/main armhf Packages [193 kB]
Hit http://httpredir.debian.org jessie Release
Get:5 http://httpredir.debian.org jessie-updates/main Sources [2,296 B]
Get:6 http://security.debian.org jessie/updates/main Translation-en [107 kB]
Get:7 http://httpredir.debian.org jessie-updates/main armhf Packages/DiffIndex [367 B]
Get:8 http://httpredir.debian.org jessie-updates/main Translation-en [2,506 B]
Hit http://httpredir.debian.org jessie/main Sources
Hit http://httpredir.debian.org jessie/main armhf Packages
Hit http://httpredir.debian.org jessie/main Translation-en
Hit https://packagecloud.io jessie InRelease
Hit https://packagecloud.io wheezy InRelease
Hit https://packagecloud.io jessie/main armhf Packages
Get:9 https://packagecloud.io jessie/main Translation-en_US [162 B]
Get:10 https://packagecloud.io jessie/main Translation-en [162 B]
Hit https://packagecloud.io wheezy/main armhf Packages
Get:11 https://packagecloud.io wheezy/main Translation-en_US [162 B]
Get:12 https://packagecloud.io wheezy/main Translation-en [162 B]
Get:13 https://packagecloud.io jessie/main Translation-en_US [162 B]
Get:14 https://packagecloud.io jessie/main Translation-en [162 B]
Get:15 https://packagecloud.io wheezy/main Translation-en_US [162 B]
Get:16 https://packagecloud.io wheezy/main Translation-en [162 B]
Get:17 https://packagecloud.io jessie/main Translation-en_US [162 B]
Get:18 https://packagecloud.io jessie/main Translation-en [162 B]
Get:19 https://packagecloud.io wheezy/main Translation-en_US [162 B]
Get:20 https://packagecloud.io wheezy/main Translation-en [162 B]
Get:21 https://packagecloud.io jessie/main Translation-en_US [162 B]
Get:22 https://packagecloud.io jessie/main Translation-en [162 B]
Get:23 https://packagecloud.io wheezy/main Translation-en_US [162 B]
Get:24 https://packagecloud.io wheezy/main Translation-en [162 B]
Get:25 https://packagecloud.io jessie/main Translation-en_US [162 B]
Ign https://packagecloud.io jessie/main Translation-en_US
Get:26 https://packagecloud.io jessie/main Translation-en [162 B]
Ign https://packagecloud.io jessie/main Translation-en
Get:27 https://packagecloud.io wheezy/main Translation-en_US [162 B]
Ign https://packagecloud.io wheezy/main Translation-en_US
Get:28 https://packagecloud.io wheezy/main Translation-en [162 B]
Ign https://packagecloud.io wheezy/main Translation-en
Fetched 615 kB in 38s (16.1 kB/s)
Reading package lists...

package: action=install name=curl
Using SSH client type: external
About to run SSH command:
DEBIAN_FRONTEND=noninteractive sudo -E apt-get install -y  curl
&{/usr/bin/ssh [/usr/bin/ssh -o PasswordAuthentication=no -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -i /Users/stefan/.docker/machine/machines/hypriotos/id_rsa -p 22 [email protected] DEBIAN_FRONTEND=noninteractive sudo -E apt-get install -y  curl] []  <nil> <nil> <nil> [] <nil> <nil> <nil> <nil> false [] [] [] [] <nil>}
SSH cmd err, output: <nil>: Reading package lists...
Building dependency tree...
Reading state information...
curl is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

installing docker
Using SSH client type: external
About to run SSH command:
if ! type docker; then curl -sSL https://get.docker.com | sh -; fi
&{/usr/bin/ssh [/usr/bin/ssh -o PasswordAuthentication=no -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -i /Users/stefan/.docker/machine/machines/hypriotos/id_rsa -p 22 [email protected] if ! type docker; then curl -sSL https://get.docker.com | sh -; fi] []  <nil> <nil> <nil> [] <nil> <nil> <nil> <nil> false [] [] [] [] <nil>}
SSH cmd err, output: <nil>: docker is /usr/bin/docker

waiting for docker daemon
Using SSH client type: external
About to run SSH command:
sudo docker version
&{/usr/bin/ssh [/usr/bin/ssh -o PasswordAuthentication=no -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -i /Users/stefan/.docker/machine/machines/hypriotos/id_rsa -p 22 [email protected] sudo docker version] []  <nil> <nil> <nil> [] <nil> <nil> <nil> <nil> false [] [] [] [] <nil>}
SSH cmd err, output: <nil>: Client:
 Version:      1.9.1
 API version:  1.21
 Go version:   go1.4.3
 Git commit:   a34a1d5
 Built:        Fri Nov 20 23:03:02 UTC 2015
 OS/Arch:      linux/arm

Server:
 Version:      1.9.1
 API version:  1.21
 Go version:   go1.4.3
 Git commit:   a34a1d5
 Built:        Fri Nov 20 23:03:02 UTC 2015
 OS/Arch:      linux/arm

configuring auth
generating server cert: /Users/stefan/.docker/machine/machines/hypriotos/server.pem ca-key=/Users/stefan/.docker/machine/certs/ca.pem private-key=/Users/stefan/.docker/machine/certs/ca-key.pem org=hypriotos
Using SSH client type: external
About to run SSH command:
sudo systemctl daemon-reload
&{/usr/bin/ssh [/usr/bin/ssh -o PasswordAuthentication=no -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -i /Users/stefan/.docker/machine/machines/hypriotos/id_rsa -p 22 [email protected] sudo systemctl daemon-reload] []  <nil> <nil> <nil> [] <nil> <nil> <nil> <nil> false [] [] [] [] <nil>}
SSH cmd err, output: <nil>: 
Using SSH client type: external
About to run SSH command:
sudo systemctl stop docker
&{/usr/bin/ssh [/usr/bin/ssh -o PasswordAuthentication=no -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -i /Users/stefan/.docker/machine/machines/hypriotos/id_rsa -p 22 [email protected] sudo systemctl stop docker] []  <nil> <nil> <nil> [] <nil> <nil> <nil> <nil> false [] [] [] [] <nil>}
SSH cmd err, output: <nil>: Warning: Stopping docker.service, but it can still be activated by:
  docker.socket

Using SSH client type: external
About to run SSH command:
printf '%s' '-----BEGIN CERTIFICATE-----
MIICyzCCAbWgAwIBAgIQWByK4x5md1dlld6D8v+rjzALBgkqhkiG9w0BAQswETEP
578aFwYcHvFOrujq/2sryYVZ4GPE1Opuif65R1pd9L9npKu44gEQfpwr1v61cBM=
-----END CERTIFICATE-----
' | sudo tee /etc/docker/ca.pem
&{/usr/bin/ssh [/usr/bin/ssh -o PasswordAuthentication=no -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -i /Users/stefan/.docker/machine/machines/hypriotos/id_rsa -p 22 [email protected] printf '%s' '-----BEGIN CERTIFICATE-----
MIICyzCCAbWgAwIBAgIQWByK4x5md1dlld6D8v+rjzALBgkqhkiG9w0BAQswETEP
578aFwYcHvFOrujq/2sryYVZ4GPE1Opuif65R1pd9L9npKu44gEQfpwr1v61cBM=
-----END CERTIFICATE-----
' | sudo tee /etc/docker/ca.pem] []  <nil> <nil> <nil> [] <nil> <nil> <nil> <nil> false [] [] [] [] <nil>}
SSH cmd err, output: <nil>: -----BEGIN CERTIFICATE-----
MIICyzCCAbWgAwIBAgIQWByK4x5md1dlld6D8v+rjzALBgkqhkiG9w0BAQswETEP
578aFwYcHvFOrujq/2sryYVZ4GPE1Opuif65R1pd9L9npKu44gEQfpwr1v61cBM=
-----END CERTIFICATE-----

Using SSH client type: external
About to run SSH command:
printf '%s' '-----BEGIN CERTIFICATE-----
MIIC+zCCAeWgAwIBAgIQHoObcqLdqGTN2pqc5tWKuzALBgkqhkiG9w0BAQswETEP
aBXwWo3+fNySNh7l6yi2bUmg0QtzReaY79+pp2EkDZE1K/GNWtL13Ub+AyGm1dA=
-----END CERTIFICATE-----
' | sudo tee /etc/docker/server.pem
&{/usr/bin/ssh [/usr/bin/ssh -o PasswordAuthentication=no -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -i /Users/stefan/.docker/machine/machines/hypriotos/id_rsa -p 22 [email protected] printf '%s' '-----BEGIN CERTIFICATE-----
MIIC+zCCAeWgAwIBAgIQHoObcqLdqGTN2pqc5tWKuzALBgkqhkiG9w0BAQswETEP
aBXwWo3+fNySNh7l6yi2bUmg0QtzReaY79+pp2EkDZE1K/GNWtL13Ub+AyGm1dA=
-----END CERTIFICATE-----
' | sudo tee /etc/docker/server.pem] []  <nil> <nil> <nil> [] <nil> <nil> <nil> <nil> false [] [] [] [] <nil>}
SSH cmd err, output: <nil>: -----BEGIN CERTIFICATE-----
MIIC+zCCAeWgAwIBAgIQHoObcqLdqGTN2pqc5tWKuzALBgkqhkiG9w0BAQswETEP
aBXwWo3+fNySNh7l6yi2bUmg0QtzReaY79+pp2EkDZE1K/GNWtL13Ub+AyGm1dA=
-----END CERTIFICATE-----

Using SSH client type: external
About to run SSH command:
printf '%s' '-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEAoQmY8c1JyetO5Zk3v2TUbSi4KIWJ//GbVGcWHKwjhI68ozed
oG10EWuIozeRd3FUQobwbzj9ophCLslwvWNXoSCQe2lVVKBY0ETy
-----END RSA PRIVATE KEY-----
' | sudo tee /etc/docker/server-key.pem
&{/usr/bin/ssh [/usr/bin/ssh -o PasswordAuthentication=no -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -i /Users/stefan/.docker/machine/machines/hypriotos/id_rsa -p 22 [email protected] printf '%s' '-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEAoQmY8c1JyetO5Zk3v2TUbSi4KIWJ//GbVGcWHKwjhI68ozed
oG10EWuIozeRd3FUQobwbzj9ophCLslwvWNXoSCQe2lVVKBY0ETy
-----END RSA PRIVATE KEY-----
' | sudo tee /etc/docker/server-key.pem] []  <nil> <nil> <nil> [] <nil> <nil> <nil> <nil> false [] [] [] [] <nil>}
SSH cmd err, output: <nil>: -----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEAoQmY8c1JyetO5Zk3v2TUbSi4KIWJ//GbVGcWHKwjhI68ozed
oG10EWuIozeRd3FUQobwbzj9ophCLslwvWNXoSCQe2lVVKBY0ETy
-----END RSA PRIVATE KEY-----

Using SSH client type: external
About to run SSH command:
printf %s "[Service]
ExecStart=/usr/bin/docker -d -H tcp://0.0.0.0:2376 -H unix:///var/run/docker.sock --storage-driver overlay --tlsverify --tlscacert /etc/docker/ca.pem --tlscert /etc/docker/server.pem --tlskey /etc/docker/server-key.pem --label provider=hypriot 
MountFlags=slave
LimitNOFILE=1048576
LimitNPROC=1048576
LimitCORE=infinity
Environment=

[Install]
WantedBy=multi-user.target
" | sudo tee /etc/systemd/system/docker.service
&{/usr/bin/ssh [/usr/bin/ssh -o PasswordAuthentication=no -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -i /Users/stefan/.docker/machine/machines/hypriotos/id_rsa -p 22 [email protected] printf %s "[Service]
ExecStart=/usr/bin/docker -d -H tcp://0.0.0.0:2376 -H unix:///var/run/docker.sock --storage-driver overlay --tlsverify --tlscacert /etc/docker/ca.pem --tlscert /etc/docker/server.pem --tlskey /etc/docker/server-key.pem --label provider=hypriot 
MountFlags=slave
LimitNOFILE=1048576
LimitNPROC=1048576
LimitCORE=infinity
Environment=

[Install]
WantedBy=multi-user.target
" | sudo tee /etc/systemd/system/docker.service] []  <nil> <nil> <nil> [] <nil> <nil> <nil> <nil> false [] [] [] [] <nil>}
SSH cmd err, output: <nil>: [Service]
ExecStart=/usr/bin/docker -d -H tcp://0.0.0.0:2376 -H unix:///var/run/docker.sock --storage-driver overlay --tlsverify --tlscacert /etc/docker/ca.pem --tlscert /etc/docker/server.pem --tlskey /etc/docker/server-key.pem --label provider=hypriot 
MountFlags=slave
LimitNOFILE=1048576
LimitNPROC=1048576
LimitCORE=infinity
Environment=

[Install]
WantedBy=multi-user.target

Using SSH client type: external
About to run SSH command:
sudo systemctl daemon-reload
&{/usr/bin/ssh [/usr/bin/ssh -o PasswordAuthentication=no -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -i /Users/stefan/.docker/machine/machines/hypriotos/id_rsa -p 22 [email protected] sudo systemctl daemon-reload] []  <nil> <nil> <nil> [] <nil> <nil> <nil> <nil> false [] [] [] [] <nil>}
SSH cmd err, output: <nil>: 
Using SSH client type: external
About to run SSH command:
sudo systemctl start docker
&{/usr/bin/ssh [/usr/bin/ssh -o PasswordAuthentication=no -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -i /Users/stefan/.docker/machine/machines/hypriotos/id_rsa -p 22 [email protected] sudo systemctl start docker] []  <nil> <nil> <nil> [] <nil> <nil> <nil> <nil> false [] [] [] [] <nil>}
SSH cmd err, output: <nil>: 
Daemon not responding yet: dial tcp 192.168.10.23:2376: connection refused
Daemon not responding yet: dial tcp 192.168.10.23:2376: connection refused
configuring swarm
enabling docker in systemd
Using SSH client type: external
About to run SSH command:
sudo systemctl daemon-reload
&{/usr/bin/ssh [/usr/bin/ssh -o PasswordAuthentication=no -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -i /Users/stefan/.docker/machine/machines/hypriotos/id_rsa -p 22 [email protected] sudo systemctl daemon-reload] []  <nil> <nil> <nil> [] <nil> <nil> <nil> <nil> false [] [] [] [] <nil>}
SSH cmd err, output: <nil>: 
Using SSH client type: external
About to run SSH command:
sudo systemctl enable docker
&{/usr/bin/ssh [/usr/bin/ssh -o PasswordAuthentication=no -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -i /Users/stefan/.docker/machine/machines/hypriotos/id_rsa -p 22 [email protected] sudo systemctl enable docker] []  <nil> <nil> <nil> [] <nil> <nil> <nil> <nil> false [] [] [] [] <nil>}
SSH cmd err, output: exit status 1: Synchronizing state for docker.service with sysvinit using update-rc.d...
Executing /usr/sbin/update-rc.d docker defaults
Executing /usr/sbin/update-rc.d docker enable
Failed to execute operation: File exists

SSH cmd error!
command: sudo systemctl enable docker
err    : exit status 1
output : Synchronizing state for docker.service with sysvinit using update-rc.d...
Executing /usr/sbin/update-rc.d docker defaults
Executing /usr/sbin/update-rc.d docker enable
Failed to execute operation: File exists

username and password

Excuse me,I have trouble using HypriotOS.
I copied the .img to SDcard and then I tried to log in the system by Xshell but failed with wrong username( pi / root ) or password( raspberry / hypriot ).
Could you tell me corret username&password?Or what should I do to log in?Thank you very much!!

crda package is missing

The crda package is not installed by default and this causes some confusing kernel messages:

Jul 3 20:46:46 localhost kernel: [ 31.169414] cfg80211: Calling CRDA to update world regulatory domain
...
Jul 3 20:46:52 localhost kernel: [ 37.489422] cfg80211: Calling CRDA to update world regulatory domain
Jul 3 20:46:56 localhost kernel: [ 40.649426] cfg80211: Exceeded CRDA call max attempts. Not calling CRDA

This is easily solved by including the crda package in the chroot-script.sh

# install packages for managing wireless interfaces
apt-get install -y \
  wpasupplicant \
  wireless-tools \
  ethtool \
  crda

Make /etc/os-release compatible w/ docker-machine

Introduce the os-rootfs v0.8.6 to make /etc/os-release compatible with docker-machine.

The change in the rootfs is that the /etc/os-release file contains ID=debian instead of ID=raspbian.

That simplifies the use of the original docker-machine binary to connect a RPi with the generic driver.

verify upstream sources

Prove sha256 checksum of upstream build artifacts like

  • hypriot/image-builder-raw
  • hypriot/os-rootfs

Updating package.io lists results in errors

Updating the Schatzkiste package lists leads to an error.

curl -s https://packagecloud.io/install/repositories/Hypriot/Schatzkiste/script.deb.sh | sudo bash
curl -s https://packagecloud.io/install/repositories/Hypriot/Schatzkiste/script.deb.sh | sudo bash
Detected operating system as hypriotos/8.
Checking for curl...
Detected curl...
Running apt-get update... done.
Installing apt-transport-https... done.
Installing /etc/apt/sources.list.d/Hypriot_Schatzkiste.list...curl: (22) The requested URL returned error: 404 Not Found


Unable to download repo config from: https://packagecloud.io/install/repositories/Hypriot/Schatzkiste/config_file.list?os=hypriotos&dist=8&source=script

This usually happens if your operating system is not supported by
packagecloud.io, or this script's OS detection failed.

You can override the OS detection by setting os= and dist= prior to running this script.
You can find a list of supported OSes and distributions on our website: https://packagecloud.io/docs#os_distro_version

For example, to force Ubuntu Trusty: os=ubuntu dist=trusty ./script.sh

If you are running a supported OS, please email [email protected] and report this.

Bluetooth doesn't work on Pi3

With SD image v0.5.9 the bluetooth device doesn't work. On the serial UART console I'm getting an error

[FAILED] Failed to start Configure Bluetooth Modems connected by UART.
See 'systemctl status hciuart.service' for details.

Issuing systemctl status hciuart.service reveals some problems on starting the service:

● hciuart.service - Configure Bluetooth Modems connected by UART
   Loaded: loaded (/lib/systemd/system/hciuart.service; enabled)
   Active: failed (Result: exit-code) since Sat 2016-05-14 15:09:49 UTC; 12s ago
  Process: 8357 ExecStart=/usr/bin/hciattach /dev/serial1 bcm43xx 921600 noflow - (code=exited, status=1/FAILURE)
 Main PID: 4457 (code=exited, status=0/SUCCESS)

May 14 15:09:49 black-pearl hciattach[8357]: Can't open serial port: No such file or directory
May 14 15:09:49 black-pearl hciattach[8357]: Can't initialize device: No such file or directory
May 14 15:09:49 black-pearl systemd[1]: hciuart.service: control process exited, code=exited status=1
May 14 15:09:49 black-pearl systemd[1]: Failed to start Configure Bluetooth Modems connected by UART.
May 14 15:09:49 black-pearl systemd[1]: Unit hciuart.service entered failed state.

The device /dev/serial1 doesn't exist, so the hciuart.service failed to start.

Possible solution: using device /dev/ttyAMA0 in /lib/systemd/system/hciuart.service seems to fix the problem. But we have to investigate if this is the best way, before using the fix.

Add pre-installed swarm docker image

The old HypriotOS SD card image has the Docker Swarm image pre-installed so you don't need an internet connection to get started with Swarm.
Currently it's missing.
We want to re-add it in our new HypriotOS SD card as well.

Prepare release notes for next HypriotOS v1.0.0 release "Blackbeard"

HypriotOS 1.0.0-rc1

This is the first major release of HypriotOS for the Raspberry Pi - a Debian-based Container OS focussed on security and minimal size with all the necessary Docker tools already pre-installed. It is heavily inspired by Raspbian and supports absolutely all Raspberry Pi models (1, 2, 3, Zero & Compute Module) out-of-the-box. The Linux kernel is optimised for use of Docker containers and runs on both ARMv6 and ARMv7 CPU's.

From Zero to Docker in five minutes only:
Downloading the SD card image, flashing it to a SD card and booting up the Raspberry Pi takes less than five minutes - and the latest Docker Engine is already up and running.

Contents

  • Linux Kernel 4.4.15 (optimised for Docker)
    • dual-arch kernel for ARMv6 and ARMv7 (supports all Raspberry Pi models)
  • Docker Engine 1.12.1-rc1 (officially build from Docker)
  • Docker Machine 0.8.0
  • Docker Compose 1.8.0
  • Hypriot Device Init 0.1.8
  • Hypriot OS-RootFS 1.0.0-rc1 - Raspbian/Jessie "Raspbian GNU/Linux 8 (jessie)"

Features

  • The root filesystem of the SD card will be automatically resized on first-boot
  • No built-in "root" user for increased security
  • Only a single standard user (username "pirate", password "hypriot") with sudo rights
    • User "pirate" is member of group "docker", can start docker commands directly
    • User "pirate" is member of group "video", can access the Raspberry Pi camera module
  • device-init allows image customisation before first-boot
    • Standard hostname "black-pearl", can be configured in /boot/device-init.yaml
    • WiFi can be configured via device-init in /boot/device-init.yaml
    • Hypriot Flash tool directly supports device-init configuration
  • Avahi service discovery built-in
    • find your Pi with a simple ping black-pearl.local or ping black-pearl on the network
  • Console login via UART pins is enabled by default (for all Raspberry Pi models including Pi 3)
  • almost all WiFi firmware included (atheros, brcm80211, libertas, ralink, realtek) for maximum compatibility
  • Using Overlay filesystem for Docker storage-driver is activated by default

Improvements

  • Reduced Image size (1000M/1.0.0-rc1 vs. 1300M/v0.8.4) for quicker SD card flashing
    • flashing to a SanDisk Ultra 16GB microSD card takes 01:56min only (2014 MBP, OS X 10.11)
  • Reduced .img.zip size (252M/1.0.0-rc1 vs. 504M/v0.8.4) for smaller and faster downloads
  • Optimised filesystem to support more I-nodes (1x I-node per 4kByte block)
  • Faster boot times (measured with a freshly flashed SD card, no containers, no additional apps)
    • first-boot: 21sec from power-on to login prompt on UART console
    • normal boot: 15-17sec from power-on to login prompt on UART console
    • reboot: 22sec to login prompt on UART console
  • Minimised memory usage, 46MByte only (new install, right after boot, w/ SSH session)
  • Minimised disk usage, 750MByte only (new install)
$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root        14G  750M   13G   6% /
devtmpfs        427M     0  427M   0% /dev
tmpfs           431M     0  431M   0% /dev/shm
tmpfs           431M   12M  420M   3% /run
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           431M     0  431M   0% /sys/fs/cgroup
/dev/mmcblk0p1   64M   30M   34M  47% /boot

Removed Features

  • Hypriot Cluster Lab (already available as separate .deb package)

Known Issues

  • this release currently only works on Pi 2 & Pi 3 as the Docker Engine 1.12.1-rc1 is built for ARMv7 only (should be fixed with the 1.0.0 release)

LICENSE

The MIT License (MIT)

Copyright (c) 2016 Hypriot

UART console not working on v0.4.0 (on Pi 3B)

With the new build the output at the serial UART console shows only garbage on a Raspberry Pi 3 B.

��n�2��br��b�n�B2nn���b2LB�b��b��2B�n�rn�r�p��|�B��2����|L������L�n�B�|B2n����~nN��p��2n₞<2nn�BLn�L�n��nⲜ�`2n||L`�2L�|̎�����L2�`�2n�����bB���2�nn��n��|�br��B���`�2L�|L̎��L2�n���p~�nn��2rrN��Br2nnn�br|bp����p�rrn₞��bL����Ln�2bl�2L�|LLL����L2Ln�2�B�n�rBb`b��Lb����l�2nn�B�`~B���2�nl�2L�|L����LL2Ll2���L��B�`~�l�`�l���0�������l��~rrn�B�n��nrLN|�nn��|2���`���Ln�lb��2Ln��l�2B�����~rrn�BL�n�r2��b�Nn�`~�n�2Nn�BL�|�b�n��blrrl`2B2nn�~r2b�B2n��n̐|��~l��n�Lb�pp2rrnn���B�n��2r2L`rL�n�rrnn���B�nnn�b�n��2LL�|LL��L��2�p����L��`�nn��n��`�2��~L������~B�n��|�n�~B2�~�n�2nnl�2LL�bL��L���2�p<����L��`�nn��n��`�2��~L������~B�n�

Maybe this is related to the fact that the Pi 3 uses some different settings for the built-in Bluetooth and WiFi chip set. Will test this on a Pi 2 B and Pi 1 soon.

Mesh routing of Swarm Mode 1.12.1 broken

Issue: Assume you have a multi-node cluster running swarm mode, and you started one web service (=container) that publishes a specific port. Next, if you send a request from anywhere in the network to a node of the cluster where the web service container is NOT running, this node should still return the answer from the web service - this is the basic idea of the mesh routing feature (https://docs.docker.com/engine/swarm/ingress/), which I could successfully test on Intel based machines.
Instead, I receive the same error as described here in the first post: moby/moby#25892

That is despite running HypriotOS 1.0.1 with VXLAN enabled (default).

Can anyone else reproduce this issue?

Update: I have the same issue on Raspbian, thus it might not be related to HypriotOS.

File "/boot/config.txt" is missing

In our old image builder we had placed a file "/boot/config.txt" with default settings, this file is missing in v04.0.

File "/boot/config.txt"
  should be file (FAILED - 1)
  should be mode 755 (FAILED - 2)
  should be owned by "root" (FAILED - 3)

Add /sbin to pirate user PATH

By default many non-root specific utilities are there. It'd be nice if the base image already includes this path in the PATH variable.

Update docker-machine 0.7.0

Compile upstream docker-machine 0.7.0 for ARM (see repo hypriot/arm-machine) and update it in image-builder-rpi

Improve hypriot/docker network stability

Check if we should add this to the HypriotOS image:

See docker/docker issue 19532 "hypriot/docker network stability issues." ->
moby/moby#19532 (comment)

@gazzer82 I finally got a chance to try the workaround mentioned @StefanScherer it also did not work for me. But... I do believe I have found the solution. With many, many thanks to @aaronlehmann! He originally found the workaround here distribution/distribution#785 (comment). He has a more complete summary on moby/libnetwork#1090.

I ended up using his echo 1 > /proc/sys/net/ipv4/netfilter/ip_conntrack_tcp_be_liberal workaround.

This has me now building container images from home!

Hope this helps you and others!
Will

move docker-image download

As first step to refactor the import of docker images into SD image move wget for hypriot/rpi-swarm and hypriot/rpi-consul from builder/chroot-script.sh to Makefile.

Second step is to use docker pull and docker save instead of wget.

Old version of docker-hypriot is installed

We should upgrade to the latest release of docker-hypriot 1.10.3-1.

dpkg -l docker-hypriot
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                Version        Architecture   Description
+++-===================-==============-==============-===========================================
ii  docker-hypriot      1.10.1-1       armhf          Docker for ARM devices, compiled and package

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.