Ops
Search…
OpenStack
OPS works perfectly fine with OpenStack.
Some cloud providers using OpenStack that have been tested are vexxhost and ovh.
In the cloud provider, download a script with the env variables required. 1. Create an account; 2. Login; 3. Click API Access in left menu; 4. Click on button with the description Download OpenStack RC File; 5. Select an option which contains the description RC File.
6. Run RC file script in the terminal where you will use ops.
1
$ ./6050015361872676-openrc.sh`
Copied!
Alternatively, you can set the env variables manually.
1
export OS_USERNAME=""
2
export OS_PASSWORD=""
3
export OS_DOMAIN_NAME="Default"
4
export OS_AUTH_URL="https://auth.vexxhost.net/"
5
export OS_REGION_NAME="sjc1"
6
export OS_PROJECT_NAME=""
7
export OS_PROJECT_ID=""
Copied!

Image Operations

Create Image

1
GOOS=linux go build -o <elf_file>
2
3
ops image create <elf_file|program> -c config.json -t openstack -i <image_name>
Copied!

List Images

1
ops image list -t openstack
Copied!

Delete Image

1
ops image delete -t openstack <image_name>
Copied!

Instance Operations

Create Instance

1
ops instance create <image_name> -t openstack
Copied!
While creating instance on openstack OPS needs flavour name. If you don't provide, OPS selects one for you. You can provide flavor name via CLI and config file.
CLI example
1
ops instance create <image_name> -t openstack -f <flavor_name>
Copied!
Sample config file
1
{
2
"CloudConfig" :{
3
"Platform" : "openstack",
4
"flavor" : "<flavor_name>"
5
}
6
}
Copied!
OPS provides configurable instance volume size. Add volume size in config file. Default size is 1 GB.
1
{
2
"RunConfig": {
3
"VolumeSizeInGb" : 2
4
}
5
}
Copied!

List Instances

1
ops instance list -t openstack
Copied!

Get Logs for Instance

1
ops instance logs -t openstack <instance_name>
Copied!

Delete Instance

1
ops instance delete -t openstack <instance_name>
Copied!
You can fetch instance name from ops instance list command.

Volume Operations

Create Volume

1
ops volume create -t openstack <volume_name>
Copied!

List Volumes

1
$ ops volume list -t openstack
2
+--------------------------------------+------+-----------+-----------+----------+-------------------------------+----------+
3
| UUID | NAME | STATUS | SIZE (GB) | LOCATION | CREATED | ATTACHED |
4
+--------------------------------------+------+-----------+-----------+----------+-------------------------------+----------+
5
| 2977268e-7c83-4191-a30d-f6fa25c3ddab | | available | 1 | | 2021-02-24 13:24:54 +0000 UTC | |
6
+--------------------------------------+------+-----------+-----------+----------+-------------------------------+----------+
Copied!

Delete Volume

1
ops volume delete -t openstack <volume_name>
Copied!

Attach Volume

1
ops volume attach -t openstack <instance_name> <volume_name> <mount_path>
Copied!

Detach Volume

1
ops volume detach -t openstack <instance_name> <volume_name>
Copied!
Last modified 7mo ago