Tye is a tool that makes developing, testing, and deploying microservices and distributed applications easier. Project Tye includes a local orchestrator to make developing microservices easier and the ability to deploy microservices to Kubernetes with min
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Sumit Ghosh 112857f021
Updated Voting sample deployment steps (#755)
5 years ago
..
.vscode Add voting sample (#201) 6 years ago
results Implement library support for service discovery (#299) 6 years ago
vote Updated Voting sample deployment steps (#755) 5 years ago
worker Updated Voting sample deployment steps (#755) 5 years ago
.editorconfig Add voting sample (#201) 6 years ago
README.md Updated Voting sample deployment steps (#755) 5 years ago
VotingSample.sln Add voting sample (#201) 6 years ago
tye.yaml Updated Voting sample deployment steps (#755) 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 redis and postgres datastore. For e.g :

    • redis : Azure Cache for Redis
    • postgres: Azure Database for PostgreSQL

    Or you can use the following steps to deploy the respective datastores in the Kubernetes cluster itself.

  • Redis can be deployed using the below command :

    kubectl apply -f https://raw.githubusercontent.com/dotnet/tye/master/docs/tutorials/hello-tye/redis.yaml
    
  • Postgresql can be installed by the following command :

    kubectl apply -f https://raw.githubusercontent.com/dotnet/tye/master/docs/tutorials/hello-tye/postgres.yaml
    
  • Once the deployment is done, you need to keep a note of the below connection strings :

    • redis:6379
    • Server=postgres;Port=5432;User Id=postgres;Password=pass@word1;

    ! NOTE: You can modify the password in postgres yaml.

  • After that, run tye deploy --interactive to do the deployment.

  • Fill in the value of container registry and connection strings for both redis and postgres when 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-nginx
    

    nginx ingress example

    Look for the service/ingress-nginx-controller with a type of LoadBalancer. The EXTERNAL-IP is 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.