11 #ifndef WRENCH_VIRTUALIZEDCLUSTERSERVICE_H
12 #define WRENCH_VIRTUALIZEDCLUSTERSERVICE_H
14 #include "wrench/services/compute/virtualized_cluster/VirtualizedClusterComputeServiceProperty.h"
15 #include "wrench/services/compute/virtualized_cluster/VirtualizedClusterComputeServiceMessagePayload.h"
16 #include "wrench/services/compute/cloud/CloudComputeService.h"
24 class CloudComputeService;
31 WRENCH_PROPERTY_COLLECTION_TYPE default_property_values = {
35 WRENCH_MESSAGE_PAYLOADCOLLECTION_TYPE default_messagepayload_values = {
57 std::string scratch_space_mount_point,
67 virtual std::shared_ptr<BareMetalComputeService>
68 startVM(
const std::string &vm_name,
const std::string &pm_name);
70 virtual void migrateVM(
const std::string &vm_name,
const std::string &dest_pm_hostname);
89 const std::string &vm_name,
90 const std::string &dest_pm_hostname);
99 #endif //WRENCH_VIRTUALIZEDCLUSTERSERVICE_H
WRENCH_PROPERTY_COLLECTION_TYPE property_list
The service's property list.
Definition: Service.h:110
static const std::string IS_THERE_AT_LEAST_ONE_HOST_WITH_AVAILABLE_RESOURCES_ANSWER_MESSAGE_PAYLOAD
The number of bytes in the control message sent to the daemon to ask is one host has some resources a...
Definition: ComputeServiceMessagePayload.h:78
static const std::string CREATE_VM_ANSWER_MESSAGE_PAYLOAD
The number of bytes in the control message sent by the service in answer to a VM creation request.
Definition: CloudComputeServiceMessagePayload.h:30
static const std::string SUBMIT_STANDARD_JOB_REQUEST_MESSAGE_PAYLOAD
The number of bytes in the control message sent to the daemon to submit a standard job.
Definition: ComputeServiceMessagePayload.h:27
static const std::string DAEMON_STOPPED_MESSAGE_PAYLOAD
The number of bytes in the control message sent by the daemon to confirm it has terminated.
Definition: ServiceMessagePayload.h:37
A virtualized cluster-based compute service.
Definition: VirtualizedClusterComputeService.h:29
static const std::string RESOURCE_DESCRIPTION_REQUEST_MESSAGE_PAYLOAD
The number of bytes in the control message sent to the daemon to request information on its resources...
Definition: ComputeServiceMessagePayload.h:74
VirtualizedClusterComputeService(const std::string &hostname, std::vector< std::string > &execution_hosts, std::string scratch_space_mount_point, WRENCH_PROPERTY_COLLECTION_TYPE property_list={}, WRENCH_MESSAGE_PAYLOADCOLLECTION_TYPE messagepayload_list={})
Constructor.
Definition: VirtualizedClusterComputeService.cpp:38
static const std::string IS_THERE_AT_LEAST_ONE_HOST_WITH_AVAILABLE_RESOURCES_REQUEST_MESSAGE_PAYLOAD
The number of bytes in the control message by the the daemon to state whether one host has some resou...
Definition: ComputeServiceMessagePayload.h:80
std::vector< std::string > execution_hosts
List of execution host names.
Definition: CloudComputeService.h:202
WRENCH_MESSAGE_PAYLOADCOLLECTION_TYPE messagepayload_list
The service's messagepayload list.
Definition: Service.h:113
A cloud-based compute service that manages a set of physical hosts and controls access to their resou...
Definition: CloudComputeService.h:36
static const std::string GET_EXECUTION_HOSTS_REQUEST_MESSAGE_PAYLOAD
The number of bytes in the control message sent to the service to request a get execution hosts.
Definition: CloudComputeServiceMessagePayload.h:24
Definition: Action.cpp:28
static const std::string GET_EXECUTION_HOSTS_ANSWER_MESSAGE_PAYLOAD
The number of bytes in the control message sent by the service in answer to a get execution hosts req...
Definition: CloudComputeServiceMessagePayload.h:26
static const std::string MIGRATE_VM_REQUEST_MESSAGE_PAYLOAD
The number of bytes in the control message sent to the service to request a VM migration.
Definition: VirtualizedClusterComputeServiceMessagePayload.h:25
static const std::string SUBMIT_PILOT_JOB_ANSWER_MESSAGE_PAYLOAD
The number of bytes in the control message sent from the daemon to acknowledge a pilot job submission...
Definition: ComputeServiceMessagePayload.h:56
static const std::string MIGRATE_VM_ANSWER_MESSAGE_PAYLOAD
The number of bytes in the control message sent by the service in answer to a VM migration request.
Definition: VirtualizedClusterComputeServiceMessagePayload.h:27
virtual void processMigrateVM(simgrid::s4u::Mailbox *answer_mailbox, const std::string &vm_name, const std::string &dest_pm_hostname)
Process a VM migration request.
Definition: VirtualizedClusterComputeService.cpp:252
static const std::string VM_BOOT_OVERHEAD_IN_SECONDS
The overhead, in seconds, to boot a VM.
Definition: CloudComputeServiceProperty.h:24
virtual void migrateVM(const std::string &vm_name, const std::string &dest_pm_hostname)
Synchronously migrate a VM to another physical host.
Definition: VirtualizedClusterComputeService.cpp:106
bool processNextMessage() override
Wait for and react to any incoming message.
Definition: VirtualizedClusterComputeService.cpp:163
virtual std::shared_ptr< BareMetalComputeService > startVM(const std::string &vm_name, const std::string &pm_name)
Start a VM.
Definition: VirtualizedClusterComputeService.cpp:65
virtual std::shared_ptr< BareMetalComputeService > startVM(const std::string &vm_name)
Start a VM.
Definition: CloudComputeService.cpp:242
static const std::string CREATE_VM_REQUEST_MESSAGE_PAYLOAD
The number of bytes in the control message sent to the service to request a VM creation.
Definition: CloudComputeServiceMessagePayload.h:28
static const std::string RESOURCE_DESCRIPTION_ANSWER_MESSAGE_PAYLOAD
The number of bytes in the control message sent by the daemon to state information on its resources.
Definition: ComputeServiceMessagePayload.h:76
static const std::string STOP_DAEMON_MESSAGE_PAYLOAD
The number of bytes in the control message sent to the daemon to terminate it.
Definition: ServiceMessagePayload.h:35
std::string hostname
The name of the host on which the daemon is running.
Definition: S4U_Daemon.h:60
static const std::string SUBMIT_STANDARD_JOB_ANSWER_MESSAGE_PAYLOAD
The number of bytes in the control message sent by the daemon to acknowledge a standard job submissio...
Definition: ComputeServiceMessagePayload.h:29
A class that provides basic simulation methods. Once the simulation object has been explicitly or imp...
Definition: Simulation.h:48
static const std::string SUBMIT_PILOT_JOB_REQUEST_MESSAGE_PAYLOAD
The number of bytes in the control message sent to the daemon to submit a pilot job.
Definition: ComputeServiceMessagePayload.h:54
int main() override
Main method of the daemon.
Definition: VirtualizedClusterComputeService.cpp:139