-
Notifications
You must be signed in to change notification settings - Fork 11
OSv Init
A host perform a few task when booting. The tasks falls into the following categories:
- Network configuration - static/dhcp, dns etc.
- Environment variable
- File and directory handling - directory creation and file deletion.
- Running the application - Running the actual application with its command line argument
- Reading the local init file
- Downloading a remote cloud init file
- Start the API for external usage
- Run the applications
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.
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 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.
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
- 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