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

Commit

Permalink
v2.0.0
Browse files Browse the repository at this point in the history
* Downgrade system-docker to 17.06.107 (last version before rename)
* Use Docker 24.0.9 by default. 25.0.3 available as alternative.
* Buildroot 2023.02.10
* Kernel 5.10.211
* Always generate dhcpd.conf (not only with Wi-Fi)
* Support user Docker "data_root" configuration
  • Loading branch information
olljanat committed Mar 5, 2024
1 parent 8a9e14f commit f30c3da
Show file tree
Hide file tree
Showing 14 changed files with 34 additions and 26 deletions.
11 changes: 5 additions & 6 deletions Dockerfile.dapper
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ RUN echo "Acquire::http { Proxy \"$APTPROXY\"; };" >> /etc/apt/apt.conf.d/01prox
wget \
xorriso \
xz-utils \
zstd \
telnet

########## Dapper Configuration #####################
Expand All @@ -62,7 +61,7 @@ ARG OS_REPO=burmilla
ARG HOSTNAME_DEFAULT=burmilla
ARG DISTRIB_ID=BurmillaOS

ARG KERNEL_VERSION=5.10.188-burmilla
ARG KERNEL_VERSION=5.10.211-burmilla
ARG KERNEL_URL_amd64=https://github.com/burmilla/os-kernel/releases/download/v${KERNEL_VERSION}/linux-${KERNEL_VERSION}-x86.tar.gz
ARG KERNEL_URL_arm64=https://github.com/burmilla/os-kernel/releases/download/v${KERNEL_VERSION}/linux-${KERNEL_VERSION}-arm64.tar.gz

Expand All @@ -81,14 +80,14 @@ ARG OS_FIRMWARE=true
ARG OS_BASE_URL_amd64=https://github.com/burmilla/os-base/releases/download/v2023.05-1/os-base_amd64.tar.xz
ARG OS_BASE_URL_arm64=https://github.com/burmilla/os-base/releases/download/v2023.05-1/os-base_arm64.tar.xz

ARG OS_INITRD_BASE_URL_amd64=https://github.com/burmilla/os-initrd-base/releases/download/v2023.05-2/os-initrd-base-amd64.tar.gz
ARG OS_INITRD_BASE_URL_arm64=https://github.com/burmilla/os-initrd-base/releases/download/v2023.05-2/os-initrd-base-arm64.tar.gz
ARG OS_INITRD_BASE_URL_amd64=https://github.com/burmilla/os-initrd-base/releases/download/v2023.02.10-1/os-initrd-base-amd64.tar.gz
ARG OS_INITRD_BASE_URL_arm64=https://github.com/burmilla/os-initrd-base/releases/download/v2023.02.10-1/os-initrd-base-arm64.tar.gz

ARG SYSTEM_DOCKER_VERSION=17.06.109
ARG SYSTEM_DOCKER_VERSION=17.06.107
ARG SYSTEM_DOCKER_URL_amd64=https://github.com/burmilla/os-system-docker/releases/download/${SYSTEM_DOCKER_VERSION}/docker-amd64-${SYSTEM_DOCKER_VERSION}.tgz
ARG SYSTEM_DOCKER_URL_arm64=https://github.com/burmilla/os-system-docker/releases/download/${SYSTEM_DOCKER_VERSION}/docker-arm64-${SYSTEM_DOCKER_VERSION}.tgz

ARG USER_DOCKER_VERSION=24.0.7
ARG USER_DOCKER_VERSION=24.0.9
ARG USER_DOCKER_ENGINE_VERSION=docker-${USER_DOCKER_VERSION}

