Go to file
Francesco Lavra 660d135143 AWS: add support for associating elastic IP address to instance
With this change, when creating an AWS instance it is possible to
specify in the configuration file an elastic IP address to be
associated to the instance. Example:
```
"CloudConfig" :{
	"ElasticIP": "1.2.3.4"
}
```
The IP address must be allocated to the AWS account from which the
instance is being created.
2022-03-04 10:49:43 +01:00
.circleci fixing mac tests && adding ops nightly (#1155) 2021-09-08 11:49:30 -07:00
aws AWS: add support for associating elastic IP address to instance 2022-03-04 10:49:43 +01:00
azure allow empty azure volumes to be set to arbitrary large sizes (#1213) 2021-12-24 07:54:50 -08:00
cmd support for new pkghub manifest format which uses namespaced packages (#1270) 2022-02-16 14:30:17 -08:00
constants Move qemu to own package (closes #571) 2021-02-16 09:17:26 +00:00
crossbuild Commands: add support for cross-build environment 2021-07-30 17:59:30 +02:00
data - Do not use time.Sleep() in tests 2019-04-05 00:48:19 +07:00
digitalocean DO: check if bucket exists when creating image (#1192) 2021-11-16 08:55:08 -08:00
examples formatting 2018-11-30 12:09:59 -08:00
fs Use zero length when filelength missing 2022-02-22 14:15:52 -05:00
gcp if creating empty volumes directly on GCP set size after uploading (#1201) 2021-11-24 08:05:30 -08:00
hack Explicitly use Go11Modules for go vet too 2019-07-17 19:08:40 +10:00
hyperv Provider CreateVolume(): simplify processing of size option 2021-09-07 12:09:30 +02:00
lepton Add KlibDir to Config 2022-03-02 11:02:03 -05:00
log Separated functions for formatted and unformatted log 2021-07-01 08:24:46 +07:00
mock_network add upcloud initial support (#877) 2021-02-03 15:43:04 +00:00
mock_oci add oci support (#970) 2021-03-18 21:16:09 +00:00
mock_upcloud add oci support (#970) 2021-03-18 21:16:09 +00:00
network Rename IPAddr -> IPAddress (#960) 2021-03-11 10:35:24 +00:00
oci Provider CreateVolume(): simplify processing of size option 2021-09-07 12:09:30 +02:00
onprem initial fbsd run support (#1223) 2022-01-05 09:06:43 -08:00
openstack Provider CreateVolume(): simplify processing of size option 2021-09-07 12:09:30 +02:00
provider Initial Proxmox Integration (#1195) 2021-11-23 08:20:21 -08:00
proxmox Initial Proxmox Integration (#1195) 2021-11-23 08:20:21 -08:00
qemu initial fbsd run support (#1223) 2022-01-05 09:06:43 -08:00
testutils fixing mac tests && adding ops nightly (#1155) 2021-09-08 11:49:30 -07:00
types AWS: add support for associating elastic IP address to instance 2022-03-04 10:49:43 +01:00
upcloud Provider CreateVolume(): simplify processing of size option 2021-09-07 12:09:30 +02:00
util/slice Fix Port Conflict Error (#1033) 2021-05-14 16:23:33 +01:00
vbox Provider CreateVolume(): simplify processing of size option 2021-09-07 12:09:30 +02:00
vsphere Provider CreateVolume(): simplify processing of size option 2021-09-07 12:09:30 +02:00
vultr Vultr: error if no zone is set (#1191) 2021-11-16 09:29:18 -08:00
wsl add vbox integration (#984) 2021-04-08 11:00:06 +01:00
.gitignore Refactor cmd package 2021-02-09 17:14:07 +00:00
CHARTER.md adding in 1st charter doc 2019-02-15 13:09:06 -08:00
LICENSE Initial commit 2018-09-10 10:57:55 -07:00
Makefile fix 'make run' command failing (#1219) 2022-01-02 12:44:13 -08:00
PACKAGES.md Package docs: fix environment variables and shasum command line 2021-04-07 16:59:10 +02:00
README.md adding notes for m1 users since we have fielded quite a lot of questions lately for it (#1222) 2022-01-03 12:27:46 -08:00
SECURITY.md formatting 2019-04-24 14:52:13 -07:00
UNIKERNELS.md more getting started links 2019-02-20 10:04:37 -08:00
bash_completion.sh Added bash completion script (#1046) 2021-05-20 21:54:05 +01:00
coverage.out Refactor cmd package 2021-02-09 17:14:07 +00:00
go.mod Bump github.com/docker/distribution from 2.7.1+incompatible to 2.8.0+incompatible (#1271) 2022-02-13 14:55:11 -08:00
go.sum Bump github.com/docker/distribution from 2.7.1+incompatible to 2.8.0+incompatible (#1271) 2022-02-13 14:55:11 -08:00
install.sh Add space after source (#1255) 2022-01-28 13:38:53 -08:00
ops.go Restructure all ops code into cmd package 2019-04-09 17:58:32 +05:30
release.sh we are persisting versioned nanos releases but not ops - this persists versioned ops releases (#1131) 2021-07-29 08:35:59 -07:00

README.md

OPS

CircleCI Go Report Go Docs

Ops is a tool 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

Installation

Most users should just download the binary from the website:

Binary install

curl https://ops.city/get.sh -sSfL | sh

Build and Install from source

Building from source is easy if you have used Go before.

This program requires GO Version 1.13.x or greater.

Installing from source follows these general steps:

Install dependencies:

make deps

Build:

make build

macOS notes:

GO111MODULE=on go build -ldflags "-w"

For detailed instructions please consult the documentation.

Basic usage examples

Before learning more about ops it is a good idea to see some basic usage examples. Below are links to simple examples using various programming platforms:

Let's run your first unikernel right now.

asciicast

Throw this into hi.js:

const http = require('http');
http.createServer((req, res) => {
    res.writeHead(200, { 'Content-Type': 'text/plain' });
    res.end('Hello World\n');
}).listen(8083, "0.0.0.0");
console.log('Server running at http://127.0.0.1:8083/');

Then you can run it like so:

ops pkg load node_v11.5.0 -p 8083 -f -n -a hi.js

Want to push your app out to the cloud?

For Google: https://nanovms.gitbook.io/ops/google_cloud

For AWS: https://nanovms.gitbook.io/ops/aws

Languages:

Various langauge examples can be found at https://github.com/nanovms/ops-examples.

Applications:

  • Nginx
  • HAProxy
  • Tarantool
  • Hiawatha
  • Mosquitto
  • Kache
  • Gnatsd
  • Wasmer

You can always find more pre-made packages via:

ops pkg list

Apple M1 Users

The Apple M1 and M2 are ARM based. OPS is built for users primarily deploying to x86 based servers. While you can certainly run ARM builds with Nanos and OPS be aware that if you are trying to run x86 builds (the default) on ARM based M1s you won't be able to use hardware acceleration.

Build a bootable image

ops build <app>

Package and run

ops run <app>
# or
ops run -p <port> <app>

Using a config file

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

Example config file

ops config files are plain JSON, below is an example

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

Setup networking

New users wishing to play around in a dev environment are encouraged to use the default user-mode networking. Other production users are encouraged to utilize native cloud builds such as Google Cloud which handle networking for you.

Only advanced/power users should use the bridge networking option.

Reporting Bugs

Feel free to open up a pull request. It's helpful to have your OPS version and the release channel you are using.

Also - if it doesn't work on the main release you can try the nightly - the main release can tail the nightly by many weeks sometimes.

ops version

if you are using a package, get the package hash:

jq '."gnatsd_1.4.1"' ~/.ops/packages/manifest.json

Pull Requests

If you have an idea for a new feature and it might take longer than a few hours or days to do it's worth opening a feature request tkt to ideate it first before jumping into code. There might be someone already working on the feature or plans to do something entirely different.

Security

Security

Feel free to email security at.

Support

If you are having trouble running a particular application please feel free to open an issue and we can take a look. In general we'll only want to support the latest release from a given application/project, however, if you really want/need support for something older there are paid support plans available - contact the folks at https://nanovms.com.