GithubHelp home page GithubHelp logo

rozele / azure-cognitive-search-skills-terraform Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 1.0 27 KB

A quickstart project for deploying Azure Cognitive Search, custom Web API skills, and enrichment pipelines in Terraform.

License: MIT License

HCL 89.84% C# 10.16%

azure-cognitive-search-skills-terraform's Introduction

page_type languages products description url-fragment
sample
csharp
terraform
azure-cognitive-search
azure-functions
A quickstart project for deploying Azure Cognitive Search, custom Web API skills, and enrichment pipelines in Terraform.
azure-cognitive-search-skills-terraform

Deploy Azure Cognitive Search Enrichment Pipelines via Terraform

A starter project for deploying Azure Cognitive Search and enrichment pipelines in Terraform. This project compiles a few learnings to simplify the deployment of Cognitive Search, enrichment pipelines, and custom Web API skills in a single Terraform execution plan.

Features

This project provides the following features:

Getting Started

Terraform deploys the end-to-end solution, including all Azure resources, Cognitive Search enrichment pipelines, and Azure Functions for custom Web API skills.

Dependencies

* This project uses .NET Core to compile the Azure Function, but the solution can also be used for any other language supported by Azure Functions (Node.js, Python, etc.).

Required Azure Subscription Roles

Whether you are deploying locally or using a service principal, you will need the following roles on the Azure Subscription:

  • Contributor - for creating Azure resources
  • User Access Administrator - for configuring roles on the Cognitive Search managed identity
  • Storage Blob Data Contributor - for deleting blobs from Storage

Building the Azure Functions

The Azure Functions deploy via an Azure Blob Storage using the WEBSITE_RUN_FROM_PACKAGE configuration setting.

Before deploying with Terraform, build a zip archive containing the Azure Functions package:

dotnet publish src/CognitiveSkills.Functions -o dist/
pushd dist; zip -r -X ../dist.zip *; popd

Deploying with Terraform

Terraform will create all Azure resources, send PUT requests to Cognitive Search to create the enrichment pipeline, and deploy the custom Web API skill Azure Functions via a block blob in Azure Storage. Run terraform with the following:

terraform init deploy/terraform
terraform apply deploy/terraform

Terraform will ask you for 2 variables:

  • environment: The name of the environment you are deploying. For testing purposes, use something unique like your alias.
  • functions_package_path: The path to the Azure Functions package zip. If you used the step above, it's likely dist.zip.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.