init
This commit is contained in:
16
image/overlay/daemon/update.sh
Executable file
16
image/overlay/daemon/update.sh
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
|
||||
mkdir -p /app
|
||||
cd /app
|
||||
rm -rf ./template ./snapshot
|
||||
mkdir /app/template /app/snapshot
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
git clone -b _REVISION_ _REPO_ template
|
||||
|
||||
python3 /daemon/orchestrate.py \
|
||||
--root /app/template \
|
||||
--network cloud \
|
||||
--volume-parent /data/volumes \
|
||||
--snapshot-root /app/snapshot
|
||||
2
image/overlay/data/PLACEHOLDER
Normal file
2
image/overlay/data/PLACEHOLDER
Normal file
@@ -0,0 +1,2 @@
|
||||
# This directory is the virtiofs mount point for host-shared data.
|
||||
# Do not store critical data here before the virtiofs share is mounted.
|
||||
3
image/overlay/etc/dhcp/dhclient.conf
Normal file
3
image/overlay/etc/dhcp/dhclient.conf
Normal file
@@ -0,0 +1,3 @@
|
||||
interface "eth0" {
|
||||
supersede routers GATEWAY_ADDRESS;
|
||||
}
|
||||
9
image/overlay/etc/docker/daemon.json
Normal file
9
image/overlay/etc/docker/daemon.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"data-root": "/data/docker",
|
||||
"log-driver": "json-file",
|
||||
"log-opts": {
|
||||
"max-size": "10m",
|
||||
"max-file": "3"
|
||||
},
|
||||
"storage-driver": "overlay2"
|
||||
}
|
||||
5
image/overlay/etc/fstab
Normal file
5
image/overlay/etc/fstab
Normal file
@@ -0,0 +1,5 @@
|
||||
# /etc/fstab: static file system information
|
||||
#
|
||||
# <file system> <mount point> <type> <options> <dump> <pass>
|
||||
/dev/root / ext4 rw,noatime 0 1
|
||||
data /data virtiofs rw,noatime,_netdev 0 0
|
||||
7
image/overlay/etc/network/interfaces
Normal file
7
image/overlay/etc/network/interfaces
Normal file
@@ -0,0 +1,7 @@
|
||||
auto lo
|
||||
iface lo inet loopback
|
||||
|
||||
auto eth0
|
||||
iface eth0 inet manual
|
||||
post-up dhclient -v eth0
|
||||
pre-down dhclient -x eth0
|
||||
2
image/overlay/var/spool/cron/crontabs/root
Normal file
2
image/overlay/var/spool/cron/crontabs/root
Normal file
@@ -0,0 +1,2 @@
|
||||
# min hour day month weekday command
|
||||
*/15 * * * * /usr/bin/sh /daemon/update.sh
|
||||
Reference in New Issue
Block a user