# Railway Cloud: Management and Orchestration Functionality Designed as Microservices
## 5 Microservices for Railway Cloud Orchestration
### Verification of Microservices  
The orchestration application logic must maintain the state of the software update process. It triggers the transitions in the model by applying the supported HTTP methods on the resources related to the software update service. On the other hand, the respective CRM microservice in the RCP also needs to have a view of the software update process, which must be synchronised with the view of the orchestration application. To illustrate the practicability of the proposed microservices-based approach to the design of railway cloud orchestration services, models representing the state of the CFM services' software process are developed. The models reflect the views on the process state of the orchestration application and of the respective CRM microservice. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Resource Name** & **Resource URI** & **HTTP Method** & **Meaning** \\ \hline CFM service packages &.../CFMservicePackages & GET & Retrieves information about the list of available CFM service packages. \\ A specific CFM &.../CFMservicePackages/ & GET & Retrieves information about specific CFM service packages. \\ service package & \{CFMservicePackagelD\} & & Retrieves the list of software versions of the CFM service package. \\ All software versions of the specific CFM & \{CFMservicePackagelD\}/ & & Retrieves the list of software versions of the CFM service package. \\ service package & SWversions & POST & Creates a new software version of the CFM service package. \\  &.../CFMservicePackages/ & GET & Retrieves information about specific software versions of the CFM service package. \\ An individual software version & \{CFMservicePackagelD\}/ & & software versions of the CFM service package. \\  & SWversions/\{SWVersionID\} & PUT & Updates information about the software version. \\  & DELETE & Deletes the software version. \\  &.../CFMservicePackages/ & & Retrieves the list of all CFM services in the software version. \\ All CFM services in the & \{CFMservicePackagelD\}/ & & Retrieves information about specific CFM services. \\ software version & SWversions/\{SWversionID\}/ & & Deletes the CFM service. \\  & CFMservices & & Deletes the CFM service. \\ \hline \hline \end{tabular}
\end{table} 
Table 3: CFM services’ software update: resources and methods summary. Figure 6 shows the CFM services' software update model supported by the orchestration application. The CFMswUpdateStart state is the initial state of the CFM software update process. A request to update triggers the CFM software image binaries' synchronisation. In the CFMswImagesQuery state, the application queries the software catalogue. In the CFMswImageSynchronisation state, the requested software version images are not in the catalogue, and information about the software version is sent to the CRM microservice. In the CFMswPrecheck state, a pre-check procedure of the software version is performed. In the CFMsoftwareUpdate state, the new CFM services' software version is updated. In the CFMswUpdateCompleted state, the update process has been completed successfully. Any failures in the update process result in transition to the CFMswUpdateFailed state. Figure 7 shows the CFM services' software update model supported by the inebreak CRM microservice. Figure 5: Associated data and elements of the resources representing CFM service software. Figure 6: CFM services’ software update model is supported by the orchestration application. The SWupdateStart state is the initial state of the CFM services' software update from the CRM service point of view. The update process moves to the ObtainingSWversion state if software binaries synchronisation is needed, and in this state, the CRM microservice obtains the software version information. In the PrecheckingSWversion state, a preliminary internal check of the new CFM software version is performed. Pre-checking includes validation of the software version images in the SWversionValidation state.