How to get the cloud foundry app instance's guid? - guid

The Cloud Foundry App /stats api (/v2/apps/:guid/stats) gives the details of each Instance of the CF App.
But it only gives the Instance Index (eg: "0", "1", "2" etc)
CF App Stats API:http://apidocs.cloudfoundry.org/222/apps/get_detailed_stats_for_a_started_app.html
GET on https://api.ng.bluemix.net/v2/apps/<app-guid>/stats
Sample response:
{
"0":
{
"state": "RUNNING",
"stats":
{
"name": "testlibappcf",
"uris":
[
"testlibappcf.mybluemix.net"
],
"host": "169.54.206.30",
"port": 61814,
"uptime": 84972,
"mem_quota": 536870912,
"disk_quota": 1073741824,
"fds_quota": 16384,
"usage":
{
"time": "2015-10-29 08:25:45 +0000",
"cpu": 0.0015772999557422517,
"mem": 181530624,
"disk": 187355136
}
}
},
"1":
{
"state": "RUNNING",
"stats":
{
"name": "testlibappcf",
"uris":
[
"testlibappcf.mybluemix.net"
],
"host": "75.126.172.157",
"port": 61588,
"uptime": 263802,
"mem_quota": 536870912,
"disk_quota": 1073741824,
"fds_quota": 16384,
"usage":
{
"time": "2015-10-29 08:25:45 +0000",
"cpu": 0.002226168338735689,
"mem": 184090624,
"disk": 187158528
}
}
},
"2":
{
"state": "RUNNING",
"stats":
{
"name": "testlibappcf",
"uris":
[
"testlibappcf.mybluemix.net"
],
"host": "50.22.22.171",
"port": 61970,
"uptime": 74472,
"mem_quota": 536870912,
"disk_quota": 1073741824,
"fds_quota": 16384,
"usage":
{
"time": "2015-10-29 08:25:45 +0000",
"cpu": 0.0019144080402859489,
"mem": 213286912,
"disk": 187158528
}
}
}
}
Since each Application instance lives inside a Warden container, is there a way to get the CF App Instance Id (container-guid)?

The accepted answer is now out-of-date.
Cloud Foundry now exposes instance GUID via CF_INSTANCE_GUID.

Applications in Cloud Foundry have GUIDs, the individual instances do not.

Related

Assign static outbound ip address to azure container instance

