Skip to content
This repository has been archived by the owner on Aug 14, 2023. It is now read-only.

Commit

Permalink
Finalize update of Odroid C1 build (#30)
Browse files Browse the repository at this point in the history
* Removed apparmor and lxc packages for now. 
* Added device-init, fake-hwclock
* Updated integration tests.
* Removed non-maintenance message
  • Loading branch information
docbobo committed Mar 10, 2017
1 parent f31414b commit 9a569e6
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 24 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
[![Join the chat at https://gitter.im/hypriot/talk](https://badges.gitter.im/hypriot/talk.svg)](https://gitter.im/hypriot/talk?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Build Status](https://travis-ci.org/hypriot/image-builder-odroid-c1.svg)](https://travis-ci.org/hypriot/image-builder-odroid-c1)

**PLEASE NOTE: This repo is currently not maintained.**

This repo builds the SD card image with HypriotOS for the ODROID C1 board. To build this SD card image we have to

* take the files for the root filesystem from [`os-rootfs`](https://github.com/hypriot/os-rootfs)
Expand Down
21 changes: 10 additions & 11 deletions builder/chroot-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ echo "deb http://deb.odroid.in/c1/ xenial main" > /etc/apt/sources.list.d/odroid

# set up Hypriot Schatzkiste repository
wget -q https://packagecloud.io/gpg.key -O - | apt-key add -
echo 'deb https://packagecloud.io/Hypriot/Schatzkiste/debian/ wheezy main' > /etc/apt/sources.list.d/hypriot.list
echo 'deb https://packagecloud.io/Hypriot/Schatzkiste/debian/ jessie main' > /etc/apt/sources.list.d/hypriot.list

# Set up docker repository
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 2C52609D
Expand All @@ -22,26 +22,25 @@ echo 'deb [arch=armhf] https://apt.dockerproject.org/repo debian-jessie main' >
# update all apt repository lists
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get upgrade -y

# ---install Docker tools---
apt-get install -y \
lxc \
aufs-tools \
fake-hwclock \
device-init="${DEVICE_INIT_VERSION}" \
cgroupfs-mount \
cgroup-bin \
apparmor \
libltdl7 \
"docker-engine=${DOCKER_ENGINE_VERSION}" \
"docker-compose=${DOCKER_COMPOSE_VERSION}" \
"docker-machine=${DOCKER_MACHINE_VERSION}" \
--no-install-recommends
docker-engine="${DOCKER_ENGINE_VERSION}" \
docker-compose="${DOCKER_COMPOSE_VERSION}" \
docker-machine="${DOCKER_MACHINE_VERSION}"

# install ODROID kernel
touch /boot/uImage
apt-get install -y \
"u-boot-tools" \
"initramfs-tools" \
"linux-image-c1=${KERNEL_VERSION}"
u-boot-tools \
initramfs-tools \
linux-image-c1="${KERNEL_VERSION}"

# cleanup APT cache and lists
apt-get clean
Expand Down
9 changes: 9 additions & 0 deletions builder/files/boot/device-init.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# hostname for your HypriotOS device
hostname: black-pearl

# optional wireless network settings
wifi:
interfaces:
# wlan0:
# ssid: "MyNetwork"
# password: "secret_password"
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
end

describe command('docker run --rm -t hypriot/rpi-swarm --version') do
its(:stdout) { should match /swarm version 1.1.0 \(HEAD\)/ }
its(:stdout) { should match /swarm version 1.2.3 \(HEAD\)/ }
its(:exit_status) { should eq 0 }
end

describe command('docker images hypriot/rpi-swarm') do
its(:stdout) { should match /hypriot\/rpi-swarm .*latest .*5eab982fa301 / }
its(:stdout) { should match /hypriot\/rpi-swarm .*latest .*3af9594249f2 / }
its(:exit_status) { should eq 0 }
end
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'spec_helper'

describe command('uname -r') do
its(:stdout) { should match /3.10.80-142/ }
its(:stdout) { should match /3.10.104-185/ }
its(:exit_status) { should eq 0 }
end
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@
end

# additional application packages
describe package('docker-hypriot') do
describe package('device-init') do
it { should be_installed }
end
describe package('docker-engine') do
it { should be_installed }
end
describe package('docker-compose') do
Expand Down
6 changes: 3 additions & 3 deletions builder/test-integration/spec/hypriotos-image/docker_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

describe command('dpkg -l docker-engine') do
its(:stdout) { should match /ii docker-engine/ }
its(:stdout) { should match /17.03.0~ce-0~raspbian-jessie/ }
its(:stdout) { should match /17.03.0~ce-0~debian-jessie/ }
its(:exit_status) { should eq 0 }
end

Expand Down Expand Up @@ -65,7 +65,7 @@
it { should be_owned_by 'root' }
end

describe file('/var/lib/docker/overlay2') do
describe file('/var/lib/docker/aufs') do
it { should be_directory }
it { should be_mode 700 }
it { should be_owned_by 'root' }
Expand All @@ -90,7 +90,7 @@
end

describe command('docker info') do
its(:stdout) { should match /Storage Driver: overlay/ }
its(:stdout) { should match /Storage Driver: aufs/ }
its(:exit_status) { should eq 0 }
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@
it { should be_file }
it { should be_mode 644 }
it { should be_owned_by 'root' }
it { should contain 'deb https://packagecloud.io/Hypriot/Schatzkiste/debian/ wheezy main' }
it { should contain 'deb https://packagecloud.io/Hypriot/Schatzkiste/debian/ jessie main' }
end

describe file('/etc/apt/sources.list.d/odroid.list') do
it { should be_file }
it { should be_mode 644 }
it { should be_owned_by 'root' }
it { should contain 'deb http://deb.odroid.in/c1/ trusty main' }
it { should contain 'deb http://deb.odroid.in/ trusty main' }
it { should contain 'deb http://deb.odroid.in/c1/ xenial main' }
end
2 changes: 1 addition & 1 deletion versions.config
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ export KERNEL_VERSION="185-1"
export DOCKER_ENGINE_VERSION="17.03.0~ce-0~debian-jessie"
export DOCKER_COMPOSE_VERSION="1.9.0-23"
export DOCKER_MACHINE_VERSION="0.9.0-39"
export DEVICE_INIT_VERSION="0.1.8"
export DEVICE_INIT_VERSION="0.1.9"

0 comments on commit 9a569e6

Please sign in to comment.