Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

RedisConf18 - Using Redis as a Backend in a Serverless Application With Kubeless

454 views

Published on

Breakout Session

Published in: Technology
  • Be the first to comment

RedisConf18 - Using Redis as a Backend in a Serverless Application With Kubeless

  1. 1. 2017 Bitnami. Proprietary and confidential. 2 Our Products Application Catalog • 150 applications & dev. runtimes • Multiple formats: cloud, container, local VMs, native installers… • Trusted, Maintained, Optimized Stacksmith • Enterprise cloud migration tool • Productize Bitnami core technology • Easily re-platform applications for cloud Kubernetes • Defining packaging & deployment tools • Key projects : Kubeapps, Kubeless, Helm • Key partners: Microsoft, Deis, Heptio, SAP
  2. 2. A Wide Range of Applications 3 DEVELOPER TOOLS APPLICATIONS INFRA- STRUCTURE
  3. 3. 2017 Bitnami. Proprietary and confidential. 4 What do we do? Package Deploy Maintain Components Packages Platforms Updates
  4. 4. 5 ● Containers ● Kubernetes ● Serverless Agenda
  5. 5. Containers Automatically pushed to multiple repositories
  6. 6. Redis Docker Container $ docker run -d -e ALLOW_EMPTY_PASSWORD=yes bitnami/redis 7 $ docker run -d -e ALLOW_EMPTY_PASSWORD=yes bitnami/redis Welcome to the Bitnami redis container Subscribe to project updates by watching https://github.com/bitnami/bitnami-docker-redis WARN ==> You set the environment variable ALLOW_EMPTY_PASSWORD=yes. For ... redis INFO nami INFO redis successfully initialized INFO ==> Starting redis... ...
  7. 7. Kubernetes Helm Charts Core Maintainers of Charts
  8. 8. Helm principles A client, a server and a package (aka Chart) 9
  9. 9. Redis Helm Chart $ helm install stable/redis 10 $ helm search redis NAME VERSION DESCRIPTION stable/redis 1.1.1 Open source, advanced key-value store. It is of... stable/redis-ha 1.0.1 Highly available Redis cluster with multiple se... stable/sensu 0.2.0 Sensu monitoring framework backed by the Redis ... $ helm install stable/redis NAME: kindly-hedgehog LAST DEPLOYED: Thu Apr 12 11:04:22 2018 NAMESPACE: default STATUS: DEPLOYED ...
  10. 10. Structure of a Chart A tarball with a set structure 11 $ helm create redis Creating redis $ tree redis redis ├── Chart.yaml ├── charts ├── templates │ ├── NOTES.txt │ ├── _helpers.tpl │ ├── deployment.yaml │ ├── ingress.yaml │ └── service.yaml └── values.yaml ...
  11. 11. Kubeapps A Kubernetes application launchpad (including charts) 12
  12. 12. Redis in Kubeapps 13
  13. 13. Using Redis in a Serverless Way With Kubeless
  14. 14. Strength in Packaging 15 Local Installers Virtual Machines Cloud Containers Functions/ Serverless evolution?
  15. 15. Kubeless Architecture A Kubernetes-native Extension 16
  16. 16. Function in Kubeapps 17
  17. 17. A more complex example (NodeJS) 18 Don’t do this, use secrets
  18. 18. Building a Todo app with “Serverless” Functions 19 Todo app front-end (react) Browser read-all function update function create function etc REST API
  19. 19. Todo app routes ● https://github.com/bitnami-labs/redisdemo 20
  20. 20. Todo app routes kubeless function deploy --runtime nodejs8 --from-file backend/todos-create.js --handler todos.create --dependencies backend/package.json --env REDIS_HOST=gangly-boxer-redis-master --env REDIS_PASSWORD=$(kubectl get secret --namespace default gangly-boxer-redis -o jsonpath="{.data.redis-password}" | base64 --decode) create ● https://github.com/bitnami-labs/redisdemo 21 Recommend kubeless 0.7.1 or newer, released this morning
  21. 21. Todo App (Demo) 22
  22. 22. Key Takeaways Kubeapps & Helm => Great building blocks and community support Kubeless & Redis => Features in minutes Try it out: ● https://hub.kubeapps.com ● https://github.com/kubeless ● https://github.com/bitnami-labs/redisdemo 23

×