Remove obsolete section on building SPA locally

Miguel Veloso 2019-03-12 15:42:32 +00:00
parent 13d03afdf0
commit f462a419e1

@ -14,13 +14,17 @@ Main steps to run it in Visual Studio:
- Set the VS startup project to the "docker-compose" project
- Hit F5! (Or Ctrl+F5 for a faster start up)
```
NOTE: In order for the authentication based on the STS (Security Token Service) to properly work and have access from remote client apps like the Xamarin mobile app, you also need to open the ports in your firewall as specified in the procedure below.
**NOTE:** In order for the authentication based on the STS (Security Token Service) to properly work and have access from remote client apps like the Xamarin mobile app, you also need to open the ports in your firewall as specified in the procedure below.
For further instructions, especially if this is the first time you are going to try .NET Core on Docker, see the detailed instructions below. Also **you'll need it the first time in order to make the SPA (Single Page Application) work (npm install, etc.)** as explained in this additional Wiki page for the [setting up the SPA app](https://github.com/dotnet-architecture/eShopOnContainers/wiki/06.-Setting-the-Web-SPA-application-up).
---------------------------------------------------------------------------------
## Detailed procedure: Setting eShopOnContainers up in a Visual Studio 2017 development machine
Visual Studio 2017 provides built-in Docker Tools with features like:
* Docker-compose support
* Multi-container debugging, supporting true microservice scenarios
* Linux Docker Containers (usually, for .NET Core apps)
@ -29,11 +33,14 @@ Visual Studio 2017 provides built-in Docker Tools with features like:
So, here's how to setup a VS 2017 environment where you can test eShopOnContainers.
### GitHub branch to use
By default, use the DEV branch which has the latest changes and testing.
The MASTER branch is also an option but it'll usually be less up to date while we keep evolving the application.
### Software requirements
Software installation requirements for a Windows dev machine with Visual Studio 2017 and Docker for Windows:
- <a href='https://docs.docker.com/docker-for-windows/install/'>Docker for Windows</a> with the concrete configuration specified below.
- <a href='https://www.visualstudio.com/vs/'>Visual Studio 2017 version 15.5</a> (Minimum version) with the workloads specified below.
- NPM and related dependencies for running the SPA Web app. <a href='https://github.com/dotnet/eShopOnContainers/wiki/06.-Setting-the-Web-SPA-application-up'>Setup process described here </a>
@ -41,6 +48,7 @@ Software installation requirements for a Windows dev machine with Visual Studio
### Installing and configuring Docker in your development machine
#### Install Docker CE for Windows
Install Docker CE for Windows (The Stable channel should suffice) from this page: https://docs.docker.com/docker-for-windows/install/
About further info on Docker for windows, check this additional page
https://docs.docker.com/docker-for-windows/
@ -51,6 +59,7 @@ Docker for Windows uses Hyper-V to run a Linux VM which is the by default Docker
VS 2017 recommends to install the Google Android emulator because it is the only Android emulator with support for Google Play Store, Google Maps, etc. However, take into account that it currently is not compatible with Hyper-V, so you might have incompatibilities with this scenario.
#### Set needed assigned Memory and CPU to Docker
For the development environment of eShopOnContainers, by default, it runs 1 instance of SQL Server running as a container with multiple databases (one DB per microservice), other 6 additional ASP.NET Core apps/services each one running as a container, plus 1 Redis server running as a container. Therefore, especially because of the SQL Server requirements on memory, it is important to set Docker up properly with enough memory RAM and CPU assigned to it or you will get errors when starting the containers with VS 2017 or "docker-compose up".
Once Docker for Windows is installed in your machine, enter into its Settings and the Advanced menu option so you are able to adjust it to the minimum amount of memory and CPU (Memory: Around 4096MB and CPU:3) as shown in the image. Usually you might need a 16GB memory machine for this configuration if you also want to run the Android emulator for the Xamarin app or multiple instances of applications demanding significant memory at the same time. If you have a less powerful machine, you can try with a lower configuration and/or by not starting certain containers like the basket and Redis. But if you don't start all the containers, the application will not fully function properly, of course.
@ -78,6 +87,7 @@ The drive you'll need to share depends on where you place your source code.
### Installing and configuring Visual Studio 2017 in your development machine
#### Install Visual Studio 2017
Run the VS 2017 setup file (latest RTM version, **Visual Studio 2017 15.5 or later**) and select the following workloads depending on the apps you intend to test or work with:
##### Working only with the server side (Microservices and web applications) - Workloads
@ -85,10 +95,13 @@ Run the VS 2017 setup file (latest RTM version, **Visual Studio 2017 15.5 or lat
- ASP.NET and web development
- .NET Core cross-platofrm development
- Azure development (Optional) - It is optional but recommended in case you want to deploy to Docker hosts in Azure or use any other infrastructure in Azure.
-
<img src="img/vs2017/vs2017_server_workload.png">
##### Working with the mobile app (Xamarin Mobile apps for iOS, Android and Windows UWP) - Workloads
If you also want to test/work with the eShopOnContainer model app based on Xamarin, you need to install the following additional workloads:
- Mobile development with .NET (Xamarin)
- Universal Windows Platform development
- .NET desktop development (Optional) - This is not required, but just in case you also want to make tests consuming the microservices from WPF or WinForms desktop apps
@ -128,14 +141,6 @@ Below you can see the full **eShopOnContainers-ServicesAndWebApps.sln** solution
Note how VS 2017 loads the docker-compose.yml files in a special node-tree so it uses that configuration to deploy/debug all the containers configured, at the same time into your Docker host.
#### Build the Web SPA application with NPM
If you want to run/test the web eShopOnContainers SPA (Single Page Application) client in adition to the regular MVC Web app, you need to install certain dependencies for the client side and build it with "npm build", as the client side of the SPA app is based on ANGULAR 2, TypeScript and other JS frameworks and compilation that needs to happen before building the Docker images.
The process is described in detail here:
https://github.com/dotnet-architecture/eShopOnContainers/wiki/06.-Setting-the-Web-SPA-application-up
Come back to this point when you finished with the "Setting the SPA up" process.
#### Build and run eShopOnContainers from Visual Studio 2017
##### Set docker-compose as the default StartUp project