Guillaume Coré
2018-03-30 78ff2319fabb2ee868bf8f8e6e638026bf30b2cd
ocp on azure: improve performances

- switch to Premier_LRS storage account
- use better VM for bastion, bastion runs byo/config, it needs more CPU cores
- use multiple of 64GB for disks (128GB IO is OK for /)
- add docker_size variables to specify docker volume size in 'instances' list

> changing the OS disk size to at least 64 (if using managed disk) or 128 (if
> using unmanaged disk). The reason for this is Az charge for provisioned IOPS
> on premium disks and the smallest size we charge for is 64 GB for managed and
> 128 GB for unmanaged.
3 files modified
52 ■■■■■ changed files
ansible/configs/ocp-workshop/env_vars.yml 9 ●●●●● patch | view | raw | blame | history
ansible/configs/ocp-workshop/files/cloud_providers/azure_cloud_template.j2 19 ●●●●● patch | view | raw | blame | history
scripts/examples/ocp-workshop-azure.rc 24 ●●●●● patch | view | raw | blame | history
ansible/configs/ocp-workshop/env_vars.yml
@@ -86,6 +86,7 @@
# you can specify a different resourceGroup and method:
#az_destroy_method: deployment
#az_resource_group: my-shared-resource-group
#az_storage_account_type: Premium_LRS
### AWS EC2 Environment settings
@@ -281,7 +282,7 @@
    rootfs_size: "{{ rootfs_size_master }}"
    volumes:
      - device_name: "{{docker_device}}"
        volume_size: 20
        volume_size: "{{master_docker_size|default(docker_size)|default('20')}}"
        volume_type: gp2
        purpose: docker
        lun: 0
@@ -301,7 +302,7 @@
    rootfs_size: "{{ rootfs_size_node }}"
    volumes:
      - device_name: "{{docker_device}}"
        volume_size: 100
        volume_size: "{{node_docker_size|d(docker_size)|d('100')}}"
        volume_type: gp2
        purpose: docker
        lun: 0
@@ -321,7 +322,7 @@
    rootfs_size: "{{ rootfs_size_infranode }}"
    volumes:
      - device_name: "{{docker_device}}"
        volume_size: 50
        volume_size: "{{infranode_docker_size|d(docker_size)|d('50')}}"
        volume_type: gp2
        purpose: docker
        lun: 0
@@ -341,7 +342,7 @@
    rootfs_size: "{{ rootfs_size_support }}"
    volumes:
      - device_name: "{{docker_device}}"
        volume_size: 20
        volume_size: "{{support_docker_size|d(docker_size)|d('50')}}"
        volume_type: gp2
        purpose: docker
        lun: 0
ansible/configs/ocp-workshop/files/cloud_providers/azure_cloud_template.j2
@@ -105,7 +105,7 @@
        },
        "tenantId" : "[subscription().tenantId]",
        "apiVersion" : "2015-06-15",
        "apiVersionCompute" : "2015-06-15",
        "apiVersionCompute" : "2017-12-01",
        "apiVersionNetwork" : "2016-03-30",
        "tmApiVersion" : "2015-11-01",
        "apiVersionStorage" : "2015-06-15",
@@ -116,7 +116,7 @@
        "sshKeyPath" : "[concat('/home/',parameters('adminUsername'),'/.ssh/authorized_keys')]",
        "sQuote" : "\"",
        "vmStorageAccountContainerName": "vhds",
        "storageAccountType": "Standard_LRS",
        "storageAccountType": "{{az_storage_account_type|d('Premium_LRS')}}",
        "vhdStorageType" : "Premium_LRS",
        "storageAccountName": "[concat('vsts8',uniquestring(parameters('guid')))]"
    },
@@ -124,7 +124,7 @@
        {
            "type": "Microsoft.Storage/storageAccounts",
            "name": "[variables('StorageAccountName')]",
            "apiVersion": "2016-01-01",
            "apiVersion": "2017-10-01",
            "location": "[resourceGroup().location]",
            "sku": {
                "name": "[variables('storageAccountType')]"
@@ -270,11 +270,12 @@
            }
        },
        {
            "apiVersion" : "2017-03-30",
            "apiVersion" : "2017-12-01",
            "type" : "Microsoft.Compute/virtualMachines",
            "name" : "{{project_tag}}-{{instancename}}",
            "location" : "[resourceGroup().location]",
            "dependsOn" : [
                "[resourceId('Microsoft.Storage/storageAccounts',variables('StorageAccountName'))]",
                "[resourceId('Microsoft.Network/networkInterfaces/', '{{project_tag}}-{{instancename}}-Interface')]"
            ],
            "tags": {
@@ -312,7 +313,10 @@
                        "caching" : "ReadWrite",
                        "name" : "{{project_tag}}-{{instancename}}-osdisk",
                        "createOption" : "FromImage",
                        "diskSizeGB" : "{{instance['rootfs_size']|d('50')}}"
                        "diskSizeGB" : "{{instance['rootfs_size']|d('50')}}",
                        "managedDisk": {
                            "storageAccountType": "{{az_storage_account_type|d('Premium_LRS')}}"
                        }
                    },
                    "dataDisks" : [
{% for vol in instance['volumes']|default([]) %}
@@ -321,7 +325,10 @@
                            "createOption" : "Empty",
                            "lun" : "{{vol.lun}}",
                            "name": "{{project_tag}}-{{instancename}}-disk{{loop.index}}-{{vol.purpose}}",
                            "diskSizeGB" : "{{vol.volume_size}}"
                            "diskSizeGB" : "{{vol.volume_size}}",
                            "managedDisk": {
                                "storageAccountType": "{{az_storage_account_type|d('Premium_LRS')}}"
                            }
                        },
{% endfor %}
                    ]
scripts/examples/ocp-workshop-azure.rc
@@ -14,14 +14,19 @@
-e azure_region=WestEurope
-e azure_subscription_id=CHANGEME
-e bastion_instance_type=Standard_A2_v2
-e master_instance_type=Standard_DS4_v2
-e infranode_instance_type=Standard_DS4_v2
-e node_instance_type=Standard_DS4_v2
-e support_instance_type=Standard_DS4_v2
-e bastion_instance_type=Standard_F8s_v2
-e master_instance_type=Standard_E8S_v3
-e infranode_instance_type=Standard_E16S_v3
-e node_instance_type=Standard_E8S_v3
-e support_instance_type=Standard_E8S_v3
-e rootfs_size_bastion=50
-e rootfs_size_support=50
-e docker_size=128
-e rootfs_size_node=128
-e rootfs_size_infranode=150
-e rootfs_size_master=128
-e rootfs_size_bastion=128
-e rootfs_size_support=128
-e remote_user=azure
-e ansible_ssh_user=azure
@@ -44,13 +49,14 @@
# Some example of sizing
# -e "bastion_instance_type=Standard_A2_v2"
#use cpu-focused VM for bastion
# -e "bastion_instance_type=Standard_F8s_v2"
# -e "master_instance_type=Standard_E8S_v3"
# -e "infranode_instance_type=Standard_E16S_v3"
# -e "node_instance_type=Standard_E8S_v3"
# -e "support_instance_type=Standard_E8S_v3"
# -e "bastion_instance_type=Standard_A2_v2"
# -e "bastion_instance_type=Standard_DS4_v2"
# -e "master_instance_type=Standard_DS4_v2"
# -e "infranode_instance_type=Standard_DS4_v2"
# -e "node_instance_type=Standard_DS4_v2"