This commit is contained in:
Dave Tillman 2016-10-24 09:01:11 -06:00
Родитель e8ca8464b7
Коммит b1d65c331a
5 изменённых файлов: 106 добавлений и 10 удалений

Просмотреть файл

@ -181,11 +181,11 @@ Each of the `push*.*` scripts `dotnet publish` the MusicStore service targeting
# Known Limitations
## Redis caching
This can only be used when targeting Windows. This is due to the fact that ASP.NET Core Redis Cache implementation only supports NET451.
This can only be used when targeting Windows. This is due to the fact that ASP.NET Core Redis Cache implementation currently only supports NET451. This will be changed in 1.1 of ASP.NET Core.
## MySQL database
This can only be used when targeting Windows. This is due to the fact that the MySql provider we use currently only supports NET451. (Note: Recent milestones of the provider have started supporting NETCoreApp1.0. We will soon make changes to start using the new provider.)
Until then, if you want to run the sample on a *nix*, you will have to use Postgres.
## Sample Databases
All MusicStore services (i.e. MusicStoreUI, OrderService, etc.) have their own database instance they use for persisting data. When a MusicStore service is started locally, it will always drop and recreate its database upon startup. When a MusicStore service is started on CloudFoundry, only the first instance (i.e. CF_INSTANCE_INDEX=0) will drop and recreate its database. As such, the service is not fully ready until the first instance has finished initializing its database.
All MusicStore services (i.e. MusicStoreUI, OrderService, etc.) have their own database instance for persisting data. When a MusicStore service is started locally, it will always drop and recreate its database upon startup. When a MusicStore service is started on CloudFoundry, only the first instance (i.e. CF_INSTANCE_INDEX=0) will drop and recreate its database. Note then, the service is not fully ready until the first instance has finished initializing its database, even though other instances are ready.

Просмотреть файл

@ -1,6 +1,30 @@
#!/bin/bash
function printUsage()
{
echo "USAGE:"
echo "pushMusicStoreService [runtime] [framework]"
echo "runtime - target runtime to publish (e.g. win7-x64, ubuntu.14.04-x64)"
echo "framework - target framework to publish (e.g. net451, netcoreapp1.0)"
exit
}
#
if [ "$1" == "" ]; then
printUsage
fi
if [ "$2" == "" ]; then
printUsage
fi
r=$1
cd src/MusicStoreService
if [ -d "$PWD/publish" ]; then
rm -rf "$PWD/publish"
fi
dotnet restore --configfile nuget.config
dotnet publish --output $PWD/publish --configuration Release --framework net451 --runtime win7-x64
cf push -f manifest-windows.yml -p $PWD/publish
dotnet publish --output $PWD/publish --configuration Release --runtime "$1" --framework "$2"
if [ "${r:0:3}" == "win" ]; then
cf push -f manifest-windows.yml -p "$PWD/publish"
fi
if [ "${r:0:6}" == "ubuntu" ]; then
cf push -f manifest.yml -p "$PWD/publish"
fi
cd ../..

Просмотреть файл

@ -1,6 +1,30 @@
#!/bin/bash
function printUsage()
{
echo "USAGE:"
echo "pushMusicStoreUI [runtime] [framework]"
echo "runtime - target runtime to publish (e.g. win7-x64, ubuntu.14.04-x64)"
echo "framework - target framework to publish (e.g. net451, netcoreapp1.0)"
exit
}
#
if [ "$1" == "" ]; then
printUsage
fi
if [ "$2" == "" ]; then
printUsage
fi
r=$1
cd src/MusicStoreUI
if [ -d "$PWD/publish" ]; then
rm -rf "$PWD/publish"
fi
dotnet restore --configfile nuget.config
dotnet publish --output $PWD/publish --configuration Release --framework net451 --runtime win7-x64
cf push -f manifest-windows.yml -p $PWD/publish
dotnet publish --output $PWD/publish --configuration Release --runtime "$1" --framework "$2"
if [ "${r:0:3}" == "win" ]; then
cf push -f manifest-windows.yml -p "$PWD/publish"
fi
if [ "${r:0:6}" == "ubuntu" ]; then
cf push -f manifest.yml -p "$PWD/publish"
fi
cd ../..

Просмотреть файл

@ -1,6 +1,30 @@
#!/bin/bash
function printUsage()
{
echo "USAGE:"
echo "pushOrderService [runtime] [framework]"
echo "runtime - target runtime to publish (e.g. win7-x64, ubuntu.14.04-x64)"
echo "framework - target framework to publish (e.g. net451, netcoreapp1.0)"
exit
}
#
if [ "$1" == "" ]; then
printUsage
fi
if [ "$2" == "" ]; then
printUsage
fi
r=$1
cd src/OrderService
if [ -d "$PWD/publish" ]; then
rm -rf "$PWD/publish"
fi
dotnet restore --configfile nuget.config
dotnet publish --output $PWD/publish --configuration Release --framework net451 --runtime win7-x64
cf push -f manifest-windows.yml -p $PWD/publish
dotnet publish --output $PWD/publish --configuration Release --runtime "$1" --framework "$2"
if [ "${r:0:3}" == "win" ]; then
cf push -f manifest-windows.yml -p "$PWD/publish"
fi
if [ "${r:0:6}" == "ubuntu" ]; then
cf push -f manifest.yml -p "$PWD/publish"
fi
cd ../..

Просмотреть файл

@ -1,6 +1,30 @@
#!/bin/bash
function printUsage()
{
echo "USAGE:"
echo "pushShoppingCartService [runtime] [framework]"
echo "runtime - target runtime to publish (e.g. win7-x64, ubuntu.14.04-x64)"
echo "framework - target framework to publish (e.g. net451, netcoreapp1.0)"
exit
}
#
if [ "$1" == "" ]; then
printUsage
fi
if [ "$2" == "" ]; then
printUsage
fi
r=$1
cd src/ShoppingCartService
if [ -d "$PWD/publish" ]; then
rm -rf "$PWD/publish"
fi
dotnet restore --configfile nuget.config
dotnet publish --output $PWD/publish --configuration Release --framework net451 --runtime win7-x64
cf push -f manifest-windows.yml -p $PWD/publish
dotnet publish --output $PWD/publish --configuration Release --runtime "$1" --framework "$2"
if [ "${r:0:3}" == "win" ]; then
cf push -f manifest-windows.yml -p "$PWD/publish"
fi
if [ "${r:0:6}" == "ubuntu" ]; then
cf push -f manifest.yml -p "$PWD/publish"
fi
cd ../..