I need to make a setup where I can read and write to an external sql db from a python script residing in a azure container instance. I order to make this work I need to assign a static ip to the container.
As I cannot associate a container instance with a dedicated ip I have had to make a setup that use the following resources: a vnet, a gateway and a public IP.
I have partially borrowed the setup from https://godatadriven.com/blog/azure-container-instance-example/ where the setup is drawn as follows:
I have made a dev-ops build and release pipeline. I use an ARM template to create the release (the resources of the template are below):
"resources": [
{
"type": "Microsoft.Network/virtualNetworks",
"name": "[parameters('vnetName')]",
"apiVersion": "2019-07-01",
"location": "[parameters('location')]",
"properties": {
"addressSpace": {
"addressPrefixes": [
"[parameters('vnetAddressPrefix')]"
]
},
"subnets": [
{
"name": "[parameters('subnet2Name')]",
"properties": {
"addressPrefix": "[parameters('subnet2AddressPrefix')]",
"privateEndpointNetworkPolicies": "Enabled",
"privateLinkServiceNetworkPolicies": "Enabled"
}
},
{
"name": "[parameters('subnetName')]",
"properties": {
"addressPrefix": "[parameters('subnetAddressPrefix')]",
"delegations": [
{
"name": "DelegationService",
"properties": {
"serviceName": "Microsoft.ContainerInstance/containerGroups"
}
}
],
"privateEndpointNetworkPolicies": "Enabled",
"privateLinkServiceNetworkPolicies": "Enabled"
}
}
]
}
},
{
"apiVersion": "2018-07-01",
"type": "Microsoft.Network/publicIPAddresses",
"name": "[variables('publicIPAddressName')]",
"location": "[parameters('location')]",
"sku": {
"name": "Standard",
"tier": "Regional"
},
"properties": {
"publicIPAddressVersion": "IPv4",
"publicIPAllocationMethod": "Static",
"idleTimeoutInMinutes": 4,
"dnsSettings": {
"domainNameLabel": "[parameters('dnsName')]"
}
}
},
{
"apiVersion": "2019-08-01",
"name": "[variables('applicationGatewayName')]",
"type": "Microsoft.Network/applicationGateways",
"location": "[parameters('location')]",
"dependsOn": [
"[resourceId('Microsoft.Network/virtualNetworks/', parameters('vnetName'))]",
"[resourceId('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]",
"[resourceId('Microsoft.ContainerInstance/containerGroups/', parameters('containerInstanceName'))]"
],
"properties": {
"sku": {
"name": "[parameters('skuName')]",
"tier": "Standard_v2",
"capacity": "[variables('capacity')]"
},
"gatewayIPConfigurations": [
{
"name": "appGatewayIpConfig",
"properties": {
"subnet": {
"id": "[variables('subnetRef')]"
}
}
}
],
"frontendIPConfigurations": [
{
"name": "appGatewayFrontendIP",
"properties": {
"privateIPAllocationMethod": "Dynamic",
"PublicIPAddress": {
"id": "[variables('publicIPRef')]"
}
}
}
],
"frontendPorts": [
{
"name": "appGatewayFrontendPort",
"properties": {
"Port": 80
}
}
],
"backendAddressPools": [
{
"name": "appGatewayBackendPool",
"properties": {
"backendAddresses": [
{
"IpAddress": "[parameters('backendIP')]"
}
]
}
}
],
"backendHttpSettingsCollection": [
{
"name": "appGatewayBackendHttpSettings",
"properties": {
"Port": 80,
"Protocol": "Http",
"CookieBasedAffinity": "Disabled"
}
}
],
"httpListeners": [
{
"name": "appGatewayHttpListener",
"properties": {
"FrontendIPConfiguration": {
"Id": "[resourceId('Microsoft.Network/applicationGateways/frontendIPConfigurations', variables('applicationGatewayName'), 'appGatewayFrontendIP')]"
},
"FrontendPort": {
"Id": "[resourceId('Microsoft.Network/applicationGateways/frontendPorts', variables('applicationGatewayName'), 'appGatewayFrontendPort')]"
},
"Protocol": "Http",
"SslCertificate": null
}
}
],
"requestRoutingRules": [
{
"Name": "rule1",
"properties": {
"RuleType": "Basic",
"httpListener": {
"id": "[resourceId('Microsoft.Network/applicationGateways/httpListeners', variables('applicationGatewayName'), 'appGatewayHttpListener')]"
},
"backendAddressPool": {
"id": "[resourceId('Microsoft.Network/applicationGateways/backendAddressPools', variables('applicationGatewayName'), 'appGatewayBackendPool')]"
},
"backendHttpSettings": {
"id": "[resourceId('Microsoft.Network/applicationGateways/backendHttpSettingsCollection', variables('applicationGatewayName'), 'appGatewayBackendHttpSettings')]"
}
}
}
]
}
},
{
"name": "[parameters('networkProfileName')]",
"type": "Microsoft.Network/networkProfiles",
"apiVersion": "2018-07-01",
"location": "[parameters('location')]",
"dependsOn": [
"[resourceId('Microsoft.Network/virtualNetworks', parameters('vnetName'))]"
],
"properties": {
"containerNetworkInterfaceConfigurations": [
{
"name": "[variables('interfaceConfigName')]",
"properties": {
"ipConfigurations": [
{
"name": "[variables('interfaceIpConfig')]",
"properties": {
"subnet": {
"id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('vnetName'), parameters('subnetName'))]"
}
}
}
]
}
}
]
}
},
{
"name": "[parameters('containerInstanceName')]",
"type": "Microsoft.ContainerInstance/containerGroups",
"apiVersion": "2018-10-01",
"location": "[parameters('location')]",
"dependsOn": [
"[resourceId('Microsoft.Network/networkProfiles', parameters('networkProfileName'))]"
],
"properties": {
"containers": [
{
"name": "[parameters('containerName')]",
"properties": {
"image": "[parameters('registryImageUri')]",
"ports": [{
"port": "[variables('port')]"
}],
"resources": {
"requests": {
"cpu": "[variables('cpuCores')]",
"memoryInGb": "[variables('memoryInGb')]"
}
}
}
}
],
"imageRegistryCredentials": [
{
"server": "[parameters('registryLoginServer')]",
"username": "[parameters('registryUserName')]",
"password": "[parameters('registryPassword')]"
}
],
"diagnostics": {
"logAnalytics": {
"workspaceId": "[parameters('LogAnalyticsID')]",
"workspaceKey": "[parameters('LogAnalyticsKEY')]"
}
},
"networkProfile": {
"Id": "[resourceId('Microsoft.Network/networkProfiles', parameters('networkProfileName'))]"
},
"osType": "Linux",
"ipAddress": {
"ports": [{
"protocol": "tcp",
"port": 80
}],
"type": "private",
"ip": "[parameters('backendIP')]"
},
"restartPolicy": "[parameters('restartPolicy')]"
}
}
]
The release works, but when I run I try to run the container instance, it use a different ip each time.
What am I doing wrong?
Since you are using an Azure provided SQL, I would recommend to leverage the private VNET offering that Azure provides.
you should look at configuring your ACI with a private subnet
https://learn.microsoft.com/en-us/azure/container-instances/container-instances-vnet
and also setup a vnet rule for your SQL server
https://learn.microsoft.com/en-us/azure/sql-database/sql-database-vnet-service-endpoint-rule-overview
Virtual network rules are one firewall security feature that controls whether the database server for your single databases and elastic pool in Azure SQL Database or for your databases in Azure Synapse Analytics accepts communications that are sent from particular subnets in virtual networks.
it's important that you enable the SQL service endpoint for SQL on the ACI subnet as well.
This will avoid you having to manage outbound IP whitelisting in your SQL firewall.
From the things you did, I think you misunderstanding the network of the Azure Container Instance. The Public or the Private type for the ACI is only available for the inbound traffic, not for the outbound. Even when you use the private type, the instance also can access the Internet without any other resource, but in this type, you cannot access it from the Internet.
Unfortunately, when you use the public type, the public IP address for the inbound and outbound may be even no the same. And for Azure Container Instance, we cannot control the IP address which we can use. So when you want to use a static public IP address to access the SQL DB, the Azure Container Instance is not suitable, I would recommend the VM, it's more controllable and appropriate.

