[iec] seba-on-arm: Installer/OS specific params 09/1209/2
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Thu, 11 Jul 2019 19:46:05 +0000 (21:46 +0200)
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Tue, 16 Jul 2019 20:10:03 +0000 (22:10 +0200)
The IEC usecase job (e.g. seba-on-arm installation) parameters should
be installer specific and OS specific, e.g. Ubuntu deployed using Fuel
defaults to 'ubuntu' user, while CentOS deployed using Fuel defaults
to 'centos'.

While at it, unify currently separate parameters for the SSH
credentials in Fuel/Compass installations and fix the IEC dir location
for Fuel.

Change-Id: I93613aacc41eb8a2cfd1662b7d76ade36c7c8090
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
jjb/iec/iec-seba_on_arm.sh
jjb/iec/iec.yaml

index ab0f293..3f1e2e5 100755 (executable)
@@ -18,13 +18,11 @@ case "${JOB_NAME}" in
                     | awk '{print $1}')
     # On Fuel deployements the K8s ssh key is the one used by the deploy job
     K8S_SSH_KEY=${SSH_KEY}
-    IEC_DIR="/home/${K8S_SSH_USER}/iec"
+    IEC_DIR="/var/lib/akraino/iec"
     ;;
   *compass*)
-    K8S_MASTER_IP=${K8S_MASTER_IP_COMPASS}
-    K8S_SSH_USER=${K8S_SSH_USER_COMPASS}
-    K8S_SSH_PASSWORD=${K8S_SSH_PASSWORD_COMPASS}
-    IEC_DIR="/${K8S_SSH_USER_COMPASS}/iec"
+    # K8S_{MASTER_IP,SSH_USER,SSH_PASSWORD} are already set by job params
+    IEC_DIR="/${K8S_SSH_USER}/iec"
     ;;
   *)
     echo "Cannot determine installer from ${JOB_NAME}"
index 1c4a758..6b3ac09 100644 (file)
           name: ARCHIVE_ARTIFACTS
           default: '**/*.log'
           description: Artifacts to archive to the logs server.
-- parameter:
-    name: 'seba_on_arm-defaults'
+# Usecase params are both installer and OS specific
+- parameter: &k8s_fuel_ubuntu1604_parameter
+    name: 'seba_on_arm-fuel-ubuntu1604-defaults'
     parameters:
-      - string:
+      - string: &k8s_master_ip
+          name: K8S_MASTER_IP
+          default: ''
+          description: 'IP address to connect to the K8s master'
+      - string: &k8s_ssh_user
           name: K8S_SSH_USER
           default: 'ubuntu'
           description: 'SSH username to connect to the K8s master '
-      - string:
+      - string: &k8s_ssh_password
           name: K8S_SSH_PASSWORD
           default: ''
           description: 'SSH password to connect to the K8s master'
-      - string:
+      - string: &k8s_ssh_key
           name: K8S_SSH_KEY
           default: ''
           description: 'SSH key to connect to the K8s master'
+- parameter:
+    <<: *k8s_fuel_ubuntu1604_parameter
+    name: 'seba_on_arm-fuel-ubuntu1804-defaults'
+- parameter:
+    name: 'seba_on_arm-fuel-centos7-defaults'
+    parameters:
       - string:
-          name: K8S_MASTER_IP_COMPASS
+          <<: *k8s_master_ip
+      - string:
+          <<: *k8s_ssh_user
+          default: 'centos'
+      - string:
+          <<: *k8s_ssh_password
+      - string:
+          <<: *k8s_ssh_key
+- parameter:
+    name: 'seba_on_arm-compass-ubuntu1604-defaults'
+    parameters:
+      - string:
+          <<: *k8s_master_ip
           default: '10.1.0.50'
-          description: 'IP address to compass connect to the K8s master'
       - string:
-          name: K8S_SSH_PASSWORD_COMPASS
+          <<: *k8s_ssh_user
           default: 'root'
-          description: 'SSH password to compass connect to the K8s master'
       - string:
-          name: K8S_SSH_USER_COMPASS
+          <<: *k8s_ssh_password
           default: 'root'
-          description: 'SSH username to compass connect to the K8s master'
+      - string:
+          <<: *k8s_ssh_key
 
 ########################
 # job templates
           stream: '{stream}'
           branch: '{branch}'
       - '{project}-defaults'
-      - '{usecase}-defaults'
+      - '{usecase}-{installer}-{os}-defaults'
 
     wrappers:
       - build-name: