From 6889bbfc1c4484003cf06f0bc2314973626f463c Mon Sep 17 00:00:00 2001 From: Alexandru Avadanii Date: Thu, 11 Jul 2019 21:46:05 +0200 Subject: [PATCH] [iec] seba-on-arm: Installer/OS specific params 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 --- jjb/iec/iec-seba_on_arm.sh | 8 +++----- jjb/iec/iec.yaml | 46 ++++++++++++++++++++++++++++++++++------------ 2 files changed, 37 insertions(+), 17 deletions(-) diff --git a/jjb/iec/iec-seba_on_arm.sh b/jjb/iec/iec-seba_on_arm.sh index ab0f293..3f1e2e5 100755 --- a/jjb/iec/iec-seba_on_arm.sh +++ b/jjb/iec/iec-seba_on_arm.sh @@ -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}" diff --git a/jjb/iec/iec.yaml b/jjb/iec/iec.yaml index 1c4a758..6b3ac09 100644 --- a/jjb/iec/iec.yaml +++ b/jjb/iec/iec.yaml @@ -89,33 +89,55 @@ 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 @@ -301,7 +323,7 @@ stream: '{stream}' branch: '{branch}' - '{project}-defaults' - - '{usecase}-defaults' + - '{usecase}-{installer}-{os}-defaults' wrappers: - build-name: -- 2.16.6