Skip to content

Commit aa68508

Browse files
committed
make sure storage account and vault name are unique, add notes about cef 69), make more params on az_create rather than hardcoded values
1 parent a8d3979 commit aa68508

File tree

3 files changed

+21
-18
lines changed

3 files changed

+21
-18
lines changed

AzureTemplateParams.json

-6
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,6 @@
4141
"osDiskType": {
4242
"value": "Premium_LRS"
4343
},
44-
"diagnosticsStorageAccountName": {
45-
"value": "estdiag862"
46-
},
47-
"diagnosticsStorageAccountId": {
48-
"value": "Microsoft.Storage/storageAccounts/estdiag862"
49-
},
5044
"diagnosticsStorageAccountType": {
5145
"value": "Standard_LRS"
5246
},

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
## Summary
2727
Automated chrome cef building and/or cefsharp building dockerfiles and scripts.
2828

29-
While the processes of building CEF and CEFSHARP are not hard they require a very exacting environment and build steps can take a _long_ time so are annoying to repeat. The goal if this repo is a collection of scripts to automate everything to make it easy for anyone to do. We are using Docker to run everything in a container as it makes it much easier to reproduce and won't pollute your dev environment with all the pre-reqs. You can easily tweak the exact versions you want to build, and the build flags. From creating a VM on your cloud provider of choice (or your own machine) it is about 20 minutes of setup, starting a build script, and just waiting a few hours for it to spit out the compiled binaries. It has been tested with 63, 65, and 67 but would likely work for any modern chrome build without changes (in most cases).
29+
While the processes of building CEF and CEFSHARP are not hard they require a very exacting environment and build steps can take a _long_ time so are annoying to repeat. The goal if this repo is a collection of scripts to automate everything to make it easy for anyone to do. We are using Docker to run everything in a container as it makes it much easier to reproduce and won't pollute your dev environment with all the pre-reqs. You can easily tweak the exact versions you want to build, and the build flags. From creating a VM on your cloud provider of choice (or your own machine) it is about 20 minutes of setup, starting a build script, and just waiting a few hours for it to spit out the compiled binaries. It has been tested with 63, 65, 67, and 69 but would likely work for any modern chrome build without changes (in most cases).
3030

3131

3232
## Thanks
@@ -45,7 +45,7 @@ In part we use the latest version of several installers/build tools if they chan
4545
Window 10 Client (Pro) by default with docker uses HyperV isolation, this mode is very non performant vs process isolation mode.
4646

4747
## Requirements
48-
The following requirements are for chrome 63(and more or less 65 and 67) and the current vs_2017 installer, they may change over time. Compiling is largely CPU bound but linking is largely IO bound.
48+
The following requirements are for chrome 63(and more or less 65, 67 and 69) and the current vs_2017 installer, they may change over time. Compiling is largely CPU bound but linking is largely IO bound.
4949

5050
- At least 20GB of ram dedicated to this would recommend 30GB total with page file to make sure you don't run out (older builds like 63 were 32GB with 40GB total). You can have any amount of that 20/30GB as a page file, just beware the less actual ram the much slower linking will be.
5151
- At least 250GB of space.
@@ -136,8 +136,8 @@ You could also expose the docker server to the internet and use remote docker co
136136

137137
### Estimated time requirements
138138
With the Azure F32 v2 host above the total estimated build time is about 2.1 hours (~$6 on azure). Machines are nice 600MB/sec read/write to the local disk. The time could be cut close to in half if you used a F64 v2 VM, but your cost will remain the same (as its twice the price for twice the power). Note it can vary somewhat dramatically for the not cef build steps based on the luck of the draw (but the cef build is most of the build time). It seems local IO depending on what physical host it is spun up on can cause 30-50% performance fluxes. Most of the build steps make efficient use of the machine however: The git cloning is not very efficient. It is 30 minutes of the cef build time below. It doesn't quite max out network or IO. The linking stage is also not super efficient see the DUAL_BUILD flag below to help with that. Linking will take 20+ minutes per platform (40 total unless run concurrently). Here are the individual build/commit times:
139-
- pull source image: 5 minutes
140-
- vs: 11 minutes
139+
- pull source image: 3 minutes
140+
- vs: 15 minutes
141141
- cef: 1.8 hours (with DUAL_BUILD)
142142
- cef-binary: 3 minutes
143143
- cefsharp: 4 minutes

