{"id":26762303,"url":"https://github.com/edosrecki/google-cloud-redis-cli","last_synced_at":"2025-04-15T09:27:23.783Z","repository":{"id":183233985,"uuid":"669815360","full_name":"edosrecki/google-cloud-redis-cli","owner":"edosrecki","description":"Connect to private Google Cloud Redis instance from local machine through stunnel proxy running in Kubernetes. ","archived":false,"fork":false,"pushed_at":"2024-12-17T08:32:32.000Z","size":3660,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-22T18:39:09.823Z","etag":null,"topics":["cli","gcloud","gcloud-cli","google","google-cloud","google-cloud-platform","javascript","kubectl","kubernetes","nodejs","proxy","redis","stunnel","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/edosrecki.png","metadata":{"files":{"readme":"README.adoc","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"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}},"created_at":"2023-07-23T14:17:58.000Z","updated_at":"2024-12-17T08:32:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"c6a613cc-dc8b-441b-ace4-44315e32284b","html_url":"https://github.com/edosrecki/google-cloud-redis-cli","commit_stats":{"total_commits":107,"total_committers":3,"mean_commits":"35.666666666666664","dds":"0.33644859813084116","last_synced_commit":"a929c437c7f2c9806f14e91a9bed4861cbf92a91"},"previous_names":["edosrecki/google-cloud-redis-cli"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edosrecki%2Fgoogle-cloud-redis-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edosrecki%2Fgoogle-cloud-redis-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edosrecki%2Fgoogle-cloud-redis-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edosrecki%2Fgoogle-cloud-redis-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/edosrecki","download_url":"https://codeload.github.com/edosrecki/google-cloud-redis-cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249042142,"owners_count":21203224,"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":["cli","gcloud","gcloud-cli","google","google-cloud","google-cloud-platform","javascript","kubectl","kubernetes","nodejs","proxy","redis","stunnel","typescript"],"created_at":"2025-03-28T18:36:59.362Z","updated_at":"2025-04-15T09:27:23.758Z","avatar_url":"https://github.com/edosrecki.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":":toc: macro\n:toc-title:\n:toclevels: 10\n\n= ⛅ google-cloud-redis\n\nimage:https://img.shields.io/github/package-json/v/edosrecki/google-cloud-redis-cli/main?color=blue\u0026label=google-cloud-redis[\"google-cloud-redis CLI Version\"]\nimage:https://img.shields.io/github/actions/workflow/status/edosrecki/google-cloud-redis-cli/continuous-integration.yml[\"Build Status\", link=\"https://github.com/edosrecki/google-cloud-redis-cli/actions\"]\n\nA CLI app which establishes a connection to a private Google Cloud Redis instance and port-forwards it to a local machine.\n\nConnection is established by running an https://www.stunnel.org/[stunnel] pod in a Google Kubernetes Engine cluster which runs in the same VPC network as the private Cloud Redis instance. Connection is then port-forwarded to the local machine, where a user can connect to the instance on localhost. Configurations in the app can be saved for practical future usage.\n\nThe app relies on local `gcloud` and `kubectl` commands which have to be configured and authenticated with the proper Google Cloud user and GKE Kubernetes cluster.\n\nThe app also needs an existing Kubernetes Secret containing the Google Cloud Redis certificate to exist in the Kubernetes \ncluster. You can download a Redis certificate file and create a Kubernetes secret manually, or you can use\n`google-cloud-redis secrets create` command to do so.\n\nimage::screenshot.png[]\n\n---\n\ntoc::[]\n\n== Install\n=== Homebrew\n[source,bash]\n----\nbrew install edosrecki/tools/google-cloud-redis\n\n# Update\nbrew upgrade google-cloud-redis\n----\n\n=== Releases\nDownload a corresponding distribution from https://github.com/edosrecki/google-cloud-redis-cli/releases[Releases] and add\nthe executable to your `PATH`.\n\n=== Build from source\nBuild the app from source by building and packaging it manually: see _Build_ and\n_Package_ sections.\n\n== Use\n=== Prerequisites\n* Install https://cloud.google.com/sdk/docs/install[`gcloud`] tool\n* Install https://kubernetes.io/docs/tasks/tools/#kubectl[`kubectl`] tool\n* Authenticate to Google Cloud: `gcloud auth login`\n* Get GKE cluster credentials: `gcloud container clusters get-credentials`\n* Download Google Cloud Redis certificate and store it in a Kubernetes secret (see `google-cloud-redis secrets create`).\n\n=== Run\n[source,bash]\n----\n# Help\ngoogle-cloud-redis help\n\n# Create Kubernetes secret containing Gogle Cloud Redis certificate\ngoogle-cloud-redis secrets create\n\n# Create (or override existing) configuration\ngoogle-cloud-redis configurations create\n\n# Run configuration (interactive mode)\ngoogle-cloud-redis configurations run\n# Run configuration (non-interactive mode)\ngoogle-cloud-redis configurations run $NAME\n# HINT: Add alias\nalias myDbProd=\"google-cloud-redis configurations run $NAME\"\n\n## Connect to the instance on localhost\nredis-cli -p $LOCAL_PORT\n\n# Export configurations (and share :-])\ncat $(google-cloud-redis configurations path)\n----\n\n== Build\n[source,bash]\n----\nnpm run clean\nnpm run build\n----\n\n== Package\n=== Pre-configured\nPackage the app for Node.JS 18 on MacOS, Linux, and Windows.\n\n[source,bash]\n----\nnpm run bundle\n----\n\n=== Manual\nSee https://www.npmjs.com/package/pkg#targets[pkg] for details.\n\n[source,bash]\n----\nnpx pkg \u003cNODE_RANGE\u003e-\u003cPLATFORM\u003e-\u003cARCH\u003e\n----\n\n== Deploy\nTo deploy a new version of `google-cloud-redis` app, manually run a https://github.com/edosrecki/google-cloud-redis-cli/actions/workflows/continuous-deployment.yml[\"Continuous Deployment\"] worklow in GitHub Actions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedosrecki%2Fgoogle-cloud-redis-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedosrecki%2Fgoogle-cloud-redis-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedosrecki%2Fgoogle-cloud-redis-cli/lists"}