0% found this document useful (0 votes)
148 views

Lab 6 Server 2016

The DevOps team at Adatum Corporation wants to evaluate Windows Server containers and look at IIS in a container. The document provides instructions on installing Docker Enterprise Edition on Windows Server 2016, downloading the Microsoft IIS container image, deploying an IIS container, and managing the container.

Uploaded by

lucas
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
148 views

Lab 6 Server 2016

The DevOps team at Adatum Corporation wants to evaluate Windows Server containers and look at IIS in a container. The document provides instructions on installing Docker Enterprise Edition on Windows Server 2016, downloading the Microsoft IIS container image, deploying an IIS container, and managing the container.

Uploaded by

lucas
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 4

[20740C] Module 06: Deploying and Managing Windows and Hyper-V Containers

1. Lab: Installing and configuring containers


Scenario:

The DevOps team at Adatum Corporation wants to explore containers to see if the
technology can help reduce deployment times for new applications and to simplify
moving applications to the cloud. The team has decided to evaluate Windows Server
containers and to look at IIS in a container.

Next Exercise

2. Lab: Installing and configuring containers


Lab Setup

For this lab, you will use the 20740C-LON-HOST1 host computer. You must have
completed the Lab from Module 5, and Lab A, Exercise 4, before starting this lab.
Also, you must complete the following steps:

Restart the classroom computer, and then in Windows Boot Manager, select 20740C-
LON-HOST1.

Sign in to LON-HOST1 with the following credentials:


User name: Adatum\Administrator
Password: Pa55w.rd

On LON-HOST1, open Server Manager.

Click Local Server, and then click the link next to vEthernet (Host Internal
Network).

On the Network Connection page, double-click vEthernet (Host Internal Network).

Click Properties, and then double-click Internet Protocol Version 4 (TCP/IPv4).

Click Use the following IP address, and then enter the following information:
IP address: 172.16.0.160
Subnet mask: 255.255.0.0
Default gateway: 172.16.0.1
Preferred DNS server: 172.16.0.10

Click OK, however, if a Microsoft TCP/IP dialog box displays notifying you about
another disabled adapter with the same IP address, click No to remove the static IP
configuration, and then click OK and click Close.

Open Microsoft Hyper-V Manager.

Click Virtual Switch Manager, and then click Physical Network.

Under Connection type, clear the Allow management operating system to share this
network adapter check box, and then click OK.

In the Apply Networking Changes dialog box, click Yes.

Right-click the 20740C-LONSVR1-B and select �Settings�. Select its �Memory� tab on
the left side of the dialog and in the �RAM:� field change the value from 4096 to
2048. Make the identical change to 20740C-LON-NVHOST2Start the 20740C-LON-DC1-B and
20740C-NAT VMs, and then start 20740C-LON-SVR1-B.
Connect to 20740C-NAT, and then sign in using the following credentials:
User name: Administrator
Password: Pa55w.rd

Connect to LON-NVHOST2 and LON-SVR1-B, and then sign in with the following
credentials:
User name: Adatum\Administrator
Password: Pa55w.rd

On LON-SVR1-B, open Internet Explorer and in the URL bar type www.bing.com and
verify that the server can connect to the internet. The server is configured with a
network adapter that is connected to the physical network adapter on the host
machine, and is configured to use Dynamic Host Configuration Protocol (DHCP) to
obtain an IP address on that network. If the virtual machine does not have internet
access, ask your instructor for guidance on how to configure the external network
to enable internet access.
The virtual machines used in this lab may need to be rearmed to prevent them from
shutting down in an hour. To rearm the virtual machines, sign in to the virtual
machines using credentials provided above. Open a Command Prompt or Windows
PowerShell window, and type Slmgr -rearm. Click OK, and then restart the computer.
After the virtual machine restarts, sign in again using the using the credentials
provided above.

Previous ExerciseNext Exercise

3. Exercise 1: Installing Docker Enterprise Edition for Windows Server 2016


Task 1: Install Docker Enterprise Edition for Windows Server 2016

