0.1.172 • Published 1 year ago

@azbake/ingredient-functions v0.1.172

Weekly downloads
65
License
MIT
Repository
-
Last release
1 year ago

Changelogs

Overview

The Functions ingredient is a plugin for Bake. When included in a recipe, this plugin will install an instance of a Function App on Linux inside a Linux-based Docker container.

This ingredient does not deploy an instance of an App Service plan and expects that a Linux-based App Service plan has already been created for the app. It also does not create Storage Account and Application Insights resources and expects them to be deployed prior to deploying the Function App.

Usage

Recipe

name: functions deployment
shortName: funcdepl
version: 0.1.0
ingredients:
  - "@azbake/ingredient-app-insights@~0"
  - "@azbake/ingredient-functions@~0"
resourceGroup: true
#rgOverride: "" 
variables:
  funcAppResourceGroup:  func-apps-test-rg
  storageAccountConnectionString: DefaultEndpointsProtocol=https;AccountName=funcappsstorageaccount;AccountKey=***;EndpointSuffix=core.windows.net
  hostingPlanName: func-apps-app-service-plan
  hostingEnvironment: func-apps-test-rg-hosting-environment
recipe:
  functions:
    properties:
      type: "@azbake/ingredient-functions"
      source: ./arm.json
      parameters:
        funcAppName: hello-docker-function-1
        funcAppResourceGroup: "[coreutils.variable('funcAppResourceGroup')]"
        storageAccountConnectionString: "[coreutils.variable('storageAccountConnectionString')]"
        container_registry_url: "[coreutils.variable('container_registry_url')]"
        container_registry_user: "[coreutils.variable('container_registry_user')]"
        container_registry_password: "[coreutils.variable('container_registry_password')]"
        container_image_name: func-apps-test/hello-docker-functions:latest
        hostingPlanName: "[coreutils.variable('hostingPlanName')]"
        location: East US
        hostingEnvironment: "[coreutils.variable('hostingEnvironment')]"
        appInsightsKey: "[appinsights.get_instrumentation_key('hellodockerfunctions','appinsights')]"
propertyrequireddescription
funcAppNameYesUnique name of the function app to create or update.
funcAppResourceGroupNoApp Service resource group. If not set, it defaults to the resource group of the Bake deployment context.
storageAccountConnectionStringYesConnection string of the storage account.
container_registry_urlYesDocker container registry address.
container_registry_userYes**Docker container registry user name.
container_registry_passwordYes**Docker container registry password.
container_image_nameYesName of the Linux-based Docker image to deploy. This image should contain the function app artifacts.
hostingPlanNameYesName of the App Service hosting plan.
locationYesResource location.
hostingEnvironmentYesApp Service environment to use for the function app.
appInsightsKeyYesApplication Insights instrumentation key.

** Not required for public repositories.

Best Practices

Since there is some secure information required to deploy your web site in a container, it is recommended that this information should be stored inside of the environment and referenced through coreutils.variable(). Do not set these values in the recipe itself as it could risk exposing this information publicly. Sample above uses this method to keep secure user credentials and password for the container registry.

Utilities

Utility classes can be used inside of the bake.yaml file for parameter and source values.

functions class

functiondescription
create_resource_name(shortName)Creates the full function app name by passing a short name.

Function Details

create_resource_name(shortName)

Creates the full function app name in the format <environment_name>fa<shortname>

...
parameters:
  funcAppName: "[functions.create_resource_name('hello-docker-function-1')]"
...

Returns

string

0.1.172

1 year ago

0.1.170

1 year ago

0.1.171

1 year ago

0.1.169

2 years ago

0.1.168

2 years ago

0.1.165

2 years ago

0.1.164

2 years ago

0.1.167

2 years ago

0.1.166

2 years ago

0.1.163

2 years ago

0.1.162

3 years ago

0.1.161

3 years ago

0.1.160

3 years ago

0.1.159

3 years ago

0.1.158

3 years ago

0.1.157

3 years ago

0.1.154

3 years ago

0.1.156

3 years ago

0.1.155

3 years ago

0.1.153

3 years ago

0.1.152

3 years ago

0.1.151

3 years ago

0.1.150

3 years ago

0.1.149

3 years ago

0.1.148

3 years ago

0.1.147

3 years ago

0.1.146

3 years ago

0.1.145

3 years ago

0.1.144

4 years ago

0.1.143

4 years ago

0.1.142

4 years ago

0.1.141

4 years ago

0.1.140

4 years ago

0.1.139

4 years ago

0.1.138

4 years ago

0.1.137

4 years ago

0.1.136

4 years ago

0.1.135

4 years ago

0.1.134

4 years ago

0.1.133

4 years ago

0.1.132

4 years ago

0.1.131

4 years ago

0.1.130

4 years ago

0.1.129

4 years ago

0.1.128

4 years ago

0.1.127

4 years ago

0.1.126

4 years ago

0.1.125

4 years ago

0.1.124

4 years ago

0.1.123

4 years ago

0.1.122

4 years ago

0.1.119

4 years ago

0.1.121

4 years ago

0.1.120

4 years ago

0.1.118

4 years ago

0.1.117

4 years ago

0.1.116

4 years ago

0.1.115

4 years ago

0.1.114

4 years ago

0.1.113

4 years ago

0.1.112

4 years ago

0.1.110

4 years ago

0.1.111

4 years ago

0.1.109

4 years ago

0.1.108

4 years ago

0.1.107

4 years ago

0.1.106

4 years ago

0.1.105

4 years ago

0.1.103

4 years ago

0.1.104

4 years ago

0.1.102

4 years ago

0.1.101

4 years ago

0.1.99

4 years ago

0.1.100

4 years ago

0.1.98

4 years ago

0.1.97

4 years ago

0.1.96

4 years ago

0.1.95

4 years ago

0.1.94

4 years ago

0.1.93

4 years ago

0.1.92

4 years ago

0.1.91

4 years ago

0.1.90

4 years ago

0.1.89

4 years ago

0.1.88

4 years ago

0.1.87

4 years ago

0.1.86

4 years ago