Virtual Studio 2015 launches a powerful tool: direct release of containerized ASP. NET 5 into the cloud via the IDE

Source: Internet
Author: User

Docker containerized trend has now entered the rapid development stage, regarding the Docker container data center level large-scale application cluster and the arrangement management, the application micro-service is the topic which the industry discusses extensively, but in addition to the above hot spots, for the containerized most development OPS personnel respected, than DevOps development test scenarios: development, build, run, ensure the configuration of the operating environment and packaging code transfer running consistency! Most of the time, however, the Docker package we saw was not directly integrated with the development tools, it needed to be manually written by the DevOps staff, and now it's beginning to evolve and change, for. NET developers Visual Studio Tools for Docker-august Preview is now available in the public preview phase and has been updated to the 0.7 beta version, which is now easily built and published by developers of ASP. NET 5 Web or console application code to a virtual machine container running in the azure public cloud. Linux or Windows two kernel virtual machines are currently supported on a cross-platform basis with ASP. Of course, I envision the scenario is a test environment published to the cloud, if the test process is not a problem, then you can transfer the same build package and environment configuration file to the OPS personnel for production deployment.

This exciting feature, or let's try it together:

Environment Preparation:

    • First of all, the extension program is supported vs 2015, so to experience this feature is not upgraded or quickly upgrade the Https://www.visualstudio.com/downloads/download-visual-studio-vs, Currently supports three versions:


      • Enterprise Edition

      • Professional Edition

      • Community Edition

(* Currently only supports the English version, it is important to note that the current preview version does not support multi-language version, so if the Chinese version of VS 2015 is more patience and so on)

    • The preview phase vs Tools for Docker has not been well-established for ASP. NET and Web tool dependencies, I ate this in the test, did not pay attention to the need to pre-install the toolkit, so in VS 2015 can not choose to create a new Docker virtual machine on Azure, refer to the This article only found the problem.

Key features of the extension tool:

    • Installing the Docker 1.8.1 Windows command-line toolset, if Windows is not installed locally, the VS 2015 tool will help with installation, and Docker's tools vs 2015 extension tools can be used to manage and deploy Docker containers.

    • The auto-Generate Azure Docker Virtual Machine resource template is used to host Web or console programs for linux/windows virtual machines that create built-in Docker functionality on Azure.

    • Automatically generate Docker TLS secure communications and management certificates in the current user environment for remote management of Azure-hosted Docker virtual machine environments.

    • Package the application and build Dockerfile to build the application base image.

When the preparation environment is ready, you can start testing;

1. First create an ASP. NET Web application,

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/72/B7/wKiom1Xr3mvSmcyaAALZ8VTWy6Y521.jpg "/>

2. Next, select the ASP. NET Preview app template, which will download the cross-platform library DNX that the project needs to reference through NuGet, package Configuration Tool NPM, bower, etc.

(* Note that the deployment to the Web app is not checked at this time)

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/72/B3/wKioL1Xr4JPTMY0uAAL5e0ZuQ3k700.jpg "/>

3. Once the project is built, we can try to publish it:) Select Publish App

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/72/B3/wKioL1Xr4JTClK4VAAFsJK4fTTs497.jpg "/>

4. After the extension tool is installed, we can see the Docker container option at this point, of course, here we have to choose to publish through the container, select it;

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/72/B7/wKiom1Xr3m7BKU-gAAFbp2SZZJY525.jpg "/>

5. Next, if we do not have a Docker virtual machine environment on Azure, we can choose to create a new Azure Docker virtual machine (this is a long time for me to see the pre-installed environment, we will not encounter similar problems)

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/72/B3/wKioL1Xr4JfRPzonAAEC_sPrnWg257.jpg "/>

6. Depending on the actual azure environment, you can choose the subscription, location, image file (here is the latest Windows Server TP3 Windows kernel container environment), size, virtual machine user credentials, etc., note if the certificate file has not been created before in the current user environment, The PowerShell script built into the extension tool detects and helps you create a certificate file for the TLS management of the Docker environment into that directory, and when you connect resources through Docker tools or scripts, you can configure the connection through the default certificate.

