Skip to content

Latest commit

 

History

History
89 lines (59 loc) · 3.99 KB

start-here.md

File metadata and controls

89 lines (59 loc) · 3.99 KB

Documentation Overview

This repository is intended to hold Avanade's exploration with Azure SQL Database Ledger Tables

Related

Folder Structure

  • docs - documentation, process flows and state diagrams, and technical architecture.
  • sql-ledger-demo - the Azure web app for the Azure SQL database ledger tables demo.
  • sql-ledger-demo/python-tools - tools for updating and generating random data in SQL ledger.
  • sql-ledger-demo/sql - Examples of the SQL we used to set up our SQL ledger demo.
  • confidential-ledger-demo/ - the Docker compose definition to run the confidential ledger use case.
  • confidential-ledger-demo/client - the Azure web app for the confidential ledger demo.
  • confidential-ledger-demo/server - the backend python server for the webapp.
  • .vscode - configuration and recommendations for the VS Code IDE.

Running the demos

Main Demos

Both demos use a frontend built with Next.js, which then integrates with the respective distributed data solution. More information is available for the SQL Ledger Tables demo and for the Confidential Ledger demo.

You can run the demos locally using nodejs, or a dockerfile/docker compose definition is provided for each demo, enabling you to run locally or deploy to Azure with all dependencies included.

Whatever your decision, both demos have a .env.template file in their respective directories, which shows application settings that you will need. These need to either be contained in a local .env.local file, or in the App Settings for your application in Azure.

Running the next.js server locally with node

  1. Open the .env.template file, and update with your settings - save it as .env.local
  2. Run npm install to ensure you have all dependencies.
  3. Run the development server with npm run dev
  4. Open http://localhost:3000 with your browser to see the result.

Python Tooling

The tooling uses Python, and we recommend using a conda environment when installing requirements, for example:

$ conda create --name distribdata python=3.9 -y
$ conda activate distribdata
$ pip install -r requirements-dev.txt

Software Installation for Python Tooling

  1. Create a separate Python environment for your installation, and activate it. You have two options:

    a. Use a Conda distribution

    If you are using a distribution of conda, you may want to create a new conda environment, rather than use venv:

    conda create --name distribdata python=3.9 -y

    b. Use a Python virtual environment

    On Windows, you may need to use python command where there are references to the python3 command.

    On linux, you may need to run sudo apt-get install python3-venv first.

    $ python3 -m venv env
    $ source env/bin/activate
    $ pip3 install -r requirements-dev.txt
  2. Install the required dependencies in your new Python environment.

    $ pip3 install -r requirements-dev.txt

    The requirements.txt file can be used alone if you don't intend to develop further.

Running the SQL code directly

You can use the SQL Server extension for VS Code to run the SQL ledger examples directly. On non-windows machines, make sure you have drivers for MS SQL installed.

On a mac, you can run the following commands:

brew install unixodbc
brew tap microsoft/mssql-release https://github.com/Microsoft/homebrew-mssql-release
brew update
brew install msodbcsql mssql-tools