{"id":16237953,"url":"https://github.com/codegoalie/total-sudoku","last_synced_at":"2026-01-21T19:34:54.591Z","repository":{"id":66782776,"uuid":"49507463","full_name":"codegoalie/total-sudoku","owner":"codegoalie","description":"Kubernetes config files for sudoku as a service platform","archived":false,"fork":false,"pushed_at":"2016-01-13T03:45:11.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-14T05:43:50.586Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codegoalie.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-01-12T15:02:17.000Z","updated_at":"2016-01-12T15:02:17.000Z","dependencies_parsed_at":"2023-03-17T20:01:21.459Z","dependency_job_id":null,"html_url":"https://github.com/codegoalie/total-sudoku","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/codegoalie%2Ftotal-sudoku","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codegoalie%2Ftotal-sudoku/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codegoalie%2Ftotal-sudoku/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codegoalie%2Ftotal-sudoku/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codegoalie","download_url":"https://codeload.github.com/codegoalie/total-sudoku/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247809333,"owners_count":20999806,"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":[],"created_at":"2024-10-10T13:38:04.920Z","updated_at":"2026-01-21T19:34:54.585Z","avatar_url":"https://github.com/codegoalie.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kubernetes config files\n\nThis repo contains application configuration files for our sudoku as a service\nplatform.\n\n## Application components\n\n### API\n\nAPI component provides a RESTful HTTP API to the Sudoku data store. It is\ncomposed of a ReplicationController and a Service. The Service has an ingress on\nport 80 to the outside world and that traffic is mapped into port 8080 on the\npods controlled by the ReplicationController .\n\n### Redis master\n\nRedis master provides a redis server with read/write capabilities. It is\ncomposed of a ReplicationController and a Service. The Service exposes port\n6379 on the internal DNS name `redis-master`. This maps onto port 6379 on the\npods controlled by the ReplicationController.\n\n### Generator\n\nGenerator provided a Sudoku puzzle generator to submit new puzzle candidates\ninto the platform through API. It consists only of a ReplicationController.\nNew randomly generated puzzles (a solution and a board with blanks) are POSTed\nto API to be persisted in Redis master.\n\n## Usage\n\n### Pre-reqs: \n\nWe are currently deploying this application on the Google Cloud infrastructure.\nYou should have the [Google Cloud command line\ntool](https://cloud.google.com/sdk/gcloud/) setup along with the [kubectrl\ncomponent](https://cloud.google.com/container-engine/docs/kubectl/).\n\n### New Application\n\nThe following commands will setup the application in a new cluster. They are,\nrespectively, deploy the Redis Master replication controller, Redis Master\nservice, API replication controller, API service, and finally, Generator\nreplication controller.\n\n```\n$ kubectl create -f redis-master-controller.yaml\n$ kubectl create -f redis-master-service.yaml\n$ kubectl create -f api-controller.yaml\n$ kubectl create -f api-service.yaml\n$ kubectl create -f generator-controller.yaml\n```\n\n### Updating Generator\n\nThe easiest way to replace Generator with a new image version or config is to\nupdate the config file, delete the existing replication controller, and create a\nnew one.\n\nUpdate the replication controller configs like so:\n\n```diff\n  apiVersion: v1\n  kind: ReplicationController\n  metadata:\n    name: generator\n    labels:\n      app: generator\n  spec:\n    replicas: 1\n    selector:\n      app: generator\n    template:\n      metadata:\n        labels:\n          app: generator\n      spec:\n        containers:\n        - name: generator\n-         image: gcr.io/total-sudoku/sudoku-generator:v4\n+         image: gcr.io/total-sudoku/sudoku-generator:v5\n          env:\n          - name: 'API_ROOT'\n            value: 'http://api'\n```\n\nDelete the existing replication controller:\n\n```\n$ kubectl delete rc generator\n```\n\nAnd create the new one from the updated config file:\n\n```\n$ kubectl create -f generator-controller.yaml\n```\n\n### Updating API replication controller\n\nWe use a rolling update to prevent downtime during a deployment of API. We will\nneed to update the API replication controller configuration and then issue the\nrolling update command. Kubernetes will take care of spinning up the new pod and\nthen spinning down the old one when the new one is settled.\n\nUpdate the repication controller configs like so:\n\n```diff\n  apiVersion: v1\n  kind: ReplicationController\n  metadata:\n-   name: api-v5\n+   name: api-v6\n    labels:\n-     app: api-v5\n+     app: api-v6\n  spec:\n    replicas: 1\n    selector:\n-     app: api-v5\n+     app: api-v6\n    template:\n      metadata:\n        labels:\n-         app: api-v5\n+         app: api-v5\n          role: api-frontend\n      spec:\n        containers:\n-       - name: api-v5\n+       - name: api-v6\n-         image: gcr.io/total-sudoku/sudoku-api:v5\n+         image: gcr.io/total-sudoku/sudoku-api:v6\n          ports:\n          - name: http-server\n            containerPort: 8080\n          env:\n          - name: 'REDIS_ADDR'\n            value: 'redis-master:6379'\n```\n\nIssue the rolling update command:\n\n```\n$ kubectl rolling-update api-v5 -f api-controller.yaml\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodegoalie%2Ftotal-sudoku","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodegoalie%2Ftotal-sudoku","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodegoalie%2Ftotal-sudoku/lists"}