ARG AZURE_SERVICE=false
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Please submit any **BurmillaOS** bugs, issues, and feature requests to [burmilla

## License

Copyright (c) 2020 Project Burmilla
Copyright (c) 2020-2024 [BurmillaOS community](https://burmillaos.org)

Copyright (c) 2014-2020 [Rancher Labs, Inc.](http://rancher.com)

Expand Down
2 changes: 1 addition & 1 deletion cmd/control/docker_init.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func dockerInitAction(c *cli.Context) error {
}
}

err = checkZfsBackingFS(cfg.Rancher.Docker.StorageDriver, cfg.Rancher.Docker.Graph)
err = checkZfsBackingFS(cfg.Rancher.Docker.StorageDriver, cfg.Rancher.Docker.DataRoot)
if err != nil {
log.Fatal(err)
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/control/user_docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,14 +186,14 @@ func startDocker(cfg *config.CloudConfig) error {
return err
}

cmd := []string{"system-engine-rc", "exec", "--", info.ID, "env"}
cmd := []string{"system-docker-runc", "exec", "--", info.ID, "env"}
log.Info(dockerCfg.AppendEnv())
cmd = append(cmd, dockerCfg.AppendEnv()...)
cmd = append(cmd, dockerCommand...)
cmd = append(cmd, args...)
log.Infof("Running %v", cmd)

return syscall.Exec("/usr/bin/system-engine-rc", cmd, os.Environ())
return syscall.Exec("/usr/bin/system-docker-runc", cmd, os.Environ())
}

func waitForPid(service string, project *project.Project) (int, error) {
Expand Down
4 changes: 3 additions & 1 deletion cmd/network/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,12 @@ func ApplyNetworkConfig(cfg *config.CloudConfig) {
cfg.Rancher.Network.DHCPTimeout = cfg.Rancher.Defaults.Network.DHCPTimeout
}

// Always generate dhcpcd.conf to support NTP and hostname configuration coming from DHCP
generateDhcpcdFiles(cfg)

// In order to handle the STATIC mode in Wi-Fi network, we have to update the dhcpcd.conf file.
// https://wiki.archlinux.org/index.php/dhcpcd#Static_profile
if len(cfg.Rancher.Network.WifiNetworks) > 0 {
generateDhcpcdFiles(cfg)
generateWpaFiles(cfg)
}

Expand Down
4 changes: 2 additions & 2 deletions config/docker_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ func TestGenerateEngineOptsString(t *testing.T) {

testContains(t, fmt.Sprint(generateEngineOptsSlice(EngineOpts{
Host: []string{
"unix:///var/run/system-engine.sock",
"unix:///var/run/system-docker.sock",
"unix:///var/run/docker.sock",
},
})), "--host unix:///var/run/system-engine.sock", "--host unix:///var/run/docker.sock")
})), "--host unix:///var/run/system-docker.sock", "--host unix:///var/run/docker.sock")

