diff --git a/os-templates/che.json b/os-templates/che.json index b01310007f9..967a65e11d2 100644 --- a/os-templates/che.json +++ b/os-templates/che.json @@ -162,7 +162,7 @@ { "name": "${APPLICATION_NAME}", "image": "${CHE_SERVER_DOCKER_IMAGE}", - "imagePullPolicy": "Always", + "imagePullPolicy": "IfNotPresent", "privileged": true, "livenessProbe": { "tcpSocket": { diff --git a/os-templates/che_debug.json b/os-templates/che_debug.json index 22c85d90935..a7c234e114a 100644 --- a/os-templates/che_debug.json +++ b/os-templates/che_debug.json @@ -92,6 +92,7 @@ { "port": 8000, "targetPort": 8000, + "nodePort": 32306, "protocol": "TCP", "name": "tomcat-debug" } @@ -169,7 +170,7 @@ { "name": "${APPLICATION_NAME}", "image": "${CHE_SERVER_DOCKER_IMAGE}", - "imagePullPolicy": "Always", + "imagePullPolicy": "IfNotPresent", "privileged": true, "livenessProbe": { "tcpSocket": { diff --git a/scripts/build_openshift_connector.sh b/scripts/build_openshift_connector.sh index e85a93bf85f..7857528c78b 100755 --- a/scripts/build_openshift_connector.sh +++ b/scripts/build_openshift_connector.sh @@ -19,22 +19,17 @@ mvnche() { } cd plugins/plugin-docker -mvnche clean install -cd ../.. - -cd wsmaster/che-core-api-agent -mvnche clean install -cd ../che-core-api-workspace -mvnche clean install +mvnche install cd ../.. cd assembly/assembly-wsmaster-war -mvnche clean install +mvnche install cd ../.. cd assembly/assembly-main/ -mvnche clean install +mvnche install cd ../.. docker build -t ${CHE_IMAGE} . -cd ${CURRENT_DIR} \ No newline at end of file +cd ${CURRENT_DIR} + diff --git a/scripts/openche.sh b/scripts/openche.sh index f4d7184130e..416d328a47e 100755 --- a/scripts/openche.sh +++ b/scripts/openche.sh @@ -48,6 +48,8 @@ set_parameters() { CHE_OPENSHIFT_ENDPOINT=${CHE_OPENSHIFT_ENDPOINT:-${DEFAULT_CHE_OPENSHIFT_ENDPOINT}} CHE_TEMPLATE=${CHE_TEMPLATE:-${DEFAULT_CHE_TEMPLATE}} + + CHE_APPLICATION_NAME=che-host } check_prerequisites() { @@ -92,26 +94,28 @@ deploy() { DOCKER0_IP=$(ip addr show docker0 | grep "inet\b" | awk '{print $2}' | cut -d/ -f1) fi - oc new-app --template=eclipse-che --param=HOSTNAME_HTTP=${CHE_HOSTNAME} \ + echo "calling oc new-app" + oc new-app --template=eclipse-che --param=APPLICATION_NAME=${CHE_APPLICATION_NAME} \ + --param=HOSTNAME_HTTP=${CHE_HOSTNAME} \ --param=CHE_SERVER_DOCKER_IMAGE=${CHE_IMAGE} \ --param=DOCKER0_BRIDGE_IP=${DOCKER0_IP} \ --param=CHE_LOG_LEVEL=${CHE_LOG_LEVEL} \ --param=CHE_OPENSHIFT_ENDPOINT=${CHE_OPENSHIFT_ENDPOINT} - oc deploy che-host --latest + echo "OPENCHE: Waiting 5 seconds for the pod to start" sleep 5 - POD_ID=$(oc get pods | grep che-host | grep -v "\-deploy" | awk '{print $1}') + POD_ID=$(oc get pods | grep ${CHE_APPLICATION_NAME} | grep -v "\-deploy" | awk '{print $1}') echo "Che pod starting (id $POD_ID)..." } ## Uninstall everything delete() { echo "Deleting resources" - # POD_ID=$(oc get pods | grep che-host | awk '{print $1}') + # POD_ID=$(oc get pods | grep ${CHE_APPLICATION_NAME} | awk '{print $1}') # oc delete pod/${POD_ID} - oc delete route/che-host || true - oc delete svc/che-host || true - oc delete dc/che-host || true + oc delete route/${CHE_APPLICATION_NAME} || true + oc delete svc/${CHE_APPLICATION_NAME} || true + oc delete dc/${CHE_APPLICATION_NAME} || true } parse_command_line () {