diff --git a/docs/architecture/containerized-lifecycle/Docker-application-lifecycle/containers-foundation-for-devops-collaboration.md b/docs/architecture/containerized-lifecycle/Docker-application-lifecycle/containers-foundation-for-devops-collaboration.md index 5532548e7864c..6520c943bd590 100644 --- a/docs/architecture/containerized-lifecycle/Docker-application-lifecycle/containers-foundation-for-devops-collaboration.md +++ b/docs/architecture/containerized-lifecycle/Docker-application-lifecycle/containers-foundation-for-devops-collaboration.md @@ -1,7 +1,7 @@ --- title: Containers as the foundation for DevOps collaboration description: Understand the key role of containers to streamline DevOps. -ms.date: 04/16/2020 +ms.date: 08/06/2020 --- # Containers as the foundation for DevOps collaboration @@ -21,27 +21,27 @@ In the pillar on the right, operations teams manage deployed applications and in The two teams are collaborating through a foundational platform (Docker containers) that provides a separation of concerns as a contract, while greatly improving the two teams' collaboration in the application life cycle. The developers own the container contents, its operating environment, and the container interdependencies, whereas the operations teams take the built images along with the manifest and runs them in their orchestration system. -## Challenges in application life cycle when using Docker. +## Challenges in the application life cycle when using Docker. There are many reasons that will increase the number of containerized applications in the upcoming years, and one of these reasons is the creation of applications based on microservices. -During the last 15 years, the use of web services has been the base of thousands of applications, and probably, after a few years, we'll find the same situation with microservice-based applications running on Docker containers. +During the last 15 years, the use of web services has been the base of thousands of applications, and probably, after a few years, you'll find the same situation with microservice-based applications running on Docker containers. It is also worth to mention that you can also use Docker containers for monolithic applications and you still get most of the benefits of Docker. Containers are not targeting only microservices. The use of Docker containerization and microservices causes new challenges in the development process of your organizations and therefore, you need a solid strategy to maintain many containers and microservices running on production systems. Eventually, enterprise applications will have hundreds or thousands of containers/instances running in production. -These challenges create new demands when using DevOps tools, so you'll have to define new processes in your DevOps activities, and find answers for this type of questions: +These challenges create new demands when using DevOps tools, so you'll have to define new processes in your DevOps activities, and find answers for the following type of questions: -- Which tools can I use for development, for CI/CD, management and operations? +- Which tools can I use for development, CI/CD, management and operations?? - How can my company manage errors in containers when running in production? - How can we change pieces of our software in production with minimum downtime? -- How can we scale and how can we monitor our production system? +- How can we scale and monitor our production system? -- How can we include testing and deployment of containers in our release pipeline? +- How can we include the testing and deployment of containers in our release pipeline? - How can we use Open Source tools/platforms for containers in Microsoft Azure? @@ -57,9 +57,9 @@ Figure 2-2 presents a more detailed workflow for a Docker application life cycle Everything begins with the developer, who starts writing code in the inner-loop workflow. The inner-loop stage is where developers define everything that happens before pushing code into the code repository (for example, a source control system such as Git). After it's committed, the repository triggers Continuous Integration (CI) and the rest of the workflow. -The inner loop basically consists of typical steps like "code," "run," "test," and "debug," plus the additional steps needed right before running the app locally. This is the developer's process to run and test the app as a Docker container. The inner-loop workflow will be explained in the sections that follow. +The inner loop consists of typical steps like "code," "run," "test," and "debug," plus the additional steps needed right before running the app locally. This is the developer's process to run and test the app as a Docker container. The inner-loop workflow will be explained in the sections that follow. -Taking a step back to look at the end-to end workflow, the DevOps workflow is more than a technology or a tool set: it's a mindset that requires cultural evolution. It's people, processes, and the appropriate tools to make your application life cycle faster and more predictable. Enterprises that adopt a containerized workflow typically restructure their organizations to represent people and processes that match the containerized workflow. +Taking a step back to look at the end-to-end workflow, the DevOps workflow is more than a technology or a tool set, it's a mindset that requires cultural evolution. It's people, processes, and the appropriate tools to make your application life cycle faster and more predictable. Enterprises that adopt a containerized workflow typically restructure their organizations to represent people and processes that match the containerized workflow. Practicing DevOps can help teams respond faster together to competitive pressures by replacing error-prone manual processes with automation, which results in improved traceability and repeatable workflows. Organizations also can manage environments more efficiently and realize cost savings with a combination of on-premises and cloud resources as well as tightly integrated tooling. diff --git a/docs/architecture/containerized-lifecycle/Docker-application-lifecycle/index.md b/docs/architecture/containerized-lifecycle/Docker-application-lifecycle/index.md index 7bc74cf761a71..80b3b72a6e5fd 100644 --- a/docs/architecture/containerized-lifecycle/Docker-application-lifecycle/index.md +++ b/docs/architecture/containerized-lifecycle/Docker-application-lifecycle/index.md @@ -1,7 +1,7 @@ --- title: Introduction to the Docker application life cycle description: Begin here the journey of containerized application development. -ms.date: 11/23/2018 +ms.date: 08/06/2020 --- # Introduction to the Docker application life cycle diff --git a/docs/architecture/containerized-lifecycle/Microsoft-platform-tools-containerized-apps/index.md b/docs/architecture/containerized-lifecycle/Microsoft-platform-tools-containerized-apps/index.md index 843f161ba9888..2be03b5d2e66c 100644 --- a/docs/architecture/containerized-lifecycle/Microsoft-platform-tools-containerized-apps/index.md +++ b/docs/architecture/containerized-lifecycle/Microsoft-platform-tools-containerized-apps/index.md @@ -1,7 +1,7 @@ --- title: Introduction to the Microsoft platform and tools for containerized apps description: Get to know Microsoft's offerings to support Docker applications lifecycle. -ms.date: 02/15/2019 +ms.date: 08/06/2020 --- # Introduction to the Microsoft platform and tools for containerized apps @@ -9,37 +9,35 @@ ms.date: 02/15/2019 Figure 3-1 shows the main pillars in the life cycle of Docker apps classified by the type of work delivered by multiple teams (app-development, DevOps infrastructure processes, and IT management and operations). Usually, in the enterprise, the profiles of "the persona" responsible for each area are different. So are their skills. -:::image type="complex" source="./media/index/microsoft-tools-contanerized-docker-app.png" alt-text="Diagram showing the Microsoft tools needed to maintain Docker apps."::: -Microsoft tools. For the Develop/Design workload: Docker engine for Windows, Visual Studio and Visual Studio Code, .NET Core, Azure Kubernetes Service. For the Build/Test/Ship workload: Azure DevOps, Team Foundation Server, Docker CLI, Azure Kubernetes Service. For the Run/Monitor/Manage workload: Azure Monitor, Azure portal, Azure Kubernetes Services, Service Fabric, other orchestrators. -:::image-end::: +![Add new project window in Visual Studio, selecting ASP.NET Core Web Application.](media/index/microsoft-tools-contanerized-docker-app.png) **Figure 3-1.** Main pillars in the life cycle for containerized Docker applications with Microsoft platform and tools -A containerized Docker life-cycle workflow can be initially prescriptive based on "by-default product choices," making it easier for developers to get started faster, but it's fundamental that under the hood there must be an open framework so that it will be a flexible workflow capable of adjusting to the different contexts from each organization or enterprise. The workflow infrastructure (components and products) must be flexible enough to cover the environment that each company will have in the future, even being capable of swapping development or DevOps products to others. This flexibility, openness, and broad choice of technologies in the platform and infrastructure are precisely the Microsoft priorities for containerized Docker applications, as explained in the chapters that follow. +A containerized Docker life-cycle workflow can be initially prescriptive based on "by-default product choices," making it easier for developers to get started faster, but it's fundamental that under the hood there must be an open framework so that it will be a flexible workflow capable of adjusting to the different contexts from each organization or enterprise. The workflow infrastructure (components and products) must be flexible enough to cover the environment that each company will have in the future, even being capable of swapping development or DevOps products to others. This flexibility, openness, and the broad choice of technologies in the platform and infrastructure are precisely the Microsoft priorities for containerized Docker applications, as explained in the chapters that follow. -Table 3-1 demonstrates that the intention of the Microsoft DevOps for containerized Docker applications is to provide an open DevOps workflow so that you can choose what products to use for each phase (Microsoft or third party) while providing a simplified workflow that provides "by-default-products" already connected; thus, you can quickly get started with your enterprise-level DevOps workflow for Docker apps. +Table 3-1 demonstrates that the intention of the Azure DevOps for containerized Docker applications is to provide an open DevOps workflow so that you can choose what products to use for each phase (Microsoft or third-party) while providing a simplified workflow that provides "by-default-products" already connected; thus, you can quickly get started with your enterprise-level DevOps workflow for Docker apps. -**Table 3-1.** DevOps workflows, open to any technology +**Table 3-1.** Azure DevOps workflows, open to any technology -| Host | Microsoft technologies | Third-party—Azure pluggable | +| Host | Microsoft technologies | Third-party (Azure pluggable) | | ---------------------------| ----------------------------------------------------| --------------------------------------------------------------------------------| -| Platform for Docker apps | • Microsoft Visual Studio and Visual Studio Code
• .NET
• Microsoft Azure Kubernetes Service (AKS)
• Azure Service Fabric
• Azure Container Registry
| • Any code editor (for example, Sublime)
• Any language (Node.js, Java, Go, etc.)
• Any orchestrator and scheduler
• Any Docker registry
| -| DevOps for Docker apps | • Azure DevOps Services
• Microsoft Team Foundation Server
• Azure Kubernetes Service (AKS)
• Azure Service Fabric
| • GitHub, Git, Subversion, etc.
• Jenkins, Chef, Puppet, Velocity, CircleCI, TravisCI, etc.
• On-premises Docker Datacenter, Docker Swarm, Mesos DC/OS, Kubernetes, etc.
| +| Platform for Docker apps | • Microsoft Visual Studio and Visual Studio Code
• .NET
• Microsoft Azure Kubernetes Service (AKS)
• Azure Container Registry
| • Any code editor (for example, Sublime)
• Any language (Node.js, Java, Go, etc.)
• Any orchestrator and scheduler
• Any Docker registry
| +| DevOps for Docker apps | • Azure DevOps Services
• Microsoft Team Foundation Server
• Azure Kubernetes Service (AKS)
| • GitHub, Git, Subversion, etc.
• Jenkins, Chef, Puppet, Velocity, CircleCI, TravisCI, etc.
• On-premises Docker Datacenter, Kubernetes, Mesos DC/OS, etc.
| | Management and monitoring | • Azure Monitor | • Marathon, Chronos, etc.
| The Microsoft platform and tools for containerized Docker apps, as defined in Table 3-1, comprise the following components: - **Platform for Docker Apps development** The development of a service, or collection of services that make up an "app." The development platform provides all the work developers requires prior to pushing their code to a shared code repository. Developing services, deployed as containers, are similar to the development of the same apps or services without Docker. You continue to use your preferred language (.NET, Node.js, Go, etc.) and preferred editor or IDE like Visual Studio or Visual Studio Code. However, rather than consider Docker a deployment destination, you develop your services in the Docker environment. You build, run, test, and debug your code in containers locally, providing the destination environment at development time. By providing the destination environment locally, Docker containers set up what will drastically help you improve your DevOps life cycle. Visual Studio and Visual Studio Code have extensions to integrate Docker containers within your development process. -- **DevOps for Docker Apps** Developers creating Docker applications can use [Azure DevOps Services](https://azure.microsoft.com/services/devops/) or any other third-party product, like Jenkins, to build out a comprehensive automated application life-cycle management (ALM). +- **DevOps for Docker Apps** Developers creating Docker applications can use [Azure DevOps](https://azure.microsoft.com/services/devops/) or any other third-party product, like Jenkins, to build out a comprehensive automated application life-cycle management (ALM). - With Azure DevOps Services, developers can create container-focused DevOps for a fast, iterative process that covers source-code control from anywhere (Azure DevOps Services-Git, GitHub, any remote Git repository, or Subversion), Continuous Integration (CI), internal unit tests, inter-container/service integration tests, Continuous Delivery (CD), and release management (RM). Developers can also automate their Docker application releases into Azure Kubernetes Service (AKS), from development to staging and production environments. + With Azure DevOps, developers can create container-focused DevOps for a fast, iterative process that covers source-code control from anywhere (Azure DevOps-Git, GitHub, any remote Git repository, or Subversion), Continuous Integration (CI), internal unit tests, inter-container/service integration tests, Continuous Delivery (CD), and release management (RM). Developers also can automate their Docker application releases into Azure Kubernetes Service (AKS), from development to staging and production environments. - **Management and Monitoring** IT can manage and monitor production applications and services in several ways, integrating both perspectives in a consolidated experience. - - **Azure portal** If you're using open-source orchestrators, Azure Kubernetes Service (AKS), Service Fabric and other orchestrators help you to set up and maintain your Docker environments. If you're using Azure Service Fabric, the Service Fabric Explorer tool makes it possible for you to visualize and configure your cluster. + - **Azure portal** Azure Kubernetes Service (AKS) helps you to set up and maintain your Docker environments. You can also use other orchestrators to visualize and configure your cluster. - - **Docker tools** You can manage your container applications using familiar tools. There's no need to change your existing Docker management practices to move container workloads to the cloud. Use the application management tools you're already familiar with and connect via the standard API endpoints for the orchestrator of your choice. You can also use other third-party tools to manage your Docker applications, such as Docker Datacenter or even CLI Docker tools. + - **Docker tools** You can manage your container applications using familiar tools. There's no need to change your existing Docker management practices to move container workloads to the cloud. Use the application management tools you're already familiar with and connect via the standard API endpoints for the orchestrator of your choice. You also can use other third-party tools to manage your Docker applications or even CLI Docker tools. Even if you're familiar with Linux commands, you can manage your container applications using Microsoft Windows and PowerShell with a Linux Subsystem command line and the products (Docker, Kubernetes…) clients running on this Linux Subsystem capability. You'll learn more about using these tools under Linux Subsystem using your favorite Microsoft Windows OS later in this book. diff --git a/docs/architecture/containerized-lifecycle/Microsoft-platform-tools-containerized-apps/media/index/microsoft-tools-contanerized-docker-app.png b/docs/architecture/containerized-lifecycle/Microsoft-platform-tools-containerized-apps/media/index/microsoft-tools-contanerized-docker-app.png index 173b9604453bd..403aa1b8c4710 100644 Binary files a/docs/architecture/containerized-lifecycle/Microsoft-platform-tools-containerized-apps/media/index/microsoft-tools-contanerized-docker-app.png and b/docs/architecture/containerized-lifecycle/Microsoft-platform-tools-containerized-apps/media/index/microsoft-tools-contanerized-docker-app.png differ diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/build-aspnet-core-applications-linux-containers-aks-kubernetes.md b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/build-aspnet-core-applications-linux-containers-aks-kubernetes.md index a87e0a7841f81..32e9944b8c32a 100644 --- a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/build-aspnet-core-applications-linux-containers-aks-kubernetes.md +++ b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/build-aspnet-core-applications-linux-containers-aks-kubernetes.md @@ -1,9 +1,10 @@ --- -title: Build ASP.NET Core 2.2 applications deployed as Linux containers into AKS/Kubernetes clusters +title: Build ASP.NET Core applications deployed as Linux containers into AKS/Kubernetes clusters description: Containerized Docker Application Lifecycle with Microsoft Platform and Tools -ms.date: 02/25/2019 +ms.date: 08/06/2020 --- -# Build ASP.NET Core 2.2 applications deployed as Linux containers into an AKS/Kubernetes orchestrator + +# Build ASP.NET Core applications deployed as Linux containers into an AKS/Kubernetes orchestrator Azure Kubernetes Services (AKS) is Azure's managed Kubernetes orchestrations services that simplify container deployment and management. @@ -12,74 +13,196 @@ AKS main features are: - An Azure-hosted control plane - Automated upgrades - Self-healing -- User configurable scaling -- A simpler user experience for both developers and cluster operators. +- User-configurable scaling +- Simpler user experience for both developers and cluster operators. -The following examples explore the creation of an ASP.NET Core 2.2 application that runs on Linux and deploys to an AKS Cluster in Azure, while development is done using Visual Studio 2017. +The following examples explore the creation of an ASP.NET Core 3.1 application that runs on Linux and deploys to an AKS Cluster in Azure, while development is done using Visual Studio 2019. -## Creating the ASP.NET Core 2.2 Project using Visual Studio 2017 +## Creating the ASP.NET Core Project using Visual Studio 2019 ASP.NET Core is a general-purpose development platform maintained by Microsoft and the .NET community on GitHub. It's cross-platform, supporting Windows, macOS and Linux, and can be used in device, cloud, and embedded/IoT scenarios. -This example uses a simple project that's based on a Visual Studio Web API template, so you don't need any additional knowledge to create the sample. You only have to create the project using a standard template that includes all the elements to run a small project with a REST API, using ASP.NET Core 2.2 technology. +This example uses a couple of simple projects based on Visual Studio templates, so you don't need much additional knowledge to create the sample. You only have to create the project using a standard template that includes all the elements to run a small project with a REST API and a Web App with Razor pages, using ASP.NET Core 3.1 technology. + +![Add new project window in Visual Studio, selecting ASP.NET Core Web Application.](media/build-aspnet-core-applications-linux-containers-aks-kubernetes/create-aspnet-core-application.png) + +**Figure 4-35**. Creating an ASP.NET Core Web Application in Visual Studio 2019. -![Add new project window in Visual Studio, selecting ASP.NET Core Web Application.](media/create-aspnet-core-application.png) +To create the sample project in Visual Studio, select **File** > **New** > **Project**, select the **Web** project type and then the **ASP.NET Core Web Application** template. You can also search for the template if you need it. -**Figure 4-36**. Creating ASP.NET Core Application +Then enter the application name and location as shown in the next image. -To create the sample project in Visual Studio, select **File** > **New** > **Project**, select the **Web** project types in the left pane, followed by **ASP.NET Core Web Application**. +![Enter the project name and location.](media/build-aspnet-core-applications-linux-containers-aks-kubernetes/enter-project-name-and-location.png) -Visual Studio lists templates for web projects. For our example, select **API** to create an ASP.NET Web API Application. +**Figure 4-36**. Enter the project name and location in Visual Studio 2019. -Verify that you've selected ASP.NET Core 2.2 as the framework. .NET Core 2.2 is included in the last version of Visual Studio 2017 and is automatically installed and configured for you when you install Visual Studio 2017. +Verify that you've selected ASP.NET Core 3.1 as the framework. .NET Core 3.1 is included in the latest release of Visual Studio 2019 and is automatically installed and configured for you when you install Visual Studio. -![Visual Studio dialog for selecting the type of an ASP.NET Core Web Application with API option selected.](media/create-web-api-application.png) +![Visual Studio dialog for selecting the type of an ASP.NET Core Web Application with API option selected.](media/build-aspnet-core-applications-linux-containers-aks-kubernetes/create-web-api-application.png) -**Figure 4-37**. Selecting ASP.NET CORE 2.2 and Web API project type +**Figure 4-37**. Selecting ASP.NET CORE 3.1 and Web API project type -If you have any previous version of .NET Core, you can download and install the 2.2 version from . +Notice Docker support is not enabled now, just to show it can be done after project creation. -You can add Docker support when creating the project or afterwards, so you can "Dockerize" your project at any time. To add Docker support after project creation, right-click on the project node in Solution Explorer and select **Add** > **Docker support** on the context menu. +If you have any previous version of .NET Core, you can download and install the 3.1 version from . -![Context menu option to add Docker support to an existing project: Right click (on the project) > Add > Docker Support.](media/add-docker-support-to-project.png) +To show you can "Dockerize" your project at any time, you'll add Docker support now. So right-click on the project node in Solution Explorer and select **Add** > **Docker support** on the context menu. -**Figure 4-38**. Adding Docker support to existing project +![Context menu option to add Docker support to an existing project: Right-click (on the project) > Add > Docker Support.](media/build-aspnet-core-applications-linux-containers-aks-kubernetes/add-docker-support-to-project.png) -To complete adding Docker support, you can choose Windows or Linux. In this case, select **Linux**, because AKS doesn't support Windows Containers (as of late 2018). +**Figure 4-38**. Adding Docker support to an existing project -![Option dialog to select Target OS for Dockerfile.](media/select-linux-docker-support.png) +To complete adding Docker support, you can choose Windows or Linux. In this case, select **Linux**. + +![Option dialog to select Target OS for Dockerfile.](media/build-aspnet-core-applications-linux-containers-aks-kubernetes/select-linux-docker-support.png) **Figure 4-39**. Selecting Linux containers. -With these simple steps, you have your ASP.NET Core 2.2 application running on a Linux container. +With these simple steps, you have your ASP.NET Core 3.1 application running on a Linux container. + +In a similar way, you can also add a very simple **WebApp** project (Figure 4-40) to consume the web API endpoint, although the details are not discussed here. + +After that, you add orchestrator support for your **WebApi** project as shown next, in image 4-40. + +![Adding orchestrator support to WebApi project](media/build-aspnet-core-applications-linux-containers-aks-kubernetes/add-orchestrator-support.png) + +**Figure 4-40**. Adding orchestrator support to *WebApi* project. + +When you choose the `Docker Compose` option, which is fine for local development, Visual Studio adds the docker-compose project, with the docker-compose files as shown in image 4-41. + +![Docker-compose added to solution](media/build-aspnet-core-applications-linux-containers-aks-kubernetes/docker-compose-project-in-visual-studio.png) + +**Figure 4-41**. Adding orchestrator support to *WebApi* project. -As you can see, the integration between Visual Studio 2017 and Docker is totally oriented to the developer's productivity. +The initial files added are similar to these ones: -Now you can run your application with the **F5** key or by using the **Play** button. +`docker-compose.yml` -After running the project, you can list the images using the `docker images` command. You should see the `mssampleapplication` image created by the automatic deployment of our project with Visual Studio 2017. +```yml +version: "3.4" + +services: + webapi: + image: ${DOCKER_REGISTRY-}webapi + build: + context: . + dockerfile: WebApi/Dockerfile + + webapp: + image: ${DOCKER_REGISTRY-}webapp + build: + context: . + dockerfile: WebApp/Dockerfile +``` + +`docker-compose.override.yml` + +```yml +version: "3.4" + +services: + webapi: + environment: + - ASPNETCORE_ENVIRONMENT=Development + - ASPNETCORE_URLS=https://+:443;http://+:80 + ports: + - "80" + - "443" + volumes: + - ${APPDATA}/Microsoft/UserSecrets:/root/.microsoft/usersecrets:ro + - ${APPDATA}/ASP.NET/Https:/root/.aspnet/https:ro + webapp: + environment: + - ASPNETCORE_ENVIRONMENT=Development + - ASPNETCORE_URLS=https://+:443;http://+:80 + ports: + - "80" + - "443" + volumes: + - ${APPDATA}/Microsoft/UserSecrets:/root/.microsoft/usersecrets:ro + - ${APPDATA}/ASP.NET/Https:/root/.aspnet/https:ro +``` + +To have you app running with Docker Compose you just have to make a few tweaks to `docker-compose.override.yml` + +```yml +services: + webapi: + #... + ports: + - "51080:80" + - "51443:443" + #... + webapp: + environment: + #... + - WebApiBaseAddress=http://webapi + ports: + - "50080:80" + - "50443:443" + #... +``` + +Now you can run your application with **F5** key, or by using the **Play** button, or the **Ctrl+F5** key, selecting the docker-compose project, as shown in image 4-42. + +![Running docker-compose project with Visual Studio](media/build-aspnet-core-applications-linux-containers-aks-kubernetes/running-docker-compose-with-visual-studio.png) + +**Figure 4-42**. Adding orchestrator support to *WebApi* project. + +When running the docker-compose application as explained, you get: + +1. The images built and containers created as per the docker-compose file. +2. The browser open in the address configured in the "Properties" dialog for the `docker-compose` project. +3. The **Container** window open (in Visual Studio 2019 version 16.4 and later). +4. Debugger support for all projects in the solution, as shown in the following images. + +Browser opened: + +![Browser view with web app running](media/build-aspnet-core-applications-linux-containers-aks-kubernetes/browser-opened.png) + +**Figure 4-43**. Browser window with an application running on multiple containers. + +Containers window: + +![Visual Studio "Containers" window](media/build-aspnet-core-applications-linux-containers-aks-kubernetes/visual-studio-containers-window.png) + +**Figure 4-44**. Visual Studio "Containers" window + +The **Containers** window lets you view running containers, browse available images, view environment variables, logs, and port mappings, inspect the filesystem, attach a debugger, or open a terminal window inside the container environment. + +As you can see, the integration between Visual Studio 2019 and Docker is completely oriented to the developer's productivity. + +Of course, you can also list the images using the `docker images` command. You should see the `webapi` and `webapp` images with the `dev` tags created by the automatic deployment of our project with Visual Studio 2019. ```console docker images ``` -![Console output from the docker images command, shows a list with: Repository, Tag, Image ID, Created (date), and Size.](media/docker-images-command.png) +![Console output from the docker images command, shows a list with: Repository, Tag, Image ID, Created (date), and Size.](media/build-aspnet-core-applications-linux-containers-aks-kubernetes/docker-images-command.png) + +**Figure 4-45**. View of Docker images -**Figure 4-40**. View of Docker images +## Register the Solution in an Azure Container Registry (ACR) -## Register the Solution in the Azure Container Registry +You can upload the images to the [Azure Container Registry (ACR)](https://azure.microsoft.com/services/container-registry/), but you could also use Docker Hub or any other registry, so the images can be deployed to the AKS cluster from that registry. -Upload the image to any Docker registry, like [Azure Container Registry (ACR)](https://azure.microsoft.com/services/container-registry/) or Docker Hub, so the images can be deployed to the AKS cluster from that registry. In this case, we're uploading the image to Azure Container Registry. +### Create an ACR instance + +Run the following command from the **az cli**: + +```powershell +az acr create --name exploredocker --resource-group explore-docker-aks-rg --sku basic --admin-enabled +``` ### Create the image in Release mode -We'll now create the image in **Release** mode (ready for production) by changing to **Release**, as shown in Figure 4-41, and running the application as we did before. +You'll now create the image in **Release** mode (ready for production) by changing to **Release**, as shown in Figure 4-46, and running the application as you did before. -![Toolbar option in VS to build in release mode.](media/select-release-mode.png) +![Toolbar option in VS to build in release mode.](media/build-aspnet-core-applications-linux-containers-aks-kubernetes/select-release-mode.png) -**Figure 4-41**. Selecting Release Mode +**Figure 4-46**. Selecting Release Mode -If you execute the `docker image` command, you'll see both images created, one for `debug` and the other for `release` mode. +If you execute the `docker images` command, you'll see both images created, one for `debug` (**dev**) and the other for `release` (**latest**) mode. ### Create a new Tag for the Image @@ -87,134 +210,219 @@ Each container image needs to be tagged with the `loginServer` name of the regis You can view the `loginServer` name from the Azure portal, taking the information from the Azure Container Registry -![Browser view of the Azure container registry name, on the top right.](media/loginServer-name.png) +![Browser view of the Azure container registry name, on the top right.](media/build-aspnet-core-applications-linux-containers-aks-kubernetes/loginServer-name.png) -**Figure 4-42**. View of the name of the Registry +**Figure 4-47**. View of the name of the Registry Or by running the following command: ```console -az acr list --resource-group MSSampleResourceGroup --query "[].{acrLoginServer:loginServer}" --output table +az acr list --resource-group --query "[].{acrLoginServer:loginServer}" --output table ``` -![Console output from the above command.](media/az-cli-loginServer-name.png) +![Console output from the above command.](media/build-aspnet-core-applications-linux-containers-aks-kubernetes/az-cli-loginServer-name.png) -**Figure 4-43**. Get the name of the registry using PowerShell +**Figure 4-48**. Get the name of the registry using **az cli** -In both cases, you'll obtain the name. In our example, `mssampleacr.azurecr.io`. +In both cases, you'll obtain the name. In our example, `exploredocker.azurecr.io`. Now you can tag the image, taking the latest image (the Release image), with the command: ```console -docker tag mssampleaksapplication:latest mssampleacr.azurecr.io/mssampleaksapplication:v1 +docker tag :latest /:v1 ``` After running the `docker tag` command, list the images with the `docker images` command, and you should see the image with the new tag. -![Console output from the docker images command.](media/tagged-docker-images-list.png) +![Console output from the docker images command.](media/build-aspnet-core-applications-linux-containers-aks-kubernetes/tagged-docker-images-list.png) -**Figure 4-44**. View of tagged images +**Figure 4-49**. View of tagged images ### Push the image into the Azure ACR Log in to the Azure Container Registry ```console -az acr login --name mssampleacr +az acr login --name exploredocker ``` Push the image into the Azure ACR, using the following command: ```console -docker push mssampleacr.azurecr.io/mssampleaksapplication:v1 +docker push /:v1 ``` -This command takes a while uploading the images but gives you feedback in the process. +This command takes a while uploading the images but gives you feedback in the process. In the following image you can see the output from one image completed and another in progress. -![Console output from the docker push command: shows a character-based progress bar for each layer.](media/uploading-image-to-acr.png) +![Console output from the docker push command.](media/build-aspnet-core-applications-linux-containers-aks-kubernetes/uploading-docker-images-complete.png) -**Figure 4-45**. Uploading the image to the ACR +**Figure 4-50**. Console output from the push command. -You can see below the result you should get when the process completes: +To deploy your multi-container app into your AKS cluster you need some manifest `.yaml` files that have, most of the properties taken from the `docker-compose.yml` and `docker-compose.override.yml` files. -![Console output from the docker push command, finished, showing all layers or nodes.](media/uploading-docker-images-complete.png) +#### `deploy-webapi.yml` -**Figure 4-46**. View of nodes +```yml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: webapi + labels: + app: weather-forecast +spec: + replicas: 1 + selector: + matchLabels: + service: webapi + template: + metadata: + labels: + app: weather-forecast + service: webapi + spec: + containers: + - name: webapi + image: exploredocker.azurecr.io/webapi:v1 + imagePullPolicy: IfNotPresent + ports: + - containerPort: 80 + protocol: TCP + env: + - name: ASPNETCORE_URLS + value: http://+:80 +--- +apiVersion: v1 +kind: Service +metadata: + name: webapi + labels: + app: weather-forecast + service: webapi +spec: + ports: + - port: 80 + targetPort: 80 + protocol: TCP + selector: + service: webapi +``` -The next step is to deploy your container into your AKS Kubernetes cluster. For that, you need a file (**.yml deploy file**) that contains the following: +#### `deploy-webapp.yml` ```yml -apiVersion: apps/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: - name: mssamplesbook + name: webapp + labels: + app: weather-forecast spec: replicas: 1 + selector: + matchLabels: + service: webapp template: metadata: labels: - app: mssample-kub-app + app: weather-forecast + service: webapp spec: containers: - - name: mssample-services-app - image: mssampleacr.azurecr.io/mssampleaksapplication:v1 + - name: webapp + image: exploredocker.azurecr.io/webapp:v1 + imagePullPolicy: IfNotPresent ports: - containerPort: 80 + protocol: TCP + env: + - name: ASPNETCORE_URLS + value: http://+:80 + - name: WebApiBaseAddress + value: http://webapi --- apiVersion: v1 kind: Service metadata: - name: mssample-kub-app + name: webapp + labels: + app: weather-forecast + service: webapp spec: + type: LoadBalancer ports: - - name: http-port - port: 80 + - port: 80 targetPort: 80 + protocol: TCP selector: - app: mssample-kub-app - type: LoadBalancer + service: webapp ``` > [!NOTE] -> For more information on deployment with Kubernetes see: +> The previous `.yml` files only enable the `HTTP` ports, using the `ASPNETCORE_URLS` parameter, to avoid issues with the missing certificate in the sample app. + +> [!TIP] +> You can see how to create the AKS Cluster for this sample in section [**Deploy to Azure Kubernetes Service (AKS)**](deploy-azure-kubernetes-service.md) on this guide. -Now you're almost ready to deploy using **Kubectl**, but first you must get the credentials to the AKS Cluster with this command: +Now you're almost ready to deploy using **kubectl**, but first you must get the credentials from the AKS Cluster with this command: ```console -az aks get-credentials --resource-group MSSampleResourceGroupAKS --name mssampleclusterk801 +az aks get-credentials --resource-group explore-docker-aks-rg --name explore-docker-aks ``` -![Console output from the above command: Merged "MSSampleK8Cluster as current context in /root/.kube/config](media/getting-aks-credentials.png) +![Console output from the above command: Merged "explore-docker-aks" as current context in C:\Users\Miguel.kube\config](media/build-aspnet-core-applications-linux-containers-aks-kubernetes/getting-aks-credentials.png) -**Figure 4-47**. getting credentials +**Figure 4-51**. Getting credentials from AKS into the kubectl environment. -Then, use the `kubectl create` command to launch the deployment. +You also have to allow the AKS cluster to pull images from the ACR, using this command: ```console -kubectl create -f mssample-deploy.yml +az aks update --name explore-docker-aks --resource-group explore-docker-aks-rg --attach-acr exploredocker +``` + +The previous command might take a couple of minutes to complete. Then, use the `kubectl apply` command to launch the deployments, and then `kubectl get all` get list the cluster objects. + +```console +kubectl apply -f deploy-webapi.yml +kubectl apply -f deploy-webapp.yml + +kubectl get all ``` -![Console output from the above command: deployment "mssamplesbook" created. service "mssample-kub-app" created.](media/kubectl-create-command.png) +![Console output from the above commands: deployments applied. services created.](media/build-aspnet-core-applications-linux-containers-aks-kubernetes/kubectl-apply-command.png) -**Figure 4-48**. Deploy to Kubernetes +**Figure 4-52**. Deployment to Kubernetes -When the deployment completes, you can access the Kubernetes console with a local proxy that you can temporally access with this command: +You'll have to wait a while until the load balancer gets the external IP, checking with `kubectl get services`, and then the application should be available at that address, as shown in the next image: + +![Browser view of the application deployed to AKS](media/build-aspnet-core-applications-linux-containers-aks-kubernetes/aks-deployed-application.png) + +**Figure 4-53**. Deployment to Kubernetes + +When the deployment completes, you can access the [Kubernetes Web UI](https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard/) with a local proxy, using an ssh tunnel. + +First you must create a ClusterRoleBinding with the following command: + +```console +kubectl create clusterrolebinding kubernetes-dashboard --clusterrole=cluster-admin --serviceaccount=kube-system:kubernetes-dashboard +``` + +And then this command to start the proxy: ```console -az aks browse --resource-group MSSampleResourceGroupAKS --name mssampleclusterk801 +az aks browse --resource-group exploredocker-aks-rg --name explore-docker-aks ``` -And accessing the url `http://127.0.0.1:8001`. +A browser window should open at `http://127.0.0.1:8001` with a view similar to this one: -![Browser view of the Kubernetes dashboard, showing Deployments, Pods, Replica Sets, and Services.](media/kubernetes-cluster-information.png) +![Browser view of the Kubernetes dashboard, showing Deployments, Pods, Replica Sets, and Services.](media/build-aspnet-core-applications-linux-containers-aks-kubernetes/kubernetes-cluster-information.png) -**Figure 4-49**. View Kubernetes cluster information +**Figure 4-54**. View Kubernetes cluster information -Now you have your application deployed on Azure, using a Linux Container, and an AKS Kubernetes Cluster. You can access your app browsing to the public IP of your service, which you can get from the Azure portal. +Now you have your ASP.NET Core application, running in Linux containers, and deployed to an AKS cluster on Azure. > [!NOTE] -> You can see how to create the AKS Cluster for this sample in section [**Deploy to Azure Kubernetes Service (AKS)**](deploy-azure-kubernetes-service.md) on this guide. +> For more information on deployment with Kubernetes see: ->[!div class="step-by-step"] ->[Previous](set-up-windows-containers-with-powershell.md) ->[Next](../docker-devops-workflow/index.md) +> [!div class="step-by-step"] +> [Previous](set-up-windows-containers-with-powershell.md) +> [Next](../docker-devops-workflow/index.md) diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/common-container-design-principles.md b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/common-container-design-principles.md index 4afeb8c504b7b..f538c84b37a23 100644 --- a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/common-container-design-principles.md +++ b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/common-container-design-principles.md @@ -1,7 +1,7 @@ --- title: Common container design principles description: Learn a fundamental principle of good container design, it's that a container should host just one process. -ms.date: 02/15/2019 +ms.date: 08/06/2020 --- # Common container design principles @@ -9,7 +9,7 @@ Ahead of getting into the development process there are a few basic concepts wor ## Container equals a process -In the container model, a container represents a single process. By defining a container as a process boundary, you begin to create the primitives used to scale, or batch-off, processes. When you run a Docker container, you'll see an [ENTRYPOINT](https://docs.docker.com/engine/reference/builder/#/entrypoint) definition. This defines the process and the lifetime of the container. When the process completes, the container life-cycle ends. There are long-running processes, such as web servers, and short-lived processes, such as batch jobs, which might have been implemented as Microsoft Azure [WebJobs](https://azure.microsoft.com/documentation/articles/websites-webjobs-resources/). If the process fails, the container ends, and the orchestrator takes over. If the orchestrator was instructed to keep five instances running and one fails, the orchestrator will create another container to replace the failed process. In a batch job, the process is started with parameters. When the process completes, the work is complete. +In the container model, a container represents a single process. By defining a container as a process boundary, you begin to create the primitives used to scale, or batch-off, processes. When you run a Docker container, you'll see an [ENTRYPOINT](https://docs.docker.com/engine/reference/builder/#entrypoint) definition. This defines the process and the lifetime of the container. When the process completes, the container life-cycle ends. There are long-running processes, such as web servers, and short-lived processes, such as batch jobs, which might have been implemented as Microsoft Azure [WebJobs](https://azure.microsoft.com/documentation/articles/websites-webjobs-resources/). If the process fails, the container ends, and the orchestrator takes over. If the orchestrator was instructed to keep five instances running and one fails, the orchestrator will create another container to replace the failed process. In a batch job, the process is started with parameters. When the process completes, the work is complete. You might find a scenario in which you want multiple processes running in a single container. In any architecture document, there's never a "never," nor is there always an "always." For scenarios requiring multiple processes, a common pattern is to use [Supervisor](http://supervisord.org/). diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/deploy-azure-kubernetes-service.md b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/deploy-azure-kubernetes-service.md index 29f75cd0b4808..3d7ef1e26a669 100644 --- a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/deploy-azure-kubernetes-service.md +++ b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/deploy-azure-kubernetes-service.md @@ -1,64 +1,59 @@ --- title: Orchestrating microservices and multi-container applications for high scalability and availability description: Learn how to deploy an app using Azure Kubernetes Service. -ms.date: 02/15/2019 +ms.date: 08/06/2020 --- -# Deploy to Azure Kubernetes Service (AKS) - -You can interact with AKS using your preferred client operating system, here we show how to do it with Microsoft Windows and an embedded version of Ubuntu Linux in Windows, using Bash commands. - -Prerequisites to have before using AKS are: -- Linux or Mac development machine -- Windows development machine - - Developer Mode enabled on Windows - - Windows Subsystem for Linux -- Azure-CLI installed on [Windows, Mac or Linux](https://docs.microsoft.com/cli/azure/install-azure-cli) +# Deploy to Azure Kubernetes Service (AKS) -> [!NOTE] -> To find complete information about: -> -> Azure-CLI: -> -> Windows Subsystem for Linux: +You can interact with AKS using your preferred client operating system (Windows, macOS, or Linux) with Azure command-line interface(Azure CLI) installed. For more details, refer [Azure CLI documentation](https://docs.microsoft.com/cli/azure/?view=azure-cli-latest) and [Installation guide](https://docs.microsoft.com/cli/azure/install-azure-cli?view=azure-cli-latest) for the available environments. ## Create the AKS environment in Azure -There are several ways to create the AKS Environment. It can be done by using Azure-CLI commands or by using the Azure portal. +There are several ways to create the AKS Environment. It can be done by using Azure CLI commands or by using the Azure portal. -Here you can explore some examples using the Azure-CLI to create the cluster and the Azure portal to review the results. You also need to have Kubectl and Docker in your development machine. +Here you can explore some examples using the Azure CLI to create the cluster and the Azure portal to review the results. You also need to have Kubectl and Docker in your development machine. ## Create the AKS cluster -Create the AKS cluster using this command: +Create the AKS cluster using this command (the resource group must exist): ```console -az aks create --resource-group MSSampleResourceGroup --name MSSampleClusterK801 --agent-count 1 --generate-ssh-keys --location westus2 +az aks create --resource-group explore-docker-aks-rg --name explore-docker-aks --node-vm-size Standard_B2s --node-count 1 --generate-ssh-keys --location westeurope ``` -After the creation job finishes, you can see the AKS created in the Azure portal: +> [!NOTE] +> The `--node-vm-size` and `--node-count` parameter values are good enough for a sample/dev application. + +After the creation job finishes, you can see: -The resource group: +- The AKS cluster created in the initial resource group +- A new, related resource group, containing the resources related to the AKS cluster, as show in the following images. -![Browser view of the Azure AKS resource group.](media/aks-resource-group-view.png) +The initial resource group, with the AKS cluster: + +![Browser view of an AKS resource group.](media/deploy-azure-kubernetes-service/aks-cluster-view.png) **Figure 4-17**. AKS Resource Group view from Azure. -The AKS cluster: +The AKS cluster resource group: -![Browser view of an AKS resource group.](media/aks-cluster-view.png) +![Browser view of the Azure AKS resource group.](media/deploy-azure-kubernetes-service/aks-resource-group-view.png) **Figure 4-18**. AKS view from Azure. -You can also view the node created using `Azure-CLI` and `Kubectl`. +> [!IMPORTANT] +> In general, you shouldn't need to modify the resources in the AKS cluster resource group. For example, the resource group is deleted when you delete the AKS cluster. + +You can also view the node created using `Azure CLI` and `Kubectl`. First, getting the credentials: ```console -az aks get-credentials --resource-group MSSampleK8ClusterRG --name MSSampleK8Cluster +az aks get-credentials --resource-group explore-docker-aks-rg --name explore-docker-aks ``` -![Console output from the above command: Merged "MsSampleK8Cluster as current context in /root/.kube/config.](media/get-credentials-command-result.png) +![Console output from the above command: Merged "explore-docker-aks" as current context in /home/miguel/.kube/config.](media/deploy-azure-kubernetes-service/get-credentials-command-result.png) **Figure 4-19**. `aks get-credentials` command result. @@ -68,10 +63,10 @@ And then, getting nodes from Kubectl: kubectl get nodes ``` -![Console output from above command: List of nodes with status, age (time running), and version](media/kubectl-get-nodes-command-result.png) +![Console output from the above command: List of nodes with status, age (time running), and version](media/deploy-azure-kubernetes-service/kubectl-get-nodes-command-result.png) **Figure 4-20**. `kubectl get nodes` command result. ->[!div class="step-by-step"] ->[Previous](orchestrate-high-scalability-availability.md) ->[Next](docker-apps-development-environment.md) +> [!div class="step-by-step"] +> [Previous](orchestrate-high-scalability-availability.md) +> [Next](docker-apps-development-environment.md) diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/design-docker-applications.md b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/design-docker-applications.md index 99a3bc50754cb..2bba08084a20e 100644 --- a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/design-docker-applications.md +++ b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/design-docker-applications.md @@ -1,7 +1,7 @@ --- title: Design Docker applications description: Find here a reference to an in-depth guide to microservices architecture, because that's a topic that it's not detailed in this guide. -ms.date: 02/15/2019 +ms.date: 08/06/2020 --- # Design Docker applications @@ -9,7 +9,7 @@ Chapter 1 introduced the fundamental concepts regarding containers and Docker. T **More info** To learn more about enterprise applications and microservices architecture in depth, read the guide [NET Microservices: Architecture for Containerized .NET Applications](../../microservices/index.md) that you can also download from . -However, before we get into the application life cycle and DevOps, it's important to know how you're going to design and construct your application and what are your design choices. +However, before you get into the application life cycle and DevOps, it's important to know how you're going to design and construct your application and what are your design choices. >[!div class="step-by-step"] >[Previous](index.md) diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/docker-apps-development-environment.md b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/docker-apps-development-environment.md index 624de6a817838..86730d562c4f5 100644 --- a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/docker-apps-development-environment.md +++ b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/docker-apps-development-environment.md @@ -1,7 +1,7 @@ --- title: Development environment for Docker apps description: Get to know the most important development tool options that support the Docker development life-cycle. -ms.date: 04/16/2020 +ms.date: 08/06/2020 --- # Development environment for Docker apps @@ -20,7 +20,7 @@ If you prefer a lightweight, cross-platform editor supporting any development la ### Visual Studio with Docker Tools (Windows development machine) -We recommend you use Visual Studio 2019 with the built-in Docker Tools enabled. With Visual Studio, you can develop, run, and validate your applications directly in the chosen Docker environment. Press F5 to debug your application (single container or multiple containers) directly in a Docker host, or press Ctrl+F5 to edit and refresh your app without having to rebuild the container. It's the simplest and most powerful choice for Windows developers to create Docker containers for Linux or Windows. +It's recommend that you use Visual Studio 2019 with the built-in Docker Tools enabled. With Visual Studio, you can develop, run, and validate your applications directly in the chosen Docker environment. Press F5 to debug your application (single container or multiple containers) directly in a Docker host, or press Ctrl+F5 to edit and refresh your app without having to rebuild the container. It's the simplest and most powerful choice for Windows developers to create Docker containers for Linux or Windows. ### Visual Studio for Mac (Mac development machine) diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/docker-apps-inner-loop-workflow.md b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/docker-apps-inner-loop-workflow.md index aa4caaad1eaac..19ad6aeb82c75 100644 --- a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/docker-apps-inner-loop-workflow.md +++ b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/docker-apps-inner-loop-workflow.md @@ -1,11 +1,12 @@ --- title: Inner-loop development workflow for Docker apps -description: Learn the "inner loop" workflow for development of Docker applications. -ms.date: 02/15/2019 +description: Learn about "inner-loop" development workflow for Docker applications. +ms.date: 08/06/2020 --- + # Inner-loop development workflow for Docker apps -Before triggering the outer-loop workflow spanning the entire DevOps cycle, it all begins on each developer's machine, coding the app itself, using their preferred languages or platforms, and testing it locally (Figure 4-21). But in every case, you'll have an important point in common, no matter what language, framework, or platforms you choose. In this specific workflow, you're always developing and testing Docker containers, but locally. +Before triggering the outer-loop workflow spanning the entire DevOps cycle, it all begins on each developer's machine, coding the app itself, using their preferred languages or platforms, and testing it locally (Figure 4-21). But in every case, you'll have an important point in common, no matter what language, framework, or platforms you choose. In this specific workflow, you're always developing and testing Docker containers in no other environments, but locally. ![Diagram showing the concept of an inner loop dev environment.](./media/docker-apps-inner-loop-workflow/inner-loop-development-context.png) @@ -39,16 +40,16 @@ The way you develop your application is similar to the way you do it without Doc **Setting up your local environment** -With the latest versions of Docker for Mac and Windows, it's easier than ever to develop Docker applications, and the setup is straightforward. +With the latest versions of Docker Desktop for Mac and Windows, it's easier than ever to develop Docker applications, and the setup is straightforward. > [!TIP] -> For instructions on setting up Docker for Windows, go to . +> For instructions on setting up Docker Desktop for Windows, go to . > ->For instructions on setting up Docker for Mac, go to . +> For instructions on setting up Docker Desktop for Mac, go to . In addition, you'll need a code editor so that you can actually develop your application while using Docker CLI. -Microsoft provides Visual Studio Code, which is a lightweight code editor that's supported on Windows, Linux, and macOS, and provides IntelliSense with [support for many languages](https://code.visualstudio.com/docs/languages/overview) (JavaScript, .NET, Go, Java, Ruby, Python, and most modern languages), [debugging](https://code.visualstudio.com/Docs/editor/debugging), [integration with Git](https://code.visualstudio.com/Docs/editor/versioncontrol) and [extensions support](https://code.visualstudio.com/docs/extensions/overview). This editor is a great fit for macOS and Linux developers. In Windows, you can also use Visual Studio. +Microsoft provides Visual Studio Code, which is a lightweight code editor that's supported on Windows, Linux, and macOS, and provides IntelliSense with [support for many languages](https://code.visualstudio.com/docs/languages/overview) (JavaScript, .NET, Go, Java, Ruby, Python, and most modern languages), [debugging](https://code.visualstudio.com/Docs/editor/debugging), [integration with Git](https://code.visualstudio.com/Docs/editor/versioncontrol) and [extensions support](https://code.visualstudio.com/docs/extensions/overview). This editor is a great fit for macOS and Linux developers. In Windows, you also can use Visual Studio. > [!TIP] > For instructions on installing Visual Studio Code for Windows, Linux, or macOS, go to . @@ -75,54 +76,71 @@ The Docker extension for VS Code provides the following features: To install the Docker extension, press Ctrl+Shift+P, type `ext install`, and then run the Install Extension command to bring up the Marketplace extension list. Next, type **docker** to filter the results, and then select the Docker Support extension, as depicted in Figure 4-23. -![View of the Docker extension for VS Code.](./media/docker-apps-inner-loop-workflow/install-docker-extension-vs-code.png) +![View of the Docker extension for VS Code.](media/docker-apps-inner-loop-workflow/install-docker-extension-vs-code.png) **Figure 4-23**. Installing the Docker Extension in Visual Studio Code ### Step 2: Create a DockerFile related to an existing image (plain OS or dev environments like .NET Core, Node.js, and Ruby) -You'll need a `DockerFile` per custom image to be built and per container to be deployed. If your app is made up of a single custom service, you'll need a single `DockerFile`. But if your app is composed of multiple services (as in a microservices architecture), you'll need one `Dockerfile` per service. +You'll need a `DockerFile` per custom image to be built and per container to be deployed. If your app is made up of single custom service, you'll need a single `DockerFile`. But if your app is composed of multiple services (as in a microservices architecture), you'll need one `Dockerfile` per service. The `DockerFile` is commonly placed in the root folder of your app or service and contains the required commands so that Docker knows how to set up and run that app or service. You can create your `DockerFile` and add it to your project along with your code (node.js, .NET Core, etc.), or, if you're new to the environment, take a look at the following Tip. > [!TIP] > You can use the Docker extension to guide you when using the `Dockerfile` and `docker-compose.yml` files related to your Docker containers. Eventually, you'll probably write these kinds of files without this tool, but using the Docker extension is a good starting point that will accelerate your learning curve. -In Figure 4-24, you can see how a docker-compose file is added by using the Docker Extension for VS Code. +In Figure 4-24, you can see the steps to add the docker files to a project by using the Docker Extension for VS Code: + +1. Open the command palette, type "**docker**" and select "**Add Docker Files to Workspace**". +2. Select Application Platform (ASP.NET Core) +3. Select Operating System (Linux) +4. Include optional Docker Compose files +5. Enter ports to publish (80, 443) +6. Select the project -![Console view of Docker extension for VS Code.](./media/docker-apps-inner-loop-workflow/add-docker-files-to-workspace-command.png) +![Steps to add docker files with docker extension](media/docker-apps-inner-loop-workflow/add-docker-files-to-workspace-command.png) -**Figure 4-24**. Docker files added using the **Add Docker files to Workspace command** +**Figure 4-24**. Docker files added using the **Add Docker files to Workspace** command When you add a DockerFile, you specify what base Docker image you'll be using (like using `FROM mcr.microsoft.com/dotnet/core/aspnet`). You'll usually build your custom image on top of a base image that you get from any official repository at the [Docker Hub registry](https://hub.docker.com/) (like an [image for .NET Core](https://hub.docker.com/_/microsoft-dotnet-core/) or the one [for Node.js](https://hub.docker.com/_/node/)). -***Use an existing official Docker image*** +> [!TIP] +> You'll have to repeat this procedure for every project in your application. However, the extension will ask to overwrite the generated docker-compose file after the first time. You should reply to not overwrite it, so the extension creates separate docker-compose files, that you can then merge by hand, prior to running docker-compose. + +**_Use an existing official Docker image_** Using an official repository of a language stack with a version number ensures that the same language features are available on all machines (including development, testing, and production). The following is a sample DockerFile for a .NET Core container: ```Dockerfile -# Base Docker image to use -FROM mcr.microsoft.com/dotnet/core/aspnet:2.2 - -# Set the Working Directory and files to be copied to the image -ARG source -WORKDIR /app -COPY ${source:-bin/Release/PublishOutput} . - -# Configure the listening port to 80 (Internal/Secured port within Docker host) -EXPOSE 80 - -# Application entry point -ENTRYPOINT ["dotnet", "MyCustomMicroservice.dll"] +FROM mcr.microsoft.com/dotnet/core/aspnet:3.1 AS base +WORKDIR /app +EXPOSE 80 +EXPOSE 443 + +FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build +WORKDIR /src +COPY ["src/WebApi/WebApi.csproj", "src/WebApi/"] +RUN dotnet restore "src/WebApi/WebApi.csproj" +COPY . . +WORKDIR "/src/src/WebApi" +RUN dotnet build "WebApi.csproj" -c Release -o /app/build + +FROM build AS publish +RUN dotnet publish "WebApi.csproj" -c Release -o /app/publish + +FROM base AS final +WORKDIR /app +COPY --from=publish /app/publish . +ENTRYPOINT ["dotnet", "WebApi.dll"] ``` -In this case, the image is based on version 2.2 of the official ASP.NET Core Docker image (multi-arch for Linux and Windows), as per the line `FROM mcr.microsoft.com/dotnet/core/aspnet:2.2`. (For more information about this topic, see the [ASP.NET Core Docker Image](https://hub.docker.com/_/microsoft-dotnet-core-aspnet/) page and the [.NET Core Docker Image](https://hub.docker.com/_/microsoft-dotnet-core/) page). +In this case, the image is based on version 3.1 of the official ASP.NET Core Docker image (multi-arch for Linux and Windows), as per the line `FROM mcr.microsoft.com/dotnet/core/aspnet:3.1`. (For more information about this topic, see the [ASP.NET Core Docker Image](https://hub.docker.com/_/microsoft-dotnet-core-aspnet/) page and the [.NET Core Docker Image](https://hub.docker.com/_/microsoft-dotnet-core/) page). -In the DockerFile, you can also instruct Docker to listen to the TCP port that you'll use at runtime (such as port 80). +In the DockerFile, you can also instruct Docker to listen to the TCP port that you'll use at runtime (such as port 80 or 443). -You can specify additional configuration settings in the Dockerfile, depending on the language and framework you're using. For instance, the `ENTRYPOINT` line with `["dotnet", "MySingleContainerWebApp.dll"]` tells Docker to run a .NET Core application. If you're using the SDK and the .NET Core CLI (`dotnet CLI`) to build and run the .NET application, this setting would be different. The key point here is that the ENTRYPOINT line and other settings depend on the language and platform you choose for your application. +You can specify additional configuration settings in the Dockerfile, depending on the language and framework you're using. For instance, the `ENTRYPOINT` line with `["dotnet", "WebMvcApplication.dll"]` tells Docker to run a .NET Core application. If you're using the SDK and the .NET Core CLI (`dotnet CLI`) to build and run the .NET application, this setting would be different. The key point here is that the ENTRYPOINT line and other settings depend on the language and platform you choose for your application. > [!TIP] > For more information about building Docker images for .NET Core applications, go to . @@ -135,7 +153,7 @@ A single image name in a repo can contain platform variants, such as a Linux ima Pulling the [dotnet/core/aspnet](https://hub.docker.com/_/microsoft-dotnet-core-aspnet/) image from a Windows host pulls the Windows variant, whereas pulling the same image name from a Linux host pulls the Linux variant. -***Create your base image from scratch*** +**_Create your base image from scratch_** You can create your own Docker base image from scratch as explained in this [article](https://docs.docker.com/engine/userguide/eng-image/baseimages/) from Docker. This scenario is probably not the best for you if you're just starting with Docker, but if you want to set the specific bits of your own base image, you can do it. @@ -146,23 +164,23 @@ For each custom service that comprises your app, you'll need to create a related > [!NOTE] > When taking into account the "outer-loop DevOps workflow", the images will be created by an automated build process whenever you push your source code to a Git repository (Continuous Integration), so the images will be created in that global environment from your source code. > -> But before we consider going to that outer-loop route, we need to ensure that the Docker application is actually working properly so that they don't push code that might not work properly to the source control system (Git, etc.). +> But before you consider going to that outer-loop route, you need to ensure that the Docker application is actually working properly so that they don't push code that might not work properly to the source control system (Git, etc.). > > Therefore, each developer first needs to do the entire inner-loop process to test locally and continue developing until they want to push a complete feature or change to the source control system. -To create an image in your local environment and using the DockerFile, you can use the docker build command, as demonstrated in Figure 4-25 (you can also run `docker-compose up --build` for applications composed by several containers/services). +To create an image in your local environment and using the DockerFile, you can use the docker build command, as shown in Figure 4-25, because it already tags the image for you and builds the images for all services in the application with a simple command. -![Screenshot showing the console output of the docker build command.](./media/docker-apps-inner-loop-workflow/run-docker-build-command.png) +![Screenshot showing the console output of the docker-compose build command.](media/docker-apps-inner-loop-workflow/run-docker-build-command.png) **Figure 4-25**. Running docker build Optionally, instead of directly running `docker build` from the project folder, you first can generate a deployable folder with the .NET libraries needed by using the run `dotnet publish` command, and then run `docker build`. -This example creates a Docker image with the name `cesardl/netcore-webapi-microservice-docker:first` (`:first` is a tag, like a specific version). You can take this step for each custom image you need to create for your composed Docker application with several containers. +This example creates a Docker image with the name `explore-docker-vscode/webapi:latest` (`:latest` is a tag, like a specific version). You can take this step for each custom image you need to create for your composed Docker application with several containers. However, we'll see in the next section that it's easier to do this using `docker-compose`. -You can find the existing images in your local repository (your development machine) by using the docker images command, as illustrated in Figure 4-26. +You can find the existing images in your local repository (your development machine) by using the `docker images` command, as illustrated in Figure 4-26. -![Console output from command docker images, showing existing images.](./media/docker-apps-inner-loop-workflow/view-existing-images-with-docker-images.png) +![Console output from command docker images, showing existing images.](media/docker-apps-inner-loop-workflow/view-existing-images-with-docker-images.png) **Figure 4-26**. Viewing existing images using docker images @@ -173,51 +191,69 @@ With the `docker-compose.yml` file, you can define a set of related services to Create that file in your main or root solution folder; it should have content similar to that shown in this `docker-compose.yml` file: ```yml -version: '3.4' +version: "3.4" + services: - web: - build: . + webapi: + image: webapi + build: + context: . + dockerfile: src/WebApi/Dockerfile ports: - - "81:80" - volumes: - - .:/code + - 51080:80 depends_on: - - redis + - redis + environment: + - ASPNETCORE_ENVIRONMENT=Development + - ASPNETCORE_URLS=http://+:80 + + webapp: + image: webapp + build: + context: . + dockerfile: src/WebApp/Dockerfile + ports: + - 50080:80 + environment: + - ASPNETCORE_ENVIRONMENT=Development + - ASPNETCORE_URLS=http://+:80 + - WebApiBaseAddress=http://webapi + redis: image: redis ``` -In this particular case, this file defines two services: the web service (your custom service) and the redis service (a popular cache service). Each service will be deployed as a container, so we need to use a concrete Docker image for each. For this particular web service, the image will need to do the following: +In this particular case, this file defines three services: the web API service (your custom service), a web application, and the Redis service (a popular cache service). Each service will be deployed as a container, so you need to use a concrete Docker image for each. For this particular application: -- Build from the DockerFile in the current directory +- The web API service is built from the DockerFile in the `src/WebApi/Dockerfile` directory. -- Forward the exposed port 80 on the container to port 81 on the host machine +- The host port 51080 is forwarded to the exposed port 80 on the `webapi` container. -- Mount the project directory on the host to /code within the container, making it possible for you to modify the code without having to rebuild the image +- The web API service depends on the Redis service -- Link the web service to the redis service +- The web application accesses the web API service using the internal address: `http://webapi`. -The redis service uses the [latest public redis image](https://hub.docker.com/_/redis/) pulled from the Docker Hub registry. [redis](https://redis.io/) is a popular cache system for server-side applications. +- The Redis service uses the [latest public redis image](https://hub.docker.com/_/redis/) pulled from the Docker Hub registry. [Redis](https://redis.io/) is a popular cache system for server-side applications. ### Step 5: Build and run your Docker app -If your app has only a single container, you just need to run it by deploying it to your Docker Host (VM or physical server). However, if your app is made up of multiple services, you need to *compose it*, too. Let's see the different options. +If your app has only a single container, you just need to run it by deploying it to your Docker Host (VM or physical server). However, if your app is made up of multiple services, you need to _compose it_, too. Let's see the different options. -***Option A: Run a single container or service*** +**_Option A: Run a single container or service_** You can run the Docker image by using the docker run command, as shown here: ```console -docker run -t -d -p 80:5000 cesardl/netcore-webapi-microservice-docker:first +docker run -t -d -p 50080:80 explore-docker-vscode/webapp:latest ``` -For this particular deployment, we'll be redirecting requests sent to port 80 to the internal port 5000. Now the application is listening on the external port 80 at the host level. +For this particular deployment, we'll be redirecting requests sent to port 50080 on the host to the internal port 80. -***Option B: Compose and run a multiple-container application*** +**_Option B: Compose and run a multiple-container application_** -In most enterprise scenarios, a Docker application will be composed of multiple services. For these cases, you can run the `docker-compose up` command (Figure 4-27), which will use the docker-compose.yml file that you might have created previously. Running this command deploys a composed application with all of its related containers. +In most enterprise scenarios, a Docker application will be composed of multiple services. For these cases, you can run the `docker-compose up` command (Figure 4-27), which will use the docker-compose.yml file that you created previously. Running this command builds all custom images and deploys the composed application with all of its related containers. -![Console output from the docker-compose up command.](./media/docker-apps-inner-loop-workflow/results-docker-compose-up.png) +![Console output from the docker-compose up command.](media/docker-apps-inner-loop-workflow/results-docker-compose-up.png) **Figure 4-27**. Results of running the "docker-compose up" command @@ -233,23 +269,17 @@ This step will vary depending on what your app is doing. In a simple .NET Core Web API "Hello World" deployed as a single container or service, you'd just need to access the service by providing the TCP port specified in the DockerFile. -If localhost is not turned on, to navigate to your service, find the IP address for the machine by using this command: - -```console -docker-machine {IP} {YOUR-CONTAINER-NAME} -``` - On the Docker host, open a browser and navigate to that site; you should see your app/service running, as demonstrated in Figure 4-29. -![Browser view of the response from localhost/API/values.](./media/docker-apps-inner-loop-workflow/test-docker-app-locally-localhost.png) +![Browser view of the response from localhost/API/values.](media/docker-apps-inner-loop-workflow/test-docker-app-locally-localhost.png) -**Figure 4-29**. Testing your Docker application locally using localhost +**Figure 4-29**. Testing your Docker application locally by using the browser -Note that it's using port 80, but internally it's being redirected to port 5000, because that's how it was deployed with `docker run`, as explained earlier. +Note that it's using port 50080, but internally it's being redirected to port 80, because that's how it was deployed with `docker compose`, as explained earlier. -You can test this by using CURL from the terminal. In a Docker installation on Windows, the default IP is 10.0.75.1, as depicted in Figure 4-30. +You can test this by using the browser using CURL from the terminal, as depicted in Figure 4-30. -![Console output from getting the http://10.0.75.1/API/values with curl](./media/docker-apps-inner-loop-workflow/test-docker-app-locally-curl.png) +![Curl result obtained from http://localhost:51080/WeatherForecast](media/docker-apps-inner-loop-workflow/test-docker-app-locally-curl.png) **Figure 4-30**. Testing a Docker application locally by using CURL @@ -257,11 +287,11 @@ You can test this by using CURL from the terminal. In a Docker installation on W Visual Studio Code supports debugging Docker if you're using Node.js and other platforms like .NET Core containers. -You can also debug .NET Core or .NET Framework containers in Docker when using Visual Studio for Windows or Mac, as described in the next section. +You also can debug .NET Core or .NET Framework containers in Docker when using Visual Studio for Windows or Mac, as described in the next section. > [!TIP] > To learn more about debugging Node.js Docker containers, see and . ->[!div class="step-by-step"] ->[Previous](docker-apps-development-environment.md) ->[Next](visual-studio-tools-for-docker.md) +> [!div class="step-by-step"] +> [Previous](docker-apps-development-environment.md) +> [Next](visual-studio-tools-for-docker.md) diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/index.md b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/index.md index 5165c6c360d67..da892b3abb9b3 100644 --- a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/index.md +++ b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/index.md @@ -1,7 +1,7 @@ --- title: Design and develop containerized apps using Docker and Microsoft Azure description: Let's get into the Develop/Design workload in the Docker applications life-cycle. -ms.date: 02/15/2019 +ms.date: 08/06/2020 --- # Designing and developing containerized apps using Docker and Microsoft Azure diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/add-docker-support-menu.png b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/add-docker-support-menu.png index e32ba2f047bb1..ce0077f993031 100644 Binary files a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/add-docker-support-menu.png and b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/add-docker-support-menu.png differ diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/aks-cluster-view.png b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/aks-cluster-view.png deleted file mode 100644 index aa2e70553632e..0000000000000 Binary files a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/aks-cluster-view.png and /dev/null differ diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/aks-resource-group-view.png b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/aks-resource-group-view.png deleted file mode 100644 index 39f66b6d578c8..0000000000000 Binary files a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/aks-resource-group-view.png and /dev/null differ diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/az-cli-loginServer-name.png b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/az-cli-loginServer-name.png deleted file mode 100644 index fb76ad69da745..0000000000000 Binary files a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/az-cli-loginServer-name.png and /dev/null differ diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/build-aspnet-core-applications-linux-containers-aks-kubernetes/add-docker-support-to-project.png b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/build-aspnet-core-applications-linux-containers-aks-kubernetes/add-docker-support-to-project.png new file mode 100644 index 0000000000000..b7515a6a9afe5 Binary files /dev/null and b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/build-aspnet-core-applications-linux-containers-aks-kubernetes/add-docker-support-to-project.png differ diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/build-aspnet-core-applications-linux-containers-aks-kubernetes/add-orchestrator-support.png b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/build-aspnet-core-applications-linux-containers-aks-kubernetes/add-orchestrator-support.png new file mode 100644 index 0000000000000..efcc51e0d288b Binary files /dev/null and b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/build-aspnet-core-applications-linux-containers-aks-kubernetes/add-orchestrator-support.png differ diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/build-aspnet-core-applications-linux-containers-aks-kubernetes/aks-deployed-application.png b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/build-aspnet-core-applications-linux-containers-aks-kubernetes/aks-deployed-application.png new file mode 100644 index 0000000000000..9ce775b0ca7e3 Binary files /dev/null and b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/build-aspnet-core-applications-linux-containers-aks-kubernetes/aks-deployed-application.png differ diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/build-aspnet-core-applications-linux-containers-aks-kubernetes/az-cli-loginServer-name.png b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/build-aspnet-core-applications-linux-containers-aks-kubernetes/az-cli-loginServer-name.png new file mode 100644 index 0000000000000..88ca0f45630a9 Binary files /dev/null and b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/build-aspnet-core-applications-linux-containers-aks-kubernetes/az-cli-loginServer-name.png differ diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/build-aspnet-core-applications-linux-containers-aks-kubernetes/browser-opened.png b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/build-aspnet-core-applications-linux-containers-aks-kubernetes/browser-opened.png new file mode 100644 index 0000000000000..a99d0237a487f Binary files /dev/null and b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/build-aspnet-core-applications-linux-containers-aks-kubernetes/browser-opened.png differ diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/build-aspnet-core-applications-linux-containers-aks-kubernetes/create-aspnet-core-application.png b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/build-aspnet-core-applications-linux-containers-aks-kubernetes/create-aspnet-core-application.png new file mode 100644 index 0000000000000..76f7430dfabeb Binary files /dev/null and b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/build-aspnet-core-applications-linux-containers-aks-kubernetes/create-aspnet-core-application.png differ diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/build-aspnet-core-applications-linux-containers-aks-kubernetes/create-web-api-application.png b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/build-aspnet-core-applications-linux-containers-aks-kubernetes/create-web-api-application.png new file mode 100644 index 0000000000000..209d886f77142 Binary files /dev/null and b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/build-aspnet-core-applications-linux-containers-aks-kubernetes/create-web-api-application.png differ diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/build-aspnet-core-applications-linux-containers-aks-kubernetes/docker-compose-project-in-visual-studio.png b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/build-aspnet-core-applications-linux-containers-aks-kubernetes/docker-compose-project-in-visual-studio.png new file mode 100644 index 0000000000000..b20d2bc99014c Binary files /dev/null and b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/build-aspnet-core-applications-linux-containers-aks-kubernetes/docker-compose-project-in-visual-studio.png differ diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/build-aspnet-core-applications-linux-containers-aks-kubernetes/docker-images-command.png b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/build-aspnet-core-applications-linux-containers-aks-kubernetes/docker-images-command.png new file mode 100644 index 0000000000000..fcd56bd22bdcf Binary files /dev/null and b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/build-aspnet-core-applications-linux-containers-aks-kubernetes/docker-images-command.png differ diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/build-aspnet-core-applications-linux-containers-aks-kubernetes/enter-project-name-and-location.png b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/build-aspnet-core-applications-linux-containers-aks-kubernetes/enter-project-name-and-location.png new file mode 100644 index 0000000000000..85e63ca46c210 Binary files /dev/null and b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/build-aspnet-core-applications-linux-containers-aks-kubernetes/enter-project-name-and-location.png differ diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/build-aspnet-core-applications-linux-containers-aks-kubernetes/getting-aks-credentials.png b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/build-aspnet-core-applications-linux-containers-aks-kubernetes/getting-aks-credentials.png new file mode 100644 index 0000000000000..550bde3a26420 Binary files /dev/null and b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/build-aspnet-core-applications-linux-containers-aks-kubernetes/getting-aks-credentials.png differ diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/build-aspnet-core-applications-linux-containers-aks-kubernetes/kubectl-apply-command.png b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/build-aspnet-core-applications-linux-containers-aks-kubernetes/kubectl-apply-command.png new file mode 100644 index 0000000000000..b930957b1430c Binary files /dev/null and b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/build-aspnet-core-applications-linux-containers-aks-kubernetes/kubectl-apply-command.png differ diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/build-aspnet-core-applications-linux-containers-aks-kubernetes/kubernetes-cluster-information.png b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/build-aspnet-core-applications-linux-containers-aks-kubernetes/kubernetes-cluster-information.png new file mode 100644 index 0000000000000..cddad2cc89a1d Binary files /dev/null and b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/build-aspnet-core-applications-linux-containers-aks-kubernetes/kubernetes-cluster-information.png differ diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/build-aspnet-core-applications-linux-containers-aks-kubernetes/loginServer-name.png b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/build-aspnet-core-applications-linux-containers-aks-kubernetes/loginServer-name.png new file mode 100644 index 0000000000000..86df6f29a186f Binary files /dev/null and b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/build-aspnet-core-applications-linux-containers-aks-kubernetes/loginServer-name.png differ diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/build-aspnet-core-applications-linux-containers-aks-kubernetes/running-docker-compose-with-visual-studio.png b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/build-aspnet-core-applications-linux-containers-aks-kubernetes/running-docker-compose-with-visual-studio.png new file mode 100644 index 0000000000000..e63fb26a409ba Binary files /dev/null and b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/build-aspnet-core-applications-linux-containers-aks-kubernetes/running-docker-compose-with-visual-studio.png differ diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/build-aspnet-core-applications-linux-containers-aks-kubernetes/select-linux-docker-support.png b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/build-aspnet-core-applications-linux-containers-aks-kubernetes/select-linux-docker-support.png new file mode 100644 index 0000000000000..79ef17f61dfea Binary files /dev/null and b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/build-aspnet-core-applications-linux-containers-aks-kubernetes/select-linux-docker-support.png differ diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/select-release-mode.png b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/build-aspnet-core-applications-linux-containers-aks-kubernetes/select-release-mode.png similarity index 70% rename from docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/select-release-mode.png rename to docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/build-aspnet-core-applications-linux-containers-aks-kubernetes/select-release-mode.png index 0f746843c48b6..a04a2f38c0193 100644 Binary files a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/select-release-mode.png and b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/build-aspnet-core-applications-linux-containers-aks-kubernetes/select-release-mode.png differ diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/build-aspnet-core-applications-linux-containers-aks-kubernetes/tagged-docker-images-list.png b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/build-aspnet-core-applications-linux-containers-aks-kubernetes/tagged-docker-images-list.png new file mode 100644 index 0000000000000..67c0770af488d Binary files /dev/null and b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/build-aspnet-core-applications-linux-containers-aks-kubernetes/tagged-docker-images-list.png differ diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/build-aspnet-core-applications-linux-containers-aks-kubernetes/uploading-docker-images-complete.png b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/build-aspnet-core-applications-linux-containers-aks-kubernetes/uploading-docker-images-complete.png new file mode 100644 index 0000000000000..e9f3a98a75f45 Binary files /dev/null and b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/build-aspnet-core-applications-linux-containers-aks-kubernetes/uploading-docker-images-complete.png differ diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/build-aspnet-core-applications-linux-containers-aks-kubernetes/visual-studio-containers-window.png b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/build-aspnet-core-applications-linux-containers-aks-kubernetes/visual-studio-containers-window.png new file mode 100644 index 0000000000000..6cd55c467df70 Binary files /dev/null and b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/build-aspnet-core-applications-linux-containers-aks-kubernetes/visual-studio-containers-window.png differ diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/create-aspnet-core-application.png b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/create-aspnet-core-application.png deleted file mode 100644 index 127356d03b573..0000000000000 Binary files a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/create-aspnet-core-application.png and /dev/null differ diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/create-web-api-application.png b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/create-web-api-application.png deleted file mode 100644 index ec0d250a8191e..0000000000000 Binary files a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/create-web-api-application.png and /dev/null differ diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/deploy-azure-kubernetes-service/aks-cluster-view.png b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/deploy-azure-kubernetes-service/aks-cluster-view.png new file mode 100644 index 0000000000000..57430ca42b662 Binary files /dev/null and b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/deploy-azure-kubernetes-service/aks-cluster-view.png differ diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/deploy-azure-kubernetes-service/aks-resource-group-view.png b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/deploy-azure-kubernetes-service/aks-resource-group-view.png new file mode 100644 index 0000000000000..d2718521a6545 Binary files /dev/null and b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/deploy-azure-kubernetes-service/aks-resource-group-view.png differ diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/get-credentials-command-result.png b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/deploy-azure-kubernetes-service/get-credentials-command-result.png similarity index 69% rename from docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/get-credentials-command-result.png rename to docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/deploy-azure-kubernetes-service/get-credentials-command-result.png index 05be21f3ea5c1..4637ec8250a61 100644 Binary files a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/get-credentials-command-result.png and b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/deploy-azure-kubernetes-service/get-credentials-command-result.png differ diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/deploy-azure-kubernetes-service/kubectl-get-nodes-command-result.png b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/deploy-azure-kubernetes-service/kubectl-get-nodes-command-result.png new file mode 100644 index 0000000000000..64a3c2a48d01c Binary files /dev/null and b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/deploy-azure-kubernetes-service/kubectl-get-nodes-command-result.png differ diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/docker-apps-inner-loop-workflow/add-docker-files-to-workspace-command.PNG b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/docker-apps-inner-loop-workflow/add-docker-files-to-workspace-command.PNG deleted file mode 100644 index f9ec3790e1c9b..0000000000000 Binary files a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/docker-apps-inner-loop-workflow/add-docker-files-to-workspace-command.PNG and /dev/null differ diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/docker-apps-inner-loop-workflow/add-docker-files-to-workspace-command.png b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/docker-apps-inner-loop-workflow/add-docker-files-to-workspace-command.png new file mode 100644 index 0000000000000..f7ce4db244691 Binary files /dev/null and b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/docker-apps-inner-loop-workflow/add-docker-files-to-workspace-command.png differ diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/docker-apps-inner-loop-workflow/install-docker-extension-vs-code.png b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/docker-apps-inner-loop-workflow/install-docker-extension-vs-code.png index 3bd5e68dfbd39..56e01df6599dd 100644 Binary files a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/docker-apps-inner-loop-workflow/install-docker-extension-vs-code.png and b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/docker-apps-inner-loop-workflow/install-docker-extension-vs-code.png differ diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/docker-apps-inner-loop-workflow/results-docker-compose-up.png b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/docker-apps-inner-loop-workflow/results-docker-compose-up.png index 985e6b9c40ec7..0147b64552c8e 100644 Binary files a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/docker-apps-inner-loop-workflow/results-docker-compose-up.png and b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/docker-apps-inner-loop-workflow/results-docker-compose-up.png differ diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/docker-apps-inner-loop-workflow/run-docker-build-command.png b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/docker-apps-inner-loop-workflow/run-docker-build-command.png index 05f0d7e22d12b..6ca6e60eb8b80 100644 Binary files a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/docker-apps-inner-loop-workflow/run-docker-build-command.png and b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/docker-apps-inner-loop-workflow/run-docker-build-command.png differ diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/docker-apps-inner-loop-workflow/test-docker-app-locally-curl.png b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/docker-apps-inner-loop-workflow/test-docker-app-locally-curl.png index 23d5215f999f0..ee81994a3d68c 100644 Binary files a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/docker-apps-inner-loop-workflow/test-docker-app-locally-curl.png and b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/docker-apps-inner-loop-workflow/test-docker-app-locally-curl.png differ diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/docker-apps-inner-loop-workflow/test-docker-app-locally-localhost.png b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/docker-apps-inner-loop-workflow/test-docker-app-locally-localhost.png index 6f9df8937212f..5e14b650dd542 100644 Binary files a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/docker-apps-inner-loop-workflow/test-docker-app-locally-localhost.png and b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/docker-apps-inner-loop-workflow/test-docker-app-locally-localhost.png differ diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/docker-apps-inner-loop-workflow/view-existing-images-with-docker-images.png b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/docker-apps-inner-loop-workflow/view-existing-images-with-docker-images.png index b0e26dca761b9..821b1b5cbd3a2 100644 Binary files a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/docker-apps-inner-loop-workflow/view-existing-images-with-docker-images.png and b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/docker-apps-inner-loop-workflow/view-existing-images-with-docker-images.png differ diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/docker-images-command.png b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/docker-images-command.png deleted file mode 100644 index b69b7117421a1..0000000000000 Binary files a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/docker-images-command.png and /dev/null differ diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/docker-support-solution-explorer.png b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/docker-support-solution-explorer.png index 23832ec2ceb5b..8c8a51c2f3d60 100644 Binary files a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/docker-support-solution-explorer.png and b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/docker-support-solution-explorer.png differ diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/enable-docker-compose-support.png b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/enable-docker-compose-support.png deleted file mode 100644 index f0575396ac2ff..0000000000000 Binary files a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/enable-docker-compose-support.png and /dev/null differ diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/enable-docker-support-visual-studio.png b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/enable-docker-support-visual-studio.png index 4ac3f23cdcd12..351dc3136dbfc 100644 Binary files a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/enable-docker-support-visual-studio.png and b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/enable-docker-support-visual-studio.png differ diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/getting-aks-credentials.png b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/getting-aks-credentials.png deleted file mode 100644 index 1168ca2a7076a..0000000000000 Binary files a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/getting-aks-credentials.png and /dev/null differ diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/kubectl-get-nodes-command-result.png b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/kubectl-get-nodes-command-result.png deleted file mode 100644 index 08a7b545ced99..0000000000000 Binary files a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/kubectl-get-nodes-command-result.png and /dev/null differ diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/kubernetes-cluster-information.png b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/kubernetes-cluster-information.png deleted file mode 100644 index 54ed976c49220..0000000000000 Binary files a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/kubernetes-cluster-information.png and /dev/null differ diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/loginServer-name.png b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/loginServer-name.png deleted file mode 100644 index 1f5340ba119a5..0000000000000 Binary files a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/loginServer-name.png and /dev/null differ diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/select-linux-docker-support.png b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/select-linux-docker-support.png deleted file mode 100644 index 68dece7b44ada..0000000000000 Binary files a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/select-linux-docker-support.png and /dev/null differ diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/uploading-docker-images-complete.png b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/uploading-docker-images-complete.png deleted file mode 100644 index ef4b6c12c1f6f..0000000000000 Binary files a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/uploading-docker-images-complete.png and /dev/null differ diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/uploading-image-to-acr.png b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/uploading-image-to-acr.png deleted file mode 100644 index 41f51c8898367..0000000000000 Binary files a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/uploading-image-to-acr.png and /dev/null differ diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/visual-studio-docker-tools-options.png b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/visual-studio-docker-tools-options.png index 599da88803144..7d6178f997872 100644 Binary files a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/visual-studio-docker-tools-options.png and b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/media/visual-studio-docker-tools-options.png differ diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/monolithic-applications.md b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/monolithic-applications.md index 69311dbb4b18d..d6265c6bddd72 100644 --- a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/monolithic-applications.md +++ b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/monolithic-applications.md @@ -1,7 +1,7 @@ --- title: Monolithic applications description: Understand the core concepts for containerizing monolithic applications. -ms.date: 02/15/2019 +ms.date: 08/06/2020 --- # Monolithic applications diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/orchestrate-high-scalability-availability.md b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/orchestrate-high-scalability-availability.md index 399b9e5c1cd96..caf885ff4d2b3 100644 --- a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/orchestrate-high-scalability-availability.md +++ b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/orchestrate-high-scalability-availability.md @@ -1,7 +1,7 @@ --- title: Orchestrating microservices and multi-container applications for high scalability and availability description: Real production applications have to be deployed and managed with orchestrators that handle the health, workload and life cycles of all containers. -ms.date: 02/15/2019 +ms.date: 08/06/2020 --- # Orchestrating microservices and multi-container applications for high scalability and availability @@ -56,7 +56,7 @@ Figure 4-7 shows the structure of a Kubernetes cluster where a master node (VM) ## Development environment for Kubernetes -In the development environment that [Docker announced in July 2018](https://blog.docker.com/2018/07/kubernetes-is-now-available-in-docker-desktop-stable-channel/), Kubernetes can also run in a single development machine (Windows 10 or macOS) by just installing [Docker Desktop](https://www.docker.com/community-edition). You can later deploy to the cloud (AKS) for further integration tests, as shown in figure 4-8. +In the development environment that [Docker announced in July 2018](https://blog.docker.com/2018/07/kubernetes-is-now-available-in-docker-desktop-stable-channel/), Kubernetes can also run in a single development machine (Windows 10 or macOS) by just installing [Docker Desktop](https://www.docker.com/products/docker-desktop). You can later deploy to the cloud (AKS) for further integration tests, as shown in figure 4-8. ![Diagram showing Kubernetes on a dev machine then deployed to AKS.](./media/orchestrate-high-scalability-availability/kubernetes-development-environment.png) diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/set-up-windows-containers-with-powershell.md b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/set-up-windows-containers-with-powershell.md index 930e19852dde2..4501f29a8d87b 100644 --- a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/set-up-windows-containers-with-powershell.md +++ b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/set-up-windows-containers-with-powershell.md @@ -1,7 +1,7 @@ --- title: Using Windows PowerShell commands in a DockerFile to set up Windows Containers (Docker standard based) description: Learn how to use PowerShell when working with Docker in Windows containers -ms.date: 02/15/2019 +ms.date: 08/06/2020 --- # Using Windows PowerShell commands in a DockerFile to set up Windows Containers (Docker standard based) diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/soa-applications.md b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/soa-applications.md index a5e7a676ef729..af9096bfdf6dc 100644 --- a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/soa-applications.md +++ b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/soa-applications.md @@ -1,13 +1,13 @@ --- title: SOA applications description: Bear in mind that containers can also be a useful deployment option for SOA applications. -ms.date: 02/15/2019 +ms.date: 08/06/2020 --- # Service-oriented applications Service-Oriented Architecture (SOA) was an overused term that meant many different things to different people. But as a common denominator, SOA means that you structure the architecture of your application by decomposing it into several services (most commonly as HTTP services) that can be classified in different types like subsystems or, in other cases, as tiers. -Today, you can deploy those services as Docker containers, which solve deployment-related issues because all of the dependencies are included in the container image. However, when you need to scale out SOAs, you might encounter challenges if you're deploying based on single instances. This challenge can be handled using Docker clustering software or an orchestrator. We'll look at orchestrators in greater detail in the next section, when we explore microservices approaches. +Today, you can deploy those services as Docker containers, which solve deployment-related issues because all of the dependencies are included in the container image. However, when you need to scale out SOAs, you might encounter challenges if you're deploying based on single instances. This challenge can be handled using Docker clustering software or an orchestrator. You'll get to look at orchestrators in greater detail in the next section, when you explore microservices approaches. Docker containers are useful (but not required) for both traditional service-oriented architectures and the more advanced microservices architectures. diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/state-and-data-in-docker-applications.md b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/state-and-data-in-docker-applications.md index f1171998597d1..ea4bf12fa8daa 100644 --- a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/state-and-data-in-docker-applications.md +++ b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/state-and-data-in-docker-applications.md @@ -1,7 +1,7 @@ --- title: State and data in Docker applications description: Learn the available option to save state in containerized applications. -ms.date: 02/15/2019 +ms.date: 08/06/2020 --- # State and data in Docker applications diff --git a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/visual-studio-tools-for-docker.md b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/visual-studio-tools-for-docker.md index 9a793f6ed76c1..6c8a475014db5 100644 --- a/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/visual-studio-tools-for-docker.md +++ b/docs/architecture/containerized-lifecycle/design-develop-containerized-apps/visual-studio-tools-for-docker.md @@ -1,10 +1,11 @@ --- title: Visual Studio Tools for Docker on Windows description: Get to know the Docker tools available in Visual Studio 2017 version 15.7 and later. -ms.date: 02/15/2019 +ms.date: 08/06/2020 ms.custom: vs-dotnet --- -# Use Docker Tools in Visual Studio 2017 on Windows + +# Use Docker Tools in Visual Studio on Windows The developer workflow when using the Docker Tools included in Visual Studio 2017 version 15.7 and later, is similar to using Visual Studio Code and Docker CLI (in fact, it's based on the same Docker CLI), but it's easier to get started, simplifies the process, and provides greater productivity for the build, run, and compose tasks. It can also run and debug your containers via the usual `F5` and `Ctrl+F5` keys from Visual Studio. You can even debug a whole solution if its containers are defined in the same `docker-compose.yml` file at the solution level. @@ -15,74 +16,73 @@ With the latest versions of Docker for Windows, it's easier than ever to develop > [!TIP] > To learn more about installing Docker for Windows, go to (). -## Docker support in Visual Studio 2017 +## Docker support in Visual Studio -There are two levels of Docker support you can add to a project. In ASP.NET Core projects, you can just add a `Dockerfile` file to the project by enabling Docker support. The next level is container orchestration support, which adds a `Dockerfile` to the project (if it doesn't already exist) and a `docker-compose.yml` file at the solution level. Container orchestration support, via Docker Compose, is added by default in Visual Studio 2017 versions 15.0 to 15.7. Container orchestration support is an opt-in feature in Visual Studio 2017 versions 15.8 or later. Version 15.8 an later support Docker Compose and Service Fabric. +There are two levels of Docker support you can add to a project. In ASP.NET Core projects, you can just add a `Dockerfile` file to the project by enabling Docker support. The next level is container orchestration support, which adds a `Dockerfile` to the project (if it doesn't already exist) and a `docker-compose.yml` file at the solution level. Container orchestration support, via Docker Compose, is added by default in Visual Studio 2017 versions 15.0 to 15.7. Container orchestration support is an opt-in feature in Visual Studio 2017 versions 15.8 or later. Visual Studio 2019 and later supports **Kubernetes/Helm** deployment as well. The **Add > Docker Support** and **Add > Container Orchestrator Support** commands are located on the right-click menu (or context menu) of the project node for an ASP.NET Core project in **Solution Explorer**, as shown in Figure 4-31: -![Add Docker Support menu option in Visual Studio](./media/add-docker-support-menu.png) +![Add Docker Support menu option in Visual Studio](media/add-docker-support-menu.png) -**Figure 4-31**. Adding Docker support to a Visual Studio 2017 project +**Figure 4-31**. Adding Docker support to a Visual Studio 2019 project ### Add Docker support -You can add Docker support to an existing ASP.NET Core project by selecting **Add** > **Docker Support** in **Solution Explorer**. You can also enable Docker support during project creation by selecting **Enable Docker Support** in the **New ASP.NET Core Web Application** dialog box that opens after you click **OK** in the **New Project** dialog box, as shown in Figure 4-32. - -![Enable Docker Support for new ASP.NET Core web app in Visual Studio](./media/enable-docker-support-visual-studio.png) - -**Figure 4-32**. Enable Docker support during project creation in Visual Studio 2017 - -When you add or enable Docker support, Visual Studio adds a *Dockerfile* file to the project. +Besides the option to add Docker support to an existing application, as shown in the previous section, you can also enable Docker support during project creation by selecting **Enable Docker Support** in the **New ASP.NET Core Web Application** dialog box that opens after you click **OK** in the **New Project** dialog box, as shown in Figure 4-32. -> [!NOTE] -> When you enable Docker Compose support during project creation for a ASP.NET project (.NET Framework, not a .NET Core project) as shown in Figure 4-33, container orchestration support is also added. +![Enable Docker Support for new ASP.NET Core web app in Visual Studio](media/enable-docker-support-visual-studio.png) -![Enable Docker compose support for an ASP.NET project](media/enable-docker-compose-support.png) +**Figure 4-32**. Enable Docker support during project creation in Visual Studio 2019 -**Figure 4-33**. Enabling Docker Compose support for an ASP.NET project in Visual Studio 2017 +When you add or enable Docker support, Visual Studio adds a _Dockerfile_ file to the project, that includes references to all required project from the solution. ### Add container orchestration support -When you want to compose a multi-container solution, add container orchestration support to your projects. This lets you run and debug a group of containers (a whole solution) at the same time if they're defined in the same *docker-compose.yml* file. +When you want to compose a multi-container solution, add container orchestration support to your projects. This lets you run and debug a group of containers (a whole solution) at the same time if they're defined in the same _docker-compose.yml_ file. -To add container orchestration support, right-click on the solution or project node in **Solution Explorer**, and choose **Add > Container Orchestration Support**. Then choose **Docker Compose** or **Service Fabric** to manage the containers. +To add container orchestration support, right-click on the solution or project node in **Solution Explorer**, and choose **Add > Container Orchestration Support**. Then choose **Kubernetes/Helm** or **Docker Compose** to manage the containers. -After you add container orchestration support to your project, you see a Dockerfile added to the project and a **docker-compose** folder added to the solution in **Solution Explorer**, as shown in Figure 4-34: +After you add container orchestration support to your project, you see a Dockerfile added to the project and a **docker-compose** folder added to the solution in **Solution Explorer**, as shown in Figure 4-33: ![Docker files in Solution Explorer in Visual Studio](media/docker-support-solution-explorer.png) -**Figure 4-34**. Docker files in Solution Explorer in Visual Studio 2017 +**Figure 4-33**. Docker files in Solution Explorer in Visual Studio 2019 -If *docker-compose.yml* already exists, Visual Studio just adds the required lines of configuration code to it. +If _docker-compose.yml_ already exists, Visual Studio just adds the required lines of configuration code to it. ## Configure Docker tools From the main menu, choose **Tools > Options**, and expand **Container Tools > Settings**. The container tools settings appear. -![Visual Studio Docker tools options, showing: Automatically pull required Docker images on project load, Automatically start containers in background, Automatically kill containers on solution close, and Do not prompt for trusting SSL certificate.](./media/visual-studio-docker-tools-options.png) +![Visual Studio Docker tools options, showing three pages: General, Single Project and Docker Compose, details in the article text.](media/visual-studio-docker-tools-options.png) -**Figure 4-35**. Docker Tools Options +**Figure 4-34**. Docker Tools Options The following table might help you decide how to set these options. -| Name | Default Setting | Applies To | Description | -| -----|:---------------:|:----------:| ----------- | -| Automatically pull required Docker images on project load | On | Docker Compose | For increased performance when loading projects, Visual Studio will start a Docker pull operation in the background so that when you're ready to run your code, the image is already downloaded or in the process of downloading. If you're just loading projects and browsing code, you can turn this off to avoid downloading container images you don't need. | -| Automatically start containers in background | On | Docker Compose | Again for increased performance, Visual Studio creates a container with volume mounts ready for when you build and run your container. If you want to control when your container is created, turn this off. | -| Automatically kill containers on solution close | On | Docker Compose | Turn this off if you would like containers for your solution to continue to run after closing the solution or closing Visual Studio. | -| Do not prompt for trusting localhost SSL certificate | Off | ASP.NET Core 2.2 projects | If the localhost SSL certificate is not trusted, Visual Studio will prompt every time you run your project, unless this checkbox is checked. | +| Page/Setting | Default Setting | Description | +| ------------------------------------------- | :----------------: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| **General page** | +| Install Docker Desktop if needed | Prompt me | +| Start Docker Desktop if needed | Prompt me | +| Trust ASP.NET Core SSL certificate | Prompt me | If the localhost SSL certificate hasn't been marked as trusted (with `dotnet dev-certs https --trust`), Visual Studio will prompt every time you run your project. | +| **Single Project page** | +| Pull required Docker images on project open | True | For increased performance when running the project, Visual Studio will start a Docker pull operation in the background so that when you're ready to run your code, the image is already downloaded or in the process of downloading. If you're just loading projects and browsing code, you can turn this off to avoid downloading container images you don't need. This could slow the open project user experience. | +| Pull updated Docker images on project load | .NET Core projects | Pull updates to existing images to get the latest updates on project open. This could slow the open project user experience. | +| Remove containers on project close | True | Clean up on project close, This could slow the close project user experience but it's usually fast anyway. | +| Run containers on project open | True | For increased performance when running the project, Visual Studio will start all containers in the solution. This could slow the open project user experience. | +| **Docker Compose** | | The Docker Compose page contains the same settings as the Single Project page, but they apply to multi-container solutions. | > [!WARNING] -> If the localhost SSL certificate is not trusted, and you check the box to suppress prompting, then HTTPS web requests might fail at runtime in your app or service. In that case, uncheck the **Do not prompt** checkbox, run your project, and indicate trust at the prompt. +> If the localhost SSL certificate is not trusted, and you set the option to **Never**, then HTTPS web requests might fail at runtime in your app or service. In that case, set the value back again to **Prompt me** or, better again, trust the certificates in your dev machine using the command `dotnet dev-certs https --trust`. > [!TIP] > For further details on the services implementation and use of Visual Studio Tools for Docker, read the following articles: > ->Debugging apps in a local Docker container: +> Debug apps in a local Docker container: > ->Deploy an ASP.NET container to a container registry using Visual Studio: +> Deploy an ASP.NET container to a container registry using Visual Studio: ->[!div class="step-by-step"] ->[Previous](docker-apps-inner-loop-workflow.md) ->[Next](set-up-windows-containers-with-powershell.md) +> [!div class="step-by-step"] +> [Previous](docker-apps-inner-loop-workflow.md) +> [Next](set-up-windows-containers-with-powershell.md) diff --git a/docs/architecture/containerized-lifecycle/docker-containers-images-and-registries.md b/docs/architecture/containerized-lifecycle/docker-containers-images-and-registries.md index b4fb034bd5f14..089d73f7eebed 100644 --- a/docs/architecture/containerized-lifecycle/docker-containers-images-and-registries.md +++ b/docs/architecture/containerized-lifecycle/docker-containers-images-and-registries.md @@ -1,7 +1,7 @@ --- title: Docker containers, images, and registries description: Learn the key role that registries play overall in the Docker way of deploying applications. -ms.date: 02/15/2019 +ms.date: 08/06/2020 --- # Docker containers, images, and registries diff --git a/docs/architecture/containerized-lifecycle/docker-devops-workflow/create-ci-cd-pipelines-azure-devops-services-aspnetcore-kubernetes.md b/docs/architecture/containerized-lifecycle/docker-devops-workflow/create-ci-cd-pipelines-azure-devops-services-aspnetcore-kubernetes.md index 4fe75acba5185..005db5fde6557 100644 --- a/docs/architecture/containerized-lifecycle/docker-devops-workflow/create-ci-cd-pipelines-azure-devops-services-aspnetcore-kubernetes.md +++ b/docs/architecture/containerized-lifecycle/docker-devops-workflow/create-ci-cd-pipelines-azure-devops-services-aspnetcore-kubernetes.md @@ -1,9 +1,9 @@ --- title: Steps in the outer-loop DevOps workflow for a Docker application description: Containerized Docker Application Lifecycle with Microsoft Platform and Tools -ms.date: 02/15/2019 +ms.date: 08/06/2020 --- -# Creating CI/CD pipelines in Azure DevOps Services for a .NET Core 2.0 application on Containers and deploying to a Kubernetes cluster +# Creating CI/CD pipelines in Azure DevOps Services for a .NET Core application on Containers and deploying to a Kubernetes cluster In Figure 5-12 you can see the end-to-end DevOps scenario covering the code management, code compilation, Docker images build, Docker images push to a Docker registry and finally the deployment to a Kubernetes cluster in Azure. diff --git a/docs/architecture/containerized-lifecycle/docker-devops-workflow/docker-application-outer-loop-devops-workflow.md b/docs/architecture/containerized-lifecycle/docker-devops-workflow/docker-application-outer-loop-devops-workflow.md index 40bc8bd108da5..ae8ec40b7c7ca 100644 --- a/docs/architecture/containerized-lifecycle/docker-devops-workflow/docker-application-outer-loop-devops-workflow.md +++ b/docs/architecture/containerized-lifecycle/docker-devops-workflow/docker-application-outer-loop-devops-workflow.md @@ -1,7 +1,7 @@ --- title: Steps in the outer-loop DevOps workflow for a Docker application description: Learn the steps for the "outer loop" of the DevOps workflow -ms.date: 02/15/2019 +ms.date: 08/06/2020 --- # Steps in the outer-loop DevOps workflow for a Docker application diff --git a/docs/architecture/containerized-lifecycle/docker-devops-workflow/index.md b/docs/architecture/containerized-lifecycle/docker-devops-workflow/index.md index 59e03297ec4d9..eab322fc2408b 100644 --- a/docs/architecture/containerized-lifecycle/docker-devops-workflow/index.md +++ b/docs/architecture/containerized-lifecycle/docker-devops-workflow/index.md @@ -1,7 +1,7 @@ --- title: Docker application DevOps workflow with Microsoft tools description: Containerized Docker Application Lifecycle with Microsoft Platform and Tools DevOps workflow with Microsoft tools -ms.date: 02/15/2019 +ms.date: 08/06/2020 --- # Docker application DevOps workflow with Microsoft tools @@ -18,7 +18,7 @@ The complexity of containerized application development increases steadily depen - Azure DevOps Services/Team Foundation Server source code management (based on Git or Team Foundation Version Control), Agile planning (Agile, Scrum, and CMMI are supported), CI, release management, and other tools for Agile teams. -- Azure DevOps Services and Team Foundation Server include a powerful and growing ecosystem of first- and third-party extensions with which you easily can construct a CI, build, test, delivery, and release management pipeline for microservices. +- Azure DevOps Services and Team Foundation Server include a powerful and growing ecosystem of first and third-party extensions with which you easily can construct a CI, build, test, delivery, and release management pipeline for microservices. - Run automated tests as part of your build pipeline in Azure DevOps Services. diff --git a/docs/architecture/containerized-lifecycle/docker-terminology.md b/docs/architecture/containerized-lifecycle/docker-terminology.md index 0e0ebdb6bf807..dc98ce752973a 100644 --- a/docs/architecture/containerized-lifecycle/docker-terminology.md +++ b/docs/architecture/containerized-lifecycle/docker-terminology.md @@ -1,7 +1,7 @@ --- title: Docker terminology description: Learn some basic terminology that's used everyday when working with Docker. -ms.date: 04/16/2020 +ms.date: 08/06/2020 --- # Docker terminology @@ -23,7 +23,7 @@ docker build **Tag**: A mark or label you can apply to images so that different images or versions of the same image (depending on the version number or the target environment) can be identified. -**Multi-stage Build**: Is a feature, since Docker 17.05 or higher, that helps to reduce the size of the final images. In a few sentences, with multi-stage build you can use, for example, a large base image, containing the SDK, for compiling and publishing the application and then using the publishing folder with a small runtime-only base image, to produce a much smaller final image. +**Multi-stage Build**: Is a feature, since Docker 17.05 or higher, that helps to reduce the size of the final images. For example, a large base image, containing the SDK can be used for compiling and publishing and then a small runtime-only base image can be used to host the application. **Repository (repo)**: A collection of related Docker images, labeled with a tag that indicates the image version. Some repos contain multiple variants of a specific image, such as an image containing SDKs (heavier), an image containing only runtimes (lighter), etc. Those variants can be marked with tags. A single repo can contain platform variants, such as a Linux image and a Windows image. @@ -35,7 +35,7 @@ docker build **Azure Container Registry**: A public resource for working with Docker images and its components in Azure. This provides a registry that's close to your deployments in Azure and that gives you control over access, making it possible to use your Azure Active Directory groups and permissions. -**Docker Trusted Registry (DTR)**: A Docker registry service (from Docker) that can be installed on-premises so it lives within the organization's datacenter and network. It's convenient for private images that should be managed within the enterprise. Docker Trusted Registry is included as part of the Docker Datacenter product. For more information, see [Docker Trusted Registry (DTR)](https://docs.docker.com/docker-trusted-registry/overview/). +**Docker Trusted Registry (DTR)**: A Docker registry service (from Docker) that can be installed on-premises so it lives within the organization's datacenter and network. It's convenient for private images that should be managed within the enterprise. Docker Trusted Registry is included as part of the Docker Datacenter product. For more information, see [Docker Trusted Registry (DTR)](https://www.docker.com/sites/default/files/Docker%20Trusted%20Registry.pdf). **Docker Community Edition (CE)**: Development tools for Windows and macOS for building, running, and testing containers locally. Docker CE for Windows provides development environments for both Linux and Windows Containers. The Linux Docker host on Windows is based on a [Hyper-V](https://www.microsoft.com/cloud-platform/server-virtualization) virtual machine. The host for Windows Containers is directly based on Windows. Docker CE for Mac is based on the Apple Hypervisor framework and the [xhyve hypervisor](https://github.com/mist64/xhyve), which provides a Linux Docker host virtual machine on Mac OS X. Docker CE for Windows and for Mac replaces Docker Toolbox, which was based on Oracle VirtualBox. @@ -45,7 +45,7 @@ docker build **Cluster**: A collection of Docker hosts exposed as if it were a single virtual Docker host, so that the application can scale to multiple instances of the services spread across multiple hosts within the cluster. Docker clusters can be created with Kubernetes, Azure Service Fabric, Docker Swarm and Mesosphere DC/OS. -**Orchestrator**: A tool that simplifies management of clusters and Docker hosts. Orchestrators enable you to manage their images, containers, and hosts through a command-line interface (CLI) or a graphical UI. You can manage container networking, configurations, load balancing, service discovery, high availability, Docker host configuration, and more. An orchestrator is responsible for running, distributing, scaling, and healing workloads across a collection of nodes. Typically, orchestrator products are the same products that provide cluster infrastructure, like Kubernetes and Azure Service Fabric, among other offerings in the market. +**Orchestrator**: A tool that simplifies the management of clusters and Docker hosts. Orchestrators enable you to manage their images, containers, and hosts through a command-line interface (CLI) or a graphical UI. You can manage container networking, configurations, load balancing, service discovery, high availability, Docker host configuration, and more. An orchestrator is responsible for running, distributing, scaling, and healing workloads across a collection of nodes. Typically, orchestrator products are the same products that provide cluster infrastructure, like Kubernetes and Azure Service Fabric, among other offerings in the market. >[!div class="step-by-step"] >[Previous](what-is-docker.md) diff --git a/docs/architecture/containerized-lifecycle/index.md b/docs/architecture/containerized-lifecycle/index.md index 20ef0da3e2d85..506fe8c98d859 100644 --- a/docs/architecture/containerized-lifecycle/index.md +++ b/docs/architecture/containerized-lifecycle/index.md @@ -1,25 +1,83 @@ --- -title: Introduction to Containers and Docker -description: Get a high level overview of the main benefits of using Docker. -ms.date: 02/15/2019 +title: Containerized Docker Application Lifecycle with Microsoft Platform and Tools +description: Get a high-level overview of the development and deployment process for developing and deploying containerized applications with Docker and Microsoft platform and tools. +ms.date: 07/30/2020 --- -# Introduction to containers and Docker +# Containerized Docker Application Lifecycle with Microsoft Platform and Tools -*Containerization is an approach to software development in which an application or service, its dependencies, and its configuration (abstracted as deployment manifest files) are packaged together as a container image. You then can test the containerized application as a unit and deploy it as a container image instance to the host operating system (OS).* +![Book cover](./media/devops-book-cover-large-we.png) -Just as shipping containers allow goods to be transported by ship, train, or truck regardless of the cargo inside, software containers act as a standard unit of software deployment that can contain different code and dependencies. Containerizing software this way enables developers and IT professionals to deploy them across environments with little or no modification. +**EDITION v3.1** - Updated to ASP.NET Core 3.1 -Containers also isolate applications from each other on a shared OS. Containerized applications run on top of a container host that in turn runs on the OS (Linux or Windows). Containers therefore have a much smaller footprint than virtual machine (VM) images. +This guide is a general overview for developing and deploying containerized ASP.NET Core applications with Docker, using the Microsoft platform and tools. The guide includes a high-level introduction to Azure DevOps, for implementing CI/CD pipelines, as well as Azure Container Registry (ACR), and Azure Kubernetes Services AKS for deployment. -Each container can run a whole web application or a service, as shown in Figure 1-1. In this example, Docker host is a container host, and App1, App2, Svc1, and Svc2 are containerized applications or services. +For low-level, development-related details you can see the [.NET Microservices: Architecture for Containerized .NET Applications](https://docs.microsoft.com/dotnet/architecture/microservices/) guide and it related reference application [eShopOnContainers](https://github.com/dotnet-architecture/eShopOnContainers). -![Diagram showing four containers running in a VM or a server.](./media/index/multiple-containers-single-host.png) +## Send us your feedback! -**Figure 1-1**. Multiple containers running on a container host +We wrote this guide to help you understand the architecture of containerized applications and microservices in .NET. The guide and related reference application will be evolving, so we welcome your feedback! If you have comments about how this guide can be improved, submit feedback at . -Another benefit you can derive from containerization is scalability. You can scale out quickly by creating new containers for short-term tasks. From an application point of view, instantiating an image (creating a container) is similar to instantiating a process like a service or web app. For reliability, however, when you run multiple instances of the same image across multiple host servers, you typically want each container (image instance) to run in a different host server or VM in different fault domains. +## Credits -In short, containers offer the benefits of isolation, portability, agility, scalability, and control across the entire application lifecycle workflow. The most important benefit is the environment isolation provided between Dev and Ops. +Author: + +> **Cesar de la Torre**, Sr. PM, .NET product team, Microsoft Corp. + +Acquisitions Editor: + +> **Janine Patrick** + +Developmental Editor: + +> **Bob Russell**, Solutions Professional at Microsoft +> +> [**Octal Publishing, Inc.**](http://www.octalpub.com/) + +Editorial Production: + +> [Dianne Russell](http://www.octalpub.com/) +> +> **Octal Publishing, Inc.** + +Copyeditor: + +> **Bob Russell**, Solutions Professional at Microsoft + +Participants and reviewers: + +> **Nish Anil**, Sr. Program Manager, .NET team, Microsoft +> +> **Miguel Veloso**, Software Development Engineer at Plain Concepts +> +> **Sumit Ghosh**, Principal Consultant at Neudesic + +## Copyright + +PUBLISHED BY + +Microsoft Developer Division, .NET and Visual Studio product teams + +A division of Microsoft Corporation + +One Microsoft Way + +Redmond, Washington 98052-6399 + +Copyright © 2020 by Microsoft Corporation + +All rights reserved. No part of the contents of this book may be reproduced or transmitted in any form or by any means without the written permission of the publisher. + +This book is provided "as-is" and expresses the author's views and opinions. The views, opinions and information expressed in this book, including URL and other Internet website references, may change without notice. + +Some examples depicted herein are provided for illustration only and are fictitious. No real association or connection is intended or should be inferred. + +Microsoft and the trademarks listed at on the "Trademarks" webpage are trademarks of the Microsoft group of companies. + +Mac and macOS are trademarks of Apple Inc. + +The Docker whale logo is a registered trademark of Docker, Inc. Used by permission. + +All other marks and logos are property of their respective owners. >[!div class="step-by-step"] ->[Next](what-is-docker.md) +>[Next](introduction-to-containers-and-docker.md) diff --git a/docs/architecture/containerized-lifecycle/introduction-to-containers-and-docker.md b/docs/architecture/containerized-lifecycle/introduction-to-containers-and-docker.md new file mode 100644 index 0000000000000..58cd68288828e --- /dev/null +++ b/docs/architecture/containerized-lifecycle/introduction-to-containers-and-docker.md @@ -0,0 +1,26 @@ +--- +title: Introduction to Containers and Docker +description: Get a high level overview of the main benefits of using Docker. +ms.date: 04/15/2020 +--- +# Introduction to containers and Docker + +*Containerization is an approach to software development in which an application or service, its dependencies, and its configuration (abstracted as deployment manifest files) are packaged together as a container image. You then can test the containerized application as a unit and deploy it as a container image instance to the host operating system (OS).* + +Just as shipping containers allow goods to be transported by ship, train, or truck regardless of the cargo inside, software containers act as a standard unit of software deployment that can contain different code and dependencies. Containerizing software this way enables developers and IT professionals to deploy them across environments with little or no modification. + +Containers also isolate applications from each other on a shared OS. Containerized applications run on top of a container host that in turn runs on the OS (Linux or Windows). Containers therefore have a much smaller footprint than virtual machine (VM) images. + +Each container can run a whole web application or a service, as shown in Figure 1-1. In this example, Docker host is a container host, and App1, App2, Svc1, and Svc2 are containerized applications or services. + +![Diagram showing four containers running in a VM or a server.](./media/introduction-to-containers-and-docker/multiple-containers-single-host.png) + +**Figure 1-1**. Multiple containers running on a container host + +Another benefit you can derive from containerization is scalability. You can scale out quickly by creating new containers for short-term tasks. From an application point of view, instantiating an image (creating a container) is similar to instantiating a process like a service or web app. For reliability, however, when you run multiple instances of the same image across multiple host servers, you typically want each container (image instance) to run in a different host server or VM in different fault domains. + +In short, containers offer the benefits of isolation, portability, agility, scalability, and control across the entire application lifecycle workflow. The most important benefit is the environment isolation provided between Dev and Ops. + +>[!div class="step-by-step"] +>[Previous](index.md) +>[Next](what-is-docker.md) diff --git a/docs/architecture/containerized-lifecycle/key-takeaways/index.md b/docs/architecture/containerized-lifecycle/key-takeaways/index.md index 5132c7b44c9d7..293a77aaa0297 100644 --- a/docs/architecture/containerized-lifecycle/key-takeaways/index.md +++ b/docs/architecture/containerized-lifecycle/key-takeaways/index.md @@ -1,7 +1,7 @@ --- title: Key takeaways description: Review the key takeaways for the guide. -ms.date: 04/20/2020 +ms.date: 08/06/2020 --- # Key takeaways diff --git a/docs/architecture/containerized-lifecycle/media/cover-small.png b/docs/architecture/containerized-lifecycle/media/cover-small.png new file mode 100644 index 0000000000000..dc16850f0708e Binary files /dev/null and b/docs/architecture/containerized-lifecycle/media/cover-small.png differ diff --git a/docs/architecture/containerized-lifecycle/media/devops-book-cover-large-we.png b/docs/architecture/containerized-lifecycle/media/devops-book-cover-large-we.png new file mode 100644 index 0000000000000..10c30876b1d56 Binary files /dev/null and b/docs/architecture/containerized-lifecycle/media/devops-book-cover-large-we.png differ diff --git a/docs/architecture/containerized-lifecycle/media/index/multiple-containers-single-host.png b/docs/architecture/containerized-lifecycle/media/index/multiple-containers-single-host.png deleted file mode 100644 index 9d0fed773626e..0000000000000 Binary files a/docs/architecture/containerized-lifecycle/media/index/multiple-containers-single-host.png and /dev/null differ diff --git a/docs/architecture/containerized-lifecycle/media/introduction-to-containers-and-docker/multiple-containers-single-host.png b/docs/architecture/containerized-lifecycle/media/introduction-to-containers-and-docker/multiple-containers-single-host.png new file mode 100644 index 0000000000000..f839b7f802521 Binary files /dev/null and b/docs/architecture/containerized-lifecycle/media/introduction-to-containers-and-docker/multiple-containers-single-host.png differ diff --git a/docs/architecture/containerized-lifecycle/road-to-modern-applications-based-on-containers.md b/docs/architecture/containerized-lifecycle/road-to-modern-applications-based-on-containers.md index 4035cccac8780..faffceba47696 100644 --- a/docs/architecture/containerized-lifecycle/road-to-modern-applications-based-on-containers.md +++ b/docs/architecture/containerized-lifecycle/road-to-modern-applications-based-on-containers.md @@ -1,7 +1,7 @@ --- title: Road to modern applications based on containers description: Understand that Docker, containers and a Microservices architecture are not a one-size-fits-all solution. Here you'll find some references that will help you decide. -ms.date: 11/23/2018 +ms.date: 08/06/2020 --- # Road to modern applications based on containers diff --git a/docs/architecture/containerized-lifecycle/run-manage-monitor-docker-environments/index.md b/docs/architecture/containerized-lifecycle/run-manage-monitor-docker-environments/index.md index 129269ac54f9d..3ba732711f42c 100644 --- a/docs/architecture/containerized-lifecycle/run-manage-monitor-docker-environments/index.md +++ b/docs/architecture/containerized-lifecycle/run-manage-monitor-docker-environments/index.md @@ -1,7 +1,7 @@ --- title: Run, manage, and monitor Docker production environments description: Containerized Docker Application Lifecycle with Microsoft Platform and Tools -ms.date: 02/15/2019 +ms.date: 08/06/2020 --- # Run, manage, and monitor Docker production environments diff --git a/docs/architecture/containerized-lifecycle/run-manage-monitor-docker-environments/manage-production-docker-environments.md b/docs/architecture/containerized-lifecycle/run-manage-monitor-docker-environments/manage-production-docker-environments.md index 3a053003c341d..db68477bdd5fb 100644 --- a/docs/architecture/containerized-lifecycle/run-manage-monitor-docker-environments/manage-production-docker-environments.md +++ b/docs/architecture/containerized-lifecycle/run-manage-monitor-docker-environments/manage-production-docker-environments.md @@ -1,7 +1,7 @@ --- title: Manage production Docker environments description: Get to know the key points for managing a container-based production environment. -ms.date: 02/15/2019 +ms.date: 08/06/2020 --- # Manage production Docker environments diff --git a/docs/architecture/containerized-lifecycle/run-manage-monitor-docker-environments/monitor-containerized-application-services.md b/docs/architecture/containerized-lifecycle/run-manage-monitor-docker-environments/monitor-containerized-application-services.md index d8aa32c8e2aa2..5628544395af9 100644 --- a/docs/architecture/containerized-lifecycle/run-manage-monitor-docker-environments/monitor-containerized-application-services.md +++ b/docs/architecture/containerized-lifecycle/run-manage-monitor-docker-environments/monitor-containerized-application-services.md @@ -1,7 +1,7 @@ --- title: Monitor containerized application services description: Learn some key aspects of monitoring container architectures -ms.date: 02/15/2019 +ms.date: 08/06/2020 --- # Monitor containerized application services diff --git a/docs/architecture/containerized-lifecycle/run-manage-monitor-docker-environments/run-microservices-based-applications-in-production.md b/docs/architecture/containerized-lifecycle/run-manage-monitor-docker-environments/run-microservices-based-applications-in-production.md index 29d5df3cf489a..13c8014ca8aed 100644 --- a/docs/architecture/containerized-lifecycle/run-manage-monitor-docker-environments/run-microservices-based-applications-in-production.md +++ b/docs/architecture/containerized-lifecycle/run-manage-monitor-docker-environments/run-microservices-based-applications-in-production.md @@ -1,7 +1,7 @@ --- title: Run composed and microservices-based applications in production environments description: Get to know the key components to run container-based applications in production -ms.date: 02/15/2019 +ms.date: 08/06/2020 --- # Run composed and microservices-based applications in production environments diff --git a/docs/architecture/containerized-lifecycle/toc.yml b/docs/architecture/containerized-lifecycle/toc.yml index 1cf4d95f44db8..e9c54e59507ca 100644 --- a/docs/architecture/containerized-lifecycle/toc.yml +++ b/docs/architecture/containerized-lifecycle/toc.yml @@ -1,14 +1,17 @@ - name: Containerized Docker Application Lifecycle with Microsoft Platform and Tools href: index.md items: - - name: What is Docker? - href: what-is-docker.md - - name: Docker terminology - href: docker-terminology.md - - name: Docker containers, images, and registries - href: docker-containers-images-and-registries.md - - name: Road to modern applications based on containers - href: road-to-modern-applications-based-on-containers.md + - name: Introduction to Containers and Docker + href: introduction-to-containers-and-docker.md + items: + - name: What is Docker? + href: what-is-docker.md + - name: Docker terminology + href: docker-terminology.md + - name: Docker containers, images, and registries + href: docker-containers-images-and-registries.md + - name: Road to modern applications based on containers + href: road-to-modern-applications-based-on-containers.md - name: Introduction to the Docker application lifecycle href: Docker-application-lifecycle/index.md items: @@ -41,14 +44,14 @@ href: design-develop-containerized-apps/visual-studio-tools-for-docker.md - name: Use Windows PowerShell commands in a DockerFile to set up Windows Containers (Docker standard based) href: design-develop-containerized-apps/set-up-windows-containers-with-powershell.md - - name: Build ASP.NET Core 2.0 applications deployed as Linux containers into AKS/Kubernetes orchestrator + - name: Build ASP.NET Core applications deployed as Linux containers into AKS/Kubernetes orchestrator href: design-develop-containerized-apps/build-aspnet-core-applications-linux-containers-aks-kubernetes.md - name: Docker application DevOps workflow with Microsoft tools href: docker-devops-workflow/index.md items: - name: Steps in the outer-loop DevOps workflow for a Docker application href: docker-devops-workflow/docker-application-outer-loop-devops-workflow.md - - name: Creating CI/CD pipelines in Azure DevOps Services for a .NET Core 2.0 application on Containers and deploying to a Kubernetes cluster + - name: Creating CI/CD pipelines in Azure DevOps Services for an ASP.NET Core application on Containers and deploying to a Kubernetes cluster href: docker-devops-workflow/create-ci-cd-pipelines-azure-devops-services-aspnetcore-kubernetes.md - name: Run, manage, and monitoring Docker production environments href: run-manage-monitor-docker-environments/index.md diff --git a/docs/architecture/containerized-lifecycle/what-is-docker.md b/docs/architecture/containerized-lifecycle/what-is-docker.md index d695b4198c444..c061cb09ae62e 100644 --- a/docs/architecture/containerized-lifecycle/what-is-docker.md +++ b/docs/architecture/containerized-lifecycle/what-is-docker.md @@ -1,7 +1,7 @@ --- title: What is Docker? description: Get a little deeper in your understanding of Docker, a simple analogy here might help you. -ms.date: 02/15/2019 +ms.date: 08/06/2020 --- # What is Docker? @@ -13,7 +13,7 @@ ms.date: 02/15/2019 As shown in the above diagram, Docker containers can run anywhere, on-premises in the customer datacenter, in an external service provider or in the cloud, on Azure. Docker image containers can also run natively on Linux and Windows. However, Windows images can run only on Windows hosts and Linux images can run on Linux hosts and Windows hosts (using a Hyper-V Linux VM, so far), where host means a server or a VM. -Developers can use development environments on Windows, Linux, or macOS. On the development computer, the developer runs a Docker host where Docker images are deployed, including the app and its dependencies. Developers who work on Linux or on the Mac, use a Docker host that's Linux-based, and they can only create images for Linux containers. (Developers working on the Mac can edit code or run the Docker CLI from macOS, but as of this writing, containers don't run directly on macOS.) Developers who work on Windows can create images for either Linux or Windows Containers. +Developers can use development environments on Windows, Linux, or macOS. On the development computer, the developer runs a Docker host where Docker images are deployed, including the app and its dependencies. Developers who work on Linux or on the Mac, use a Docker host that's Linux-based, and they can only create images for Linux containers. (Developers working on the Mac can edit code or run the Docker command-line interface (CLI) from macOS, but as of this writing, containers don't run directly on macOS.) Developers who work on Windows can create images for either Linux or Windows Containers. To host containers in development environments and provide additional developer tools, Docker ships [Docker Community Edition (CE)](https://www.docker.com/community-edition) for Windows or for macOS. These products install the necessary VM (the Docker host) to host the containers. Docker also makes available [Docker Enterprise Edition (EE)](https://www.docker.com/enterprise-edition), which is designed for enterprise development and is used by IT teams who build, ship, and run large business-critical applications in production. @@ -74,5 +74,5 @@ You can think of an image as an auxiliary read-only hard disk ready to be instal Similarly, you can think of a container as the "computer" with the image hard disk installed. The container, just like a computer, can be powered on or off. >[!div class="step-by-step"] ->[Previous](index.md) +>[Previous](introduction-to-containers-and-docker.md) >[Next](docker-terminology.md)