Skip to main content

3. Create a unit

This topic covers the basic procedures for creating a unit. You can use Oracle VirtualBox and a special disk image with preinstalled AosEdge services to emulate a physical device. This image contains the same services as a physical unit, which behaves identically.

Install required tools

Create target system

To use the whole AosEdge functionality appropriate target system. Login to aoscloud.io as OEM. And create a target system with the name "vm-dev-mulinode".

Use https://github.com/aoscloud/meta-aos-vm/blob/v4.0.5/doc/aos_unit.cfg file content in Unit configuration field

Download the latest image for VM:

aos-prov download

Create you first Unit

aos-prov unit-new --name FirstUnit

Create a new unit using a virtual machine

The output will look like this:

aos-prov unit-new --name FirstUnit
aos-prov unit-new --name FirstUnit
Operation will be executed on domain: aoscloud.io
OEM: OEM user@epam.com
user: oem-user@epam.com
Checking VirtualBox... 7.0.10r158379

Creating a new virtual machines...
Found VM image (v4) with supporting static Nodes functionality. Use it as two nodes VM.
Creating a network for the units... Network aos-network-FirstUnit has been created
Forwarding provisioning port... 8316
Forwarding ssh port to node0... 8143
Forwarding ssh port to node1... 8149
Creating a new VM for node0... DONE
Creating a new VM for node1... DONE
Starting VMs in group /AosUnits/FirstUnit
Starting VM f84576ff-3f64-4771-96fc-decc59a496d1... DONE
Starting VM 405426f9-bc75-4982-87e1-e228ac9bcf9c... DONE
Starting provisioning...
Communicating with unit using provisioning protocol version 5... Connection timeout
Communicating with unit using provisioning protocol version 5... Connection timeout
Communicating with unit using provisioning protocol version 5... Connection timeout
Communicating with unit using provisioning protocol version 5... DONE
Getting System Info... DONE
System ID: 8NNN2OHTJGP5VQ8QH
Unit model: vm-dev-multinode;1.0

Getting unit's status on the cloud ...
Getting Node IDs... ['893fab064d304b2fb56b7e7ecdd7a284']
Wait while secondary node will be connected.
Getting Node IDs... ['893fab064d304b2fb56b7e7ecdd7a284', '3ff5c179e8f3422da9806deebf506cf1']
Starting provisioning... DONE
Getting certificate types to renew on node 893fab064d304b2fb56b7e7ecdd7a284... ['online', 'offline', 'iam', 'sm', 'um', 'cm']
Generating key type: online on Node: 893fab064d304b2fb56b7e7ecdd7a284... DONE
Generating key type: offline on Node: 893fab064d304b2fb56b7e7ecdd7a284... DONE
Generating key type: iam on Node: 893fab064d304b2fb56b7e7ecdd7a284... DONE
Generating key type: sm on Node: 893fab064d304b2fb56b7e7ecdd7a284... DONE
Generating key type: um on Node: 893fab064d304b2fb56b7e7ecdd7a284... DONE
Generating key type: cm on Node: 893fab064d304b2fb56b7e7ecdd7a284... DONE
Starting provisioning... DONE
Getting certificate types to renew on node 3ff5c179e8f3422da9806deebf506cf1... ['iam', 'sm', 'um']
Generating key type: iam on Node: 3ff5c179e8f3422da9806deebf506cf1... DONE
Generating key type: sm on Node: 3ff5c179e8f3422da9806deebf506cf1... DONE
Generating key type: um on Node: 3ff5c179e8f3422da9806deebf506cf1... DONE
Registering the unit ...
Applying certificate type: online Node ID: 893fab064d304b2fb56b7e7ecdd7a284... DONE
Applying certificate type: offline Node ID: 893fab064d304b2fb56b7e7ecdd7a284... DONE
Applying certificate type: iam Node ID: 893fab064d304b2fb56b7e7ecdd7a284... DONE
Applying certificate type: sm Node ID: 893fab064d304b2fb56b7e7ecdd7a284... DONE
Applying certificate type: um Node ID: 893fab064d304b2fb56b7e7ecdd7a284... DONE
Applying certificate type: cm Node ID: 893fab064d304b2fb56b7e7ecdd7a284... DONE
Applying certificate type: iam Node ID: 3ff5c179e8f3422da9806deebf506cf1... DONE
Applying certificate type: sm Node ID: 3ff5c179e8f3422da9806deebf506cf1... DONE
Applying certificate type: um Node ID: 3ff5c179e8f3422da9806deebf506cf1... DONE
Finishing provisioning... DONE
Finishing provisioning... DONE
Finished successfully!
You may find your unit on the cloud here: https://aoscloud.io/oem/units/22296

View unit info

To view information about your unit, you may Ctrl-click on the link in the last line of the aos-prov output or find it in the UI on the Units page. See Units — AosEdge.

In selected unit you are able to see unit general information and monitoring data.

unit info