Projects



Changes between Version 19 and Version 20 of CloudNativeRenew


Ignore:
Timestamp:
Mar 28, 2021, 5:46:59 PM (4 years ago)
Author:
roewekamp
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CloudNativeRenew

    v19 v20  
    1212
    1313== Features ==
    14 Cloud Native Renew offers the following features.
    15 It is assumed, that the system is up and running, to do so on your own, follow the [#install installation instructions] further down the page.
     14Cloud Native Renew offers the following features.\\
     15It is assumed, that the system is up and running, to do so on your own, [#download download] Cloud Native Renew and follow the [#install installation instructions] further down the page.
     16
     17For all examples it is assumed, that the service is running on localhost on port 8085. If you set it up otherwise than suggested in the [#install installation instructions], please use the corresponding URL you've set up instead.\\
     18It is also assumed, that you have a web browser and the command line tool `curl` installed.
     19
     20For a quick overview over the available (non-health related) endpoints navigate to `http://localhost:8085/swagger-ui.html`.
     21
     22
     23=== Examine Logs from the simulator via Web ===
     24To access all system log data from when the cloud native plugin was loaded onwards, open up the URL:\\
     25`http://localhost:8085/logs`
     26
     27=== Upload nets and start a simulation === #upload
     28It is possible to use the Cloud Native Renew Plugin to upload net definitions to an HTTP endpoint.
     29Renew uses so called shadow net systems to simulate reference nets.
     30A shadow net system contains just the bare minimum to run a (non-visual) headless simulation.
     31To create a shadow net from a regular Renew .rnw net definition file, you can use Renew user interface.
     32To just try functionality you can also just use the supplied `example.sns` file.\\
     33To upload a shadow net system and start a simulation follow these steps:\\
     34* Create a shadow net system by doing either of these steps:
     35 * You either can use the supplied `example.sns` file or
     36 * You can also create a shadow net system yourself: Open up a Renew instance (or use the one spawned by the startup earlier), draw a reference net (or multiple), save all of your nets with a specific name each (File -> Save Drawing As...), and hit File -> Export -> Export all drawings (merged file) -> !ShadowNetSystem
     37   Close the net drawing(s), but not Renew itself.
     38* Assume the shadow net system file is namend `example.sns`: Upload the net using:\\ `curl -F 'snsZipFile=@example.sns' localhost:8085/upload/sns?fileName=example.sns`
     39* After uploading you can start a simulation. Assume you named the main net within `example.sns` also `example`.
     40 * Use this command: `curl -X POST 'localhost:8085/simulation/start?mainNet=example&sns=example.sns'` \\
     41   Note, that shadow net systems do not hold graphical information, therefore you will not be able to see the simulation within the spawned Renew instance, but you should be able to observe the console output generated by the running simulation.
     42   Within the intended deployment, that was shown in the figure above, Renew instances are headless anyways and do not have any graphical output.
     43
     44=== Control a running simulation ===
     45It is possible to control a running simulation over HTTP.
     46To do you, you need to set up a simulation first.
     47The most simple way to do so is to draw (or load) a net, like the supplied `example.rnw` file and start a simulation from within the Renew GUI: `Simulation -> Start Simulation`\\
     48You can alternatively use the method described [#upload above] to upload a shadow net system and start a simulation with it remotely.
     49As noted earlier, this method will not show graphical feedback, while starting through Renew directly does.
     50
     51* The simulation can now be controlled by using the following command:\\
     52`curl -X POST 'localhost:8085/simulation/control?command=step'`\\
     53You can use these keywords instead of `step`:
     54 * `run` (To run simulations, that have been paused or only initialized)
     55 * `step` (To execute a single step in the simulation)
     56 * `stop` or `halt` (To suspend the simulation but do not terminate it)
     57 * `term` (To terminate a simulation irreversibly. Subsequent control commands will have no effects until a new simulation is started.)
     58
    1659
    1760=== Extending the simulator on the fly ===
    1861
    19 == Download ==
     62== Download == #download
    2063
    2164The latest version of the cloud native Renew plugin (shown in bold font in the figure) can be downloaded here.
     
    3679* Open a web browser and navigate to `http://localhost:8085/swagger-ui.html` to see an API documentation of the service endpoints with their required parameters. Note, that this overview does not cover the /health endpoints, that indicate state of the application and its parts.
    3780
    38 * You can for example upload an existing shadown net system .sns.
    39  * You either can use the supplied `example.sns` file or
    40  * You can also create a shadow net system yourself: Open up a Renew instance (or use the one spawned by the startup earlier), draw a reference net, save it with a specific name (File -> Save Drawing As...), and hit File -> Export -> Export all drawings (merged file) -> !ShadowNetSystem
    41  * If you created the net within the here supplied Renew instance with the cloud native plugin, close the net drawing, but not Renew itself.
    42  * Assume the shadow net system file is namend `example.sns`: Upload the net using: `curl -F 'snsZipFile=@example.sns' localhost:8085/upload/sns?fileName=example.sns`
    43 * After uploading you can start a simulation. Assume you named the net within `example.sns` also `example`.
    44  * Use this command: `curl -X POST 'localhost:8085/simulation/start?mainNet=example&sns=example.sns'`
    45  * The simulation can now be controlled by the endpoint: `curl -X POST 'localhost:8085/simulation/control?command=step'` Use the keywords:
    46   * `run` (To run simulations, that have been paused or only initialized)
    47   * `step` (To execute a single step in the simulation)
    48   * `stop` or `halt` (To suspend the simulation but do not terminate it)
    49   * `term` (To terminate a simulation irreversibly. Subsequent control commands will have no effects until a new simulation is started.)
     81
     82