/ops

ops - build and run nanos unikernels

Primary LanguageGoMIT LicenseMIT

OPS

CircleCI

Ops is the main interface for creating and running a Nanos unikernel. It is used to package, create and run your application as a nanos unikernel instance.

Check out the DOCS

ops <command> [flags] [ARG]

Minimal Version

This program requires GO Version 1.10.x or greater.

Build

  1. Clone the repository.
  2. Install dependencies:
    • make deps
  3. Build
    • make build

Setup networking

bridge network

sudo ops net setup

reset

sudo ops net reset

Build a bootable image

ops build <ELFBinary>

Package and run

ops run <ELFBinary>
OR
ops run -p <port> <ELFBinary>

Using a config file

ops run -p <port> -c <file> <ELFBinary>

Example config file

ops config files are plain JSON, below is an example

{
    "Args":["one","two"],
    "Dirs":["myapp/static"]
}

## File layout on local host machine 
    -myapp
        app
        -static
            -example.html
            -stylesheet 
                -main.css
## File  layout on VM
    /myapp
        app
        /static
            -example.html
            /stylesheet
                -main.css