testContains(t, fmt.Sprint(generateEngineOptsSlice(EngineOpts{
LogOpts: map[string]string{
Expand Down
2 changes: 1 addition & 1 deletion config/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ var schema = `{
"debug": {"type": ["boolean", "null"]},
"exec_root": {"type": "string"},
"group": {"type": "string"},
"graph": {"type": "string"},
"data_root": {"type": "string"},
"host": {"type": "array"},
"live_restore": {"type": ["boolean", "null"]},
"log_driver": {"type": "string"},
Expand Down
6 changes: 3 additions & 3 deletions config/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ const (
StateDir = "/state"
RosBin = "/usr/bin/ros"
SysInitBin = "/usr/bin/ros-sysinit"
SystemDockerHost = "unix:///var/run/system-engine.sock"
SystemDockerHost = "unix:///var/run/system-docker.sock"
DockerHost = "unix:///var/run/docker.sock"
ImagesPath = "/usr/share/ros"
InitImages = "images-init.tar"
SystemImages = "images-system.tar"
UserImages = "images-user.tar"
Debug = false
SystemDockerBin = "/usr/bin/system-engine"
SystemDockerBin = "/usr/bin/system-dockerd"
DefaultDind = "burmilla/os-dind:17.12.1"

DetachLabel = "io.rancher.os.detach"
Expand Down Expand Up @@ -171,7 +171,7 @@ type EngineOpts struct {
Debug *bool `yaml:"debug,omitempty" opt:"debug"`
ExecRoot string `yaml:"exec_root,omitempty" opt:"exec-root"`
Group string `yaml:"group,omitempty" opt:"group"`
Graph string `yaml:"graph,omitempty" opt:"graph"`
DataRoot string `yaml:"data_root,omitempty" opt:"data-root"`
Host []string `yaml:"host,omitempty" opt:"host"`
InsecureRegistry []string `yaml:"insecure_registry" opt:"insecure-registry"`
LiveRestore *bool `yaml:"live_restore,omitempty" opt:"live-restore"`
Expand Down
2 changes: 1 addition & 1 deletion images/02-console/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ COPY build/sshd_config.append.tpl /etc/ssh/
COPY build/lsb-release /etc/

RUN apt-get update \
&& apt-get install -y --no-install-recommends fdisk ipset iptables openssh-server rsync locales \
&& apt-get install -y --no-install-recommends fdisk eject ipset iptables openssh-server rsync locales \
sudo less curl ca-certificates psmisc htop kmod iproute2 \
net-tools bash-completion wget \
nano open-iscsi iputils-ping nvi \
Expand Down
8 changes: 4 additions & 4 deletions os-config.tpl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ rancher:
restart: false
graph: /var/lib/system-docker
group: root
host: ["unix:///var/run/system-engine.sock"]
host: ["unix:///var/run/system-docker.sock"]
userland_proxy: false
console: {{.OS_CONSOLE}}
cloud_init:
Expand Down Expand Up @@ -123,7 +123,7 @@ rancher:
volumes:
- /usr/bin/ros:/usr/bin/ros:ro
- /usr/bin/system-docker:/usr/bin/system-docker:ro
- /usr/bin/system-engine-rc:/usr/bin/system-engine-rc:ro
- /usr/bin/system-docker-runc:/usr/bin/system-docker-runc:ro
system-volumes:
image: {{.OS_REPO}}/os-base:{{.VERSION}}{{.SUFFIX}}
command: echo
Expand Down Expand Up @@ -342,7 +342,7 @@ rancher:
privileged: true
restart: always
volumes:
- /var/run/system-engine.sock:/var/run/docker.sock
- /var/run/system-docker.sock:/var/run/docker.sock
environment:
DOCKER_API_VERSION: "1.22"
udev-cold:
Expand Down Expand Up @@ -403,7 +403,7 @@ rancher:
restart: false
graph: /var/lib/system-docker
group: root
host: ["unix:///var/run/system-engine.sock"]
host: ["unix:///var/run/system-docker.sock"]
pid_file: /var/run/system-docker.pid
exec_root: /var/run/system-docker
config_file: /etc/docker/system-docker.json
Expand Down
2 changes: 1 addition & 1 deletion pkg/dfs/scratch.go
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ func ParseConfig(config *Config, args ...string) []string {
if err != nil {
config.BridgeMtu = mtu
}
} else if strings.HasPrefix(arg, "-g") || strings.HasPrefix(arg, "--graph") {
} else if strings.HasPrefix(arg, "--data-root") {
config.GraphDirectory = GetValue(i, args)
}
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/init/recovery/recovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ func Recovery(initFailure error) {
Bridge: "none",
StorageDriver: "overlay2",
Restart: &[]bool{false}[0],
Graph: "/var/lib/recovery-docker",
DataRoot: "/var/lib/recovery-docker",
Group: "root",
Host: []string{"unix:///var/run/system-engine.sock"},
Host: []string{"unix:///var/run/system-docker.sock"},
UserlandProxy: &[]bool{false}[0],
},
}
Expand Down
4 changes: 4 additions & 0 deletions scripts/layout-initrd
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ ln -s bin ${INITRD_DIR}/usr/sbin
ln -s usr/sbin ${INITRD_DIR}/sbin

curl -SL ${!SYSTEM_DOCKER_URL} | tar --strip-components=1 -xzvf - -C ${INITRD_DIR}/usr/bin/
# we have diabled the user-proxy so we get rid of system-docker-proxy
rm -f ${INITRD_DIR}/usr/bin/system-docker-proxy
# reduce size by removing debugging tool system-docker-containerd-ctr
rm -f ${INITRD_DIR}/usr/bin/system-docker-containerd-ctr

cat <<HERE > ${INITRD_DIR}/usr/share/ros/os-release
NAME="BurmillaOS"
Expand Down
5 changes: 4 additions & 1 deletion scripts/tar-images
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ echo "tar-image: SYSTEM_IMAGES=$SYSTEM_IMAGES"
echo "tar-image: INIT_IMAGES=$INIT_IMAGES"
echo "tar-image: USER_IMAGES=$USER_IMAGES"

ARCHIVE_CMD="zstd -19 -c"
# system-docker can not load images which compressed by xz with a compression level of 9
# decompression consumes more memory if using level 9
# the default compression level for xz is 6
ARCHIVE_CMD="xz -4 -e"

docker save ${INIT_IMAGES} | ${ARCHIVE_CMD} > ${INIT_IMAGES_DST}
docker save ${SYSTEM_IMAGES} | ${ARCHIVE_CMD} > ${SYSTEM_IMAGES_DST}
Expand Down

0 comments on commit f30c3da

Please sign in to comment.