DOCUMENT ARCHIVE

Get Started with Redis and SQL Server Containers on Kubernetes

Instructions follow for:

  • Sample .NET application source code with Redis session and query caching
  • Kubernetes deployment and service YAML files and instructions
  • Support for any Windows SQL Server edition
  • Database cloning for a complete Redis + SQL Server development environment

 

 

Solution Components

Redis

The leading open source, in-memory data store.

 

Redis off-loads SQL Server by caching user sessions and frequently-accessed queries. Enhance the user experience, system performance and scalability.

Windocks SQL Containers & Clones

Containers for all editions of SQL Server 2008 onward.

 

Secure production database clones provide complete database environments in seconds, and combined with containers brings SQL Server into a Cloud-native architecture.

Kubernetes

The standard for cloud-native development.

 

Kubernetes provides declarative support for delivery of complex multi-service environments.

 

 

Redis Quick Start

To set up your own Kubernetes cluster, download Windocks and follow the instructions below.

DOWNLOAD

Schedule a demo using Redis, Windocks, SQL Server Containers and Kubernetes

GET A DEMO

 

 

Step 1: Prepare the database for containers and cloning

  1. Log into Windows as an administrator and install SQL Server

  2. Download Windocks, double-click on the installer and finish the install Refer to the getting started steps.-->

  3. Install a git client

  4. Open a Command Prompt and run the following commands:

    cd C:

    git clone https://github.com/WinDocks/redis-sql-container.git

    copy c:\redis-sql-container\redisdemo.bak c:\windocks\dbbackups

    cd C:\windocks\samples

    notepad dockerfile

    Enter the following lines into dockerfile and save it (Change mssql-2016 to whichever version of SQL Server you installed)

    FROM mssql-2016
    SETUPCLONING FULL redisdemo c:\windocks\dbbackups\redisdemo.bak

    docker build -t redisdemo2 c:\windocks\samples\redis

    docker images

  5. Email support@windocks.com for the Windocks API password.

 

 

Step 2: Launch the Kubernetes Services

  1. Create a kubernetes cluster and get a console that supports kubectl

  2. git clone https://github.com/WinDocks/redis-sql-container.git

    cd redis-sql-container

    vi secrets.sh

    Set WINDOCKS_REQUIRED_USERNAME and WINDOCKS_REQUIRED_PASSWORD to the credentials you got from support@windocks.com. If you want to setup a secure connection, then edit the key and crt in secret-ssl.

    sh secrets.sh

    vi sqlproxy-deployment.yaml

    Line 31, set the hostname or IP address for your Windocks VM above

    sh deploy.sh

  3. Confirm the services are running by entering:

    kubectl get services
kubectlGetServicesReturn

 

  1. Open a browser using the Windocks-dotnetwebsite external IP address:port. Click on the Cars tab to access the application.
displayCars

 

  1. Paste the .NET api external IP address into the app, along with a username of ramenn2 and password of Password!! Click the “Get Cars” button to see the behavior of the redis cache interacting with the .NET application and SQL Server.

Extend CI/CD to your data layer