# Railway Cloud: Management and Orchestration Functionality Designed as Microservices
## 4 Railway Cloud Orchestration Use Cases  
A railway operator may have multiple edge railway clouds to face the requirements of real-time functionality, and in this case, the railway clouds' deployment must be performed by the RMAO platform. Railway cloud instantiation and deployment are triggered by the RMAO platform and include pre-deployment processing, platform software installation, registration, and activation. Railway cloud pre-deployment processing is required to configure the RMAO platform to add a railway cloud into its catalogue prior to the activation and registration of the railway cloud. The process is initiated by the cloud manager, and the RMAO platform generates a unique identification of the new cloud instance and creates a catalogue with the railway cloud ID. Then, the new railway cloud nodes are installed, and connectivity is setup by the personnel; afterwards, the RMAO is notified and provided with information to connect to the built railway cloud, including the target node and identity of the basic software to be loaded onto the railway cloud. The RMAO uploads the railway cloud's  
Figure 2: Basic railway cloud’s orchestration use cases. basic software on the first railway cloud node, which in turn raises the railway cloud to additional railway cloud nodes. The CRM services in the RCP load the railway cloud's basic software onto other nodes, activate CFM services, and create the software catalogue. Figure 3 shows the high-level interaction between the RMAO platform and the RCP during the pre-processing of the railway cloud and installation of the platform software. The registration and initialisation of the railway cloud include the update of the CRM services' software catalogue, if required, configuration of the railway cloud, discovery of new CFM services and their capabilities, and registration of them in the railway cloud catalogue. The update of the railway cloud catalogue is related to the renovation of information about the railway cloud type and its capabilities, e.g., resource configuration, capacity, allocations, applications, and availability. It is triggered upon an initial railway cloud deployment or later when changes are required. The scaling of the hardware infrastructure of the railway cloud is related to resource scale-up or -down and it is triggered, e.g., when a decision is made to install and register a new railway cloud node. In this case, the railway cloud catalogue update procedure is used. The railway cloud platform's software update must ensure service continuity. As a precondition, the cloudified railway functions, deployed on the affected edge railway clouds, need to be migrated to other railway clouds. Within the update process, CRM services download and validate the software, perform a pre-check procedure to determine whether the software is acceptable or not, update the software's images, perform a restart, if required, and update the software catalogue. In case of software update failure, a roll-back procedure to the working software version takes place. The update of CRM and CFM services' software includes software download, pre-checking, modification, and testing. To provide more details on upgrading or downgrading the software of the CFM services, this use case is elaborated as follows and illustrated in Figure 4.  
The CFM services' software update process is triggered by the railway cloud manager, who requests the RMAO platform to update the software version within a railway cloud. To synchronise CFM services' software, the RMAO platform queries the CRM services in the RCP for its current software catalogue, and if the software catalogue is not the required one, the RMAO platform provides information about the software version. If the CRM services obtain the requested software version, then the RMAO platform is notified that the  
Figure 3: High-level flow of railway cloud platform pre-processing and installation. software version is available; otherwise, the RMAO platform is notified that the software update is unsuccessful.