Deploying a Flogo App to a Microsoft Azure Container Instance Using a YAML File

    Procedure
  1. Create a YAML file as follows:
  2. --- apiVersion: 2018-10-01
    location: <location>
    name: <name-of-YAML-file>
    properties:   
    containers:     
    -       
    name: fe-app-yaml      
    properties:         
    environmentVariables:           
    -             
    name: <name-of-app-property>           
    value: <value-of-app-property>          
    -             
    name: <name-of-app-property>            
    value: <value-of-app-property>          
    -             
    name: <name-of-app-property>            
    secureValue: <value-of-app-property>              
    #NOTE: secureValue must be used for passwords
    -             
    name: FLOGO_APP_PROPS_ENV            
    value: auto 
    #NOTE: If the environment variable FLOGO_APP_PROPS_ENV is not set to "auto", the environment variables are not detected at Flogo runtime.         
    image: "<image>"        
    ports:           
    -            
    port: <port-number>        
    resources:           
    requests:             
    cpu: 1            
    memoryInGb: <memory>  
    imageRegistryCredentials:     
    -       
    password: <password>      
    server: <server>      
    username: <username>  
    ipAddress: <IP-address>    
    ports:       
    -        
    port: <port-number>        
    protocol: <protocol>    
    type: Public  
    #NOTE: IP Address must be explicitly set to Public. 
    
    osType: <OS>
    tags: ~
    type: <type>

  3. Run the following commands:

    az container create --resource-group <name-of-resource-group> --file <name-of-YAML-file>
    az container show -g <name-of-resource-group> -n <name-of-container>

  4. After the app is deployed, you can access the app endpoint by accessing the public IP address of the Azure container instance followed by the resource path.

    <IP-address>:<port>/<resource-path>