* Local Organizer of * Chair of CloudNative Days Fukuoka 2019 * Author of Japanese Ruby Books * Founder of Haconiwa (mruby on container) * 10 y.o. Rubyist * Container Enthusiast * System Programming Novice
info “image” files • Restore processes from dumped image files • CRIU stands for “Checkpoint and Restore In Userspace” • CRIU is a tool for processes, but it can be applied to containers C/R. 13
in bootstrap, like Jenkins, Redmine, or legacy monolithic Rails app, you will hesitate to reboot these. • e.g. Jenkins requires about 5 sec to boot (using docker with downloaded image). 17
new container is invoked automatically in another host. But this requires RESTART of a container... 23 Crash! Proxy Requests Restart and Redirect Accesses
are varying between VMs and containers • VMs has an init process • daemons such as sshd and rsyslogd • a full-stack filesystem to manage whole operation system • ... all of which containers are usually omitting 39
do isolate_namespace_using_unshare(flag) assign_to_cgroup(name) if enabled chroot_or_pivot_root(to: rootfs) # Doing other options exec(“/path/to/command”, “--opt1”, “--opt2”) end status = Process.waitpid2(pid) # will block and wait() puts status • NOTE: program should be single-threaded, so mruby is better 46
like a normal, VM-based application daemon • Internally some of attributes are unshared • To allow CRIU to create checkpoints easily • Grenadine is aimed that it can be introduced into historical VM-based application environments with least changes 52
historical VMs now • I want people to use Grenadine as a checkpoint/restore tool for Kubernetes or other container-based systems • It is cloud-native middleware!! (Like ones on CNCF incubators) 55