(* Note that this feature only supports the international azure environment at this time, and we still need to wait patiently for the domestic azure version)

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/72/B7/wKiom1Xr3nGC-hWNAAHcYRDy4bQ607.jpg "/>

7. After we choose to complete, we can actually see from the current Web project that the extension tool builds the Docker Virtual machine Resource group configuration file *.json, and the default parameter profile *. Param.dev.json; also generates a script file for creating a certificate file and applying a Docker virtual machine template to create a Docker virtual machine environment;

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/72/B3/wKioL1Xr4Jqw44zdAAJfMJHYAho285.jpg "/>

8. Start creating a Virtual Machine resource Group, cup of coffee wait patiently until the virtual machine is created successfully waiting for us to deploy our web App.

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/72/B3/wKioL1Xr4KegQT0FAAQd6xKLpKs616.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/72/B7/wKiom1Xr3oah0ou-AAK6BX-kgi8417.jpg "/>

9. We can verify through PowerShell whether the resources have been created;

switch-azuremode -name azureresourcemanagerget-azureresource -name demoasp5net - outputobjectformat newname               : demoasp5netresourceid        : /subscriptions/ 3cf430da-bda2-4739-b6c8-44092933335b/resourcegroups/demoasp5net/providers/microsoft.                     compute/ Virtualmachines/demoasp5netresourcename      : demoasp5netresourcetype       : Microsoft.Compute/virtualMachinesResourceGroupName :  Demoasp5netlocation          : westussubscriptionid     : 3cf430da-bda2-4739-b6c8-44092933335bTags              &nbsP;: {system.collections.hashtable} 

10. Next, we can deploy our test Web App on this virtual machine, select the Publish option again, and if the Dockfile section doesn't have a file, it doesn't matter, the extension tool will help us create a user-created dockfile of the underlying Docker image; Click Validate Connection confirm that you can now connect to the Docker virtual machine environment on Azure;

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/72/B3/wKioL1Xr4K7A8BA1AAGGM6qIpe0563.jpg "/>

11. After selecting Publish, the extension tool will pass gulp/grunt,dnu. CMD packages the Web application and creates the image file through the Dockfile and Docker command-line tools, then create the container from the image file and map the container to the outside in accordance with the mapping port we developed in the previous step. The test found that the endpoint endpoint, including the external azure, also helped us do well, and it was a real multiplier.

650) this.width=650; "title=" 1.png "style=" Float:none; "alt=" wkiol1xr5cczpkvtaat0hw4bh-u955.jpg "src=" http:/ S3.51cto.com/wyfs02/m02/72/b4/wkiol1xr5cczpkvtaat0hw4bh-u955.jpg "/>

650) this.width=650; "title=" 2.png "style=" Float:none; "alt=" wkiom1xr4fqtdwofaapklwgag90176.jpg "src=" http:/ S3.51cto.com/wyfs02/m00/72/b8/wkiom1xr4fqtdwofaapklwgag90176.jpg "/>

after all deployment is complete, we can click on the app URL in output to access the website and verify that the ASP . NET app has been deployed successfully .

650) this.width=650; "title=" 3.png "style=" Float:none; "alt=" wkiom1xr4jjgd2o2aau0y9wad2k162.jpg "src=" http:/ S3.51cto.com/wyfs02/m02/72/b8/wkiom1xr4jjgd2o2aau0y9wad2k162.jpg "/>


at this point, if you prefer, you can also connect to the Docker environment on Azure on your test machine and view the container runtime environment:


650) this.width=650; "title=" 4.png "alt=" wkiol1xr5opcfteiaadg02ztvpc913.jpg "src=" http://s3.51cto.com/wyfs02/M00/ 72/b4/wkiol1xr5opcfteiaadg02ztvpc913.jpg "/>

650) this.width=650; "title=" 5.png "alt=" wkiol1xr5pgjcxytaao_tdhdubc776.jpg "src=" http://s3.51cto.com/wyfs02/M02/ 72/b4/wkiol1xr5pgjcxytaao_tdhdubc776.jpg "/>


This is where the Docker integration tool came in and wanted to be interested in the public cloud,. NET Cross-platform, and container applications to be able to experience it by themselves:)


Virtual Studio 2015 launches a powerful tool: direct release of containerized ASP. NET 5 into the cloud via the IDE

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.