Go to GitHub project page or GitHub issues for the milestone and TODO items we are used for tracking upcoming features and bug fixes.
Every Azure Storage REST APIs maps to one handler method. Handler methods throwing NotImplementedError
should be implemented.
Every handler will talk to persistence layer directly. We make implements of persistency layer abstract by creating interfaces. LokiBlobDataStore
is one of the implementation based on Loki database used by Azurite V3.
In the root of the repository, we have provided pre-defined debugging scripts. This makes it easy to debug in Visual Studio Code with simple F5 click for debug configuration "Azurite Blob Service" or "Azurite Queue Service".
Manually follow following steps to build and run all services in Azurite:
npm ci
npm run azurite
Or build and run a certain service like Blob service:
npm ci
npm run blob
By default, Azurite leverages loki as metadata database.
However, loki limits Azurite's scalability and extensibility.
Set environment variable AZURITE_DB=dialect://[username][:password][@]host:port/database
to make Azurite blob service switch to a SQL database based metadata storage, like MySql, SqlServer.
For example, connect to MySql or SqlServer by set environment variables:
set AZURITE_DB=mysql://root:[email protected]:3306/azurite_blob
set AZURITE_DB=mssql://username:password@localhost:1024/azurite_blob
Note. Need to manually create database before starting Azurite instance.
Tips. Create database instance quickly with docker, for example
docker run --name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=my-secret-pw -d mysql:latest
. And grant external access and create databaseazurite_blob
usingdocker exec mysql mysql -u root -pmy-secret-pw -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION; FLUSH PRIVILEGES; create database azurite_blob;"
. Notice that, above commands are examples, you need to carefully define the access permissions in your production environment.
Select and start Visual Studio Code debug configuration "Run Extension".
For every newly implemented REST API and handler, there should be at least coverage from 1 unit / integration test case.
We also provide a predefined Visual Studio Code debug configuration "Current Mocha", allowing you to execute mocha tests within the currently opended file.
Or manually execute all test cases:
npm ci
npm run test
Make sure test cases are added for the changes you made. And send a PR to main
branch for Azurite V3 or later development, dev-legacy
branch for Azurite V2.
- Install autorest by
npm install -g autorest
- Clone autorest TypeScript server generator to some local path
git clone --recursive https://github.com/xiaoningliu/autorest.typescript.server
- Go to cloned autorest.typescript.server folder and build autorest server
npm install
npm install -g gulp
npm run build
- Go to package.json of Azurite repo, update
build:autorest:blob
andbuild:autorest:queue
to point to the local generator cloned path - Generate by go to Azurite root folder and run
npm run build:autorest:queue
npm run build:autorest:blob