Docker on Azure PaaS - Tika Parser

Azure PaaS services are an example of how the cloud has raised the raised the bar in the commodity platform space. More functionality is baked into the platform and less has to be built by software developers and enterprises. Some of the PaaS tenants are that it should be simple to scale-up and scale-out.  Networking should be simple and port exposure should be simple.

Microsoft has at least 3 different Container services with different levels of PaaS-ness. They appear to be targeted more at Enterprise customers than the original SMB oriented PaaS services. It may be that the original ones just didn't support enterprise security, networking and other needs.

Tech Comments

The demonstration deploys a Tika Parser, Java Docker container running on each Azure Linux Docker PaaS services. Microsoft's move towards explicitly containerized PaaS services has both improved and degraded this model.

Sample Scripts

Use these scripts to experiment with Java Linux deployments on Azure PaaS. All was done using the Amazon Command Line Interface running in BASH shell. Tested with Windows Git Bash. The CLI was used instead of the Azure Portal to get a feel for the automation capabilities. Note that Docker PaaS deployments may be slower than other serverless architectures. 

Scripts for each Azure PaaS serviceare on GitHub. https://github.com/freemansoft/docker-scripts/tree/master/tika 
  • azure-0-setup.sh : Log into Azure and select a subscription
  • azure-1-create-resource.sh : Create Azure Resource Group and any service specific resource pool.
  • azure-2-deploy-app.sh : Deploy the Docker container and run post-deploy configuration.
  • azure-3-undeploy-app.sh : Undeploy Docker Container
  • azure-4-delete-resources.sh : Delete the Azure Resource Group and all other resources.
The scripts are examples. The scripts are not tuned.  The scripts are not configured for any logging or instrumentation

Videos

Resource creation and deployment steps

The scripts in the GitHub repository operate in 5 phases. 
  • Authentication
  • Resource Creation
  • Application Deployment
    • This can take 5 minutes in some situations.
  • Application Tear-down
    • Can be immediately followed by a new deployment.
  • Resource Tear-down 
Azure App Service - Linux Azure Container Service - Linux Azure Service Fabric - Linux
az login
az account set --subscription $SubscriptionID
az group create --name $ResourceGroupName  --location $Location 
az appservice plan create ... ... az sf cluster create ....
az webapp create ...

az webapp config ...WEBSITES_PORT=9998
az container create ...
    --ports 9998
sfctl cluster select ...

sfctl compose create ...
Feature Comparison
Exposed on 80 Exposed on 9998 Exposed on 80
Port map via option WEBSITES_PORT No port mapping Port map via docker-compose.yml
No auto-scale No auto-scale No auto-scale
No load balancer No load balancer load balancer
Single node Single node Multi node at startup
No docker compose. Early release but could not get working No docker compose Supports docker compose
 Single Deployment Model  Single Deployment Model  Multiple Deployment Models
Microsoft Troubleshooting guide Microsoft Troubleshooting guide ...
Scripts can be found on GitHub: https://github.com/freemansoft/docker-scripts/tree/master/tika

Created 5/2020
Modified 9/2020

Comments

Popular posts from this blog

Understanding your WSL2 RAM and swap - Changing the default 50%-25%

Installing the RNDIS driver on Windows 11 to use USB Raspberry Pi as network attached

DNS for Azure Point to Site (P2S) VPN - getting the internal IPs