mountainss Cloud and Datacenter Management Blog

Microsoft SystemCenter blogsite about virtualization on-premises and Cloud


Leave a comment

Running #NanoServer in a #Container on Windows Server 2016 with #Docker in Powershell #DevOps

windows-containers

What are Containers

They are an isolated, resource controlled, and portable operating environment. 

Basically, a container is an isolated place where an application can run without affecting the rest of the system and without the system affecting the application. Containers are the next evolution in virtualization. 

If you were inside a container, it would look very much like you were inside a freshly installed physical computer or a virtual machine. And, to Docker, a Windows Server Container can be managed in the same way as any other container.

Windows Container Types

Windows Containers include two different container types, or runtimes. 

Windows Server Containers – provide application isolation through process and namespace isolation technology. A Windows Server container shares a kernel with the container host and all containers running on the host.

Hyper-V Containers – expand on the isolation provided by Windows Server Containers by running each container in a highly optimized virtual machine. In this configuration the kernel of the container host is not shared with the Hyper-V Containers. 

hyper-v-containers

Container Fundamentals

When you begin working with containers you will notice many similarities between a container and a virtual machine. A container runs an operating system, has a file system and can be accessed over a network just as if it was a physical or virtual computer system. That said, the technology and concepts behind containers are very different from that of virtual machines.

The following key concepts will be helpful as you begin creating and working with Windows Containers.  

Container Host: Physical or Virtual computer system configured with the Windows Container feature. The container host will run one or more Windows Containers.

Container Image: As modifications are made to a containers file system or registry, such as with software installation they are captured in a sandbox. In many cases you may want to capture this state such that new containers can be created that inherit these changes. That’s what an image is – once the container has stopped you can either discard that sandbox or you can convert it into a new container image. For example, let’s imagine that you have deployed a container from the Windows Server Core OS image. You then install MySQL into this container. Creating a new image from this container would act as a deployable version of the container. This image would only contain the changes made (MySQL), however would work as a layer on top of the Container OS Image.

Sandbox: Once a container has been started, all write actions such as file system modifications, registry modifications or software installations are captured in this ‘sandbox’ layer.

Container OS Image: Containers are deployed from images. The container OS image is the first layer in potentially many image layers that make up a container. This image provides the operating system environment. A Container OS Image is Immutable, it cannot be modified.

Container Repository: Each time a container image is created the container image and its dependencies are stored in a local repository. These images can be reused many times on the container host. The container images can also be stored in a public or private registry such as DockerHub so that they can be used across many different container host.

You have to install these Windows Server 2016 Rolls and Feature first before you start with Containers :

  • Hyper-V
  • Containers

system

My Windows 2016 Server Build version.

hyperv-install

Install Hyper-V

container-feature-installed

Install Containers

Here is an example on my Windows 2016 Server to get started with Windows Containers :

containers1

Install-Module -Name DockerMsftProvider -Repository PSGallery -Force

containers2

Install-Package -Name docker -ProviderName DockerMsftProvider

containers3

containers4

Restart-Computer -Force

containers5

Here we pull out of the Docker Hub the Microsoft Nanoserver Container.

containers6

Downloading the Image.

containers7

Automatically extract the image.

containers8 Docker Container Image Microsoft/nanoserver is downloaded.

run-container

Docker run -i -t microsoft/nanoserver

docker-container-session

docker ps
( you will see the container with Nanoserver is running)

container-nic

Inside the container.

powershell-nanoserver-from-docker-container

Running Powershell inside the container.

Containers for Developers

From a developer’s desktop to a testing machine to a set of production machines, a Docker image can be created that will deploy identically across any environment in seconds. This story has created a massive and growing ecosystem of applications packaged in Docker containers, with DockerHub, the public containerized-application registry that Docker maintains, currently publishing more than 180,000 applications in the public community repository.  

When you containerize an app, only the app and the components needed to run the app are combined into an “image”. Containers are then created from this image as you need them. You can also use an image as a baseline to create another image, making image creation even faster. Multiple containers can share the same image, which means containers start very quickly and use fewer resources. For example, you can use containers to spin up light-weight and portable app components – or ‘micro-services’ – for distributed apps and quickly scale each service separately. 

Because the container has everything it needs to run your application, they are very portable and can run on any machine that is running Windows Server 2016. You can create and test containers locally, then deploy that same container image to your company’s private cloud, public cloud or service provider. The natural agility of Containers supports modern app development patterns in large scale, virtualized and cloud environments.

With containers, developers can build an app in any language. These apps are completely portable and can run anywhere – laptop, desktop, server, private cloud, public cloud or service provider – without any code changes.

Containers helps developers build and ship higher-quality applications, faster.

Containers for IT Pro’s

IT Professionals can use containers to provide standardized environments for their development, QA, and production teams. They no longer have to worry about complex installation and configuration steps. By using containers, systems administrators abstract away differences in OS installations and underlying infrastructure. Containers help admins create an infrastructure that is simpler to update and maintain

microsoft-containers

Lot of Success with Containers and Nanoserver
#MVPbuzz

Advertisements


Leave a comment

#Docker containers running on #Windows10 for #DevOps #Azure

