{{- $app := .AppName | kebabcase}}
# Azure App Service Usage

## Start the XL Platform
{{if eq .GenerateDockerComposeSetup true}}
Follow the instructions in `xebialabs/USAGE-docker-compose.md`.
{{else}}
Make sure your existing XL Platform is up and running and accessible.
{{end}}

## Deploy the blueprint to the XL Platform

To deploy this blueprint to the XebiaLabs DevOps Platform, open up a terminal in the folder where you generated the configuration. Then run:

```plain
xl apply -f xebialabs.yaml
```

## Deploy to Azure

Go to XL Deploy and look for the `{{$app}}` folder under `Applications`.

### Provision the service

1. Select `{{$app}}/{{$app}}-app/1.0.0`, click on the ellipsis and select 'Deploy'.
    1. Select `Environments/{{$app}}/{{$app}}-terraform` and click 'Continue'.
    2. Verify that there are no error messages, then click 'Deploy'.

After the deployment process is complete, an App Service application will have been provisioned on Azure.

In order to access the application you can check the entry `app_service_default_hostname` in `Environments/{{$app}}/{{$app}}-app-service-dictionary`.

## Undeploy from Azure

Go to XL Deploy and look for the `{{$app}}` folder under `Environments`.

### Deprovision the application

1. Select `Environments/{{$app}}/{{$app}}-terraform/{{$app}}-app (1.0.0)`, click on the ellipsis and select 'Undeploy'.
    1. Click 'Undeploy' at the top right of the screen.

