Skip to content

Commit

Permalink
v2.0.0-rc1
Browse files Browse the repository at this point in the history
* Load apparmor on boot also when booting from disk
* Rename system-dockerd to system-engine
* Do not cache service metadatas
* Do not cache Docker image to ISO file
* Disable system-docker bridge by default
* Remove deprecated --oom-score-adjust flag
* Update VMware tools to 12.2.5
* Update QEMU guest agent to 7.2
* Remove broken VirtualBox tools
  • Loading branch information
olljanat committed Aug 20, 2023
1 parent f87c220 commit 615b3d4
Show file tree
Hide file tree
Showing 13 changed files with 20 additions and 33 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ __pycache__
.trash-conf
/Dockerfile.dapper*
!/Dockerfile.dapper
scripts/images/raspberry-pi-hypriot64/Dockerfile.dapper*
2 changes: 1 addition & 1 deletion Dockerfile.dapper
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ ARG OS_BASE_URL_arm64=https://github.com/burmilla/os-base/releases/download/v202
ARG OS_INITRD_BASE_URL_amd64=https://github.com/burmilla/os-initrd-base/releases/download/v2023.05-1/os-initrd-base-amd64.tar.gz
ARG OS_INITRD_BASE_URL_arm64=https://github.com/burmilla/os-initrd-base/releases/download/v2023.05-1/os-initrd-base-arm64.tar.gz

ARG SYSTEM_DOCKER_VERSION=17.06.108
ARG SYSTEM_DOCKER_VERSION=17.06.109
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

Expand Down
2 changes: 1 addition & 1 deletion cmd/control/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ func layDownOS(image, installType, cloudConfig, device, partition, statedir, kap
//cloudConfig := SCRIPTS_DIR + "/conf/empty.yml" //${cloudConfig:-"${SCRIPTS_DIR}/conf/empty.yml"}
CONSOLE := "tty0"
baseName := "/mnt/new_img"
kernelArgs := "printk.devkmsg=on rancher.state.dev=LABEL=RANCHER_STATE rancher.state.wait transparent_hugepage=never scsi_mod.use_blk_mq=1 panic=10" // console="+CONSOLE
kernelArgs := "printk.devkmsg=on rancher.state.dev=LABEL=RANCHER_STATE rancher.state.wait transparent_hugepage=never scsi_mod.use_blk_mq=1 apparmor=1 security=apparmor panic=10" // console="+CONSOLE
if statedir != "" {
kernelArgs = kernelArgs + " rancher.state.directory=" + statedir
}
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-docker-runc", "exec", "--", info.ID, "env"}
cmd := []string{"system-engine-rc", "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-docker-runc", cmd, os.Environ())
return syscall.Exec("/usr/bin/system-engine-rc", cmd, os.Environ())
}

func waitForPid(service string, project *project.Project) (int, error) {
Expand Down
5 changes: 0 additions & 5 deletions config/docker_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ func (d *DockerConfig) FullArgs() []string {
args = append(args, generateEngineOptsSlice(d.EngineOpts)...)
args = append(args, d.ExtraArgs...)

// Make sure that OOM killer will kill containers before user docker
// https://github.com/burmilla/os/issues/33
args = append(args, "--oom-score-adjust")
args = append(args, "-250")

if d.TLS {
args = append(args, d.TLSArgs...)
}
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-docker.sock",
"unix:///var/run/system-engine.sock",
"unix:///var/run/docker.sock",
},
})), "--host unix:///var/run/system-docker.sock", "--host unix:///var/run/docker.sock")
})), "--host unix:///var/run/system-engine.sock", "--host unix:///var/run/docker.sock")

testContains(t, fmt.Sprint(generateEngineOptsSlice(EngineOpts{
LogOpts: map[string]string{
Expand Down
4 changes: 2 additions & 2 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-docker.sock"
SystemDockerHost = "unix:///var/run/system-engine.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-dockerd"
SystemDockerBin = "/usr/bin/system-engine"
DefaultDind = "burmilla/os-dind:17.12.1"

DetachLabel = "io.rancher.os.detach"
Expand Down
10 changes: 5 additions & 5 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-docker.sock"]
host: ["unix:///var/run/system-engine.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-docker-runc:/usr/bin/system-docker-runc:ro
- /usr/bin/system-engine-rc:/usr/bin/system-engine-rc:ro
system-volumes:
image: {{.OS_REPO}}/os-base:{{.VERSION}}{{.SUFFIX}}
command: echo
Expand Down Expand Up @@ -341,7 +341,7 @@ rancher:
privileged: true
restart: always
volumes:
- /var/run/system-docker.sock:/var/run/docker.sock
- /var/run/system-engine.sock:/var/run/docker.sock
environment:
DOCKER_API_VERSION: "1.22"
udev-cold:
Expand Down Expand Up @@ -398,11 +398,11 @@ rancher:
system_docker:
exec: true
storage_driver: overlay2
bip: 172.18.42.1/16
bridge: none
restart: false
graph: /var/lib/system-docker
group: root
host: ["unix:///var/run/system-docker.sock"]
host: ["unix:///var/run/system-engine.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/init/recovery/recovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func Recovery(initFailure error) {
Restart: &[]bool{false}[0],
Graph: "/var/lib/recovery-docker",
Group: "root",
Host: []string{"unix:///var/run/system-docker.sock"},
Host: []string{"unix:///var/run/system-engine.sock"},
UserlandProxy: &[]bool{false}[0],
},
}
Expand Down
Empty file.
9 changes: 0 additions & 9 deletions scripts/layout-initrd
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@ 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 All @@ -50,11 +46,6 @@ BUG_REPORT_URL="https://github.com/burmilla/os/issues"
BUILD_ID=
HERE

# cache os-services yml file
cache_services "h/hyperv-vm-tools.yml"
cache_services "o/open-vm-tools.yml"
cache_services "q/qemu-guest-agent.yml"

pushd ${INITRD_DIR}/usr/etc
ln -s ../share/ros/os-release .
popd
Expand Down
5 changes: 0 additions & 5 deletions scripts/release-amd64
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@ set -ex

cd $(dirname $0)/..

# touch .make-azurebase
touch .make-hyperv
touch .make-proxmoxve
touch .make-vmware

source ./scripts/version
./scripts/release-build

Expand Down
5 changes: 5 additions & 0 deletions scripts/tar-images
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ for i in ${APPEND_SYSTEM_IMAGES};do
done

for i in ${IMAGES}; do
# Reduce ISO file size by not caching Docker engine
if [[ ${i} == "burmilla/os-docker:"* ]]; then
continue
fi

echo "tar-image: pull($i)"
if ! docker inspect $i >/dev/null 2>&1; then
docker pull ${i}
Expand Down

0 comments on commit 615b3d4

Please sign in to comment.