microsoft / tailwindtraders-backend Goto Github PK
View Code? Open in Web Editor NEWTailwind Traders Backend Services
License: MIT License
Tailwind Traders Backend Services
License: MIT License
As someone with very little experience of Azure, the deployment documentation is impossible to follow.
As this is meant to be a reference app, could you provide additional detail?
Thanks
I had configured and ran the deployment flow, it is always failing.
Could you please help me to fix this here https://github.com/belikebros/TailwindTraders-Backend/actions
While trying to deploy all the APIs of backend and web to dev space, the process starts but hangs at " Waiting for container image build". The process terminates after about an hour and shows the below message -
Waiting for container image build...Streaming build container logs for service 'tt-coupons' failed with: Server timeout (30000.00ms) elapsed without receiving a message from the server. 4m 57s
Oops... An unexpected error has occurred. A report of the error will be sent to Microsoft.
For diagnostic information, see Azure Dev Spaces logs at 'C:\Users\abc\AppData\Local\Temp\Azure Dev Spaces'.
Please include the following Request ID when contacting support: 3d5b48b9-0e19-4f22-b000-07c43df8f7e8
Thanks,
Hoysala
If you have a different output format than json, this command will fail.
$(az acr show -n $acrName -g $resourceGroup | ConvertFrom-Json).loginServer
add -o json.
It is the same problem on the next line also.
If I understand this code correctly, any user with an email address can see what's in a given cart simply by adding an email address to a querystring:
This has a number of security ramifications. I would suggest using some type of non-discoverable key (like a GUID) or perhaps using anonymous auth with a JWT.
kubectl version
Client Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.5", GitCommit:"20c265fef0741dd71a66480e35bd69f18351daea", GitTreeState:"clean", BuildDate:"2019-10-15T19:16:51Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.0", GitCommit:"70132b0f130acc0bed193d9ba59dd186f0e634cf", GitTreeState:"clean", BuildDate:"2020-01-27T21:11:27Z", GoVersion:"go1.13.4", Compiler:"gc", Platform:"linux/amd64"}
helm version
version.BuildInfo{Version:"v3.0.3", GitCommit:"ac925eb7279f4a6955df663a0128044a8a6b7593", GitTreeState:"clean", GoVersion:"go1.13.7"}
Add-Cert-Manager.ps1
I recommend replacing using Deploy/powershell/Add-Cert-Manager.ps with instructions to simply follow the documentation at https://cert-manager.io/docs/ otherwise there are a number of challenges to overcome, with version differences, for example.
As is, running Add-Cert-Manager.ps1 results in an error: Error: unknown flag: --name
because it's assuming Helm v2 (where the current prerequisites calls for Helm v3). Simply updating the command to use the v3 version will lead you to a bunch more issues, hence my recommendation...
Enable-Ssl.ps1
Similarly, helm install command requires an update for Helm v3:
Lines 78-79:
Write-Host "helm install $name-ssl tls-support -f $(Join-Path tls-support values-staging.yaml) --set domain=$domain" -ForegroundColor Yellow
helm install $name-ssl-staging tls-support -f $(Join-Path tls-support values-staging.yaml) --set domain=$domain
Lines 83-84:
Write-Host "helm install $name-ssl tls-support -f $(Join-Path tls-support values-prod.yaml) --set domain=$domain" -ForegroundColor Yellow
helm install name-ssl-prod tls-support -f $(Join-Path tls-support values-prod.yaml) --set domain=$domain
Then, the helm charts requires updating, according to the cert-manager spec...
certificate.yaml:
apiVersion: cert-manager.io/v1alpha2
kind: Certificate
metadata:
name: {{ .Values.certName }}
namespace: default
spec:
secretName: {{ .Values.certSecretName }}
issuerRef:
name: {{ .Values.issuerName }}
commonName: {{ .Values.domain }}
dnsNames:
- {{ .Values.domain }}
issuer.yaml:
apiVersion: cert-manager.io/v1alpha2
kind: Issuer
metadata:
name: {{ .Values.issuerName }}
namespace: default
spec:
acme:
server: {{ .Values.server }}
email: [email protected]
privateKeySecretRef:
name: {{ .Values.issuerSecretName }}
solvers:
- http01:
ingress:
class: {{ .Values.ingressClass }}
I validated the above using staging
To help expedite the deployment of the the Azure ARM Template, put a Pre-Req step in the Doco to create or reuse an existing Service Principal. Otherwise, you get to the portal, and then have to go back and find or create one.
Stuff like this may seem trivial, but really interrupts the flow of Workshops, etc., especially the 1st time through.
I think this documentation can improved specifically to manually tag and push images -> where are the dockerfiles, or the image names?
Taken from the AKS documentation for how to deploy this demo with helm:
Run docker-compose build and then manually tag and push the images to your ACR.
Note: Under WSL docker daemon do not run, so you won't be able to use docker-compose build unless you configure docker client to use the Docker CE for Windows daemon. You can always build docker images using Docker CE for Windows, from a Windows command prompt, and run all scripts from WSL.
when I can't to deploy the ASK services, the Tailwind.Traders.Coupon.Api won't compile:
C:\Program Files\dotnet\sdk\2.2.100\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.ConflictResolution.targets(33,5): error NETSDK1052: Framework list file path 'v4.0.30319\RedistList\FrameworkList.xml' is not rooted. Only full paths are supported. [D:\!Training\TailwindTraders\TailwindTraders-Backend\Source\Services\Tailwind.Traders.Coupon.Api\Tailwind.Traders.Coupon.Api.njsproj]
Hi,
When I try to compile from VS 2019 preview, I get an error:
Error Value cannot be null.
Parameter name: stream docker-compose C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\Sdks\Microsoft.Docker.Sdk\build\Microsoft.VisualStudio.Docker.Compose.targets 291
Looks like it happened exactly like the following error from SmartHotel360 still opened:
(https://github.com/Microsoft/SmartHotel360/issues/1
if I try to build using CLI dotnet build Tailwind.Traders.Backend.sln
I get the following error:
C:\Program Files\dotnet\sdk\2.2.100\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.ConflictResolution.targets(33,5): error NETSDK1052: Framework list file path 'v4.0.30319\RedistList\FrameworkList.xml' is not rooted. Only full paths are supported. [D:!Training\TailwindTraders\TailwindTraders-Backend\Source\Services\Tailwind.Traders.Coupon.Api\Tailwind.Traders.Coupon.Api.njsproj]
docker-compose build issues:
the docker file contains the following statement:
RUN apt-get update
&& apt-get install -y --allow-unauthenticated
libc6-dev
libgdiplus
libx11-dev
&& rm -rf /var/lib/apt/lists/*
which breaks on windows; looking in forums and found I should modify the command :
Now, I get the following error:
apt-get : The term 'apt-get' is not recognized as the name of a cmdlet,
function, script file, or operable program. Check the spelling of the name, or
if a path was included, verify that the path is correct and try again.
At line:1 char:76
- ... e = 'Stop'; $ProgressPreference = 'SilentlyContinue'; apt-get update ...
~~~~~~~
- CategoryInfo : ObjectNotFound: (apt-get:String) [], ParentConta
insErrorRecordException- FullyQualifiedErrorId : CommandNotFoundException
If I command this statement, the next step report the following error:
Successfully built 91e1c97860e9
Successfully tagged tailwindtraders/mobileapigw:latest
Building stock.api
Step 1/16 : FROM openjdk:8-jre AS base
---> dd20fb277e3c
Step 2/16 : WORKDIR /app
---> Using cache
---> ba30ea0e0279Step 3/16 : FROM openjdk:8-jdk AS maven
---> c14ba9d23b3a
Step 4/16 : WORKDIR /src
---> Using cache
---> 566d132012f2
Step 5/16 : COPY . .
---> Using cache
---> 960a75e16576
Step 6/16 : RUN chmod +x ./mvnw
---> Using cache
---> 076febd195d1
Step 7/16 : RUN ./mvnw install
---> Running in ad4456225d23
/bin/sh: 1: ./mvnw: not found
ERROR: Service 'stock.api' failed to build: The command '/bin/sh -c ./mvnw install' returned a non-zero code: 127
txs
Deploy/powershell/Generate-Config.ps1 provides the output for the App Insights Instrumentation Key at the start of the section gvalues file will be generated with values
, where it again lists the key anyway (and twice, as per issue #80), listed as "appinsightsik"
...
===========================================================
gvalues file will be generated with values:
App Insights Instrumentation Key: 640e35fd-9472-4fd8-98fe-338879105c4b
App Insights Instrumentation Key: 640e35fd-9472-4fd8-98fe-338879105c4b
{
...
"appinsightsik": "xxx"
...
}
should be
...
App Insights Instrumentation Key: 640e35fd-9472-4fd8-98fe-338879105c4b
===========================================================
gvalues file will be generated with values:
{
...
"appinsightsik": "xxx"
...
}
The AuthKey for Cosmos DB is hard-coded here, in case the ENV
isn't set:
This goes against our guidelines internally and externally. I would suggest relying explicitly on process.env
or throwing.
Attempting to deploy to Azure results in an invalid template error which blows up the deployment:
The template deployment 'Microsoft.Template' is not valid according to the validation procedure. The tracking id is 'a9adae50-b041-46a4-a8ae-26c4fa342c8b'.
I'm a Microsoft employee and happy to work with you on the issue to resolve it.
Deploy-Images-Aks.ps1: Error: unable to build kubernetes objects from release manifest: unable to recognize "": no matches for kind "Deployment" in version "apps/v1beta2"
As per https://kubernetes.io/blog/2019/07/18/api-deprecations-in-1-16/
kubectl version
Client Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.5", GitCommit:"20c265fef0741dd71a66480e35bd69f18351daea", GitTreeState:"clean", BuildDate:"2019-10-15T19:16:51Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.0", GitCommit:"70132b0f130acc0bed193d9ba59dd186f0e634cf", GitTreeState:"clean", BuildDate:"2020-01-27T21:11:27Z", GoVersion:"go1.13.4", Compiler:"gc", Platform:"linux/amd64"}
helm version
version.BuildInfo{Version:"v3.0.3", GitCommit:"ac925eb7279f4a6955df663a0128044a8a6b7593", GitTreeState:"clean", GoVersion:"go1.13.7"}
Fix: Update each of the template deployment.yaml files to apiVersion: apps/v1
Will Tailwind be used to showcase transition to Managed Identities rather than less secure SPs?
Managed Identities are now the preferred approach to manage the “security identity” because they are created automatically. System-assigned managed identities are enabled on the Azure service, giving the actual service an identity within Azure AD. Such service identities are only active until the instance has been deleted or disabled. Once this happens, Azure will automatically clean up the service identity within Azure AD.
From time to time MS Internal Subscriptions are restricted from provisioning Azure resources such as SQL Server in a given region (such as Central US today) due to capacity constraints.
Microsoft.ContainerService/managedClusters - Conflict
{"code":"DeploymentFailed","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-debug for usage details.","details":[{"code":"Conflict","message":"{\r\n \"status\": \"Failed\",\r\n \"error\": {\r\n \"code\": \"ResourceDeploymentFailure\",\r\n \"message\": \"The resource operation completed with terminal provisioning state 'Failed'.\",\r\n \"details\": [\r\n {\r\n \"code\": \"CreateRoleAssignmentError\",\r\n \"message\": \"We are unable to serve this request due to an internal error, Correlation ID: 00000000-0000-0000-0000-000000000000, Operation ID: ba9c7d39-6393-47ea-b8ab-d88ead36b79b, Timestamp: 2019-10-04T15:12:21Z.\"\r\n }\r\n ]\r\n }\r\n}"}]}
When attempting to deploy the Backend to AKS, I get this error when running Deploy-Images-Aks.ps1
helm upgrade --install tailwindtraders-product products-api -f ..\helm__values\gvalues.yaml --set ingress.hosts='{17a70b5634ff444a996f.westus2.aksapp.io}' --set image.repository=ttacrdwcdmtkxdlw3u.azurecr.io/product.api --set image.tag=latest --set hpa.activated=False
Error: unknown shorthand flag: 'e' in -encodedCommand
I am running Helm 2.1.16 and Docker v19.03.5. Is there a gap in supported versions?
I have the Cosmos DB Emulator installed and working properly (verified by testing with other code), but when I try to run the backend with VS debugger, I get this error during startup on the Profile api project in the Main method. I've tried with and without a .env file configured as noted in the readme text. I'm running the latest VS 2019, latest Docker for Windows with WSL 2 and Ubuntu distro. Do I need to abandon WSL2 and use Hyper-V with additional RAM allocated as indicated in a previous issue similar to this?
System.AggregateException
HResult=0x80131500
Message=One or more errors occurred. (Connection refused)
Source=System.Private.CoreLib
StackTrace:
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait()
at Tailwind.Traders.Profile.Api.Program.<>c.
This exception was originally thrown at this call stack:
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task)
System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult()
System.Net.Http.ConnectHelper.ConnectAsync(string, int, System.Threading.CancellationToken)
Inner Exception 1:
HttpRequestException: Connection refused
Inner Exception 2:
SocketException: Connection refused
Running the unified setup
.\Deploy-Unified.ps1 -resourceGroup TailwindUni2 -location $LOC -clientId $CLIENTID -password $PASSWORD -subscription $SUBSCRIPTION | out-file c:\temp\unifieldTailwindLogs1
results in images being deployed to the ACR, but nothing to the AKS cluster.
Running in Powershell on windows
AZ CLI 2.0.81
Helm 3.2.3
The AKS cluster that is created is 1.18.2
Login Succeeded
The push refers to repository [ttacr5qnvhxf2jjqys.azurecr.io/cart.api]
latest: digest: sha256:c5636adb840fdd80664bc2f37463e2331c54b2baddeb20ea60146dc161a52a8f size: 1788
The push refers to repository [ttacr5qnvhxf2jjqys.azurecr.io/product.api]
latest: digest: sha256:1fb182264cf882f22bf35af57cfdb5bd0837c52ad536b0e13e483cd68553d64e size: 1794
The push refers to repository [ttacr5qnvhxf2jjqys.azurecr.io/profile.api]
latest: digest: sha256:6c4a2cb15adcc603649722e9cd7afaa872d4ce8dc36881fbbee66f464863e6ad size: 1793
The push refers to repository [ttacr5qnvhxf2jjqys.azurecr.io/login.api]
latest: digest: sha256:c8bcf60d9870fbf21fec49849153c1a921ca8a9ae36ef7d5372ffde885490210 size: 1793
The push refers to repository [ttacr5qnvhxf2jjqys.azurecr.io/coupon.api]
latest: digest: sha256:8753c9dedf8c82464ecf700ec161c2d638dc495e9233009355890fc3de7bce5f size: 1787
The push refers to repository [ttacr5qnvhxf2jjqys.azurecr.io/popular-product.api]
latest: digest: sha256:d84e3b09ee311799b7c63db1b3f62ee498594d50819c07ff6fbeb3f1e173af04 size: 3044
The push refers to repository [ttacr5qnvhxf2jjqys.azurecr.io/stock.api]
latest: digest: sha256:10bae04621c11bb5b73ba95085087d28b0e4d4b23267dfe69655a173839067f8 size: 2207
The push refers to repository [ttacr5qnvhxf2jjqys.azurecr.io/image-classifier.api]
latest: digest: sha256:6df38216c4528061dcb765c5854d0ddc167f415037b7af01a1ee8c3a6aedc4b2 size: 2217
The push refers to repository [ttacr5qnvhxf2jjqys.azurecr.io/mobileapigw]
latest: digest: sha256:5381b516b3051f5c2a61d23e17c8f9981e287e576eefbfb6eb5834cf6794b260 size: 1793
The push refers to repository [ttacr5qnvhxf2jjqys.azurecr.io/webapigw]
latest: digest: sha256:3f7c633c4ac826b3bf87fb95e748ea3240c0ecac2b6ae3f47c506b3add62e3db size: 1793
Release "tailwindtraders-product" does not exist. Installing it now.
Release "tailwindtraders-coupon" does not exist. Installing it now.
Release "tailwindtraders-profile" does not exist. Installing it now.
Release "tailwindtraders-popular-product" does not exist. Installing it now.
Release "tailwindtraders-stock" does not exist. Installing it now.
Release "tailwindtraders-image-classifier" does not exist. Installing it now.
Release "tailwindtraders-cart" does not exist. Installing it now.
Release "tailwindtraders-login" does not exist. Installing it now.
Release "tailwindtraders-mobilebff" does not exist. Installing it now.
Release "tailwindtraders-webbff" does not exist. Installing it now.
{
"created": true
}
{
"created": true
}
{
"created": true
}
{
"created": true
}
PS C:\ReposGitHub\TailwindTraders-Backend\Deploy> kubectl get po -A
NAMESPACE NAME READY STATUS RESTARTS AGE
kube-system addon-http-application-routing-default-http-backend-6c5f786tvhq 1/1 Running 0 29m
kube-system addon-http-application-routing-external-dns-56c48cff57-gcx86 1/1 Running 0 29m
kube-system addon-http-application-routing-nginx-ingress-controller-5c98h7t 1/1 Running 0 29m
kube-system aks-link-6dcddc8fdb-pv9fm 2/2 Running 1 29m
kube-system coredns-698df7b9b5-bt42t 1/1 Running 0 29m
kube-system coredns-698df7b9b5-l4xw4 1/1 Running 0 28m
kube-system coredns-autoscaler-77fdb85884-mt66v 1/1 Running 0 29m
kube-system kube-proxy-kpjtp 1/1 Running 0 28m
kube-system kube-proxy-wt97z 1/1 Running 0 28m
kube-system metrics-server-5b585fcd8c-2xpwq 1/1 Running 0 29m
kube-system omsagent-2zrkl 1/1 Running 1 28m
kube-system omsagent-rs-7d79fdf565-zb6sg 1/1 Running 0 29m
kube-system omsagent-wj75p 1/1 Running 0 28m
After running docker-compose up
, not all containers are up and running:
It seems that there is an error connecting to sql:
dbug: Microsoft.EntityFrameworkCore.Migrations[20400]
Migrating using database 'Microsoft.TailWindTraders.Product' on server 'sql.data'.
dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000]
Opening connection to database 'Microsoft.TailWindTraders.Product' on server 'sql.data'.
dbug: Microsoft.EntityFrameworkCore.Database.Connection[20004]
An error occurred using the connection to database 'Microsoft.TailWindTraders.Product' on server 'sql.data'.
System.Data.SqlClient.SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 40 - Could not open a connection to SQL Server)
&
source profile
2019-05-19T16:50:21.786341800Z
Unhandled Exception: System.Data.SqlClient.SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 40 - Could not open a connection to SQL Server)
stock java
2019-05-19 16:51:19.299 ERROR 1 --- [ main] o.s.boot.SpringApplication : Application run failed
2019-05-19T16:51:19.331692900Z
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Invocation of init method failed; nested exception is org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
nevermind plz delete.
Checking if the following resource group exists: TailwindTradersBackend.
Resource group exists: false.
Creating resource Group: TailwindTradersBackend
Resource Group created successfully.
Creating deployment parameters.
The detected encoding for file '/home/vsts/work/1/s/Deploy/deployment.json' is 'utf-8'
Starting Deployment.
Deployment name is deployment-20190510-170852-fcf6
There were errors in your deployment. Error code: InvalidTemplateDeployment.
##[error]The template deployment 'deployment-20190510-170852-fcf6' is not valid according to the validation procedure. The tracking id is '81cb7516-5649-4b05-a49f-0ea2c3399aff'. See inner errors for details. Please see https://aka.ms/arm-deploy for usage details.
##[error]Details:
##[error]InvalidParameter: Provisioning of resource(s) for container service tailwindtradersaksdpdfqfju5ljee in resource group TailwindTradersBackend failed. Message: {
"code": "InvalidParameter",
"message": "The value of parameter orchestratorProfile.OrchestratorVersion is invalid.",
"target": "orchestratorProfile.OrchestratorVersion"
}. Details: undefined
##[error]Task failed while creating or updating the template deployment.
Finishing: Azure Deployment:Create Or Update Resource Group action on TailwindTradersBackend
Currently deploying guide is for only Aks
But I also want for local env
Can I get it??
Deploy/powershell/Generate-Config.ps1 unnecessary outputs the App Insights Instrumentation Key twice. Recommend deleting the first call to Write-Host "App Insights Instrumentation Key: $($appinsightsId)" -ForegroundColor Yellow
When generating the values file using the Generate-Config.ps1
and token-replace.ps1
scripts, the rewards DB values are not populated. This seems to invalidate the values file.
example:
profile:
host: ttsqlservervk7einhhudcse.database.windows.net
port: "1433"
catalog: profile
user: sqladmin
pwd: **********
rewards:
host: {{dbhostrewards}}
port: "1433"
catalog: rewards
user: {{dbuserrewards}}
pwd: {{dbpwdrewards}}
I would be happy to PR the fix but am not sure on the needed DB values.
I am trying to start the backend with updated images containing the application insights additions. Several are failing to start.
Steps taken:
coupon-api
logs:
> [email protected] start /src
> node ./bin/www
Local environment detected
WARNING: Disabled checking of self-signed certs. Do not have this code in production.
Go to http://localhost:3001 to try the sample.
/src/node_modules/applicationinsights/out/AutoCollection/Exceptions.js:34
throw THIS_IS_APPLICATION_INSIGHTS_RETHROWING_YOUR_EXCEPTION; // Error originated somewhere else in your app
^
SyntaxError: Unexpected token u in JSON at position 0
at JSON.parse (<anonymous>)
at Object.<anonymous> (/src/app.js:36:10)
at Module._compile (internal/modules/cjs/loader.js:654:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
at Module.load (internal/modules/cjs/loader.js:566:32)
at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
at Function.Module._load (internal/modules/cjs/loader.js:498:3)
at Module.require (internal/modules/cjs/loader.js:598:17)
at require (internal/modules/cjs/helpers.js:11:18)
at Object.<anonymous> (/src/bin/www:7:11)
npm ERR! code ELIFECYCLE
npm ERR! errno 7
npm ERR! [email protected] start: `node ./bin/www`
npm ERR! Exit status 7
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2019-08-27T04_42_58_980Z-debug.log
config map secrets removed.
data:
APPLICATIONINSIGHTSIK: ***
CONNECTIONSTRING: ***
COUPON_COLLECTION: CouponCollection
ISSUER: TTFakeLogin
SECURITYKEY: ***
URL_BASE: https://ttstoragevk7einhhudcse.blob.core.windows.net/coupon-list
products
logs
> [email protected] start /src
> node ./bin/www
Local environment detected
WARNING: Disabled checking of self-signed certs. Do not have this code in production.
Go to http://localhost:3001 to try the sample.
undefined:1
undefined
^
SyntaxError: Unexpected token u in JSON at position 0
at JSON.parse (<anonymous>)
at Object.<anonymous> (/src/app.js:36:10)
at Module._compile (internal/modules/cjs/loader.js:654:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
at Module.load (internal/modules/cjs/loader.js:566:32)
at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
at Function.Module._load (internal/modules/cjs/loader.js:498:3)
at Module.require (internal/modules/cjs/loader.js:598:17)
at require (internal/modules/cjs/helpers.js:11:18)
at Object.<anonymous> (/src/bin/www:7:11)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node ./bin/www`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2019-08-27T04_43_28_030Z-debug.log
config map secrets removed
ApplicationInsights__InstrumentationKey: ***
ConnectionString: ***
ISSUER: TTFakeLogin
ProductDetailImagesUrl: https://ttstoragevk7einhhudcse.blob.core.windows.net/product-detail
ProductImagesUrl: https://ttstoragevk7einhhudcse.blob.core.windows.net/product-list
ProductVisitsUrl: ""
SECURITYKEY: ***
Any thoughts on what might be missing that would prevent these services from starting?
The Deploy templates fail as the JSON references /master/ and yet the path is changed to /main/
The method name should be Process
in stead of Proccess
.
I have followed the steps to
Deploy Tailwind Traders on AKS and Azure Resources (SQL Azure, CosmosDb, Storage accounts) .
From here, I have deployed the TailwindTraders-Website and updated the ApiUrl
and ApiUrlShoppingCart
to point to the respective services within AKS.
Attempting to perform an example request against the api like:
http://223cfde1568d47d79d78.eastus.aksapp.io/webbff/products/?&type=diytools
Results in a "503 Service Temporarily Unavailable" error:
This is a bit odd as my deployment appears correct:
kubectl describe ingresses my-tt-webbff
Name: my-tt-webbff
Namespace: default
Address: 52.168.17.18
Default backend: default-http-backend:80 (<none>)
Rules:
Host Path Backends
---- ---- --------
223cfde1568d47d79d78.eastus.aksapp.io
/webbff webbff:http ()
Annotations:
ingress.kubernetes.io/rewrite-target: /
ingress.kubernetes.io/ssl-redirect: false
kubernetes.io/ingress.class: addon-http-application-routing
nginx.ingress.kubernetes.io/rewrite-target: /
nginx.ingress.kubernetes.io/ssl-redirect: false
Events: <none>
The pod in question is reporting a status or Running
(my-tt-stock seems to have it's own issues at the moment) :
kubectl get pods
NAME READY STATUS RESTARTS AGE
my-tt-cart-b5c76d757-d4j9c 1/1 Running 14 93m
my-tt-coupon-tt-coupons-75c48d455c-x6lrv 1/1 Running 15 55m
my-tt-image-classifier-695b47cc4c-qlln7 1/1 Running 0 93m
my-tt-login-645d5798c7-qhnrx 1/1 Running 0 93m
my-tt-mobilebff-585b45f858-gfpf6 0/1 Running 0 93m
my-tt-popular-product-tt-popularproducts-86c9b99cf9-klj8g 1/1 Running 0 94m
my-tt-product-tt-products-6cbcb4ff5c-phnvr 1/1 Running 13 94m
my-tt-profile-5cb5fc55f4-z44rv 1/1 Running 12 94m
my-tt-stock-7576576945-c9s2l 0/1 CrashLoopBackOff 20 94m
my-tt-webbff-575cc88f7f-fkp8l 0/1 Running 0 93m
The cart-api seems to be working without issue:
Any suggestions as to what is going on?
The current code looks like:
var result = await _ctx.Profiles
.Select(p => p.ToProfileDto(_settings))
.ToListAsync();
if(result == null)
{
return NoContent();
}
return Ok(result);
However, can result
ever be null ? In case nothing is found in database, an empty list is returned?
The statement in add-tiller.sh:
kubectl patch deploy --namespace kube-system tiller-deploy -p '{"spec":{"template":{"spec":{"serviceAccount":"tiller"}}}}'
fails:
Error from server (NotFound): deployments.extensions "tiller-deploy" not found
Is a pre-requisite missing?
Deploy/powershell/Generate-Config.ps1 uses az cosmosdb list-keys
which has been deprecated. Replace with az cosmosdb keys list
.
Running the script as is outputs the following warning (twice, as it's currently called twice):
This command has been deprecated and will be removed in a future release. Use 'cosmosdb keys list' instead.
Looking at the Github Actions for this, it appears that the nightly build and deploy is failing. This appears to be related to updates to kubernetes and the networking api.
I do understand this was created for demo purposes so the code below makes sense. If we're to turn it out as a reference application, the hard-coded auth values should be removed.
When running docker build on the provided Dockerfile I am receiving the following:
Sending build context to Docker daemon 50.69kB
Step 1/12 : FROM golang:alpine
---> e0d646523991
Step 2/12 : WORKDIR /go/src/app
---> Using cache
---> be7712b95df8
Step 3/12 : RUN apk update && apk add git
---> Using cache
---> e280bb45aa64
Step 4/12 : ENV GO111MODULE=on
---> Using cache
---> 77455eac06d9
Step 5/12 : COPY Services/Tailwind.Traders.PopularProduct.Api/go.mod .
COPY failed: stat /var/lib/docker/tmp/docker-builder801703890/Services/Tailwind.Traders.PopularProduct.Api/go.mod: no such file or directory
The deployment guide does not contain steps to populate data. The most visible result is broken images, as the storage account that should contain them is empty.
Can this be included?
Each image seems to build fine when using docker-compose, however many fail when using docker build.
Example: Image Classifier
$ docker build -t imageclassifier .
Sending build context to Docker daemon 5.875MB
Step 1/24 : ARG sdkTag=2.2
Step 2/24 : ARG runtimeTag=2.2
Step 3/24 : ARG image=mcr.microsoft.com/dotnet/core/aspnet
Step 4/24 : ARG sdkImage=mcr.microsoft.com/dotnet/core/sdk
Step 5/24 : FROM ${image}:${runtimeTag} AS base
---> 34973cab5999
Step 6/24 : WORKDIR /app
---> Using cache
---> 52c754c1ce15
Step 7/24 : EXPOSE 80
---> Using cache
---> 95d3bb996f26
Step 8/24 : RUN apt-get update && apt-get install -y --allow-unauthenticated libc6-dev libgdiplus libx11-dev && rm -rf /var/lib/apt/lists/*
---> Using cache
---> 7bcf59ae9eb3
Step 9/24 : FROM ${sdkImage}:${sdkTag} AS build
---> 08657316a4cd
Step 10/24 : WORKDIR /src
---> Using cache
---> dd6eca0d07bf
Step 11/24 : COPY ./Directory.Build.props .
COPY failed: stat /var/lib/docker/tmp/docker-builder393851329/Directory.Build.props: no such file or directory
This also appears to be an issue with the profile.api
, products.api
, webff
and login.api
.
I am trying to accomplish this so that I can use Azure Container Registry Tasks to build these images in a pipeline. I'm unfortunately not able to pinpoint the issue with the Dockerfile and docker build command.
Any assistance would be appreciated.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.