Azure ARM - DSC VM configuration

I would like to configure my VMs using ARM template and DSC. I prepared simple DCS script in powershell, base on that using powershell command created .zip file. mentioned .zip file uploaded to storage account container. Now I want to use this .zip file to made configuration changes on my test VMs, below my ARM template. I am receiving error message New-AzResourceGroupDeployment : 10:12:09 AM - VM has reported a failure when processing extension 'dscExtension'. Error message: "The DSC Extension failed to execute: Error downloading
https://storageAccountName.blob.core.windows.net/containerName/test.zip after 2 attempts: <?xml version="1.0" encoding="utf-8"?><Error><Code>ResourceNotFound</Code><Message>The specified resource
does not exist.
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"vmName": {
"type": "string",
"minLength": 1,
"metadata": {
"description": "List of virtual machines to be reconfigured, if using multiple VMs, make their names comma separate. E.g. VM01, VM02, VM03."
},
"defaultValue": "VM1,VM2"
},
"Location": {
"type": "string",
"metadata": {
"description": "Location of the VM"
},
"defaultvalue": "WestEurope"
},
"functionName": {
"type": "string",
"metadata": {
"description": "Specify the function name"
},
"defaultvalue": "test.ps1\\testConfigurationName"
},
"storageAccountName": {
"type": "string",
"metadata": {
"description": "Specify the Storage Account name, Storage Account where DCS .zip module is located"
}
},
"setupScriptContainerName": {
"type": "string",
"metadata": {
"description": "Specify the Storage Account container name, container where DCS .zip module is located"
}
},
"DSCSetupArchiveFileName": {
"type": "string",
"metadata": {
"description": "Specify the Storage Account container name, container where DCS .zip module is located"
},
"defaultvalue": "test.zip"
},
"nodeConfigurationName": {
"type": "string",
"metadata": {
"description": "The name of the node configuration, on the Azure Automation DSC pull server, that this node will be configured as"
},
"defaultValue": "testConfigurationName.localhost"
},
"registrationKey": {
"type": "securestring",
"metadata": {
"description": "Registration key to use to onboard to the Azure Automation DSC pull/reporting server"
},
"defaultValue": "AutomationAccountPrimaryKey"
},
"registrationUrl": {
"type": "string",
"metadata": {
"description": "Registration url of the Azure Automation DSC pull/reporting server"
},
"defaultValue": AutomationAccountRegistrationURL"
}
},
"variables": {
"vmListArray": "[split(parameters('vmName'),',')]"
},
"resources": [
{
"type": "Microsoft.Compute/virtualMachines/extensions",
"apiVersion": "2015-06-15",
"name": "[concat(trim(variables('vmListArray')[copyIndex()]),'/dscExtension')]",
"copy": {
"name": "ExtentionLooptoAllVMs",
"count": "[length(variables('vmListArray'))]"
},
"location": "[parameters('Location')]",
"properties": {
"autoUpgradeMinorVersion": true,
"publisher": "Microsoft.Powershell",
"type": "DSC",
"typeHandlerVersion": "2.19",
"protectedSettings": {
"Items": {
"registrationKeyPrivate": "[parameters('registrationKey')]"
}
},
"settings": {
"ModulesUrl": "[concat('https://',parameters('storageAccountName'),'.blob.core.windows.net/',parameters('setupScriptContainerName'),'/',parameters('DSCSetupArchiveFileName'))]",
"ConfigurationFunction": "[parameters('functionName')]",
"Properties": [
{
"Name": "RegistrationKey",
"Value": {
"UserName": "PLACEHOLDER_DONOTUSE",
"Password": "PrivateSettingsRef:registrationKeyPrivate"
},
"TypeName": "System.Management.Automation.PSCredential"
},
{
"Name": "RegistrationUrl",
"Value": "[parameters('registrationUrl')]",
"TypeName": "System.String"
},
{
"Name": "NodeConfigurationName",
"Value": "[parameters('nodeConfigurationName')]",
"TypeName": "System.String"
}
]
}
}
}
]
}
Updated version:
"resources": [
{
"type": "Microsoft.Compute/virtualMachines/extensions",
"apiVersion": "2018-10-01",
"name": "[concat(trim(variables('vmListArray')[copyIndex()]),'/dscExtension')]",
"copy": {
"name": "ExtentionLooptoAllVMs",
"count": "[length(variables('vmListArray'))]"
},
"location": "[parameters('Location')]",
"properties": {
"autoUpgradeMinorVersion": true,
"publisher": "Microsoft.Powershell",
"type": "DSC",
"typeHandlerVersion": "2.9",
"protectedSettings": {
"Items": {
"registrationKeyPrivate": "[parameters('registrationKey')]"
}
},
"settings": {
"configuration": {
"url": "[concat('https://',parameters('storageAccountName'),'.blob.core.windows.net/',parameters('setupScriptContainerName'),'/',parameters('DSCSetupArchiveFileName'))]",
"script": "[parameters('scriptName')]",
"function": "[parameters('functionName')]"
},
"Properties": [
{
"Name": "RegistrationKey",
"Value": {
"UserName": "PLACEHOLDER_DONOTUSE",
"Password": "PrivateSettingsRef:registrationKeyPrivate"
},
"TypeName": "System.Management.Automation.PSCredential"
},
{
"Name": "RegistrationUrl",
"Value": "[parameters('registrationUrl')]",
"TypeName": "System.String"
},
{
"Name": "NodeConfigurationName",
"Value": "[parameters('nodeConfigurationName')]",
"TypeName": "System.String"
},
{
"Name": "ConfigurationMode",
"Value": "[parameters('configurationMode')]",
"TypeName": "System.String"
},
{
"Name": "ConfigurationModeFrequencyMins",
"Value": "[parameters('configurationModeFrequencyMins')]",
"TypeName": "System.Int32"
},
{
"Name": "RefreshFrequencyMins",
"Value": "[parameters('refreshFrequencyMins')]",
"TypeName": "System.Int32"
},
{
"Name": "RebootNodeIfNeeded",
"Value": "[parameters('rebootNodeIfNeeded')]",
"TypeName": "System.Boolean"
},
{
"Name": "ActionAfterReboot",
"Value": "[parameters('actionAfterReboot')]",
"TypeName": "System.String"
},
{
"Name": "AllowModuleOverwrite",
"Value": "[parameters('allowModuleOverwrite')]",
"TypeName": "System.Boolean"
}
]
}
}
}
]
DSC part:
Configuration SetRegistryxxx {
Node 'localhost' {
Registry configxxx {
Ensure = "Present"
Key = "HKLM:\xx"
ValueName = "xx"
ValueData = "http://0.0.0.0:xxx
ValueType = "String"
}
Registry configxxx {
Ensure = "Present"
Key = "HKLM:\xx"
ValueName = "xx"
ValueData = "http://0.0.0.0:xx"
ValueType = "String"
}
}
}
According to the error, you can not download the zip file from the Azure blob storage account you use. Please create a sas token for the blob or set the blob access level to Public.
For example
"resources": [
{
"type": "Microsoft.Compute/virtualMachines/extensions",
"name": "[concat(parameters('vmName'),'/Microsoft.Powershell.DSC')]",
"apiVersion": "2015-06-15",
"location": "[parameters('location')]",
"properties": {
"publisher": "Microsoft.Powershell",
"type": "DSC",
"typeHandlerVersion": "2.19",
"autoUpgradeMinorVersion": true,
"protectedSettings": {
"Items": {
"registrationKeyPrivate": "[parameters('registrationKey')]"
}
},
"settings": {
"ModulesUrl": "<the url of you azure blob>",
"SasToken": "<the sas token for the blob>",
"ConfigurationFunction": "[parameters('configurationFunction')]",
...
}
]
For more details, please refer to the document and the template

413 Request Entity Too Large on Wordpress / Kubernetes

When trying to upload a new theme on my fresh Wordpress install, I get the 413 Request Entity Too Large.
I've read a lot of other questions on StackOverflow and tried these annotations:
nginx.ingress.kubernetes.io/secure-backends: "true"
nginx.ingress.kubernetes.io/proxy-body-size: "100m"
nginx.ingress.kubernetes.io/client-max-body-size: "100m"
nginx.org/client-max-body-size: "100m"
What works:
Uploading files smaller than 1MB.
I guess it has to do with the Bitnami standard nginx configuration. As seen here . But I have no clue on how to add this to my current configuration.
Thanks for helping me out!
**Wordpress Debug Information:**
PHP max input variables 1000
PHP time limit 30
PHP memory limit 512M
Max input time 60
Upload max filesize 40M
PHP post max size 40M
The main WordPress directory Writable
The wp-content directory Writable
The uploads directory Writable
The plugins directory Writable
The themes directory Writable
Deployment Yaml
{
"kind": "Deployment",
"apiVersion": "extensions/v1beta1",
"metadata": {
"name": "wordpressdf99e",
"namespace": "default",
"selfLink": "/apis/extensions/v1beta1/namespaces/default/deployments/wordpressdf99e",
"uid": "f39369f1-6c1f-11ea-8b29-063deb7a2778",
"resourceVersion": "18492542",
"generation": 2,
"creationTimestamp": "2020-03-22T09:31:47Z",
"labels": {
"app.kubernetes.io/instance": "wordpressdf99e",
"app.kubernetes.io/managed-by": "Tiller",
"app.kubernetes.io/name": "wordpress",
"helm.sh/chart": "wordpress-9.0.4"
},
"annotations": {
"deployment.kubernetes.io/revision": "2"
}
},
"spec": {
"replicas": 1,
"selector": {
"matchLabels": {
"app.kubernetes.io/instance": "wordpressdf99e",
"app.kubernetes.io/name": "wordpress"
}
},
"template": {
"metadata": {
"creationTimestamp": null,
"labels": {
"app.kubernetes.io/instance": "wordpressdf99e",
"app.kubernetes.io/managed-by": "Tiller",
"app.kubernetes.io/name": "wordpress",
"helm.sh/chart": "wordpress-9.0.4"
},
"annotations": {
"kubectl.kubernetes.io/restartedAt": "2020-03-22T12:23:46+01:00"
}
},
"spec": {
"volumes": [
{
"name": "wordpress-data",
"persistentVolumeClaim": {
"claimName": "wordpressdf99e"
}
}
],
"containers": [
{
"name": "wordpress",
"image": "docker.io/bitnami/wordpress:5.3.2-debian-10-r48",
"ports": [
{
"name": "http",
"containerPort": 8080,
"protocol": "TCP"
},
{
"name": "https",
"containerPort": 8443,
"protocol": "TCP"
}
],
"env": [
{
"name": "ALLOW_EMPTY_PASSWORD",
"value": "yes"
},
{
"name": "MARIADB_HOST",
"value": "wordpressdf99e-mariadb"
},
{
"name": "MARIADB_PORT_NUMBER",
"value": "3306"
},
{
"name": "WORDPRESS_DATABASE_NAME",
"value": "bitnami_wordpress"
},
{
"name": "WORDPRESS_DATABASE_USER",
"value": "bn_wordpress"
},
{
"name": "WORDPRESS_DATABASE_PASSWORD",
"valueFrom": {
"secretKeyRef": {
"name": "wordpressdf99e-mariadb",
"key": "mariadb-password"
}
}
},
{
"name": "WORDPRESS_USERNAME",
"value": "user"
},
{
"name": "WORDPRESS_PASSWORD",
"valueFrom": {
"secretKeyRef": {
"name": "wordpressdf99e",
"key": "wordpress-password"
}
}
},
{
"name": "WORDPRESS_EMAIL",
"value": "user#example.com"
},
{
"name": "WORDPRESS_FIRST_NAME",
"value": "FirstName"
},
{
"name": "WORDPRESS_LAST_NAME",
"value": "LastName"
},
{
"name": "WORDPRESS_HTACCESS_OVERRIDE_NONE",
"value": "no"
},
{
"name": "WORDPRESS_BLOG_NAME",
"value": "User's Blog!"
},
{
"name": "WORDPRESS_SKIP_INSTALL",
"value": "no"
},
{
"name": "WORDPRESS_TABLE_PREFIX",
"value": "wp_"
},
{
"name": "WORDPRESS_SCHEME",
"value": "http"
}
],
"resources": {
"requests": {
"cpu": "300m",
"memory": "512Mi"
}
},
"volumeMounts": [
{
"name": "wordpress-data",
"mountPath": "/bitnami/wordpress",
"subPath": "wordpress"
}
],
"livenessProbe": {
"httpGet": {
"path": "/wp-login.php",
"port": "http",
"scheme": "HTTP"
},
"initialDelaySeconds": 120,
"timeoutSeconds": 5,
"periodSeconds": 10,
"successThreshold": 1,
"failureThreshold": 6
},
"readinessProbe": {
"httpGet": {
"path": "/wp-login.php",
"port": "http",
"scheme": "HTTP"
},
"initialDelaySeconds": 30,
"timeoutSeconds": 5,
"periodSeconds": 10,
"successThreshold": 1,
"failureThreshold": 6
},
"terminationMessagePath": "/dev/termination-log",
"terminationMessagePolicy": "File",
"imagePullPolicy": "IfNotPresent"
}
],
"restartPolicy": "Always",
"terminationGracePeriodSeconds": 30,
"dnsPolicy": "ClusterFirst",
"securityContext": {
"runAsUser": 1001,
"fsGroup": 1001
},
"schedulerName": "default-scheduler",
"hostAliases": [
{
"ip": "127.0.0.1",
"hostnames": [
"status.localhost"
]
}
]
}
},
"strategy": {
"type": "RollingUpdate",
"rollingUpdate": {
"maxUnavailable": "25%",
"maxSurge": "25%"
}
},
"revisionHistoryLimit": 10,
"progressDeadlineSeconds": 600
},
"status": {
"observedGeneration": 2,
"replicas": 1,
"updatedReplicas": 1,
"readyReplicas": 1,
"availableReplicas": 1,
"conditions": [
{
"type": "Progressing",
"status": "True",
"lastUpdateTime": "2020-03-22T11:34:28Z",
"lastTransitionTime": "2020-03-22T09:31:47Z",
"reason": "NewReplicaSetAvailable",
"message": "ReplicaSet \"wordpressdf99e-6bcf574f64\" has successfully progressed."
},
{
"type": "Available",
"status": "True",
"lastUpdateTime": "2020-03-22T12:14:55Z",
"lastTransitionTime": "2020-03-22T12:14:55Z",
"reason": "MinimumReplicasAvailable",
"message": "Deployment has minimum availability."
}
]
}
}
If you were using an external Nginx Ingress Controller you would create a configmap for your ingress controllers and set the proxy-body-size to the size needed.
The default size for it is 1m
There is also a bitnami wordpress nginx image
Where you can set the Server block for it directly and add client_max_body_size
https://github.com/bitnami/bitnami-docker-wordpress-nginx/blob/master/test.yaml#L9
Thanks for your comment strongjz!
The one line of code that was needed to solve this problem was:
ingress.bluemix.net/client-max-body-size: "500m"
Once I've added this to the annotations of my ingress. The issue was solved!

Creating Policy for AAS (Azure Analysis Services)

Does anyone have experience in writing Azure Policy for Analysis Services? I am stuck on getting one completed. I am attempting to create policy that enforces what IPs can be added to the public IP side. So far I have this and it does work:
{
"parameters": {
"allowedAddressRanges": {
"type": "Array",
"metadata": {
"displayName": "Address Range",
"description": "The list of allowed external IP address ranges"
}
}
},
"policyRule": {
"if": {
"allOf": [
{
"field": "type",
"equals": "Microsoft.AnalysisServices/servers"
},
{
"not": {
"field": "Microsoft.AnalysisServices/servers/ipV4FirewallSettings.firewallRules[*]",
"in": "[parameters('allowedAddressRanges')]"
}
}
]
},
"then": {
"effect": "audit"
}
}
}
Do I need to go further down the alias path to something like:
"Microsoft.AnalysisServices/servers/ipV4FirewallSettings.firewallRules[*].rangeStart"
This is an old thread but since it hasn't been answered yet, perhaps someone can benefit from my findings. Looking at the aliases available for Azure Analysis Services we can notice the following :
Microsoft.AnalysisServices/servers/ipV4FirewallSettings.firewallRules
Microsoft.AnalysisServices/servers/ipV4FirewallSettings.firewallRules[*]
Microsoft.AnalysisServices/servers/ipV4FirewallSettings.firewallRules[*].firewallRuleName
Microsoft.AnalysisServices/servers/ipV4FirewallSettings.firewallRules[*].rangeStart
Microsoft.AnalysisServices/servers/ipV4FirewallSettings.firewallRules[*].rangeEnd
Based on the notation above, I had to go down until "rangeStart" and "rangeEnd". This is what works for me:
{
"mode": "All",
"policyRule": {
"if": {
"allOf": [
{
"field": "type",
"equals": "Microsoft.AnalysisServices/servers"
},
{
"not": {
"anyOf": [
{
"field": "Microsoft.AnalysisServices/servers/ipV4FirewallSettings.firewallRules[*].rangeStart",
"in": "[parameters('allowedAddressRanges')]"
},
{
"field": "Microsoft.AnalysisServices/servers/ipV4FirewallSettings.firewallRules[*].rangeEnd",
"in": "[parameters('allowedAddressRanges')]"
}
]
}
}
]
},
"then": {
"effect": "[parameters('effect')]"
}
},
"parameters": {
"effect": {
"type": "String",
"metadata": {
"displayName": "Effect",
"description": "The effect determines what happens when the policy rule is evaluated to match"
},
"allowedValues": [
"Audit",
"Deny",
"Disabled"
],
"defaultValue": "Deny"
},
"allowedAddressRanges": {
"type": "Array",
"metadata": {
"displayName": "Address Range",
"description": "The list of allowed IP address ranges"
},
"allowedValues": [
"0.0.0.0",
"0.0.0.0",
"0.0.0.0",
"0.0.0.0",
"0.0.0.0"
],
"defaultValue": [
"0.0.0.0",
"0.0.0.0",
"0.0.0.0",
"0.0.0.0",
"0.0.0.0"
]
}
}
}
reference: https://learn.microsoft.com/en-us/azure/templates/microsoft.analysisservices/servers#IPv4FirewallRule

I am not seeing dialogState in Alexa's event in AWS lambda logs, for a multiturn dialog?

I created an intent with slots in Alexa. This triggers an AWS lambda written in Python. I am logging the 'event'. I expect event['request']['dialogState'] to be present but it is not. Am I missing something?
Event:
{u'session': {u'application': {u'applicationId': u'amzn1.ask.skill.b2a191bb-7ee2-4fa7-aa7b-456d4bd2ee35'}, u'sessionId': u'Sessi onId.afb747ea-01ae-4094-ba10-ac49405a99df', u'user': {u'userId': u'amzn1.ask.account.BFHTSNCIVD2HA563BEPLRW5TSCESQEZXCIULPPB2ULOZBIJRCPM 5Z5NWOWH3HWNOZRTY4WT3FZFVGWWPKRSKC4ZNDSB2EYB45TYQ3RNY67CZPGF4GBMV6CL57C5MJVPIQPH25DQWGXGALDBCBRHMG5IA3Y26UHI7MHPIV3665ZU5OESS3UBADD7MDYQ BWJZFB3XHJS6IM2Y5UTQ', u'accessToken': None}, u'new': False, u'attributes': {}}, u'request': {u'locale': u'en-US', u'type': u'IntentRequ est', u'intent': {u'slots': {u'ncpu': {u'name': u'ncpu'}, u'nmem': {u'name': u'nmem'}}, u'name': u'CreateVM'}, u'requestId': u'EdwReques tId.c9de162a-d606-43a1-9257-b7367c9da5de', u'timestamp': u'2017-10-24T09:43:17Z'}, u'version': u'1.0', u'context': {u'AudioPlayer': {u'p layerActivity': u'IDLE'}, u'System': {u'device': {u'supportedInterfaces': {}}, u'application': {u'applicationId': u'amzn1.ask.skill.b2a1 91bb-7ee2-4fa7-aa7b-456d4bd2ee35'}, u'user': {u'userId': u'amzn1.ask.account.BFHTSNCIVD2HA563BEPLRW5TSCESQEZXCIULPPB2ULOZBIJRCPM5Z5NWOWH 3HWNOZRTY4WT3FZFVGWWPKRSKC4ZNDSB2EYB45TYQ3RNY67CZPGF4GBMV6CL57C5MJVPIQPH25DQWGXGALDBCBRHMG5IA3Y26UHI7MHPIV3665ZU5OESS3UBADD7MDYQBWJZFB3X HJS6IM2Y5UTQ'}}}}
You can not test you skills inside of the Amazon developer portal because these will not return a Dialogstate for your dialog. If you want to test your skill i suggest you go to echosim.io or get an echo dot to experiment with.
If you don't want to test with echosim.io or a real echo device and you have your skill code inside of AWS Lambda you can always test your code there with the test command.
Example:
{
"session": {
"new": true,
"sessionId": "SessionId.******************0ed735901",
"application": {
"applicationId": "amzn1.ask.skill.e96d9***********3ee1b958e6ca"
},
"attributes": {},
"user": {
"userId": "amzn1.ask.account.AGMQGVEZFE355BBMXYBQGFN7TRN5E5CSGUU5Y3AUNEBT3DOZ7IOQ3K7G3RGIOI7BEJVLVR4CWSARSTMAF5RNA4QW************DURTSESLYMYDVIQLWA2LF6PHG3KB3UEOLZWYBBWLRKCFFMG7JFP7TNKCS2RQ4KOGPIMOT2PGQT3S2HAOBNJSAA
}
},
"request": {
"type": "IntentRequest",
"dialogState": "IN_PROGRESS",
"requestId": "EdwRequestId.5b2a45f7-e4bb-44cd-ba9f-1cfe138d577f",
"intent": {
"name": "SearchIntent",
"slots": {
"AnswerTime": {
"name": "AnswerTime",
"value": "Nope"
},
"FirstTime": {
"name": "FirstTime",
"value": "02:00"
},
"SecondTime": {
"name": "SecondTime"
},
"Date": {
"name": "Date",
"value": "2017-10-20"
},
"Name": {
"name": "Name",
"value": "Liam De Lee"
}
}
},
"locale": "en-US",
"timestamp": "2017-10-19T13:29:17Z"
},
"context": {
"AudioPlayer": {
"playerActivity": "IDLE"
},
"System": {
"application": {
"applicationId": "amzn1.ask.skill.e96d95e0-8cbd-41d2-a280-3ee1b958e6ca"
},
"user": {
"userId": "amzn1.ask.account.AGMQGVEZFE355BBMXYBQGFN7TRN5E5CSGUU5Y3AUNEBT3DOZ7IOQ3K7G3RGIOI7BEJVLVR4CWSARSTMAF5RNA4QW************DURTSESLYMYDVIQLWA2LF6PHG3KB3UEOLZWYBBWLRKCFFMG7JFP7TNKCS2RQ4KOGPIMOT2PGQT3S2HAOBNJSAA"
},
"device": {
"supportedInterfaces": {}
}
}
},
"version": "1.0"
}
Note: Service Simulator does not currently support testing audio
player directives, dialog model, customer permissions and customer
account linking.
Amazon developer portal.

Resources