{"id":16144306,"url":"https://github.com/ryanj/redisconf-2018","last_synced_at":"2025-04-06T20:15:16.015Z","repository":{"id":66461898,"uuid":"131048460","full_name":"ryanj/redisconf-2018","owner":"ryanj","description":"Demo examples from RedisConf 2018","archived":false,"fork":false,"pushed_at":"2018-10-14T18:15:21.000Z","size":764,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-13T02:16:22.525Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://bit.ly/redis-devtestprod","language":"JavaScript","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/ryanj.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-25T18:34:24.000Z","updated_at":"2018-10-14T18:15:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"f7f8a335-8d8f-4c00-86fe-83d92db0c07c","html_url":"https://github.com/ryanj/redisconf-2018","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/ryanj%2Fredisconf-2018","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanj%2Fredisconf-2018/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanj%2Fredisconf-2018/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanj%2Fredisconf-2018/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryanj","download_url":"https://codeload.github.com/ryanj/redisconf-2018/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247543598,"owners_count":20955865,"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-10T00:12:29.798Z","updated_at":"2025-04-06T20:15:15.997Z","avatar_url":"https://github.com/ryanj.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RedisConf 2018 Demos by RyanJ\n\nSlides: http://bit.ly/redis-devtestprod\n\nTo follow along with these examples, you'll need access to an OpenShift environment. Minishift is one way to get started: http://github.com/minishift/minishift\n\n## Dev Demos\nRedis-powered web solutions can be assembed piece by piece using the Service Catalog.\n\nUse the Service Catalog to lanch the \"**Redis (Ephemeral)**\" service. Make sure to choose the option to \"create a secret\" / binding during the setup. \n\nNext, try building *this repo* using the Service Catalog's *NodeJS* runtime: https://github.com/ryanj/redisconf-2018\n\nWhen the build and deployment are completed, check OpenShift's dashboard Overview page to find the resulting web service address (or **Route**).  Open the link to see view the resulting service which echoes out the available redis integration variables and credentials.\n\n**What do you find?**\n\nAccess the container environments via the web-based *Terminal* to investigate.\n\nShow realtime changes via the web container: Edit `index.html` in a terminal, then reload the page to preview your changes\n\nUse a rolling deployment to demo outage-free updates\n\n## Test Demos\n\nDeploy the same thing in a new project, while choosing the other (non-ephemeral) \"Redis\" service from the catalog.\n\nTest scaling and autorecovery.  Scale the web instances up to 6, then kill four of them. Show autorecovery. Reload the web page to show that kubernetes can automatically route around and restore the availability of these types of services without any visible disruption for external users.\n\nRun `redis-cli cluster nodes` in the Terminal of the redis pod, to confirm that we are *not* configured to run Redis as a cluster.\n\n## Production Demos\n\n*WARNING: NOT FOR USE IN PRODUCTION*\n\n**Step1:** Install the template (NOT IN PRODUCTION!)\n\nSwitch to a new project, then use `oc create` to add a new `Redis Cluster` catalog item:\n\n```bash\noc create -f https://raw.githubusercontent.com/ryanj/redisconf-2018/master/redis-cluster-template.yml\n```\n\nThe above command should install a new `Redis Cluster` option to your Service Catalog!\n\n**Step2:** Use your web browser to deploy the Redis Cluster in a new project\n\nUse the OpenShift web console to switch to your latest project. Then use the *`Add to Project`* button to find the new Redis Cluster catalog entry.  Launch it using the available defaults.\n\nAfter one of the first pod is deployed, use the available web terminal to run: `redis-cli cluster nodes`\n\nThe output should show that clustering capabilities are available, but that this node is not yet configured to talk to it's peers.\n\n**Step3:** Configure the cluster\n\n**After all 6 pods are deployed**, run the following **from your laptop** to join this cluster of Redis nodes: \n\n```bash\nkubectl exec -it redis-cluster-0 -- redis-trib create --replicas 1 \\\n$(kubectl get pods -l app=redis-cluster -o jsonpath='{range.items[*]}{.status.podIP}:6379 ')\n```\n\nChoose \"`yes`\" to confirm your cluster configuration update.  \n\nRun `kubectl exec -it redis-cluster-0 -- redis-cli cluster nodes` to confirm that all six pods have been successfully configured as a cluster.\n\n**Step4:** Demo Autorecovery of DB tier:\n\n1. In an OpenShift Web Terminal, run: `watch redis-cli cluster nodes`, or try `kubectl exec -it redis-cluster-0 -- watch redis-cli cluster nodes` from your laptop.  This should provide a dashboard of the current cluster state.\n\n2. Delete two master Redis nodes, and observe the results in your other terminal:\n\n```bash\nkubectl delete po/redis-cluster-1 po/redis-cluster-2\n```\n\n### Wrap up\n\nSee [Sander Ploegsma's blog post on \"Running Redis Cluster on Kubernetes\"](https://sanderp.nl/running-redis-cluster-on-kubernetes-e451bda76cad) for additional Redis clustering examples.\n\nIf you are interested in learning about [Redis Operators for Kubernetes](https://product.spotahome.com/redis-operator-for-kubernetes-released-9c6775e7da9b), take a look at:\n\n1. https://github.com/spotahome/redis-operator\n2. https://github.com/jw-s/redis-operator\n3. [CoreOS's new Operator Toolkit](https://coreos.com/blog/introducing-operator-framework)\n\n# Thank You!\n\nSlides: http://bit.ly/redis-devtestprod\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryanj%2Fredisconf-2018","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryanj%2Fredisconf-2018","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryanj%2Fredisconf-2018/lists"}