Verified Commit c0048945 authored by Raphaël Flores's avatar Raphaël Flores
Browse files

Configure brc4env deployment server. Rationalise proxmox/openstack variables. GNP-5796.

parent 4b6c8cd4
......@@ -248,14 +248,14 @@ build-data-discovery:
# SSH initialization
- eval $(ssh-agent -s)
- ssh-add <(echo "${SSH_PRIVATE_KEY}")
- ssh -o StrictHostKeyChecking=no ${SERVER_USER_OPENSTACK}@${SERVER_IP_OPENSTACK} 'echo "Successfully connected on $(hostname)"'
- ssh -o StrictHostKeyChecking=no ${SERVER_USER}@${SERVER_IP} 'echo "Successfully connected on $(hostname)"'
# Copy jar to the server
- scp ./backend/build/libs/${APP_NAME}.jar ${SERVER_USER_OPENSTACK}@${SERVER_IP_OPENSTACK}:/tmp/${APP_NAME}-${ENV}.jar
- ssh ${SERVER_USER_OPENSTACK}@${SERVER_IP_OPENSTACK} "sudo mv /tmp/${APP_NAME}-${ENV}.jar /opt/bootapp/${APP_NAME}-${ENV}.jar ; sudo chown -R bootapp:bootapp /opt/bootapp/"
- scp ./backend/build/libs/${APP_NAME}.jar ${SERVER_USER}@${SERVER_IP}:/tmp/${APP_NAME}-${ENV}.jar
- ssh ${SERVER_USER}@${SERVER_IP} "sudo mv /tmp/${APP_NAME}-${ENV}.jar /opt/bootapp/${APP_NAME}-${ENV}.jar ; sudo chown -R bootapp:bootapp /opt/bootapp/"
# Restarting service with the updated jar and the according Spring profiles enabled
- ssh ${SERVER_USER_OPENSTACK}@${SERVER_IP_OPENSTACK} "sudo systemctl restart bootapp@${APP_NAME}-${ENV}"
- ssh ${SERVER_USER}@${SERVER_IP} "sudo systemctl restart bootapp@${APP_NAME}-${ENV}"
- eval $(ssh-agent -k)
- echo "Deploy and index done. Application should be available at http://${SERVER_IP_OPENSTACK}:${APP_PORT}/${APP_CONTEXT}"
- echo "Deploy and index done. Application should be available at http://${SERVER_IP}:${APP_PORT}/${APP_CONTEXT}"
.variables-rare-beta-openstack: &variables-rare-beta-openstack
variables:
......@@ -263,7 +263,7 @@ build-data-discovery:
APP_NAME: rare
APP_PORT: ${BETA_RARE_PORT}
DATA_DIR: ${APP_NAME}
SERVER_IP: ${SERVER_IP_OPENSTACK}
SERVER_IP: ${SERVER_IP_OPENSTACK_DEV}
SERVER_USER: ${SERVER_USER_OPENSTACK}
ES_HOST: ${ES_DEV_HOST_OPENSTACK}
ES_HOSTS: ${ES_DEV_HOSTS_OPENSTACK}
......@@ -276,7 +276,7 @@ build-data-discovery:
APP_NAME: rare
APP_PORT: ${STAGING_RARE_PORT}
DATA_DIR: ${APP_NAME}
SERVER_IP: ${SERVER_IP_OPENSTACK}
SERVER_IP: ${SERVER_IP_OPENSTACK_DEV}
SERVER_USER: ${SERVER_USER_OPENSTACK}
ES_HOST: ${ES_DEV_HOST_OPENSTACK}
ES_HOSTS: ${ES_DEV_HOSTS_OPENSTACK}
......@@ -289,7 +289,8 @@ build-data-discovery:
APP_NAME: rare
APP_PORT: ${PROD_RARE_PORT}
DATA_DIR: ${APP_NAME}
SERVER_IP: ${SERVER_IP}
SERVER_IP: ${SERVER_IP_PROXMOX}
SERVER_USER: ${SERVER_USER_PROXMOX}
ES_HOST: ${ES_PROD_HOST}
ES_HOSTS: ${ES_PROD_HOSTS}
ES_PORT: ${ES_PROD_PORT}
......@@ -302,7 +303,7 @@ build-data-discovery:
APP_NAME: rare
APP_PORT: ${PROD_RARE_PORT}
DATA_DIR: ${APP_NAME}
SERVER_IP: ${SERVER_IP_OPENSTACK}
SERVER_IP: ${SERVER_IP_OPENSTACK_PROD}
SERVER_USER: ${SERVER_USER_OPENSTACK}
ES_HOST: ${ES_DEV_HOST_OPENSTACK}
ES_HOSTS: ${ES_DEV_HOSTS_OPENSTACK} # TODO: TO BE FIXED WHEN PROD CLUSTER AVAILABLE IN OPENSTACK
......@@ -315,7 +316,7 @@ build-data-discovery:
APP_NAME: brc4env
APP_PORT: ${BETA_BRC4ENV_PORT}
DATA_DIR: rare
SERVER_IP: ${SERVER_IP_OPENSTACK}
SERVER_IP: ${SERVER_IP_OPENSTACK_DEV}
SERVER_USER: ${SERVER_USER_OPENSTACK}
ES_HOST: ${ES_DEV_HOST_OPENSTACK}
ES_HOSTS: ${ES_DEV_HOSTS_OPENSTACK}
......@@ -328,14 +329,13 @@ build-data-discovery:
APP_NAME: brc4env
APP_PORT: ${STAGING_BRC4ENV_PORT}
DATA_DIR: rare
SERVER_IP: ${SERVER_IP_OPENSTACK}
SERVER_IP: ${SERVER_IP_OPENSTACK_DEV}
SERVER_USER: ${SERVER_USER_OPENSTACK}
ES_HOST: ${ES_DEV_HOST_OPENSTACK}
ES_HOSTS: ${ES_DEV_HOSTS_OPENSTACK}
ES_PORT: ${ES_DEV_PORT}
APP_CONTEXT: ${APP_NAME}
# ALPHA
.variables-brc4env-prod-openstack: &variables-brc4env-prod-openstack
variables:
ENV: prod
......@@ -344,9 +344,9 @@ build-data-discovery:
DATA_DIR: rare
SERVER_IP: ${SERVER_IP_OPENSTACK_PROD}
SERVER_USER: ${SERVER_USER_OPENSTACK}
ES_HOST: ${ES_PROD_HOST_OPENSTACK} # TODO: TO BE FIXED WHEN PROD CLUSTER AVAILABLE IN OPENSTACK
ES_HOSTS: ${ES_PROD_HOSTS_OPENSTACK} # TODO: TO BE FIXED WHEN PROD CLUSTER AVAILABLE IN OPENSTACK
ES_PORT: ${ES_PROD_PORT}
ES_HOST: ${ES_DEV_HOST_OPENSTACK} # TODO: TO BE FIXED WHEN PROD CLUSTER AVAILABLE IN OPENSTACK
ES_HOSTS: ${ES_DEV_HOSTS_OPENSTACK} # TODO: TO BE FIXED WHEN PROD CLUSTER AVAILABLE IN OPENSTACK
ES_PORT: ${ES_DEV_PORT} # TODO: TO BE FIXED WHEN PROD CLUSTER AVAILABLE IN OPENSTACK
APP_CONTEXT: ${APP_NAME}
.variables-wheatis-beta-openstack: &variables-wheatis-beta-openstack
......@@ -355,7 +355,7 @@ build-data-discovery:
APP_NAME: wheatis
APP_PORT: ${BETA_WHEATIS_PORT}
DATA_DIR: ${APP_NAME}
SERVER_IP: ${SERVER_IP_OPENSTACK}
SERVER_IP: ${SERVER_IP_OPENSTACK_DEV}
SERVER_USER: ${SERVER_USER_OPENSTACK}
ES_HOST: ${ES_DEV_HOST_OPENSTACK}
ES_HOSTS: ${ES_DEV_HOSTS_OPENSTACK}
......@@ -368,7 +368,7 @@ build-data-discovery:
APP_NAME: wheatis
APP_PORT: ${STAGING_WHEATIS_PORT}
DATA_DIR: ${APP_NAME}
SERVER_IP: ${SERVER_IP_OPENSTACK}
SERVER_IP: ${SERVER_IP_OPENSTACK_DEV}
SERVER_USER: ${SERVER_USER_OPENSTACK}
ES_HOST: ${ES_DEV_HOST_OPENSTACK}
ES_HOSTS: ${ES_DEV_HOSTS_OPENSTACK}
......@@ -381,7 +381,8 @@ build-data-discovery:
APP_NAME: wheatis
APP_PORT: ${PROD_WHEATIS_PORT}
DATA_DIR: ${APP_NAME}
SERVER_IP: ${SERVER_IP}
SERVER_IP: ${SERVER_IP_PROXMOX}
SERVER_USER: ${SERVER_USER_PROXMOX}
ES_HOST: ${ES_PROD_HOST}
ES_HOSTS: ${ES_PROD_HOSTS}
ES_PORT: ${ES_PROD_PORT}
......@@ -394,7 +395,7 @@ build-data-discovery:
APP_NAME: wheatis
APP_PORT: ${PROD_WHEATIS_PORT}
DATA_DIR: ${APP_NAME}
SERVER_IP: ${SERVER_IP_OPENSTACK}
SERVER_IP: ${SERVER_IP_OPENSTACK_PROD}
SERVER_USER: ${SERVER_USER_OPENSTACK}
ES_HOST: ${ES_DEV_HOST_OPENSTACK} # TODO: TO BE FIXED WHEN PROD CLUSTER AVAILABLE IN OPENSTACK
ES_HOSTS: ${ES_DEV_HOSTS_OPENSTACK} # TODO: TO BE FIXED WHEN PROD CLUSTER AVAILABLE IN OPENSTACK
......@@ -407,7 +408,7 @@ build-data-discovery:
APP_NAME: data-discovery
APP_PORT: ${BETA_DATADISCOVERY_PORT}
DATA_DIR: ${APP_NAME}
SERVER_IP: ${SERVER_IP_OPENSTACK}
SERVER_IP: ${SERVER_IP_OPENSTACK_DEV}
SERVER_USER: ${SERVER_USER_OPENSTACK}
ES_HOST: ${ES_DEV_HOST_OPENSTACK}
ES_HOSTS: ${ES_DEV_HOSTS_OPENSTACK}
......@@ -420,7 +421,7 @@ build-data-discovery:
APP_NAME: data-discovery
APP_PORT: ${STAGING_DATADISCOVERY_PORT}
DATA_DIR: ${APP_NAME}
SERVER_IP: ${SERVER_IP_OPENSTACK}
SERVER_IP: ${SERVER_IP_OPENSTACK_DEV}
SERVER_USER: ${SERVER_USER_OPENSTACK}
ES_HOST: ${ES_DEV_HOST_OPENSTACK}
ES_HOSTS: ${ES_DEV_HOSTS_OPENSTACK}
......@@ -433,7 +434,8 @@ build-data-discovery:
APP_NAME: data-discovery
APP_PORT: ${PROD_DATADISCOVERY_PORT}
DATA_DIR: ${APP_NAME}
SERVER_IP: ${SERVER_IP}
SERVER_IP: ${SERVER_IP_PROXMOX}
SERVER_USER: ${SERVER_USER_PROXMOX}
ES_HOST: ${ES_PROD_HOST}
ES_HOSTS: ${ES_PROD_HOSTS}
ES_PORT: ${ES_PROD_PORT}
......@@ -446,7 +448,7 @@ build-data-discovery:
APP_NAME: data-discovery
APP_PORT: ${PROD_DATADISCOVERY_PORT}
DATA_DIR: ${APP_NAME}
SERVER_IP: ${SERVER_IP_OPENSTACK}
SERVER_IP: ${SERVER_IP_OPENSTACK_PROD}
SERVER_USER: ${SERVER_USER_OPENSTACK}
ES_HOST: ${ES_DEV_HOST_OPENSTACK} # TODO: TO BE FIXED WHEN PROD CLUSTER AVAILABLE IN OPENSTACK
ES_HOSTS: ${ES_DEV_HOSTS_OPENSTACK} # TODO: TO BE FIXED WHEN PROD CLUSTER AVAILABLE IN OPENSTACK
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment