Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Mastering Windows Server 2022 - Fourth Edition

You're reading from  Mastering Windows Server 2022 - Fourth Edition

Product type Book
Published in May 2023
Publisher Packt
ISBN-13 9781837634507
Pages 720 pages
Edition 4th Edition
Languages
Author (1):
Jordan Krause Jordan Krause
Profile icon Jordan Krause

Table of Contents (20) Chapters

Preface 1. Getting Started with Windows Server 2022 2. Installing and Managing Windows Server 2022 3. Active Directory 4. DNS and DHCP 5. Group Policy 6. Certificates 7. Networking with Windows Server 2022 8. Remote Access 9. Hardening and Security 10. Server Core 11. PowerShell 12. Redundancy in Windows Server 2022 13. Containers 14. Hyper-V 15. Remote Desktop Services 16. Troubleshooting 17. Other Books You May Enjoy
18. Index
Appendix: Answers to the End-of-Chapter Questions

Containers

Many of the new technologies included in Windows Server 2022 are designed to reflect the capabilities provided by cloud computing, bringing your private and hybrid clouds to life and granting you the ability to produce the same solutions given to you by public cloud providers within your physical infrastructure. The last few iterations of the Server operating system have also revolved around virtualization, and the idea of application containers is something that taps into both of these mindsets. Application containers will make the deployment of applications more streamlined, more secure, and more efficient. Containers are a relatively new idea in the Microsoft world, and outside of conversations about DevOps, I haven’t heard many IT admins talking about them. This is something that has been enhancing Linux computing for a while now, and this newest Windows Server operating system brings it a little bit closer to home for us Microsoft-centric shops.

Application...

Understanding application containers

What does it mean to contain an application? We have a pretty good concept these days of containing servers through virtualization. Taking physical hardware, turning it into a Hyper-V virtualization host, and then running many virtual machines (VMs) on top of it is a form of containment for those VMs. We are essentially tricking them into believing that they are their own entity, completely unaware that they are sharing resources and hardware with other VMs running on that host. Although we share hardware resources, we can provide strong layers of isolation between VMs, because we need to make sure that access and permissions cannot bleed across VMs – particularly in a cloud provider scenario, as that would spell disaster.

Application containers are the same idea, at a different level. While VMs are all about virtualizing hardware, containers are more like virtualizing an operating system. Rather than creating VMs to host our applications...

Container base images

This topic brings us full circle to our discussion about Server Core and Nano Server. If you have worked with Windows Server for many years, you have probably wondered why Microsoft introduced a new installation option called Nano Server, only to remove it during the next LTSC release. This change happened right around the same time that Microsoft started diving into using Windows Servers as container host servers, and this information directly relates to the question, “What happened to Nano Server?”

Nano Server is now only useful for containers. In fact, you cannot install a Nano Server instance outside of a container. This is its purpose. You do not have to use Nano inside your containers, but it’s one of the options.

Containers are sort of like VMs but at a different level. With VMs you share hardware among multiple full instances of the Windows operating system. Each VM maintains a completely separated kernel from one another...

Windows Server containers versus Hyper-V containers

When spinning up your containers, it is important to know that there are two categories of containers that you can run in Windows Server 2022. I know this is all a bit confusing, since we just talked about how there are three (or four, depending on how you view SAC) different container base image types. Those are all about what OS runs within the container itself. Here we are talking about what different types of containers there are, which is moreso from the perspective of the container host operating system, and what functionality your containers as a whole will have. All aspects of application containers that we have been talking about so far apply to either Windows Server containers or Hyper-V containers. Hyper-V containers can run the same code or images as Windows Server containers, while keeping stronger isolation guarantees to make sure the important stuff stays separated. The decision on whether to use Windows Server containers...

Docker and Kubernetes

Docker started as an open source project – a toolset, really – that was originally designed to assist with the running of containers on Linux operating systems. Wait a minute, what? The words Linux and open source have been written once again inside a Microsoft book! What is this world coming to? You see, containers are quickly becoming a big deal, and rightfully so. In Server 2016, Microsoft took some steps to start reinventing the container wheel, with the inclusion of PowerShell cmdlets that could be used to spin up and control containers running on your Windows Server, but the Docker platform has grown at such a fast rate that Microsoft now expects that anyone who wants to run containers on their Windows machines is probably going to do so via the Docker toolset. If you want to utilize or even test containers in your environment, you’ll need to get Docker for Windows to get started.

Docker is a container platform. This means that...

Working with containers

There are a lot of moving pieces that work together to make containers a reality in your environment, but it’s not too difficult to get started. Let’s walk through the initial setup of turning Windows Server 2022 into a container-running mega-machine.

Installing the role and feature

The amount of work that you need to accomplish here depends on whether you want to run Windows Server containers, Hyper-V containers, or both. The primary feature that you need to make sure that you install is Containers, which can be installed by using either the Add roles and features link from inside Server Manager, or by issuing the following PowerShell command:

Add-WindowsFeature Containers
Text  Description automatically generated

Figure 13.5: Installing the Containers feature

Additionally, if you intend to run Hyper-V containers, you need to ensure that the underlying Hyper-V components are also installed on your container host server. To do that, install the Hyper-V role and...

Where is Azure in all this?

This book is focused primarily on functionality provided natively inside the Windows Server operating system, most often utilized on-premise. Our chapter on containers has obviously followed suit. Containers are part of a cloud-first mentality, and there is certainly much to learn on the topic of utilizing Windows containers inside Azure, rather than on classic servers. While this is not our core focus, here is some information regarding ways that containers intersect with Azure.

Azure Container Registry

Earlier in this chapter, we took a look at Docker Hub and pulled some container images from the Microsoft Container Registry. Both of these systems are live and ready to use, but they may be too public-facing for your enterprise’s taste. A third option that may be more appropriate when working with containers hosted in Azure is another container registry, useful for the private storage of container images, Azure Container Registry.

Azure...

Summary

Containers are revolutionizing the way that we build and host modern applications. By containerizing apps, we can run many more applications on each physical server, because they are capable of being fully isolated from each other. Additionally, the container mentality allows the development of applications to happen in a much more fluid fashion. App developers can build their applications inside containers running on their own laptops and, once finished, simply hand them over to the infrastructure team to slide that container image onto a production container host server. That host server could be on-premises, or even in the cloud. Orchestration tools such as Kubernetes can then be leveraged to scale that application, increasing or decreasing resource capacity and the number of necessary containers based on load or other factors. The usability of containers in the real world has been expanded greatly by the Docker project. The folks at Docker are clearly the frontrunners...

Questions

  1. There are three base operating systems that can be used for a Windows Server 2022 container. What are they?
  2. Compared to a Windows Server container, what type of container provides even greater levels of isolation?
  3. True or false—in Windows Server 2016, you can run both Windows and Linux containers on the same Windows Server host platform.
  4. What is the Docker command to see a list of container images on your local system?
  5. What is currently the most popular container orchestration software that integrates with Windows Server 2022?
  6. True or false—developers can install Docker onto their Windows 10 workstations to start building applications inside containers.
  7. What is a common reason that a developer may need to utilize Server Core containers, rather than Nano Server?

Join our community on Discord

Join our community’s Discord space for discussions with the author and other readers:

https://packt...

lock icon The rest of the chapter is locked
You have been reading a chapter from
Mastering Windows Server 2022 - Fourth Edition
Published in: May 2023 Publisher: Packt ISBN-13: 9781837634507
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.
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}