Designed to illustrate how buildpacks and supply chains work to build and deploy an application on Kubernetes. Should work just fine with VMware Tanzu Application Platform and VMware Tanzu Application Service.
dotnet run --project WebAppDemoCode
dotnet test
Point your browser tohttp://localhost:5001
Point your browser tohttp://localhost:5001/api/messages
or follow the link on the homepage.
tanzu apps workload apply dotnet-aspcore `
--git-repo https://github.com/benwilcock/dotnet-aspcore `
--git-branch dotnet-7-upgrade `
--type web `
--build-env BP_DOTNET_PROJECT_PATH=./WebAppDemoCode `
--build-env BP_DOTNET_FRAMEWORK_VERSION=7.0.0 `
--label apps.tanzu.vmware.com/has-tests=true `
--label app.kubernetes.io/part-of=dotnet-aspcore `
--param-yaml testing_pipeline_matching_labels="{'apps.tanzu.vmware.com/pipeline':'test', 'apps.tanzu.vmware.com/language':'dotnet', 'apps.tanzu.vmware.com/version':'7.0'}" `
--annotation autoscaling.knative.dev/minScale=1 `
--tail --yes
/
HTML home page (shows a single page app containing a static image and some text). Contains a link to the source code./api/messages
REST Json [GET] (shows a single hardcoded message as part of a list of messages).
For a simple customisation, in the application code (in the appsettings.json
file) change the name of the client
property from "VMware" to something else and then commit/redeploy/restart.
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*",
"DemoClient": "VMware"
}
The homepage will then use the new name of the client in the text at the bottom of the page.
Details here
Details here