Git Product home page Git Product logo

bicep-redis-poc's Introduction

Redis-Sync-POC

This project demonstrates a way to sync a Redis Enterprise Cache between 2 locations. The code included is meant to illustrate the process for demo purposes, but the concepts could be extended to a production use case.

Technologies

  • Bicep : A tool used to create infrastructure templates for standarized deployments
  • Azure Functions : A serverless runtime environment for on-demand code, supporting multiple languages and environment
  • PowerShell Fn : We chose PowerShell because there's existing commandlets for exporting and importing from Azure Redis

Approach

  1. Define an infrastructure for our code to run, this includes the following, see main.bicep and substitute your appName value. For purposes of illustration I used bnkredispoc

    • SRC Cluster : Source Cluster
    • DR Cluster : Disaster Recovery cluster
    • SRC Azure Storage : Storage in the source region
    • DR Azure Storage : Storage in DR region
    • App Svc Hosting Plan : Hosting plan for function
    • Function App : Container for the functions to do the sync
    • App Insights : Monitoring of the function

  2. Add function App fnAppRedisSyncPS to perform extract, copy the data, and import the data

    • fnHttpRedisExportPS : Exports the cache when triggered by HTTP call
    • fnBlobCopySrcToDest : Uses blob trigger and bindings to copy blob from source to dest
    • fnBlobRedisImport : Imports the blob into the cache when it arrives
  3. Deploy Infrastructure from ./deploy folder

    • az deployment group create --name [name] --resource-group [rg-redis-poc] --template-file main.bicep
  4. Deploy Code from ./fnAppRedisSyncPS folder

    • func azure functionapp publish [bnkredispoc-fn]
  5. In the Azure portal enable system managed identity by going to the app settings and turning on the setting. Also add an RBAC role assignment to the service to grant access at the Resource Group scope. then click on Azure Role Assignments and add role

References

bicep-redis-poc's People

Contributors

mbenko avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.