--- tags: [ "eclipse" , "che" ] title: Multi-Machine Workspaces in Che excerpt: "" layout: tutorials permalink: /:categories/multi-machine/ --- {% include base.html %} A multi-machine recipe allows multiple runtimes to communicate/share data. In this tutorial we will be looking at an existing Java and MySQL application called Pet Clinic. The tutorial will help show how to create a multi-machine from an existing [runtime stack](doc:stacks) called "Java-MySQL", execute commands on different target runtimes, startup the Pet Clinic Tomcat server, view/interact with the Pet Clinic web page, and take a closer look at the "Java-MySQL" [runtime stack](doc:stacks) /[runtime recipe](doc:recipes) to get a better understanding of how multi-machine runtimes are created. # 1. Start Che Use your SaaS account for the following, or if you have [installed Che](https://eclipse-che.readme.io/docs/che-getting-started), open a terminal and use the Che startup script: ```shell # Launch Che che start\ ``` When you execute this command, you'll see the URL for the Che server. This URL can be used to open Che server's dashboard. It is where you manage your projects and workspaces. # 2. Create Workspace Click the "Dasboard" menu item in the dashboard. Click the "New Workspace" button if there are existing workspaces or make sure "Select Source" category is set to "New from blank, template, or sample project" if one or more workspace exists. ![che-multimachine-tutorial3.jpg]({{ base }}/assets/imgs/che-multimachine-tutorial3.jpg) Select "Java-MySQL" from the list of available stacks. ![che-multimachine-tutorial1.jpg]({{ base }}/assets/imgs/che-multimachine-tutorial1.jpg) The other workspace information can remain as it is. Click the "create" button at the bottom to create the workspace. ![che-multimachine-tutorial2.jpg]({{ base }}/assets/imgs/che-multimachine-tutorial2.jpg) # 3. Using IDE Once the workspace is created, the IDE will be loaded in the browser. Each runtime can be identified in the processes section of the IDE. It will list the runtimes of "dev-machine" and "db" of our multi-machine workspace. The "db" runtime for this tutorial provides the database for the Java Spring application to use. To make sure that the database is running we will issue the "show database" command to the "db" runtime. Select the "db" runtime item from the target drop down menu. Then make sure that "show databases" is selected in the command drop down menu and hit the play button. ![che-multimachine-tutorial4.jpg]({{ base }}/assets/imgs/che-multimachine-tutorial4.jpg) This will run the "show databases" command in the "db" runtime and display the available database. Note that it is not required to know the database listed for this tutorial. This step merely shows how to successfully target different runtimes. Switch the target back to "dev-machine", select the "web-java-petclinic: build and deploy" command, and click the play button. The Pet Clinic Java code will be compiled and the tomcat server started. Give the server ample amount of time to start as the server output may stay on `INFO Version - HCANN000001: Hibernate Commons Annotations {4.0.5.Final}` for awhile. The tomcat server when it is ready will output `Server startup in