Ops
Search…
Vultr
OPS works perfectly fine with Vultr.
For most operations you'll want to use the following config and you'll need access to your API key and the access key and secret access key found in your portal:
1
{
2
"CloudConfig": {
3
"Zone": "ewr1",
4
"BucketName": "nanos-test"
5
}
6
}
Copied!
1
package main
2
3
import (
4
"fmt"
5
"net/http"
6
)
7
8
func main() {
9
fmt.Println("hello world!")
10
11
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
12
fmt.Fprintf(w, "Welcome to my website!")
13
})
14
15
fs := http.FileServer(http.Dir("static/"))
16
http.Handle("/static/", http.StripPrefix("/static/", fs))
17
18
http.ListenAndServe("0.0.0.0:8080", nil)
19
}
Copied!

Image Operations

Create Image

1
VULTR_TOKEN=my_api_token \
2
VULTR_ACCESS=my_access_token \
3
VULTR_SECRET=my_vultr_secret \
4
ops image create <elf_file|program> -i <image_name> -c config.json -z ewr1 -t vultr
Copied!

List Images

1
VULTR_TOKEN=my_api_token \
2
VULTR_ACCESS=my_access_token \
3
VULTR_SECRET=my_vultr_secret \
4
ops image list -z ewr1 -t vultr
Copied!

Delete Image

Instance Operations

Create Instance

1
VULTR_TOKEN=my_api_token \
2
VULTR_ACCESS=my_access_token \
3
VULTR_SECRET=my_vultr_secret \
4
ops instance create 6f5e4eebdf761 -z ewr1 -t vultr
Copied!

List Instances

1
VULTR_TOKEN=my_api_token \
2
VULTR_ACCESS=my_access_token \
3
VULTR_SECRET=my_vultr_secret \
4
ops instance list -z ewr1 -t vultr
Copied!

Get Logs for Instance

Delete Instance

Last modified 22d ago