Reader small image

You're reading from  Microservices with Spring Boot 3 and Spring Cloud, Third Edition - Third Edition

Product typeBook
Published inAug 2023
Reading LevelIntermediate
PublisherPackt
ISBN-139781805128694
Edition3rd Edition
Languages
Right arrow
Author (1)
Magnus Larsson
Magnus Larsson
author image
Magnus Larsson

Magnus Larsson, an IT industry veteran since 1986, has consulted for major Swedish firms like Volvo, Ericsson, and AstraZeneca. Despite past struggles with distributed systems, today's open-source tools like Spring Cloud, Kubernetes, and Istio offer effective solutions. For the past eight years, Magnus has been helping customers use these tools and shared insights through presentations and blog posts.
Read more about Magnus Larsson

Right arrow

Installation Instructions for Microsoft Windows with WSL 2 and Ubuntu

In this chapter, we will learn how to set up the tools required to run the commands described in this book on Microsoft Windows. We will also learn how to get access to the source code of the book.

The following topics will be covered in this chapter:

  • Technical requirements
  • Installing tools
  • Accessing the source code

If you are using a Mac, you should follow the instructions in Chapter 21, Installation Instructions for macOS.

Technical requirements

All of the commands described in this book are run on a MacBook Pro using bash as the command shell. In this chapter, we will learn how to set up a development environment in Microsoft Windows in which the commands in this book can be run without requiring any changes. In a few cases, the commands have to be modified to run in the Windows environment. This is clearly pointed out in each chapter and the alternative command to be used in the Windows environment is also specified.

The development environment is based on Windows Subsystem for Linux v2, or WSL 2 for short, which requires Windows 10, version 2004 (build 19041) or later. We will use WSL 2 to run a Linux server based on Ubuntu 22.04, where we will run all the commands using bash as the command shell.

Microsoft provides integration between Windows and Linux servers that run in WSL 2. Linux files can be accessed from Windows, and vice versa. We will learn how to access files in the Linux server...

Installing tools

In this section, we will learn how to install and configure the tools. Here is a list of the tools we will install, with a link to more information on downloading and installation, if required.

On Windows, we will install the following tools:

On the Linux server, we will install the following tools:

Accessing the source code

The source code for this book can be found in the GitHub repository at https://github.com/PacktPublishing/Microservices-with-Spring-Boot-and-Spring-Cloud-Third-Edition.

To be able to run the commands in the Linux server in WSL 2 that are described in this book, download the source code to a folder and set up an environment variable, $BOOK_HOME, that points to that folder. Sample commands are as follows:

export BOOK_HOME=~/Microservices-with-Spring-Boot-and-Spring-Cloud-Third-Edition
git clone https://github.com/PacktPublishing/Microservices-with-Spring-Boot-and-Spring-Cloud-Third-Edition.git $BOOK_HOME

To verify access to source code downloaded to the Linux server in WSL 2 from Visual Studio Code, run the following commands:

cd $BOOK_HOME
code .

Visual Studio Code will open a window from where you can start to inspect the source code. You can also start a Terminal window for running bash commands in the Linux server from the menu selection...

Summary

In this chapter, we have learned how to install, configure, and verify the tools required to run the commands described in this book on WSL 2 and Windows. For development, we will use git, docker, java, and spring. To create a Kubernetes environment to deploy our microservice in runtime, we will use minikube, Helm, kubectl, and istioctl. Finally, to run tests to verify that the microservices work as expected in runtime, we will use curl, jq, and siege.

We have also learned how to access the source code from GitHub and how the source code is structured.

In the next and final chapter, we will learn how to natively compile microservices, reducing their startup time to sub-seconds.

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Microservices with Spring Boot 3 and Spring Cloud, Third Edition - Third Edition
Published in: Aug 2023Publisher: PacktISBN-13: 9781805128694
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime

Author (1)

author image
Magnus Larsson

Magnus Larsson, an IT industry veteran since 1986, has consulted for major Swedish firms like Volvo, Ericsson, and AstraZeneca. Despite past struggles with distributed systems, today's open-source tools like Spring Cloud, Kubernetes, and Istio offer effective solutions. For the past eight years, Magnus has been helping customers use these tools and shared insights through presentations and blog posts.
Read more about Magnus Larsson