|
|
5 years ago | |
|---|---|---|
| .. | ||
| .vscode | 6 years ago | |
| results | 6 years ago | |
| vote | 5 years ago | |
| worker | 5 years ago | |
| .editorconfig | 6 years ago | |
| README.md | 5 years ago | |
| VotingSample.sln | 6 years ago | |
| tye.yaml | 5 years ago | |
README.md
VotingSample
Voting sample app inspired by https://github.com/dockersamples/example-voting-app with a few different implementation choices.
For running
The project should be immediately runnable by calling tye run from the directory.
For deployment
A few things need to be configured before deploying to Kubernetes.
-
Create an Azure container registry using the Azure portal or you can use your public docker hub account
-
You can use managed service instances for both
redisandpostgresdatastore. For e.g :redis: Azure Cache for Redispostgres: Azure Database for PostgreSQL
Or you can use the following steps to deploy the respective datastores in the Kubernetes cluster itself.
-
Rediscan be deployed using the below command :kubectl apply -f https://raw.githubusercontent.com/dotnet/tye/main/docs/tutorials/hello-tye/redis.yaml -
Postgresqlcan be installed by the following command :kubectl apply -f https://raw.githubusercontent.com/dotnet/tye/main/docs/tutorials/hello-tye/postgres.yaml -
Once the deployment is done, you need to keep a note of the below connection strings :
redis:6379Server=postgres;Port=5432;User Id=postgres;Password=pass@word1;
! NOTE: You can modify the password in
postgresyaml. -
After that, run
tye deploy --interactiveto do the deployment. -
Fill in the value of container registry and connection strings for both
redisandpostgreswhen it's prompted. -
Once the deployment is complete you should be able to find the public IP address of the deployed application by using :
kubectl get all -n ingress-nginxLook for the
service/ingress-nginx-controllerwith a type ofLoadBalancer. TheEXTERNAL-IPis the entry point for your application. For e.g :- vote : http://<EXTERNAL-IP>/vote
- result: http://<EXTERNAL-IP>/results
! NOTE: Ingress controller may take a while to update the listed public IP address.
