Skip to content

Commit e56c123

Browse files
demodhBethanyZhou
andauthored
Added support for Ubuntu 20.04 vm image (#17632)
* changes added to support ubuntu 20.04 * updated changelog.md * updated changes.md based on comments * Update src/ServiceFabric/ServiceFabric/ChangeLog.md Co-authored-by: Beisi Zhou <[email protected]>
1 parent 90b46d8 commit e56c123

File tree

9 files changed

+737
-3
lines changed

9 files changed

+737
-3
lines changed

src/ServiceFabric/ServiceFabric.Test/ScenarioTests/TestServiceFabric.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,12 @@ public void DefaultTemplateFilesAvailable()
169169
parameterFilePath = Path.Combine(ubuntu18TemplateDirectory, Constants.ParameterFileName);
170170
Assert.True(File.Exists(templateFilePath), string.Format("file not found: {0}", templateFilePath));
171171
Assert.True(File.Exists(parameterFilePath), string.Format("file not found: {0}", parameterFilePath));
172+
173+
string ubuntu20TemplateDirectory = Path.Combine(assemblyFolder, Constants.UbuntuServer20TemplateRelativePath);
174+
templateFilePath = Path.Combine(ubuntu20TemplateDirectory, Constants.TemplateFileName);
175+
parameterFilePath = Path.Combine(ubuntu20TemplateDirectory, Constants.ParameterFileName);
176+
Assert.True(File.Exists(templateFilePath), string.Format("file not found: {0}", templateFilePath));
177+
Assert.True(File.Exists(parameterFilePath), string.Format("file not found: {0}", parameterFilePath));
172178
}
173179
}
174180
}

src/ServiceFabric/ServiceFabric/ChangeLog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
- Additional information about change #1
1919
-->
2020
## Upcoming Release
21+
* Added support for Ubuntu 20.04 vm image.
22+
- This enables cluster operations with Ubuntu 20.04 vm image using AZ powershell.
2123

2224
## Version 3.0.1
2325
* Fixed Managed and Classic Application models (Application, Cluster, Service) by updating constructor to take all new properties

src/ServiceFabric/ServiceFabric/Commands/NewAzureRmServiceFabricCluster.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ public class NewAzureRmServiceFabricCluster : ServiceFabricClusterCertificateCmd
4646
{OperatingSystem.WindowsServer2012R2Datacenter, "2012-R2-Datacenter"},
4747
{OperatingSystem.UbuntuServer1604, "16.04-LTS"},
4848
{OperatingSystem.UbuntuServer1804, "18.04-LTS"},
49+
{OperatingSystem.UbuntuServer2004, "20_04-LTS"},
4950
{OperatingSystem.WindowsServer2016DatacenterwithContainers, "2016-Datacenter-with-Containers"},
5051
{OperatingSystem.WindowsServer2016Datacenter, "2016-Datacenter"}
5152
};
@@ -449,6 +450,9 @@ private void DeployWithDefaultTemplate()
449450
case OperatingSystem.UbuntuServer1804:
450451
osRelativePath = Constants.UbuntuServer18TemplateRelativePath;
451452
break;
453+
case OperatingSystem.UbuntuServer2004:
454+
osRelativePath = Constants.UbuntuServer20TemplateRelativePath;
455+
break;
452456
default:
453457
throw new NotImplementedException("OS not defined for DeployWithDefaultTemplate");
454458
}

src/ServiceFabric/ServiceFabric/Common/Constants.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ public static class Constants
6969
public static readonly string WindowsTemplateRelativePath = Path.Combine("Template", "Windows");
7070
public static readonly string UbuntuServer16TemplateRelativePath = Path.Combine("Template", "Linux");
7171
public static readonly string UbuntuServer18TemplateRelativePath = Path.Combine("Template", "Ubuntu18_04");
72+
public static readonly string UbuntuServer20TemplateRelativePath = Path.Combine("Template", "Ubuntu20_04");
7273
public const string ParameterFileName = @"parameter.json";
7374
public const string TemplateFileName = @"template.json";
7475

src/ServiceFabric/ServiceFabric/Models/OperatingSystem.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ public enum OperatingSystem
2020
WindowsServer2016Datacenter,
2121
WindowsServer2016DatacenterwithContainers,
2222
UbuntuServer1604,
23-
UbuntuServer1804
23+
UbuntuServer1804,
24+
UbuntuServer2004
2425
}
2526
}

src/ServiceFabric/ServiceFabric/Models/VmImageKind.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ public enum VmImageKind
1818
Windows,
1919
Linux,
2020
Ubuntu,
21-
Ubuntu18_04
21+
Ubuntu18_04,
22+
Ubuntu20_04
2223
}
2324
}
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
{
2+
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json",
3+
"contentVersion": "1.0.0.0",
4+
"parameters": {
5+
"clusterLocation": {
6+
"value": "westus"
7+
},
8+
"clusterName": {
9+
"value": "GEN-UNIQUE"
10+
},
11+
"adminUserName": {
12+
"value": "GEN-UNIQUE"
13+
},
14+
"adminPassword": {
15+
"value": "GEN-PASSWORD"
16+
},
17+
"vmImagePublisher": {
18+
"value": "Canonical"
19+
},
20+
"vmImageOffer": {
21+
"value": "0001-com-ubuntu-server-focal"
22+
},
23+
"vmImageSku": {
24+
"value": "20_04-LTS"
25+
},
26+
"vmImageVersion": {
27+
"value": "latest"
28+
},
29+
"loadBalancedAppPort1": {
30+
"value": 80
31+
},
32+
"loadBalancedAppPort2": {
33+
"value": 8081
34+
},
35+
"clusterProtectionLevel": {
36+
"value": "EncryptAndSign"
37+
},
38+
"certificateStoreValue": {
39+
"value": "My"
40+
},
41+
"certificateThumbprint": {
42+
"value": "GEN-CUSTOM-DOMAIN-SSLCERT-THUMBPRINT"
43+
},
44+
"sourceVaultValue": {
45+
"value": "GEN-KEYVAULT-RESOURCE-ID"
46+
},
47+
"certificateUrlValue": {
48+
"value": "GEN-KEYVAULT-SSL-SECRET-URI"
49+
},
50+
"storageAccountType": {
51+
"value": "Standard_LRS"
52+
},
53+
"supportLogStorageAccountType": {
54+
"value": "Standard_LRS"
55+
},
56+
"applicationDiagnosticsStorageAccountType": {
57+
"value": "Standard_LRS"
58+
},
59+
"nt0InstanceCount": {
60+
"value": 5
61+
},
62+
"vmNodeType0Size": {
63+
"value": "Standard_D2_v2"
64+
},
65+
"durabilityLevel": {
66+
"value": "Bronze"
67+
},
68+
"reliabilityLevel": {
69+
"value": "Silver"
70+
}
71+
}
72+
}

0 commit comments

Comments
 (0)