On LON-SVR1-B, click Start, and then click Windows PowerShell.


Note: Run the following command before installing Docker(step 2), to avoid issues
in downloading and installing package.

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

At the Windows PowerShell command prompt, type the following command to install
Docker, and then press Enter:
Install-Module DockerProvider -Force
Note: If the command in Step 2 or Step 4 displays an error, wait for several
minutes and then rerun the command.

At the notification " Do you want PowerShellGet to install and import the NuGet
provider now?" type Y, and then press Enter.

At the Windows PowerShell command prompt, type the following command, and then
press Enter:
Install-Package Docker -ProviderName DockerProvider -Force

At the notification " Are you sure you want to install software from DockerDefault"
type Y, and then press Enter:

Type the following command to restart the computer, and then press Enter:
Restart-Computer -Force
Previous ExerciseNext Exercise
4. Exercise 1: Installing Docker Enterprise Edition for Windows Server 2016
Task 2: Download an image

After the VM restarts, sign in to LON-SVR1-B as Adatum\Administrator with the


password Pa55w.rd.

On LON-SVR1-B, click Start, and then click Windows PowerShell.

At the Windows PowerShell command prompt, type the following command to search the
Docker Hub for Windows container images, and then press Enter:
docker search microsoft

To download the IIS image, type the following command, and then press Enter:
docker pull microsoft/iis:windowsservercore
Note: If the command in Step 3 or Step 4 displays an error, wait for several
minutes and then rerun the command.

Note: During this step, you are downloading and extracting several gigabytes of
data. Depending on your internet connection, this might take 60-90 minutes. Because
of this, you will be performing the rest of the lab on 20740C-NVHOST2, which
already has Docker Enterprise Edition installed and the
microsoft/iis:windowsservercore images downloaded.

Previous ExerciseNext Exercise

5. Exercise 2: Installing and configuring an IIS container


Task 1: Deploy a new container

If you haven't already done so, sign in to LON-NVHOST2 as Adatum\Administrator with


a password of Pa55w.rd.

At the Windows PowerShell command prompt, type the following command to display the
downloaded container image(s), and then press Enter:
docker images
Note: Note the image REPOSITORY of microsoft/iis with a TAG of windowsservercore.
You will use this to run the container.

At the Windows PowerShell command prompt, type the following command to deploy the
IIS container, and then press Enter:
docker run -d -p 80:80 microsoft/iis:windowsservercore cmd
Note: This command runs the IIS image as a background service (-d) and configures
networking such that port 80 of the container host maps to port 80 of the
container.

Type the following command to retrieve the IP address information of the container
host, and then press Enter:
ipconfig
Note: Note the IPv4 address of the Ethernet adapter named vEthernet (HNS Internal
NIC). This is the address of the new container. Make a note of the IPv4 address of
the Ethernet adapter named Ethernet. This is the IP address of the container host.
On LON-HOST1, open Microsoft Internet Explorer.

In the address bar, type the following command, and then press Enter:
http://<ContainerhostIP>
Note: Replace <ContainerhostIP> with the IP address of the container host, which is
the IP address of LON-NVHOST2.

Observe the default IIS page.


Previous ExerciseNext Exercise

6. Exercise 2: Installing and configuring an IIS container


Task 2: Manage the container

On LON-NVHOST2, in the Windows PowerShell command prompt window, type the following
command to view the running containers, and then press Enter:
docker ps

Make a note of the container ID.

Type the following command to stop the container, and then press Enter:
docker stop <ContainerID>
Note: Replace <ContainerID> with the container ID.

On LON-HOST1, open Internet Explorer.

In the Internet Explorer Address Bar, type the following command, and then press
Enter:
http://<ContainerhostIP>

Notice that the default IIS page is no longer accessible. This is because the
container is not running.

On LON-NVHOST2, in the Windows PowerShell command prompt window, type the following
command to delete the container, and then press Enter:
docker rm <ContainerID>
Note: Replace <ContainerID> with the container ID.

Previous Exercise

You might also like