{"id":19522298,"url":"https://github.com/anycable/kuby-anycable","last_synced_at":"2026-03-09T17:14:44.967Z","repository":{"id":56880551,"uuid":"431427934","full_name":"anycable/kuby-anycable","owner":"anycable","description":"Kuby plugin to deploy AnyCable applications","archived":false,"fork":false,"pushed_at":"2022-01-11T18:28:41.000Z","size":13,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-04T10:36:32.207Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/anycable.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-11-24T09:48:15.000Z","updated_at":"2022-08-10T06:19:49.000Z","dependencies_parsed_at":"2022-08-20T23:10:39.361Z","dependency_job_id":null,"html_url":"https://github.com/anycable/kuby-anycable","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anycable%2Fkuby-anycable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anycable%2Fkuby-anycable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anycable%2Fkuby-anycable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anycable%2Fkuby-anycable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anycable","download_url":"https://codeload.github.com/anycable/kuby-anycable/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250967245,"owners_count":21515565,"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-11-11T00:38:10.320Z","updated_at":"2026-03-09T17:14:39.937Z","avatar_url":"https://github.com/anycable.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Gem Version](https://badge.fury.io/rb/kuby-anycable.svg)](https://rubygems.org/gems/kuby-anycable)\n\n# Kuby AnyCable\n\n[Kuby][] plugin to deploy [AnyCable][] applications.\n\nThis plugin allows you to install all the required AnyCable components to a Kubernetes cluster.\n\n\u003e Read also [Kubing Rails: stressless Kubernetes deployments with Kuby](https://evilmartians.com/chronicles/kubing-rails-stressless-kubernetes-deployments-with-kuby).\n\n## Installation\n\nAdd to your project:\n\n```ruby\n# Gemfile\ngem \"kuby-anycable\"\n```\n\n## Usage\n\nHere is the minimal configuration:\n\n```ruby\n# kuby.rb\n\nrequire \"kuby-anycable\"\n\n# ...\n\nKuby.define(\"my-app\") do\n  environment(:production) do\n    #...\n\n    kubernetes do\n      add_plugin :rails_app do\n        # ...\n      end\n\n      add_plugin :anycable_rpc\n      add_plugin :anycable_go\n    end\n  end\nend\n```\n\nWhat happens under the hood:\n\n- RPC service definitions are created:\n  - The current `rails_app` image is used for the container.\n  - The `rails_app` Config Map is attached to the RPC container.\n- AnyCable-Go service definitions are created:\n  - The latest stable image is used for `anycable-go`.\n  - Connected to the RPC service (using [DNS load balancing](https://docs.anycable.io/deployment/load_balancing?id=client-side-load-balancing) by default).\n  - Redis URL is inferred from the RPC service `ANYCABLE_REDIS_URL` or `REDIS_URL`.\n  - [Concurrency settings](https://docs.anycable.io/anycable-go/configuration?id=concurrency-settings) are adjusted according to the number of RPC servers and their concurrency settings.\n\nOf course, you can customize the resources:\n\n```ruby\nadd_plugin :anycable_rpc do\n  replicas 2\n  # Provide Redis URL explicitly.\n  redis_url \"redis://custom_url\"\n  # Override gRPC server port (but why?)\n  port 50051\n  # Expose additional port named 'metrics'\n  # (e.g., if you use Prometheus exporter).\n  # Disabled by default.\n  metrics_port 3030\n  # Shortcut for ENV['ANYCABLE_RPC_SERVER_ARGS__MAX_CONNECTION_AGE_MS']\n  max_connection_age 300000\n  # Shortcut for ENV['ANYCABLE_RPC_POOL_SIZE']\n  rpc_pool_size 30\nend\n\nadd_plugin :anycable_go do\n  replicas 2\n  # Provide Redis URL explicitly.\n  redis_url \"redis://custom_url\"\n  # Override web server port (but why?)\n  port 8081\n  # Metrics port (enabled by default and exposed as \"metrics\")\n  metric_port 5001\n  # Provide path to RPC server explicitly\n  rpc_host \"my-app-rpc:50051\"\n  # WebSocket endpoint path\n  ws_path \"/cable\"\n  # AnyCable-Go Dockerimage\n  image \"anycable/anycable-go:1.1\"\n  # Specify ENV['ANYCABLE_RPC_CONCURRENCY'] explicitly\n  rpc_concurrency nil\n  # Use a separate hostname for AnyCable-Go\n  # (disabled by default)\n  hostname nil\nend\n```\n\n### Using with Alpine images\n\nInstalling Ruby deps on Apline images requires some special attention to gRPC-related gems (tl;dl we need to build them from source).\n\nKuby AnyCable comes with a special _package_, which installs everything for you (so you shouldn't use any hacks yourself). You need to add a single line:\n\n```ruby\nKuby.define(\"my-app\") do\n  environment(:production) do\n    docker do\n      # ...\n      distro :apline\n      package_phase.add(\"anycable-build\")\n\n      # ...\n    end\n\n    # ...\n  end\nend\n```\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at [https://github.com/palkan/kuby-anycable](https://github.com/palkan/kuby-anycable).\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n\n[Kuby]: https://getkuby.io\n[AnyCable]: https://anycable.io\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanycable%2Fkuby-anycable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanycable%2Fkuby-anycable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanycable%2Fkuby-anycable/lists"}