Run the SimpleApp class as we did before.Īs a result, our application now starts in 10.3 seconds! That's a bit better than on our Surface Go, but clearly the default Virtual Machine isn't the best option for us.Use the command palette to do a Git clone of our sample application. Use the extension management tab to install the "Java Extension Pack" from Microsoft again, but this time on the remote SSH host.Once you are connected to the Azure virtual machine : ssh/config file in your home folder, with a setup similar to this one : As we will use this SSH connection quite often, I recommend that you create a. Let's go back to VS Code and connect to it. Once you are logged in, run my installation script as root : sh -c "$(curl -fsSL )"Ĭongratulations, your Azure machine is ready!.Login to your new Azure virtual machine using SSH : ssh (please note you can find your machine's IP address on its "overview" page on the Azure portal), and become root : sudo su.I personally have my own setup script, which you can of course reuse : Once the machine is created, let's configure it with our usual working environment. Keep all the other options by default, and create the machine.Add your public key on the first screen, and in the networking screen, don't forget to open the SSH port in the Select inbound ports drop-down list.Choose the default machine type, D2Sv3 at the time of this writing.Let's create the virtual machine on Azure : This will allow us to work on a SSH machine, that will be provided by Azure. Open up again Visual Studio Code Insiders, and install the "Remote Development" extension from Microsoft. We are now gaining the Maven start-up time, but the application still starts in 13.5 seconds. And you can also debug the application with one click! It's much easier than running Maven, but also much faster. Let's open the application using Visual Studio Code Insiders, and install of course the "Java Extension Pack" from Microsoft.Īs Spring Boot applications are also normal "Main" Java classes, it is possible to simply run the application by running its main method, in the SimpleApp class. So, first interesting lesson from a cost perspective : buying a $500 Surface Go is a very good deal here, as it costs a quarter of the price of the Surface Book, and is also quarter of the weight in your backpack! I've installed the same setup on this machine : starting the Spring Boot application takes now 12 seconds, instead of 13.5 seconds! What we are doing is a bit dependant on the CPU, but most of our problems are probably I/O related, and both hardware have the same memory and probably a similar SSD. Thankfully, for work I have a mid-range (core i5) Surface Book, so it should be better with that hardware, isn't it? mvnwįrom a performance point of view, this doesn't look very good : Clone the project : git clone Run the Maven wrapper.I created a simple project at, which you can test on your own machine easily :
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |