{"id":19051445,"url":"https://github.com/seniorquico/orleansdockersample","last_synced_at":"2025-04-24T01:24:37.913Z","repository":{"id":99027677,"uuid":"176795256","full_name":"seniorquico/OrleansDockerSample","owner":"seniorquico","description":"An example project and guide demonstrating an Orleans cluster in Docker containers.","archived":false,"fork":false,"pushed_at":"2019-04-01T23:01:31.000Z","size":24,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-18T09:34:26.451Z","etag":null,"topics":["docker","orleans"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/seniorquico.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-03-20T18:34:39.000Z","updated_at":"2023-01-27T15:20:05.000Z","dependencies_parsed_at":"2023-03-07T18:45:41.353Z","dependency_job_id":null,"html_url":"https://github.com/seniorquico/OrleansDockerSample","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seniorquico%2FOrleansDockerSample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seniorquico%2FOrleansDockerSample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seniorquico%2FOrleansDockerSample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seniorquico%2FOrleansDockerSample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seniorquico","download_url":"https://codeload.github.com/seniorquico/OrleansDockerSample/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250542289,"owners_count":21447685,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","orleans"],"created_at":"2024-11-08T23:18:38.206Z","updated_at":"2025-04-24T01:24:37.905Z","avatar_url":"https://github.com/seniorquico.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker Sample for Orleans\n\nThis repository contains an example project and guide demonstrating an Orleans cluster in Docker containers.\n\nThe guide is currently provided only for Windows, and it has only been tested on Windows 10. However, this project and demonstration should work on any platform supporting Linux containers in Docker and .NET Core.\n\n## Overview\n\nThis project provides executables for both an Orleans silo and client. The project provides a single grain type that manages an incrementing counter.\n\nThe client connects to a \"singleton\" grain instance and requests the incrementing of the counter. There may be multiple, simultaneous clients, but the requests will be interleaved and processed single-threaded by the \"singleton\" grain instance.\n\nThe silo may be run with development clustering or Azure Table Storage clustering. If using development clustering, only a single silo is supported in the cluster. If using Azure Table Storage clustering, multiple silos may be in the cluster. However, given the client implementation, only a single grain instance will ever be active.\n\n## Guide for Windows\n\nThis guide demonstrates running an Orleans cluster with a single silo using Linux containers and Docker Desktop for Windows.\n\n### Prerequisites\n\n- Clone this repository to a convenient location.\n- Download and install [Docker Desktop for Windows](https://www.docker.com/products/docker-desktop) (latest version recommended). Configure the service to [run Linux containers](https://docs.docker.com/docker-for-windows/#switch-between-windows-and-linux-containers).\n- Download and install the [.NET Core SDK](https://dotnet.microsoft.com/download) (version 2.2, latest patch version recommended).\n- An [Azure Table Storage resource](https://azure.microsoft.com/en-us/services/storage/tables/). This is only needed if testing the Azure Table Storage clustering.\n\n### Build the silo image\n\nIn this section, we'll build the silo image used in the following sections.\n\nFirst, open a command prompt and change to the directory containing the cloned repository.\n\nFinally, build the silo image by executing the following command:\n\n```sh\ndocker build -f src\\OrleansDockerSample.Silo\\Dockerfile --pull -t orleans-docker-sample:latest .\n```\n\n### Run the project with development clustering\n\nIn this section, we'll start a single silo container using development clustering (a hardcoded connection to localhost). The container will run with the default \"bridge\" network, and the network ports will be exposed on the host machine. We'll start a single client, and it will connect to the network ports exposed on the host machine. Because development clustering uses localhost, the client _must_ be run on the host machine.\n\nFirst, open a command prompt.\n\nNext, start a single silo container by executing the following command:\n\n```sh\ndocker run -d --name silo -p 11111:11111 -p 30000:30000 --rm orleans-docker-sample:latest\n```\n\nNext, change to the directory containing the cloned repository.\n\nNext, start a single client by executing the following commands:\n\n```sh\ncd src\\OrleansDockerSample.Client\ndotnet run\n```\n\nThe container logs of the silo and the console logs of the client should confirm the progress of the incrementing counter.\n\nNext, stop the client by pressing `Ctrl+C` in the command prompt that was used to run the client.\n\nFinally, stop the silo container by executing the following command:\n\n```sh\ndocker stop silo\n```\n\n### Run the project with Azure Table Storage clustering\n\nIn this section, we'll start a single silo container using Azure Table Storage clustering. The container will run with the default \"bridge\" network, and the network ports will be exposed on the host machine. We'll start a single client, and it will connect to the network ports exposed on the host machine. Because Azure Table Storage clustering publishes the IP address in an external service, the client _may_ be run on any machine with network access to the published IP address.\n\nFirst, obtain the connection string to the Azure Table Storage resource.\n\nNext, open a command prompt.\n\nNext, start a single silo container by executing the following command (replacing \"\u003cMyConnectionString\u003e\" with the connection string to the Azure Table Storage resource):\n\n```sh\ndocker run -d -e ConnectionString=\u003cMyConnectionString\u003e --name silo -p 11111:11111 -p 30000:30000 --rm orleans-docker-sample:latest\n```\n\nNext, change to the directory containing the cloned repository.\n\nNext, start a single client by executing the following commands (replacing \"\u003cMyConnectionString\u003e\" with the connection string to the Azure Table Storage resource):\n\n```sh\nset ConnectionString=\u003cMyConnectionString\u003e\ncd src\\OrleansDockerSample.Client\ndotnet run\n```\n\nThe container logs of the silo and the console logs of the client should confirm the progress of the incrementing counter.\n\nNext, stop the client by pressing `Ctrl+C` in the command prompt that was used to run the client.\n\nFinally, stop the silo container by executing the following command:\n\n```sh\ndocker stop silo\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseniorquico%2Forleansdockersample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseniorquico%2Forleansdockersample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseniorquico%2Forleansdockersample/lists"}