docker-site-1

Docker for Windows

An integrated, easy-to-deploy environment for building, assembling, and shipping applications from a Windows PC, Docker for Windows is a native Windows application with a native user interface and auto-update capability, deeply integrated with Windows native virtualization, Hyper-V, networking and file system, making it faster and more reliable than previous ways of getting Docker on a Windows PC

Before you install Docker for Windows 10 make sure you have the right Windows 10 version.
The current version of Docker for Windows runs on 64bit Windows 10 Pro, Enterprise and Education (1511 November update, Build 10586 or later).
And have the Hyper-V feature of Windows 10 installed. Here you can download Docker for Windows 10

docker-download

docker-setup1

Click on Install.

docker-setup2

Click Finish and Launch Docker

docker-is-running-1

hyper-v

The Docker VM

docker-is-up

Now you can work from Powershell with Docker Containers :

docker-help

There is also a graphical GUI called Kitematic with the Docker Hub connection for the Container marketplace.

open-kitematic

This will download Kitematic.

kitematicExtract the zip file and run Kitematic

kitematic-icon

docker-kite

Kitematic with recommended Docker Containers to download 😉

azure-containers

If you search for Azure you find a lot of Azure related Docker Containers.

It’s so easy to download a container from the Docker Hub and make it running on your Windows 10 Machine, here is an example of an Jenkins Container:

jenkins

Click Create.

download-images

It’s downloading the Docker Container Image.

jenkins-3

Jenkins is already running in the Docker Container and is
asking some questions for the setup.

jenkins-4

Jenkins is setting up the environment.

jenkins-5

jenkins-6

And now we have Jenkins in a Container running.

Here you can find more information about Jenkins

jenkins-running

And with Kitematic you can see the log of the Jenkins Container
Here you can start, restart or stop the Docker Containers.

jenkins-inspect

Here I did a Docker Inspect Jenkins to see settings of the Container.

Hope this blogpost is useful to play with Docker Containers on your Windows 10 device 😉

When you want to learn more about Microsoft Windows Containers you can start here :

Windows Containers Documentation

acs

When you want to learn more about Microsoft Azure Container Services you can start here :

Azure Container Service Documentation

docker-containers

Lot of Success with running Containers !


Leave a comment

Happy Holidays and Thank you ! #MSOMS #Azure #AzureStack #Hyperv #Sysctr #HybridCloud

merry-christmas-and-happy-new-year-2017

Thank you for following me @Jamesvandenberg
Thank you Community 😉
Thank you Microsoft
Wish you all the Best !
#MVPbuzz


Leave a comment

Get Started with Microsoft #MSOMS Network Performance (Preview)

network-performance-monitor-preview

OMS Network Performance Monitor (Preview)

This blogpost describes how to set-up and use the Network Performance Monitor solution in OMS, which helps you monitor the performance of your networks-in near real-time-to detect and locate network performance bottlenecks. With the Network Performance Monitor solution, you can monitor the loss and latency between two networks, subnets or servers. Network Performance Monitor detects network issues like traffic blackholing, routing errors, and issues that conventional network monitoring methods are not able to detect. Network Performance Monitor generates alerts and notifies as and when a threshold is breached for a network link. These thresholds can be learned automatically by the system or you can configure them to use custom alert rules. Network Performance Monitor ensures timely detection of network performance issues and localizes the source of the problem to a particular network segment or device.+

You can detect network issues with the solution dashboard which displays summarized information about your network including recent network health events, unhealthy network links, and subnetwork links that are facing high packet loss and latency. You can drill-down into a network link to view the current health status of subnetwork links as well as node-to-node links. You can also view the historical trend of loss and latency at the network, subnetwork, and node-to-node level. You can detect transient network issues by viewing historical trend charts for packet loss and latency and locate network bottlenecks on a topology map. The interactive topology graph allows you to visualize the hop-by-hop network routes and determine the source of the problem. Like any other solutions, you can use Log Search for various analytics requirements to create custom reports based on the data collected by Network Performance Monitor.+

The solution uses synthetic transactions as a primary mechanism to detect network faults. So, you can use it without regard for a specific network device’s vendor or model. It works across on-premises, cloud (IaaS), and hybrid environments. The solution automatically discovers the network topology and various routes in your network.+

Typical network monitoring products focus on monitoring the network device (routers, switches etc.) health but do not provide insights into the actual quality of network connectivity between two points, which Network Performance Monitor does.

If you are new with Microsoft Operations Management Suite, you can download here a Free OMS Subscription Plan to try it your Self

oms-network-performance-2

When you have added the Microsoft OMS Network Performance Monitor (Preview) to your Dashboard you have to install OMS agents and configure them in an easy way to start the Network Performance solution and getting results.

  1. Install OMS Agents.
  2. Configure OMS Agents
  3. Create your Networks.

1. Install OMS Agents :

In order to work with OMS, OMS agents are required to be installed on all servers of interest.

NPM requires agents to be installed on at least 2 servers to monitor the connectivity between them. We recommend that for every subnet that you want to monitor, select two or more servers and install the agent on them. If you are unsure about the topology of your network, simply install the agents on critical workloads for which you want to monitor the network performance.

