fix: correct minor grammatical errors and improve clarity in README.md
This commit is contained in:
21
README.md
21
README.md
@@ -1,14 +1,15 @@
|
|||||||
# Azure Storage Emulator
|
# Azure Storage Emulator
|
||||||
|
|
||||||
This is a simple guide that will help you set up and run the Azure Storage Emulator on your local machine. The Azure Storage Emulator allows you to develop and test your applications that use Azure Storage services without needing an Azure subscription nor Internet connection.
|
This is a simple guide that will help you set up and run the Azure Storage Emulator on your local machine. The Azure Storage Emulator allows you to develop and test your applications that use Azure Storage services without needing an Azure subscription or an Internet connection.
|
||||||
|
|
||||||
Review the [Documentation](#reference) for more details on how to use the emulator and its features. This document will cover a scenario where you want to run the emulator as close to the real Azure Storage service as possible, which means using triple HTTPS endpoints and OAuth simulation.
|
Review the [Documentation](#reference) for more details on how to use the emulator and its features. This document covers a scenario where you want to run the emulator as close to the real Azure Storage service as possible, which means using triple HTTPS endpoints and OAuth simulation.
|
||||||
|
|
||||||
## Docker Installation
|
## Docker Installation
|
||||||
|
|
||||||
To run the Azure Storage Emulator in a Docker container, follow these steps:
|
To run the Azure Storage Emulator in a Docker container, follow these steps:
|
||||||
|
|
||||||
1. Ensure that a container runtime is installed. This repository supports both Docker and Apple `container` command.
|
1. Ensure that a container runtime is installed. This repository supports both Docker and Apple `container` command.
|
||||||
|
|
||||||
2. Build the emulator image using the provided Dockerfile:
|
2. Build the emulator image using the provided Dockerfile:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@@ -23,7 +24,7 @@ To run the Azure Storage Emulator in a Docker container, follow these steps:
|
|||||||
|
|
||||||
## Native Installation
|
## Native Installation
|
||||||
|
|
||||||
To install the Azure Storage Emulator natively on your machine, follow these steps:
|
To install the Azure Storage Emulator natively on your machine, ensure you have Node.js and npm installed, and follow these steps:
|
||||||
|
|
||||||
1. Clone the repository:
|
1. Clone the repository:
|
||||||
|
|
||||||
@@ -102,11 +103,11 @@ To install the Azure Storage Emulator natively on your machine, follow these ste
|
|||||||
|
|
||||||
The script is the entry point for starting the Azure Storage Emulator natively. It discovers the account name and key from the `accounts.env` file, generates the necessary SSL certificates, configures Caddy for HTTPS endpoints, and starts the Azurite server with the appropriate settings.
|
The script is the entry point for starting the Azure Storage Emulator natively. It discovers the account name and key from the `accounts.env` file, generates the necessary SSL certificates, configures Caddy for HTTPS endpoints, and starts the Azurite server with the appropriate settings.
|
||||||
|
|
||||||
It accepts the following optional flag: `--oauth` or `-o`. It enables OAuth simulation for the emulator. When this flag is set, the emulator will simulate OAuth authentication flows, allowing you to test scenarios that involve Entra ID authentication. It does not implement a real authentication flow, instead it will accept any valid token.
|
It accepts the following optional flag: `--oauth` or `-o`. It enables OAuth simulation for the emulator. When this flag is set, the emulator simulates OAuth authentication flows, allowing you to test scenarios that involve Entra ID authentication. It does not implement a real authentication flow; instead, it accepts any valid token.
|
||||||
|
|
||||||
The script assumes that both Azurite and Caddy are installed and available in the system's PATH. It also assumes that the `accounts.env` file is properly configured with at least one account name and key and the `/etc/hosts` file contains the necessary entries for the custom domain names, e.g. `accountname.blob.core.windows.net`, `accountname.queue.core.windows.net`, and `accountname.table.core.windows.net`.
|
The script assumes that both Azurite and Caddy are installed and available in the system's PATH. It also assumes that the `accounts.env` file is properly configured with at least one account name and key, and that the `/etc/hosts` file contains the necessary entries for the custom domain names, e.g. `accountname.blob.core.windows.net`, `accountname.queue.core.windows.net`, and `accountname.table.core.windows.net`.
|
||||||
|
|
||||||
The storage location is determined by the `AZURITE_DIR` environment variable, which defaults to relative `storage` subdirectory of the current directory if not set. Ensure that the specified directory is writable by the user running the script, as Azurite will need to create and manage files for the emulated storage accounts.
|
The storage location is determined by the `AZURITE_DIR` environment variable, which defaults to the relative `storage` subdirectory of the current directory if not set. Ensure that the specified directory is writable by the user running the script, as Azurite will need to create and manage files for the emulated storage accounts.
|
||||||
|
|
||||||
The script will generate self-signed SSL certificates for the specified account name and store them in the storage directory. Caddy will be configured to use these certificates for the HTTPS endpoints. The emulator will be accessible at the following endpoints:
|
The script will generate self-signed SSL certificates for the specified account name and store them in the storage directory. Caddy will be configured to use these certificates for the HTTPS endpoints. The emulator will be accessible at the following endpoints:
|
||||||
|
|
||||||
@@ -116,14 +117,14 @@ The script will generate self-signed SSL certificates for the specified account
|
|||||||
|
|
||||||
You need to add `storage/ca_cert.pem` as a trusted root certificate in your system to avoid SSL errors when connecting to the emulator.
|
You need to add `storage/ca_cert.pem` as a trusted root certificate in your system to avoid SSL errors when connecting to the emulator.
|
||||||
|
|
||||||
For Linux based systems, you can use the following commands to add the certificate to the trusted store:
|
For Linux-based systems, you can use the following commands to add the certificate to the trusted store:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo cp storage/ca_cert.pem /usr/local/share/ca-certificates/azurite_ca_cert.crt
|
sudo cp storage/ca_cert.pem /usr/local/share/ca-certificates/azurite_ca_cert.crt
|
||||||
sudo update-ca-certificates
|
sudo update-ca-certificates
|
||||||
```
|
```
|
||||||
|
|
||||||
For MacOS, you can use the Keychain Access application to import the certificate and mark it as trusted. Windows users can use the Certificate Manager to import the certificate into the "Trusted Root Certification Authorities" store.
|
For macOS, you can use the Keychain Access application to import the certificate and mark it as trusted. Windows users can use the Certificate Manager to import the certificate into the "Trusted Root Certification Authorities" store.
|
||||||
|
|
||||||
### `build.sh`
|
### `build.sh`
|
||||||
|
|
||||||
@@ -131,14 +132,14 @@ The script builds a container image for the Azure Storage Emulator using the pro
|
|||||||
|
|
||||||
Accepted flags:
|
Accepted flags:
|
||||||
|
|
||||||
- `--arch`: Specifies the target architecture for the container image. Supported values are `amd64` and `arm64`. If not provided, the script will build for the architecture of the host machine. Can be specfied twice to build for both architectures.
|
- `--arch`: Specifies the target architecture for the container image. Supported values are `amd64` and `arm64`. If not provided, the script will build for the architecture of the host machine. It can be specified twice to build for both architectures.
|
||||||
- `--version`: Specifies the version tag for the built container image. The version value must correspond to a valid Azurite GitHub tag.
|
- `--version`: Specifies the version tag for the built container image. The version value must correspond to a valid Azurite GitHub tag.
|
||||||
- `--latest`: Uses the latest released version of Azurite from GitHub as the base for the container image. This flag cannot be used together with `--version`.
|
- `--latest`: Uses the latest released version of Azurite from GitHub as the base for the container image. This flag cannot be used together with `--version`.
|
||||||
- `--registry`: Specifies the container registry to which the built image will be pushed. If not provided, the image will only be built locally and not tagged with registry prefix.
|
- `--registry`: Specifies the container registry to which the built image will be pushed. If not provided, the image will only be built locally and not tagged with registry prefix.
|
||||||
|
|
||||||
### `run.sh`
|
### `run.sh`
|
||||||
|
|
||||||
The script runs the Azure Storage Emulator using supported container runtime (Docker or Apple `container` command). It accepts the same flag as `run-server.sh` to enable OAuth simulation (`--oauth` or `-o`). It also assumes the AZURITE_DIR is either set in the environment or empty (not set) in which case it will default to `./storage` subdirectory of the current directory. The script will mount the specified storage directory into the container, allowing you to persist data and access the generated SSL certificates on the host machine.
|
The script runs the Azure Storage Emulator using a supported container runtime (Docker or Apple `container` command). It accepts the same flag as `run-server.sh` to enable OAuth simulation (`--oauth` or `-o`). It also assumes `AZURITE_DIR` is either set in the environment or empty (not set), in which case it will default to the `./storage` subdirectory of the current directory. The script mounts the specified storage directory into the container, allowing you to persist data and access the generated SSL certificates on the host machine.
|
||||||
|
|
||||||
You have to use the same procedure as for `run-server.sh` to install the generated CA certificate as a trusted root certificate in your system to avoid SSL errors when connecting to the emulator.
|
You have to use the same procedure as for `run-server.sh` to install the generated CA certificate as a trusted root certificate in your system to avoid SSL errors when connecting to the emulator.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user