-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
To support other distros, addition to EliotOS, added deb build and publish steps to CircleCI configs.
- Loading branch information
Showing
7 changed files
with
112 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,11 @@ builds: | |
goarch: | ||
- amd64 | ||
- arm64 | ||
- arm | ||
goarm: | ||
- 6 | ||
- 7 | ||
|
||
env: | ||
- CGO_ENABLED=0 | ||
|
||
|
@@ -17,6 +22,11 @@ builds: | |
goarch: | ||
- amd64 | ||
- arm64 | ||
- arm | ||
goarm: | ||
- 6 | ||
- 7 | ||
|
||
env: | ||
- CGO_ENABLED=0 | ||
|
||
|
@@ -57,3 +67,25 @@ dockers: | |
dockerfile: Dockerfile.eliotd | ||
tag_templates: | ||
- "v{{ .Version }}-arm64" | ||
|
||
nfpm: | ||
homepage: http://www.eliot.run | ||
maintainer: Erno Aapa <[email protected]> | ||
description: "Container management system for IoT devices" | ||
license: Apache 2.0 | ||
formats: | ||
- deb | ||
|
||
# At the moment repositories includes really old version of containerd | ||
# so we bake in the containerd daemon and runc binary | ||
# dependencies: | ||
# - [email protected] | ||
dependencies: | ||
- libseccomp2 #(Actually runc dep) | ||
|
||
files: | ||
"build/etc/systemd/system/eliotd.service": "/etc/systemd/system/eliotd.service" | ||
"build/etc/systemd/system/containerd.service": "/etc/systemd/system/containerd.service" | ||
# Built during the build process | ||
"bin/runc": "/usr/local/bin/runc" | ||
"bin/containerd": "/usr/local/bin/containerd" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/bin/sh | ||
# | ||
# | ||
|
||
set -eu | ||
|
||
CONTAINERD_VERSION="v1.0.3" | ||
RUNC_VERSION="v0.1.1" | ||
BUILD_DIR=/tmp/build | ||
TARGET_DIR=$(pwd)/bin | ||
|
||
mkdir -p $TARGET_DIR | ||
|
||
# CONTAINERD | ||
echo "Build containerd" | ||
rm -rf ${BUILD_DIR} && mkdir -p ${BUILD_DIR}/src/github.com/containerd/containerd | ||
wget -qO- "https://github.com/containerd/containerd/archive/${CONTAINERD_VERSION}.tar.gz" | tar xvz --strip-components=1 -C ${BUILD_DIR}/src/github.com/containerd/containerd | ||
cd ${BUILD_DIR}/src/github.com/containerd/containerd | ||
# Modify Makefile to have optional VERSION and REVISION | ||
sed -i='' 's/VERSION=/VERSION?=/g' Makefile | ||
sed -i='' 's/REVISION=/REVISION?=/g' Makefile | ||
GOPATH=${BUILD_DIR} VERSION=${CONTAINERD_VERSION} REVISION=unknown make binaries | ||
cp bin/containerd ${TARGET_DIR} | ||
cp bin/ctr ${TARGET_DIR} | ||
cp bin/containerd-shim ${TARGET_DIR} | ||
|
||
# RUNC | ||
echo "Build runc" | ||
rm -rf ${BUILD_DIR} && mkdir -p ${BUILD_DIR}/src/github.com/opencontainers/runc | ||
wget -qO- "https://github.com/opencontainers/runc/archive/${RUNC_VERSION}.tar.gz" | tar xvz --strip-components=1 -C ${BUILD_DIR}/src/github.com/opencontainers/runc | ||
cd ${BUILD_DIR}/src/github.com/opencontainers/runc | ||
make | ||
cp runc ${TARGET_DIR} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[Unit] | ||
Description=Containerd | ||
Documentation=https://github.com/containerd/containerd | ||
Requires=network-online.target | ||
After=network-online.target | ||
|
||
[Service] | ||
ExecStart=/usr/local/bin/containerd | ||
Restart=always | ||
KillMode=process | ||
RestartSec=10 | ||
|
||
[Install] | ||
WantedBy=default.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[Unit] | ||
Description=Eliot daemon | ||
Documentation=https://github.com/ernoaapa/eliot | ||
Requires=containerd.target | ||
After=containerd.target | ||
|
||
[Service] | ||
ExecStart=/usr/local/bin/eliotd --debug --grpc-api-listen 0.0.0.0:5000 | ||
Restart=always | ||
KillMode=process | ||
RestartSec=2 | ||
|
||
[Install] | ||
WantedBy=default.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters