diff --git a/README.md b/README.md index 11ac370..1dd3087 100644 --- a/README.md +++ b/README.md @@ -65,6 +65,29 @@ Dive into the `schema-versioning` folder to learn how to manage changes to your ## Getting Started +### Prerequisites +If running locally you will need to install some pre-requistes. + +- [.NET 8.0 Runtime](https://dotnet.microsoft.com/download) +- [Azure Functions Core Tools](https://learn.microsoft.com/azure/azure-functions/functions-run-local#install-the-azure-functions-core-tools) + +To confirm you have the required versions of the tools installed. + +First, check the .NET runtime with this command. Make sure that .NET components with versions that start with 8.0 appear as part of the output: + +```bash +dotnet --list-runtimes +``` + +Next, check the version of Azure Functions Core Tools with this command. You should have a version 4.*x* installed.: + +```bash +func --version +``` + +If you do not have this version installed, you will need to uninstall the older version and follow [these instructions for installing Azure Functions Core Tools](https://learn.microsoft.com/azure/azure-functions/functions-run-local#install-the-azure-functions-core-tools). + + ### Using the Terminal: - Open the terminal on your computer. - Navigate to the directory where you want to clone the repository. @@ -83,7 +106,7 @@ Dive into the `schema-versioning` folder to learn how to manage changes to your Nearly all of these samples are configured to run from [GitHub Codespaces](https://docs.github.com/codespaces/overview). -Navigate to the individual folders of each design pattern for a dedicated `README.md` file and look for the GitHub Codespaced badge. +Navigate to the individual folders of each design pattern for a dedicated `README.md` file and look for the GitHub Codespaced badge. ### Setting up Azure Cosmos DB diff --git a/attribute-array/README.md b/attribute-array/README.md index 29e572a..4814bf8 100644 --- a/attribute-array/README.md +++ b/attribute-array/README.md @@ -129,50 +129,16 @@ SELECT p.name, s.size, s.count FROM products p JOIN s IN p.sizes WHERE s.count > If a user adds new sizes or even removes them. The same query will run unmodified, future-proofing your design and avoiding potential bugs. -## Try this implementation - -In order to run the demos, you will need: - -- [.NET 8.0 Runtime](https://dotnet.microsoft.com/download) -- [Azure Functions Core Tools v4](https://learn.microsoft.com/azure/azure-functions/functions-run-local#install-the-azure-functions-core-tools) - -## Confirm required tools are installed - -Confirm you have the required versions of the tools installed for this demo. - -First, check the .NET runtime with this command: - -```bash -dotnet --list-runtimes -``` - -As you may have multiple versions of the runtime installed, make sure that .NET components with versions that start with 6.0 appear as part of the output. - ## Getting the code -### **Clone the Repository to Your Local Computer:** - -**Using the Terminal:** - -- Open the terminal on your computer. -- Navigate to the directory where you want to clone the repository. -- Type `git clone https://github.com/Azure-Samples/cosmos-db-design-patterns.git` and press enter. -- The repository will be cloned to your local machine. - -**Using Visual Studio Code:** +### Using Terminal or VS Code -- Open Visual Studio Code. -- Click on the **Source Control** icon in the left sidebar. -- Click on the **Clone Repository** button at the top of the Source Control panel. -- Paste `https://github.com/Azure-Samples/cosmos-db-design-patterns.git` into the text field and press enter. -- Select a directory where you want to clone the repository. -- The repository will be cloned to your local machine. +Directions installing pre-requisites to run locally and for cloning this repository using [Terminal or VS Code](../README.md?#getting-started) -### **GitHub Codespaces** -You can try out this implementation by running the code in [GitHub Codespaces](https://docs.github.com/codespaces/overview) +### GitHub Codespaces -- Open the application code in a GitHub Codespace: +Open the application code in GitHub Codespaces: [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/azure-samples/cosmos-db-design-patterns?quickstart=1&devcontainer_path=.devcontainer%2Fattribute-array%2Fdevcontainer.json) diff --git a/data-binning/README.md b/data-binning/README.md index 3d64ceb..18d9f75 100644 --- a/data-binning/README.md +++ b/data-binning/README.md @@ -128,51 +128,18 @@ Once binning is applied to summarize to a 1 minute window, the resulting event w Note: In the demo application, aggregated events are collected based on system time. The `numberOfReadings` will likely be less than 12 on the earliest `eventTimestamp` because that is usually a partial minute (from whenever the application is started until the first time current timestamp has seconds value of `00`). -## Try this implementation - -In order to run the demos, you will need: - -- [.NET 8.0 Runtime](https://dotnet.microsoft.com/download) - -## Confirm required tools are installed - -Confirm you have the required versions of the tools installed for this demo. - -First, check the .NET runtime with this command: - -```bash -dotnet --list-runtimes -``` - -As you may have multiple versions of the runtime installed, make sure that .NET components with versions that start with 6.0 appear as part of the output. - ## Getting the code -### **Clone the Repository to Your Local Computer:** - -**Using the Terminal:** - -- Open the terminal on your computer. -- Navigate to the directory where you want to clone the repository. -- Type `git clone https://github.com/Azure-Samples/cosmos-db-design-patterns.git` and press enter. -- The repository will be cloned to your local machine. - -**Using Visual Studio Code:** +### Using Terminal or VS Code -- Open Visual Studio Code. -- Click on the **Source Control** icon in the left sidebar. -- Click on the **Clone Repository** button at the top of the Source Control panel. -- Paste `https://github.com/Azure-Samples/cosmos-db-design-patterns.git` into the text field and press enter. -- Select a directory where you want to clone the repository. -- The repository will be cloned to your local machine. +Directions installing pre-requisites to run locally and for cloning this repository using [Terminal or VS Code](../README.md?#getting-started) -### **GitHub Codespaces** -You can try out this implementation by running the code in [GitHub Codespaces](https://docs.github.com/codespaces/overview) +### GitHub Codespaces -- Open the application code in a GitHub Codespace: +Open the application code in GitHub Codespaces: - [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/azure-samples/cosmos-db-design-patterns?quickstart=1&devcontainer_path=.devcontainer%2Fdata-binning%2Fdevcontainer.json) +[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/azure-samples/cosmos-db-design-patterns?quickstart=1&devcontainer_path=.devcontainer%2Fdata-binning%2Fdevcontainer.json) ## Set up application configuration files diff --git a/distributed-counter/README.md b/distributed-counter/README.md index 03126bb..929e05d 100644 --- a/distributed-counter/README.md +++ b/distributed-counter/README.md @@ -64,60 +64,18 @@ This sample is implemented as a C#/.NET application with three projects. The thr ... ``` -## Try this implementation - -In order to run the demos, you will need: - -- [.NET 8.0 Runtime](https://dotnet.microsoft.com/download) -- [Azure Functions Core Tools](https://learn.microsoft.com/azure/azure-functions/functions-run-local#install-the-azure-functions-core-tools) - -## Confirm required tools are installed - -Confirm you have the required versions of the tools installed for this demo. - -First, check the .NET runtime with this command: - -```bash -dotnet --list-runtimes -``` - -As you may have multiple versions of the runtime installed, make sure that .NET components with versions that start with 8.0 appear as part of the output. - -Next, check the version of Azure Functions Core Tools with this command: - -```bash -func --version -``` - -You should have a version 4._x_ installed. If you do not have this version installed, you will need to uninstall the older version and follow [these instructions for installing Azure Functions Core Tools](https://learn.microsoft.com/azure/azure-functions/functions-run-local#install-the-azure-functions-core-tools). - ## Getting the code -### **Clone the Repository to Your Local Computer:** - -**Using the Terminal:** - -- Open the terminal on your computer. -- Navigate to the directory where you want to clone the repository. -- Type `git clone https://github.com/Azure-Samples/cosmos-db-design-patterns.git` and press enter. -- The repository will be cloned to your local machine. - -**Using Visual Studio Code:** +### Using Terminal or VS Code -- Open Visual Studio Code. -- Click on the **Source Control** icon in the left sidebar. -- Click on the **Clone Repository** button at the top of the Source Control panel. -- Paste `https://github.com/Azure-Samples/cosmos-db-design-patterns.git` into the text field and press enter. -- Select a directory where you want to clone the repository. -- The repository will be cloned to your local machine. +Directions installing pre-requisites to run locally and for cloning this repository using [Terminal or VS Code](../README.md?#getting-started) -### **GitHub Codespaces** -You can try out this implementation by running the code in [GitHub Codespaces](https://docs.github.com/codespaces/overview) +### GitHub Codespaces -- Open the application code in a GitHub Codespace: +Open the application code in GitHub Codespaces: - [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/azure-samples/cosmos-db-design-patterns?quickstart=1&devcontainer_path=.devcontainer%2Fdistributed-counter%2Fdevcontainer.json) +[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/azure-samples/cosmos-db-design-patterns?quickstart=1&devcontainer_path=.devcontainer%2Fdistributed-counter%2Fdevcontainer.json) ## Set up application configuration files diff --git a/distributed-lock/README.md b/distributed-lock/README.md index 499c574..b756e2a 100644 --- a/distributed-lock/README.md +++ b/distributed-lock/README.md @@ -42,49 +42,16 @@ The application creates a Lock based on the Name and Time to Live( TTL) provided The TTL feature is used to automatically get rid of a lease object rather than having clients do the work of checking a leasedUntil date. This takes away one step, but you are still required to check to see if two clients tried to get a lease on the same object at the same time. This is easily done in Azure Cosmos DB via the 'etag' property on the object. -## Try this implementation - -In order to run the demos, you will need: - -- [.NET 8.0 Runtime](https://dotnet.microsoft.com/download) - -## Confirm required tools are installed - -Confirm you have the required versions of the tools installed for this demo. - -First, check the .NET runtime with this command: - -```bash -dotnet --list-runtimes -``` - -As you may have multiple versions of the runtime installed, make sure that .NET components with versions that start with 6.0 appear as part of the output. - ## Getting the code -### **Clone the Repository to Your Local Computer:** - -**Using the Terminal:** - -- Open the terminal on your computer. -- Navigate to the directory where you want to clone the repository. -- Type `git clone https://github.com/Azure-Samples/cosmos-db-design-patterns.git` and press enter. -- The repository will be cloned to your local machine. - -**Using Visual Studio Code:** +### Using Terminal or VS Code -- Open Visual Studio Code. -- Click on the **Source Control** icon in the left sidebar. -- Click on the **Clone Repository** button at the top of the Source Control panel. -- Paste `https://github.com/Azure-Samples/cosmos-db-design-patterns.git` into the text field and press enter. -- Select a directory where you want to clone the repository. -- The repository will be cloned to your local machine. +Directions installing pre-requisites to run locally and for cloning this repository using [Terminal or VS Code](../README.md?#getting-started) -### **GitHub Codespaces** -You can try out this implementation by running the code in [GitHub Codespaces](https://docs.github.com/codespaces/overview) +### GitHub Codespaces -- Open the application code in a GitHub Codespace: +Open the application code in GitHub Codespaces: [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/azure-samples/cosmos-db-design-patterns?quickstart=1&devcontainer_path=.devcontainer%2Fdistributed-lock%2Fdevcontainer.json) diff --git a/document-versioning/README.md b/document-versioning/README.md index 0c5baca..284431d 100644 --- a/document-versioning/README.md +++ b/document-versioning/README.md @@ -94,29 +94,14 @@ You should have installed a version that starts with `4.`. If you do not have a ## Getting the code -### **Clone the Repository to Your Local Computer:** +### Using Terminal or VS Code -**Using the Terminal:** +Directions installing pre-requisites to run locally and for cloning this repository using [Terminal or VS Code](../README.md?#getting-started) -- Open the terminal on your computer. -- Navigate to the directory where you want to clone the repository. -- Type `git clone https://github.com/Azure-Samples/cosmos-db-design-patterns.git` and press enter. -- The repository will be cloned to your local machine. -**Using Visual Studio Code:** +### GitHub Codespaces -- Open Visual Studio Code. -- Click on the **Source Control** icon in the left sidebar. -- Click on the **Clone Repository** button at the top of the Source Control panel. -- Paste `https://github.com/Azure-Samples/cosmos-db-design-patterns.git` into the text field and press enter. -- Select a directory where you want to clone the repository. -- The repository will be cloned to your local machine. - -### **GitHub Codespaces** - -You can try out this implementation by running the code in [GitHub Codespaces](https://docs.github.com/codespaces/overview) - -- Open the application code in a GitHub Codespace: +Open the application code in GitHub Codespaces: [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/azure-samples/cosmos-db-design-patterns?quickstart=1&devcontainer_path=.devcontainer%2Fdocument-versioning%2Fdevcontainer.json) diff --git a/event-sourcing/README.md b/event-sourcing/README.md index 5c1dffb..0787199 100644 --- a/event-sourcing/README.md +++ b/event-sourcing/README.md @@ -120,58 +120,16 @@ Sample events in the event store could look like this: } ``` -## Try this implementation - -To run the function app for Event Sourcing Pattern, you will need to have: - -- [.NET 8.0 Runtime](https://dotnet.microsoft.com/download) -- [Azure Functions Core Tools](https://learn.microsoft.com/azure/azure-functions/functions-run-local#install-the-azure-functions-core-tools) - -## Confirm required tools are installed - -Confirm you have the required versions of the tools installed for this demo. - -First, check the .NET runtime with this command: - -```bash -dotnet --list-runtimes -``` - -As you may have multiple versions of the runtime installed, make sure that .NET components with versions that start with 8.0 appear as part of the output. - -Next, check the version of Azure Functions Core Tools with this command: - -```bash -func --version -``` - -You should have a version 4.*x* installed. If you do not have this version installed, you will need to uninstall the older version and follow [these instructions for installing Azure Functions Core Tools](https://learn.microsoft.com/azure/azure-functions/functions-run-local#install-the-azure-functions-core-tools). - ## Getting the code -### **Clone the Repository to Your Local Computer:** - -**Using the Terminal:** - -- Open the terminal on your computer. -- Navigate to the directory where you want to clone the repository. -- Type `git clone https://github.com/Azure-Samples/cosmos-db-design-patterns.git` and press enter. -- The repository will be cloned to your local machine. - -**Using Visual Studio Code:** +### Using Terminal or VS Code -- Open Visual Studio Code. -- Click on the **Source Control** icon in the left sidebar. -- Click on the **Clone Repository** button at the top of the Source Control panel. -- Paste `https://github.com/Azure-Samples/cosmos-db-design-patterns.git` into the text field and press enter. -- Select a directory where you want to clone the repository. -- The repository will be cloned to your local machine. +Directions installing pre-requisites to run locally and for cloning this repository using [Terminal or VS Code](../README.md?#getting-started) -### **GitHub Codespaces** -You can try out this implementation by running the code in [GitHub Codespaces](https://docs.github.com/codespaces/overview) +### GitHub Codespaces -- Open the application code in a GitHub Codespace: +Open the application code in GitHub Codespaces: [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/azure-samples/cosmos-db-design-patterns?quickstart=1&devcontainer_path=.devcontainer%2Fevent-sourcing%2Fdevcontainer.json) diff --git a/materialized-view/README.md b/materialized-view/README.md index 283a5a4..851d473 100644 --- a/materialized-view/README.md +++ b/materialized-view/README.md @@ -99,29 +99,14 @@ You should have a version 4.*x* installed. If you do not have this version insta ## Getting the code -### **Clone the Repository to Your Local Computer:** +### Using Terminal or VS Code -**Using the Terminal:** +Directions installing pre-requisites to run locally and for cloning this repository using [Terminal or VS Code](../README.md?#getting-started) -- Open the terminal on your computer. -- Navigate to the directory where you want to clone the repository. -- Type `git clone https://github.com/Azure-Samples/cosmos-db-design-patterns.git` and press enter. -- The repository will be cloned to your local machine. -**Using Visual Studio Code:** +### GitHub Codespaces -- Open Visual Studio Code. -- Click on the **Source Control** icon in the left sidebar. -- Click on the **Clone Repository** button at the top of the Source Control panel. -- Paste `https://github.com/Azure-Samples/cosmos-db-design-patterns.git` into the text field and press enter. -- Select a directory where you want to clone the repository. -- The repository will be cloned to your local machine. - -### **GitHub Codespaces** - -You can try out this implementation by running the code in [GitHub Codespaces](https://docs.github.com/codespaces/overview) - -- Open the application code in a GitHub Codespace: +Open the application code in GitHub Codespaces: [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/azure-samples/cosmos-db-design-patterns?quickstart=1&devcontainer_path=.devcontainer%2Fmaterialized-view%2Fdevcontainer.json) diff --git a/preallocation/README.md b/preallocation/README.md index aea8eff..ee6a71b 100644 --- a/preallocation/README.md +++ b/preallocation/README.md @@ -218,29 +218,14 @@ As you may have multiple versions of the runtime installed, make sure that .NET ## Getting the code -### **Clone the Repository to Your Local Computer:** +### Using Terminal or VS Code -**Using the Terminal:** +Directions installing pre-requisites to run locally and for cloning this repository using [Terminal or VS Code](../README.md?#getting-started) -- Open the terminal on your computer. -- Navigate to the directory where you want to clone the repository. -- Type `git clone https://github.com/Azure-Samples/cosmos-db-design-patterns.git` and press enter. -- The repository will be cloned to your local machine. -**Using Visual Studio Code:** +### GitHub Codespaces -- Open Visual Studio Code. -- Click on the **Source Control** icon in the left sidebar. -- Click on the **Clone Repository** button at the top of the Source Control panel. -- Paste `https://github.com/Azure-Samples/cosmos-db-design-patterns.git` into the text field and press enter. -- Select a directory where you want to clone the repository. -- The repository will be cloned to your local machine. - -### **GitHub Codespaces** - -You can try out this implementation by running the code in [GitHub Codespaces](https://docs.github.com/codespaces/overview) - -- Open the application code in a GitHub Codespace: +Open the application code in GitHub Codespaces: [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/azure-samples/cosmos-db-design-patterns?quickstart=1&devcontainer_path=.devcontainer%2Fpreallocation%2Fdevcontainer.json) diff --git a/schema-versioning/README.md b/schema-versioning/README.md index 77769f8..1f0c356 100644 --- a/schema-versioning/README.md +++ b/schema-versioning/README.md @@ -223,29 +223,14 @@ You should have installed a version that starts with `4.`. If you do not have a ## Getting the code -### **Clone the Repository to Your Local Computer:** +### Using Terminal or VS Code -**Using the Terminal:** +Directions installing pre-requisites to run locally and for cloning this repository using [Terminal or VS Code](../README.md?#getting-started) -- Open the terminal on your computer. -- Navigate to the directory where you want to clone the repository. -- Type `git clone https://github.com/Azure-Samples/cosmos-db-design-patterns.git` and press enter. -- The repository will be cloned to your local machine. -**Using Visual Studio Code:** +### GitHub Codespaces -- Open Visual Studio Code. -- Click on the **Source Control** icon in the left sidebar. -- Click on the **Clone Repository** button at the top of the Source Control panel. -- Paste `https://github.com/Azure-Samples/cosmos-db-design-patterns.git` into the text field and press enter. -- Select a directory where you want to clone the repository. -- The repository will be cloned to your local machine. - -### **GitHub Codespaces** - -You can try out this implementation by running the code in [GitHub Codespaces](https://docs.github.com/codespaces/overview) - -- Open the application code in a GitHub Codespace: +Open the application code in GitHub Codespaces: [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/azure-samples/cosmos-db-design-patterns?quickstart=1&devcontainer_path=.devcontainer%2Fschema-versioning%2Fdevcontainer.json)