Clocal-azure provides an easy-to-use test/mocking framework for developing Cloud applications.
Currently features are under development.
- NodeJS (^8.9.4)
- yarn (^1.6.0)
- Docker
- MYSQL
- MongoDB
$ git clone https://github.com/cloudlibz/clocal-azure.git
$ cd clocal-azure
$ yarn
$ yarn link (Install clocal commands)
$ yarn start <command>
or
$ clocal <command>
Clocal-azure spins up the following core Cloud APIs on your local machine:
- Azure Functions at http://localhost:9574
- Azure Storage at http://localhost:9569 (Blobs), http://localhost:9570 (Queues), http://localhost:9571 (Tables)
- Azure CosmosDB (Only windows supported) port will be given by the emulator with the IP address
- Azure SQL Service at http://localhost:3306
- Azure Key Vault at http://localhost:8200
- Azure Search at http://localhost:9520
- Azure API App Service at http://localhost:9567
- Azure CLI 2.0 No ports
Step 1: Go to compose.env
file and specify the path to create the images for azure functions and azure api app service and azure cosmosdb.
Step 2: Run the shell script below.
$ sh compose.sh
or
$ yarn service
- Init Functions
$ clocal function-init <folder>
Azure functions working directory is located in example/azure-functions.
You can create a folder inside the location and give the folder location.
Then attach the init file where the service starting file.
Example: clocal function-init function-sample
- Start Functions
$ clocal function-start
- Stop Functions
$ clocal function-stop
Azure storage comprises of azure blobs, queues and tables. See the example/azure-storage for sample project.
- Start Storage
$ clocal storage-start
- Stop Storage
$ clocal storage-stop
- Clear all files created
$ clocal storage-clear
- List files To list all files
$ clocal storage-query
To list specific folder files
$ clocal storage-query folder_name
- Init CosmosDB
$ clocal cosmosdb-init
This will create the in-built image of the Cosmos DB emulator and will be on ready state to start the container.
- Start CosmosDB
$ clocal cosmosdb-start
- Stop CosmosDB
$ clocal cosmosdb-stop
- Start SQL Service
$ clocal sql-start
- Stop SQL Service
$ exit
- Start KeyVault
$ clocal keyvault-start
- Stop KeyVault
$ clocal keyvault-stop
- Start Search
$ clocal search-start
- Stop Search
$ cmd + c / ctrl + c
- Start CLI
$ clocal cli-start
- Exit CLI
$ exit
Azure API working directory is located in example/azure-api-service. You can create a folder inside the location and give the folder location. Then attach the init file where the service starting file.
Example: clocal api-start ./ api.json
$ clocal api-start <folder> <init-file>
- Azure Functions
- Azure Storage
- Azure Cosmos DB
- Azure SQL Service
- Azure KeyVault
- Azure Search
- Azure CLI
Before runs the tests, make sure all docker images have been installed.
$ yarn test
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
This project is licensed under the Apache License 2.0 - see the LICENSE.md file for details
The project clocal-azure is initially developed for the Google Summer of Code 2018. Special thanks goes to my mentors Rumesh, Lasitha and Rajika and CloudLibz Organization.
Second phase of clocal-azure carried out for Google Summer of Code 2019. Once again I would like to thank my mentors Rumesh, Sammani, Rajika and Dilantha.