wls-eng / arm-oraclelinux-wls

Microsoft Azure ARM Templates to create Oracle Linux VM with pre-installed Weblogic Server
Apache License 2.0
0 stars 7 forks source link

Alter Oracle internal CI/CD for base image creation to use SSH instead of password in parameters.json #215

Open edburns opened 3 years ago

edburns commented 3 years ago

Hello Jacob,

The long term solution is to modify your parameters.json to use SSH instead of password for the admin account. Like this.

--- parameters.json 2021-01-15 22:49:03.069158200 -0500
+++ 20210115-parameters.json    2021-01-15 22:42:32.383953800 -0500
@@ -6,16 +6,19 @@
             "value": "adminuser"
         },
         "adminPasswordOrKey": {
-            "value": "REDACTED"
+            "value": "ssh-rsa AAAAREDACTEDf0= foo@bar.com"
         },
         "acceptOTNLicenseAgreement": {
             "value": "Y"
         },
+        "authenticationType": {
+            "value": "sshPublicKey"
+        },
         "otnAccountUsername": {
-            "value": "REDACTED"
+            "value": "foo@bar.com"
         },
         "otnAccountPassword": {
-            "value": "REDACTED"
+            "value": "password"
         },
         "shiphomeurl": {
             "value": "http://download.oracle.com/otn/nt/middleware/12c/12213/fmw_12.2.1.3.0_wls_Disk1_1of1.zip"

The existing azuredeploy.json will still work.

A workaround is to modify azuredeploy.json to add this tag:

--- azuredeploy.json    2021-01-15 20:38:36.000000000 -0500
+++ 20210115-workaround-azuredeploy.json    2021-01-15 22:44:30.999816500 -0500
@@ -264,6 +270,9 @@
             "[resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]",
             "[resourceId('Microsoft.Network/networkInterfaces/', variables('nicName'))]"
          ],
+         "tags": {
+            "SkipGreenTeamLinuxSSHAuthForResource": true
+         },
          "properties":{
             "hardwareProfile":{
                "vmSize":"[variables('vmSize')]"

If you need to use the workaround now, that's fine. But please let's use this issue to track transitioning your CI/CD to use the long term solution.