Giter VIP home page Giter VIP logo

Miehistö

mruby

Miehistö (formerly grenadine) is a checkpoint/restore manager for application servers, using CRIU(Checkpoint and Restore In Userspace) internally.

"Miehistö" is the Suomi(Finnish) word equivalent to CREW in English :)

Architecture

Overview

TODO: write in some human languages.

Install

System requirement

  • Kernel 3.11 (CRIU's requirement, newer is better)
  • criu command and service (recommended: criu > 3.14)

Binary/Package

TODO...

Build from source

git clone https://github.com/udzura/miehitsto.git; cd miehisto
rake
sudo mv -v ./mruby/bin/* /usr/local/bin

Usage

Start miehistod

# All logs are put to stdout/err. TODO: Unit file
$ sudo miehistod >/var/log/miehistod.log 2>&1 &

Create service via mhctl

$ sudo mhctl service create /usr/bin/ruby -run -e httpd -- /var/www/html
$ curl localhost:8080
<h1>It works?</h1>

$ sudo mhctl service list
OBJECT_ID                        PID   PPID  ARGS
9491c63874fac947cc46d437b028b189 68248 68243 /usr/bin/ruby -run -e httpd -- /var/www/html

Then, dump this process

# TODO: specify by object_id
$ sudo mhctl service dump -t 68248
/var/lib/miehisto/images/742e79e9de83a9091424edb0fa463235

# Service will be stopped
$ sudo mhctl service list
OBJECT_ID                        PID   PPID  ARGS

$ curl localhost:8080
curl: (7) Failed to connect to localhost port 8080: Connection refused

You will get some images

$ sudo mhctl image list
OBJECT_ID                        COMM         PAGE_SIZE  CTIME
742e79e9de83a9091424edb0fa463235 ruby         21.41MiB   2020-11-13 12:37:30 +0000
e5912ffa22a8ed2f6ec35c1e4d463d4d memcached    792.00KiB  2020-11-13 07:22:50 +0000

You can restore process from these images

$ sudo mhctl service restore --from 742e79e9de83a9091424edb0fa463235
742e79e9de83a9091424edb0fa463235

$ sudo mhctl service list
OBJECT_ID                        PID   PPID  ARGS
9491c63874fac947cc46d437b028b189 68668 68660 /usr/bin/ruby -run -e httpd -- /var/www/html

# Works again!
$ curl localhost:8080
<h1>It works?</h1>

More information/usecases are TBD :(

License

Under the MIT License. See LICENSE file.

Miehistö's Projects

miehisto icon miehisto

Miehistö is a checkpoint manager for application servers

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.