Skip to content
amnonh edited this page Apr 29, 2014 · 37 revisions

OSv System Init

A host perform a few task when booting. The tasks falls into the following categories:

  1. Network configuration - static/dhcp, dns etc.
  2. Environment variable
  3. File and directory handling - directory creation and file deletion.
  4. Running the application - Running the actual application with its command line argument

System init stages

  1. Reading the local init file
  2. Downloading a remote cloud init file
  3. Start the API for external usage
  4. Run the applications

OSV Init

The OSV init responsible for the init tasks on the system boot. It reads the init file and starts additional applications.

It also responsible for opening the API for external usage.

Init file

The init file is a Yaml formatted file with instruction to the the OSv Init. Among the command in the file could be read a remote init file, which is a command to OSv Init itself.

Cloud init

Cloud init is a file that can be downloaded from a designated IP address. Cloud init in general can support multiple formats. OSv-Init will support Yaml format.

Configuration example

The configuration file is mostly API calls and some additional command to the OSv Init itself.

The file is in a Yaml format, and the commands are performed sequential

create a log directory

- API
    command: PUT
    url: /file/usr/log
    op: MKDIR
    permission: 0777

- API
    command: PUT
    url: /env/path
    value: usr/local/bin
#fetch remote file from predetermine address
- INCLUDE
    url: 192.168.1.1/remote_file.yaml

#open httpserver for input
- API
   command: PUT
   url: /server
   value: start
#sleep
- Sleep
   time: 100

#run an application
- API
  command: PUT
  url: /app/java.so
  params: -jar myjar.jar
Clone this wiki locally