0.1.114 • Published 1 year ago

@azbake/ingredient-webapp-container v0.1.114

Weekly downloads
3
License
MIT
Repository
github
Last release
1 year ago

Changelogs

Overview

The Web App ingredient is a plugin for Bake. When included in a recipe, this plugin will install a instance of an azure Web App for Containers. An instance of the web app will be included with each region specified in your environment. This ingredient only supports deployment of a web site inside of 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.

Usage

Recipe

name: My package
shortName: mypkg
version: 0.0.1
ingredients:
  - "@azbake/ingredient-webapp-container@~0"
resourceGroup: true
recipe:
  mypkg-web-site:
    properties:
      type: "@azbake/ingredient-webapp-container"
      source: "[coreutils.get_app_svc_name('ngapp')]"
      tokens:
        BASE_URL: "[coreutils.variable('svc_base_url')]"
        PROPERTY: "some value"
      parameters:
        container_image_name: "myregistry.azurecr.io/mypkg:latest"
        container_registry_url: "[coreutils.variable('container_registry_url')]"
        container_registry_user: "[coreutils.variable('container_registry_user')]"
        container_registry_password: "[coreutils.variable('container_registry_password')]"
propertyrequireddescription
sourceyesthe linux based app service plan used to host this website. Format <resourceGroup>/<resource> ***
container_image_nameyesThe name of the image to be deployed to web app.
container_registry_urlyesThe url to the container registry containing your image
container_registry_useryesthe user name with access to pull images from the registry
container_registry_passwordyesthe password for the user specified with access to the registry

*** Please note that you can supply just the name of the azure resource for the source if the resource exists within the same resource group that is currently being deployed for traffic manager.

*** Please note that all values should be in the parameters section of the recipe except for source

Tokens

The token section of the ingredient can be used to specify any values you wished to be pushed into the environment variables of the container running your web application. Very useful for updating configuration files. Tokens are optional and can be omitted if not needed.

Best Practices

Since there is some secure information required to deploy your web site in a container, it si 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.

webapp class

functiondescription
create_profile()Gets or creates the profile name used to deploy the web app
get_resource_profile()Gets the resource group and web app name in the format <resourceGroup>/<resource>.

Function Details

create_profile()

Gets or creates the name of the web app in the format <environment_name><region_code>webapp<pkg_shortname>

...
parameters:
  appName: "[webapp.create_profile()]"
...

Returns

string

get_resource_profile()

Gets the resource group and web app profile name as a single string in the format <resourceGroup>/<resource>

This is useful inside of a recipe when another ingredient needs to reference the web application deployed with this ingredient (such as a traffic manager endpoint)

...
source: "[webapp.get_resource_profile()]"
...

Returns

string - Formatted as <resourceGroup>/<resource>

0.1.114

1 year ago

0.1.113

1 year ago

0.1.110

2 years ago

0.1.112

2 years ago

0.1.111

2 years ago

0.1.109

2 years ago

0.1.107

2 years ago

0.1.106

4 years ago

0.1.105

4 years ago

0.1.104

4 years ago

0.1.103

4 years ago

0.1.102

4 years ago

0.1.101

4 years ago

0.1.100

4 years ago

0.1.99

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.92

4 years ago

0.1.87

4 years ago

0.1.76

5 years ago

0.1.75

5 years ago

0.1.74

5 years ago

0.1.70

5 years ago

0.1.68

5 years ago

0.1.67

5 years ago

0.1.65

5 years ago

0.1.64

5 years ago

0.1.61

5 years ago

0.1.59

5 years ago

0.1.58

5 years ago

0.1.55

5 years ago

0.1.53

5 years ago

0.1.52

5 years ago

0.1.47

5 years ago

0.1.46

5 years ago

0.1.45

5 years ago

0.1.44

5 years ago

0.1.42

5 years ago

0.1.40

5 years ago

0.1.38

5 years ago

0.1.37

5 years ago

0.1.36

5 years ago

0.1.34

5 years ago

0.1.33

5 years ago

0.1.32

5 years ago

0.1.31

5 years ago

0.1.30

5 years ago

0.1.29

5 years ago

0.1.28

5 years ago

0.1.27

5 years ago

0.1.26

5 years ago

0.1.25

5 years ago

0.1.24

5 years ago

0.1.23

5 years ago

0.1.22

5 years ago

0.0.2

5 years ago