From the course: Azure Service Fabric for Developers

Service Fabric development environment verification - Azure Tutorial

From the course: Azure Service Fabric for Developers

Start my 1-month free trial

Service Fabric development environment verification

- Let's verify our development environment. We're going to start with Docker, one easy way to verify the Docker from Windows is correctly installed and configured is to try to pull and run a container, so let's open the terminal and type Docker run hello world which is the equivalent of a hello world application in the Docker space, if you get a response then the engine is running and everything is configured correctly. Concerning Service Fabric there are two options that we can choose from to check if the development environment is ready. The first one is to open the Service Fabric Explorer which is running in port 1908O by default. Service Fabric Explorer is an administration tool that allows you to inspect a cluster its nodes and applications. You can open Service Project Explorer by right-clicking on the Service Fabric icon and select the option start local cluster, this action will start the local cluster in your machine and after a period of time you will get this message that the local cluster is running and now we're ready to select this manage local cluster option in the Service Fabric Explorer you can take a quick look at how your cluster is configured, in this local environment the cluster is configured to use five nodes and of course these are just virtual nodes because the truth is these are only processes running in my machine, great. So, if we see these nodes section in a green color then the Service Fabric runtime is configured correctly. The second option is to create a Service Fabric application in Visual Studio, so let's open Visual Studio and select the option create a new project, let's click on that file new project and here we're going to search for Fabric and we can find this Service Fabric application template I'm going to click on this next button and the name in this moment it doesn't matter, so I'll accept this and I'm going to build these stateless service and I'm going to click on the create button as well. After the solution is created you just can right-click on it and select the rebuild solution option so we can be sure that it's compiling, which it does and then we can just click on this Start button, as you can see this task requires elevated permission so I'm going to restart Visual Studio as an administrator this is because the debugger will communicate to the local processes so that's why it requires the elevated permissions. Well I restarted Visual Studio and I will click on this Start button again. Now we can see that the application is deployed and we can go back to Service Fabric Explorer and here we can verify that we have this application with one service, if you can see these application and service deployed in a green color then Service Fabric is correctly configured into your machine. Now let's test the cluster functionality, I'm going to expand this application three type you can make this faster by sliding this option to the fast value, so we can see things refreshing more rapidly, I can see that this service is running on node number one so let's expand nodes and then I'm going to restart these node, this is because I want to verify that Service Fabric is behaving correctly and now that the node number one was restarted, we can see that the service was deployed to node number two. I didn't have to do anything special about it, that's just Service Fabric nature. So it looks that my development environment is configured correctly and let's go back to the cluster section and let me show you one additional thing you can configure to your localed environment to use a single node. If you go to this switch cluster mode section and select one node, this is an excellent option for testing purposes with less memory footprint, but in this case I'll leave the default configuration.

Contents