connected-resources

Here you can download your OMS Agent for your Server

If you are deploying using SCOM you should ignore step 1 and jump directly to step 2

Once the NPM solution is enabled on your OMS workspace the required management packs for NPM will automatically flow down to the machines that are connected to OMS via SCOM.

In case you want to connect SCOM with OMS but haven’t figured out how to do it yet, click on the link below.
oms-operations-manager-connectionHow to Connect SCOM to OMS

2. Configure OMS agents :

Firewall ports are required to be opened on the servers so that the agents can connect to each other.

Run the script without any parameters in a power shell window with administrative privileges. This script creates few registry keys required by NPM and creates windows firewall rules to allow agents to create TCP connections with each other

The port opened by default would be 8084. You have the option of using a custom port by providing the parameter ‘portNumber’ to the script. However, the same port should be used on all the machines where the script is executed.

Note that the script will configure only windows firewall locally. If you have a network firewall you should make sure that it is allowing traffic destined for the TCP port being used by NPM

network-powershell-script

Run the Powershell script as Administrator on your Servers.

3. Create your Networks :

A ‘Network’ in NPM is a container for a bunch of subnets. The Default network is the container for all the subnets that are not contained in any user defined network. In the most likely case the subnets in your organization will be arranged in more than one network and you should create one or more network to logically group your subnets.

You can create network with any name that meets your business requirements and add the subnets to the network.

Once you have saved the configuration for the first time, the solution will start collecting network data. The process usually takes a while. Once the data has been uploaded you should be able to see the solution dashboard with data and graphs. At this point the setup is complete and you can start using the solution

The OMS Performance Monitor Solution needs time to get the information of your network.

after-powershell-script

oms-network-performance-3

I have only one network in my lab environment

oms-network-performance-4

OMS Network Performance Monitor (Preview)

oms-network-performance-5

The issue here is that my switches are not IP V6 ready 😦

trends-in-schedule

After a view days analytics you can make your own custom view

oms-network-performance-7

Here you can plot network performance issues between two Servers

oms-network-performance-8

Everything is fine here 🙂

oms-network-performance-9

When something is wrong you can go directly to the View Node Logs.

oms-network-performance-10

OMS Log analytics results of your Server

When you have a large network with a lot of HOPS like switches and routers you can see where you have latency :

npm-investigation

The OMS NPM solution is still in preview but you can test it in your test environment to learn and get a better network by eliminating your network issues.
When you use the OMS Gateway on-premises you can connect your Servers to Operations Management Suite, here you
find my blogpost for the installation and configuration :

Hybrid IT Connect computers and devices to #MSOMS using the OMS Gateway

Hope this blogpost is useful for you to get your network in Control with Hybrid IT Management of OMS Services.

SCUG Banner


Leave a comment

Get Started with Microsoft #MSOMS Service Map to get in Control #HybridCloud #Winserv #Linux

oms-servicemap-overview

Microsoft OMS Service Map

Service Map automatically discovers application components on Windows and Linux systems and maps the communication between services. It allows you to view your servers as you think of them – as interconnected systems that deliver critical services. Service Map shows connections between servers, processes, and ports across any TCP-connected architecture with no configuration required other than installation of an agent.

If you are new with Microsoft Operations Management Suite, you can download here a Free OMS Subscription Plan to try it your Self

oms-solution-overview-smap

Start the Microsoft OMS Solution Market and select Service Map

oms-servicemap

Click on ADD Solution.

oms-dashboard-with-servicemap-config-tile

Click on the Service Map Tile.

servicemap-agent-1

Download your dependency Agent here.

download-agent

servicemap-agent-software

Run as Administrator

dependency-agent-install-1

agent

Click Finish.

services-dependeny-agent

The Microsoft Dependency Agent is running together with the OMS Agent.

servicemap-in-dashboard

Your first agent is running in Service Map

servicemap-dash-tile

I Added 3 Machines.

hybridcloud01-connection

Service Map of HyperV2016 Server.

hybridcloud01-connection-2 HybridCloud01 Server via the OMS Gateway

hybridcloud01-connection-3

hybridcloud01-connection-5

If you load Server Map from 40.121.165.208

hybridcloud01-connection-6

Microsoft Operations Management Suite (OMS) Service Map Alert view looks like this :

security-alert-service-map

Click on this HybridCloud01 Server alert.

security-alert-service-map-1

Here you can see that I miss a Security Update on this Server.

service-map-features

For this HybridCloud01 Server you can choose more OMS Service Map features to see what is going on with :

  • See a Summary of my Hybridcloud01 Server
  • The properties of my Hybridcloud01 Server
  • Alerts on my HybridCloud01 Server
  • Changes on my HybridCloud01 Server
  • Performance issues on my HybridCloud01 Server
  • Security on my HybridCloud01 Server
  • Updates on my HybridCloud Server

oms-service-map-schedule-view

OMS Service Map Schedule View settings.

oms-gateway-performance

Here you see the OMS Gateway Performance via Service Map.

Here you find more Microsoft technical documentation about Service Map in OMS

SCUG Banner