mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-21 06:21:08 +02:00
Merge pull request #901 from eyakubovich/master
flannel: adding flannel, early-docker, sdnotify-proxy
This commit is contained in:
commit
114a24592a
28
sdk_container/src/third_party/coreos-overlay/app-admin/flannel/files/flanneld.service
vendored
Normal file
28
sdk_container/src/third_party/coreos-overlay/app-admin/flannel/files/flanneld.service
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
[Unit]
|
||||
Description=Network fabric for containers
|
||||
Documentation=https://github.com/coreos/flannel
|
||||
Wants=etcd.service
|
||||
Requires=early-docker.service
|
||||
After=etcd.service early-docker.service
|
||||
Before=early-docker.target
|
||||
|
||||
[Service]
|
||||
Type=notify
|
||||
Environment="TMPDIR=/var/tmp/"
|
||||
Environment="DOCKER_HOST=unix:///var/run/early-docker.sock"
|
||||
Environment="FLANNEL_VER={{flannel_ver}}"
|
||||
LimitNOFILE=1048576
|
||||
LimitNPROC=1048576
|
||||
ExecStartPre=/usr/bin/mkdir -p /run/flannel
|
||||
|
||||
ExecStart=/usr/libexec/sdnotify-proxy /run/flannel/sd.sock /usr/bin/docker run --net=host --privileged=true --rm -v /run/flannel:/run/flannel -e NOTIFY_SOCKET=/run/flannel/sd.sock quay.io/coreos/flannel:${FLANNEL_VER} /opt/bin/flanneld --ip-masq=true
|
||||
|
||||
# Update docker options
|
||||
ExecStartPost=/bin/bash -c ' \
|
||||
touch /run/docker_opts.env; \
|
||||
source /run/docker_opts.env; \
|
||||
source /run/flannel/subnet.env; \
|
||||
DOCKER_OPTS+=--ip-masq=false \
|
||||
DOCKER_OPTS+=$(test -n "$FLANNEL_SUBNET" && echo "--bip=$FLANNEL_SUBNET "); \
|
||||
DOCKER_OPTS+=$(test -n "$FLANNEL_MTU" && echo "--mtu=$FLANNEL_MTU "); \
|
||||
echo "DOCKER_OPTS=\\"$DOCKER_OPTS\\"" >/run/docker_opts.env'
|
1
sdk_container/src/third_party/coreos-overlay/app-admin/flannel/flannel-0.1.0.ebuild
vendored
Symbolic link
1
sdk_container/src/third_party/coreos-overlay/app-admin/flannel/flannel-0.1.0.ebuild
vendored
Symbolic link
@ -0,0 +1 @@
|
||||
flannel-9999.ebuild
|
28
sdk_container/src/third_party/coreos-overlay/app-admin/flannel/flannel-9999.ebuild
vendored
Normal file
28
sdk_container/src/third_party/coreos-overlay/app-admin/flannel/flannel-9999.ebuild
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
# Copyright (c) 2014 CoreOS, Inc.. All rights reserved.
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=4
|
||||
|
||||
if [[ "${PV}" == 9999 ]]; then
|
||||
KEYWORDS="~amd64"
|
||||
else
|
||||
KEYWORDS="amd64"
|
||||
fi
|
||||
|
||||
inherit systemd
|
||||
|
||||
DESCRIPTION="flannel"
|
||||
HOMEPAGE="https://github.com/coreos/flannel"
|
||||
SRC_URI=""
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND="app-admin/sdnotify-proxy"
|
||||
S="$WORKDIR"
|
||||
|
||||
src_install() {
|
||||
sed "s/{{flannel_ver}}/${PV}/" "${FILESDIR}"/flanneld.service >"${T}"/flanneld.service
|
||||
systemd_dounit "${T}"/flanneld.service
|
||||
}
|
1
sdk_container/src/third_party/coreos-overlay/app-admin/sdnotify-proxy/sdnotify-proxy-0.1.0.ebuild
vendored
Symbolic link
1
sdk_container/src/third_party/coreos-overlay/app-admin/sdnotify-proxy/sdnotify-proxy-0.1.0.ebuild
vendored
Symbolic link
@ -0,0 +1 @@
|
||||
sdnotify-proxy-9999.ebuild
|
35
sdk_container/src/third_party/coreos-overlay/app-admin/sdnotify-proxy/sdnotify-proxy-9999.ebuild
vendored
Normal file
35
sdk_container/src/third_party/coreos-overlay/app-admin/sdnotify-proxy/sdnotify-proxy-9999.ebuild
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
# Copyright (c) 2014 CoreOS, Inc.. All rights reserved.
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=4
|
||||
CROS_WORKON_PROJECT="coreos/sdnotify-proxy"
|
||||
CROS_WORKON_LOCALNAME="sdnotify-proxy"
|
||||
CROS_WORKON_REPO="git://github.com"
|
||||
|
||||
if [[ "${PV}" == 9999 ]]; then
|
||||
KEYWORDS="~amd64"
|
||||
else
|
||||
CROS_WORKON_COMMIT="f516129af110fd4a51bd5ea2654f4dc8dd02e5c4"
|
||||
KEYWORDS="amd64"
|
||||
fi
|
||||
|
||||
inherit cros-workon
|
||||
|
||||
DESCRIPTION="fleet"
|
||||
HOMEPAGE="https://github.com/coreos/sdnotify-proxy"
|
||||
SRC_URI=""
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
IUSE=""
|
||||
|
||||
DEPEND=">=dev-lang/go-1.3"
|
||||
|
||||
src_compile() {
|
||||
./build
|
||||
}
|
||||
|
||||
src_install() {
|
||||
exeinto /usr/libexec
|
||||
doexe ${S}/bin/sdnotify-proxy
|
||||
}
|
@ -186,6 +186,9 @@ src_install() {
|
||||
|
||||
systemd_dounit "${FILESDIR}/docker.service"
|
||||
systemd_dounit "${FILESDIR}/docker.socket"
|
||||
systemd_dounit "${FILESDIR}/early-docker.service"
|
||||
systemd_dounit "${FILESDIR}/early-docker.socket"
|
||||
systemd_dounit "${FILESDIR}/early-docker.target"
|
||||
|
||||
insinto /usr/lib/systemd/network
|
||||
doins "${FILESDIR}"/50-docker{,-veth}.network
|
||||
|
@ -1,17 +1,18 @@
|
||||
[Unit]
|
||||
Description=Docker Application Container Engine
|
||||
Documentation=http://docs.docker.io
|
||||
Requires=docker.socket
|
||||
After=docker.socket
|
||||
After=docker.socket early-docker.target
|
||||
Requires=docker.socket early-docker.target
|
||||
|
||||
[Service]
|
||||
Environment="TMPDIR=/var/tmp/"
|
||||
ExecStartPre=/bin/mount --make-rprivate /
|
||||
EnvironmentFile=-/run/docker_opts.env
|
||||
LimitNOFILE=1048576
|
||||
LimitNPROC=1048576
|
||||
# Run docker but don't have docker automatically restart
|
||||
# containers. This is a job for systemd and unit files.
|
||||
ExecStart=/usr/bin/docker --daemon --storage-driver=btrfs --host=fd://
|
||||
ExecStart=/usr/bin/docker --daemon --storage-driver=btrfs --host=fd:// $DOCKER_OPTS
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
17
sdk_container/src/third_party/coreos-overlay/app-emulation/docker/files/early-docker.service
vendored
Normal file
17
sdk_container/src/third_party/coreos-overlay/app-emulation/docker/files/early-docker.service
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
[Unit]
|
||||
Description=Early Docker Application Container Engine
|
||||
Documentation=http://docs.docker.io
|
||||
After=early-docker.socket
|
||||
Requires=early-docker.socket
|
||||
|
||||
[Service]
|
||||
Environment="TMPDIR=/var/tmp/"
|
||||
ExecStartPre=/bin/mount --make-rprivate /
|
||||
LimitNOFILE=1048576
|
||||
LimitNPROC=1048576
|
||||
# Run docker but don't have docker automatically restart
|
||||
# containers. This is a job for systemd and unit files.
|
||||
ExecStart=/usr/bin/docker --daemon --storage-driver=btrfs --host=fd:// --bridge=none --iptables=false --graph=/var/lib/early-docker --pidfile=/var/run/early-docker.pid
|
||||
|
||||
[Install]
|
||||
WantedBy=early-docker.target
|
8
sdk_container/src/third_party/coreos-overlay/app-emulation/docker/files/early-docker.socket
vendored
Normal file
8
sdk_container/src/third_party/coreos-overlay/app-emulation/docker/files/early-docker.socket
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
[Unit]
|
||||
Description=Early Docker Socket for the API
|
||||
|
||||
[Socket]
|
||||
ListenStream=/var/run/early-docker.sock
|
||||
|
||||
[Install]
|
||||
WantedBy=sockets.target
|
2
sdk_container/src/third_party/coreos-overlay/app-emulation/docker/files/early-docker.target
vendored
Normal file
2
sdk_container/src/third_party/coreos-overlay/app-emulation/docker/files/early-docker.target
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
[Unit]
|
||||
Description=Run Docker containers before main Docker starts up
|
@ -84,6 +84,7 @@ RDEPEND="${RDEPEND}
|
||||
app-emulation/xenserver-pv-version
|
||||
sys-apps/findutils
|
||||
sys-apps/which
|
||||
app-admin/flannel
|
||||
app-admin/fleet
|
||||
app-admin/locksmith
|
||||
app-admin/sudo
|
||||
|
Loading…
x
Reference in New Issue
Block a user