az_create.ps1

+17-8
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,25 @@
22
Param(
33
[Parameter(Mandatory=$true)]
44
[PSCredential] $admin_creds,
5-
[String] $shutdown_email
5+
[String] $shutdown_email,
6+
[String] $RESOURCE_GROUP="CEFTest",
7+
[String] $LOCATION="West US 2",
8+
[String] $MACHINE_SIZE="Standard_F72s_v2",
9+
[String] $SHUTDOWN_TIME="23:30",
10+
[String] $RANDOM_STR=""
11+
612
)
713
Set-StrictMode -version latest
814
$ErrorActionPreference = "Stop";
9-
$VAULT_NAME = "CEFVault"
10-
$RESOURCE_GROUP = "CEFTest"
11-
$LOCATION="West US 2"
12-
$MACHINE_SIZE="Standard_F32s_v2"
15+
$rand_str = $RANDOM_STR;
16+
if (! $rand_str){
17+
$rand_str = -join ((97..122) | Get-Random -Count 5 | % {[char]$_});
18+
}
19+
$VAULT_NAME = "CEFVault-" + $rand_str;
1320
$SECRET_NAME="CEFPSCertSecret"
1421
$CERT_PASS="dummy"
15-
$SHUTDOWN_TIME="23:30";
1622
$SHUTDOWN_TIMEZONE="Pacific Standard Time";
23+
$DIAG_STORAGE_ACT="estdiag86" + $rand_str;
1724
Function WriteException($exp){
1825
write-host "Caught an exception:" -ForegroundColor Yellow -NoNewline
1926
write-host " $($exp.Exception.Message)" -ForegroundColor Red
@@ -25,7 +32,7 @@ Function WriteException($exp){
2532

2633
try{
2734

28-
35+
Write-Host "RANDOM_STR FOR THIS SESSION: $RANDOM_STR"
2936
$CERT_PASS_SEC=ConvertTo-SecureString -AsPlainText -Force $CERT_PASS
3037
$cred = $admin_creds
3138
#Connect-AzureRmAccount
@@ -49,7 +56,7 @@ else{
4956

5057
$vault = Get-AzureRmKeyVault -VaultName $VAULT_NAME -ErrorAction SilentlyContinue
5158
if (! $vault){
52-
Write-Host "Creating key vault to store remote powershell certificate in"
59+
Write-Host "Creating key vault to store remote powershell certificate in: $VAULT_NAME"
5360
New-AzureRmKeyVault -VaultName $VAULT_NAME -ResourceGroupName $RESOURCE_GROUP -Location $LOCATION -EnabledForDeployment -EnabledForTemplateDeployment | Out-Null
5461
$vault = Get-AzureRmKeyVault -VaultName $VAULT_NAME
5562
}else{
@@ -100,6 +107,8 @@ $hashtable.PsRemoteSecretUrl = $secretURL;
100107
$hashtable.adminUsername = $cred.UserName;
101108
$hashtable.adminPassword = $cred.Password;
102109
$hashtable.location = $LOCATION;
110+
$hashtable.diagnosticsStorageAccountName = $DIAG_STORAGE_ACT;
111+
$hashtable.diagnosticsStorageAccountId = "Microsoft.Storage/storageAccounts/" + $DIAG_STORAGE_ACT;
103112
$hashtable.virtualMachineSize = $MACHINE_SIZE;
104113
$hashtable.autoShutdownTimeZone = $SHUTDOWN_TIMEZONE;
105114
$hashtable.autoShutdownTime = $SHUTDOWN_TIME;

0 commit comments

Comments
 (0)