Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edge fields extension and cluster undeployment improvement for edge #112

Merged
merged 8 commits into from
Nov 27, 2024
36 changes: 21 additions & 15 deletions endpoints/4-edge-endpoints.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,14 @@ This endpoint is used to register new Edge nodes, which are passed as an [EdgeDe
}
],
"nodeProperties": {
"providerId": "1",
"price": "{{price}}",
"numberOfCores": "{{cores}}",
"memory": "{{memory}}",
"providerId": "{{providerID}}",
"cores": "{{cores}}",
"cpuFrequency": "{{cpuFrequency}}",
"ram": "{{ram}}",
"disk": "{{disk}}",
"fpga": "{{fpga}}",
"gpu": "{{gpu}}",
"operatingSystem": {
"operatingSystemFamily": "{{OS_name}}",
"operatingSystemArchitecture": "{{OS_architecture}}",
Expand All @@ -65,22 +68,25 @@ This endpoint is used to register new Edge nodes, which are passed as an [EdgeDe
- Information registered in node candidate for hardware, location, and image that represent the device.

The fields are defined as:
- `name`: The name of the edge node. This is used for identification and management within the cluster.
- `name`(String): The name of the edge node, used for identification and management within the cluster.
- `loginCredential`: Contains authentication details for accessing the edge node. The username and password are required for SSH access, with an option for a privateKey instead of a password.
- `ipAddresses`: A list of IP addresses associated with the node, including both PUBLIC_IP and PRIVATE_IP with IP Version specified as V4.
- `nodeProperties`:
- `providerId`: The ID of the provider. Default is `"1"`.
- `price`: The price of the edge node source.
- `numberOfCores`: A string representing number of hardware cores (e.g., `"1"`).
- `memory`: The hardware memory in GB (e.g., `"1"`)
- `disk`: The hardware storage space in GB (e.g., `"1.0"`).
- `nodeProperties`: Represents the properties being transmitted to a node candidate, reflecting the attributes of the registered edge device.
- `price`(Double): The price of the edge node source.
- `providerId` (String): The unique identifier of the provider.
- `cores`(Integer): The number of CPU cores the node possesses.
- `cpuFrequency`(Double): The CPU frequency in GHz.
- `ram`(Long): The hardware's RAM memory in MB.
- `disk`(Double): The hardware's storage space in GB.
- `fpga`(Integer): The number of FPGAs (Field-Programmable Gate Arrays) available on the node.
- `gpu`(Integer): The number of GPUs (Graphics Processing Units) available on the node.
- `operatingSystem`: Information about the OS, including Family, Architecture, and Version.
- `geoLocation`: The physical location details, such as city, country, latitude, and longitude of the edge node.
- `port`: The port on which the edge node is accessible.
- `jobId`: ProActive Job ID associated with the edge node. Set to `"0"` or `"any"` if no job is linked.
- `systemArch`: The system architecture, which must be one of `"AMD"`, `"ARMv8"`, or `"ARMv7"`.
- `scriptURL`: A URL pointing to any script required during the node setup.
- `jarURL`: The URL for the node's executable `.jar` file, which corresponds to the `systemArch`.
- `port` (String): The port number on which the edge node is accessible.
- `jobId`(String): The ProActive Job ID associated with the edge node. Set to `"0"` or `"any"`, or `null`, if no job is linked. Note that value `"any"` will be assigned to the jobId in this case indicating that there is no deployment on given device. When the deployment is sent to the edge device, the value will be replaced with name of ProActive deployment job.
- `systemArch`(String): The system architecture, which must be one of `"AMD"`, `"ARMv8"`, or `"ARMv7"`.
- `scriptURL`(String): A URL pointing to a script required for setting up the node.
- `jarURL`(String): The URL for the node's executable `.jar` file, which corresponds to the `systemArch`.

Each system architecture requires a specific `jarURL` for node execution, available from your ProActive installation. To obtain these `.jar` files, access the ProActive Resource Manager portal and go to _Portal -> Launch a Node_. Here are examples for various architectures:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,38 +13,41 @@


/**
* Attributes defining a BYON node
* Attributes defining a EDGE node
ankicabarisic marked this conversation as resolved.
Show resolved Hide resolved
*/
@AllArgsConstructor
@NoArgsConstructor
@Getter
@Setter
@ToString(callSuper = true)
public class EdgeDefinition {
@JsonProperty("name")
// Default constants
ankicabarisic marked this conversation as resolved.
Show resolved Hide resolved
public static final String DEFAULT_PORT = "22";

@JsonProperty(EdgeNode.JSON_NAME)
private String name = null;

@JsonProperty("jobId")
@JsonProperty(EdgeNode.JSON_JOB_ID)
private String jobId = null;

@JsonProperty("systemArch")
@JsonProperty(EdgeNode.JSON_SYSTEM_ARCH)
private String systemArch = null;

@JsonProperty("scriptURL")
@JsonProperty(EdgeNode.JSON_SCRIPT_URL)
private String scriptURL = null;

@JsonProperty("jarURL")
@JsonProperty(EdgeNode.JSON_JAR_URL)
private String jarURL = null;

@JsonProperty("loginCredential")
@JsonProperty(EdgeNode.JSON_LOGIN_CREDENTIAL)
private LoginCredential loginCredential = null;

@JsonProperty("ipAddresses")
@JsonProperty(EdgeNode.JSON_IP_ADDRESSES)
private List<IpAddress> ipAddresses = null;

@JsonProperty("port")
private String port = "22";
@JsonProperty(EdgeNode.JSON_PORT)
private String port = DEFAULT_PORT;

@JsonProperty("nodeProperties")
@JsonProperty(EdgeNode.JSON_NODE_PROPERTIES)
private NodeProperties nodeProperties = null;
}
53 changes: 41 additions & 12 deletions sal-common/src/main/java/org/ow2/proactive/sal/model/EdgeNode.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,54 +29,83 @@
@Setter
@Table(name = "EDGE_NODE")
public class EdgeNode extends AbstractNode {
public static final String ANY_JOB_ID = "any";

// Constants for JSON properties
public static final String JSON_NAME = "name";

public static final String JSON_LOGIN_CREDENTIAL = "loginCredential";

public static final String JSON_IP_ADDRESSES = "ipAddresses";

public static final String JSON_NODE_PROPERTIES = "nodeProperties";

public static final String JSON_PORT = "port";

public static final String JSON_REASON = "reason";

public static final String JSON_DIAGNOSTIC = "diagnostic";

public static final String JSON_USER_ID = "userId";

public static final String JSON_ALLOCATED = "allocated";

// edge jobID corresponds to the ProActive job name
public static final String JSON_JOB_ID = "jobId";

public static final String JSON_SYSTEM_ARCH = "systemArch";

public static final String JSON_SCRIPT_URL = "scriptURL";

public static final String JSON_JAR_URL = "jarURL";
ankicabarisic marked this conversation as resolved.
Show resolved Hide resolved

@Column(name = "NAME")
@JsonProperty("name")
@JsonProperty(JSON_NAME)
private String name = null;

@Embedded
@JsonProperty("loginCredential")
@JsonProperty(JSON_LOGIN_CREDENTIAL)
private LoginCredential loginCredential = null;

@ElementCollection(targetClass = IpAddress.class)
private List<IpAddress> ipAddresses = null;

@Embedded
@JsonProperty("nodeProperties")
@JsonProperty(JSON_NODE_PROPERTIES)
private NodeProperties nodeProperties = null;

@Column(name = "PORT")
@JsonProperty("port")
@JsonProperty(JSON_PORT)
private String port = null;

@Column(name = "REASON")
@JsonProperty("reason")
@JsonProperty(JSON_REASON)
private String reason = null;

@Column(name = "DIAGNOSTIC")
@JsonProperty("diagnostic")
@JsonProperty(JSON_DIAGNOSTIC)
private String diagnostic = null;

@Column(name = "USER_ID")
@JsonProperty("userId")
@JsonProperty(JSON_USER_ID)
private String userId = null;

@Column(name = "ALLOCATED")
@JsonProperty("allocated")
@JsonProperty(JSON_ALLOCATED)
private Boolean allocated = null;

@Column(name = "JOB_ID")
@JsonProperty("jobId")
@JsonProperty(JSON_JOB_ID)
private String jobId;

@Column(name = "SYSTEM_ARCH")
@JsonProperty("systemArch")
@JsonProperty(JSON_SYSTEM_ARCH)
private String systemArch = null;

@JsonProperty("scriptURL")
@JsonProperty(JSON_SCRIPT_URL)
private String scriptURL = null;

@JsonProperty("jarURL")
@JsonProperty(JSON_JAR_URL)
private String jarURL = null;

public EdgeNode name(String name) {
Expand Down
Loading
Loading