Skip to content

Commit

Permalink
fixing everything
Browse files Browse the repository at this point in the history
pull request updates
  • Loading branch information
MichaelClifford committed Apr 27, 2018
1 parent c593125 commit ae115fd
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 14 deletions.
44 changes: 32 additions & 12 deletions conf/openshift/openshift.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,15 +124,18 @@
}
},
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"kind": "StatefulSet",
"apiVersion": "apps/v1beta1",
"metadata": {
"name": "dataverse-glassfish",
"annotations": {
"template.alpha.openshift.io/wait-for-ready": "true"
"template.alpha.openshift.io/wait-for-ready": "true",
"alpha.image.policy.openshift.io/resolve-names": "*"
}
},
"spec": {
"serviceName" : "dataverse-glassfish",
"replicas": 1,
"template": {
"metadata": {
"labels": {
Expand All @@ -143,14 +146,26 @@
"containers": [
{
"name": "dataverse-plus-glassfish",
"image": "dataverse-plus-glassfish",
"image": "iqss/dataverse-glassfish:latest",
"ports": [
{
"containerPort": 8080,
"protocol": "TCP"
}
],
"resources": {"limits": {"memory": "3072Mi"
}

},
"env": [

{ "name": "MY_POD_NAME",
"valueFrom": {
"fieldRef": {
"fieldPath": "metadata.name"
}
}
},
{
"name": "POSTGRES_SERVER",
"value": "dataverse-postgresql-0"
Expand Down Expand Up @@ -184,7 +199,7 @@
"value": "dvndb"
}
],
"imagePullPolicy": "IfNotPresent",
"imagePullPolicy": "Always",
"securityContext": {
"capabilities": {},
"privileged": false
Expand All @@ -200,7 +215,9 @@
"intervalSeconds": 1,
"timeoutSeconds": 300
},
"resources": {}
"resources": {"limits": {
"memory": "512Mi"
}}
},
"triggers": [
{
Expand All @@ -220,9 +237,11 @@
"type": "ConfigChange"
}
],
"replicas": 1,
"selector": {
"name": "iqss-dataverse-glassfish"
"name": "iqss-dataverse-glassfish",
"matchLabels" : {
"name": "iqss-dataverse-glassfish"
}
}
}
},
Expand Down Expand Up @@ -252,6 +271,7 @@
"command": [
"sh", "-c", "echo 'Setting up Postgres Master/Slave replication...'; [[ `hostname` =~ -([0-9]+)$ ]] || exit 1; ordinal=${BASH_REMATCH[1]}; if [[ $ordinal -eq 0 ]]; then run-postgresql-master; else run-postgresql-slave; fi;"
],

"ports": [
{
"containerPort": 5432,
Expand Down Expand Up @@ -306,7 +326,7 @@
"memory": "256Mi"
}
},
"imagePullPolicy": "IfNotPresent",
"imagePullPolicy": "Always",
"securityContext": {
"capabilities": {},
"privileged": false
Expand Down Expand Up @@ -371,7 +391,7 @@
"containers": [
{
"name": "iqss-dataverse-solr",
"image": "iqss-dataverse-solr",
"image": "iqss-dataverse-solr:latest",
"ports": [
{
"containerPort": 8983,
Expand All @@ -380,10 +400,10 @@
],
"resources": {
"limits": {
"memory": "256Mi"
"memory": "1024Mi"
}
},
"imagePullPolicy": "IfNotPresent",
"imagePullPolicy": "Always",
"securityContext": {
"capabilities": {},
"privileged": false
Expand Down
30 changes: 28 additions & 2 deletions scripts/installer/glassfish-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,20 @@ fi

###
# Set up the data source for the timers
./asadmin $ASADMIN_OPTS set configs.config.server-config.ejb-container.ejb-timer-service.timer-datasource=jdbc/VDCNetDS

if [ -z "$MY_POD_NAME" ]
then
./asadmin $ASADMIN_OPTS set configs.config.server-config.ejb-container.ejb-timer-service.timer-datasource=jdbc/VDCNetDS

else
echo $MY_POD_NAME
if [ $MY_POD_NAME == "dataverse-glassfish-0" ]
then
./asadmin $ASADMIN_OPTS set configs.config.server-config.ejb-container.ejb-timer-service.timer-datasource=jdbc/VDCNetDS
echo "Only I Run The Jobs"
fi
fi


###
# Add the necessary JVM options:
Expand All @@ -216,7 +229,20 @@ fi
./asadmin $ASADMIN_OPTS create-jvm-options "\-Ddoi.username=apitest"
./asadmin $ASADMIN_OPTS create-jvm-options "\-Ddoi.baseurlstring=https\://ezid.cdlib.org"
# "I am the timer server" option:
./asadmin $ASADMIN_OPTS create-jvm-options "-Ddataverse.timerServer=true"

if [ -z "$MY_POD_NAME" ]
then
./asadmin $ASADMIN_OPTS create-jvm-options "-Ddataverse.timerServer=true"

else
if [ $MY_POD_NAME == "dataverse-glassfish-0" ]
then
./asadmin $ASADMIN_OPTS create-jvm-options "-Ddataverse.timerServer=true"

fi
fi



# enable comet support
./asadmin $ASADMIN_OPTS set server-config.network-config.protocols.protocol.http-listener-1.http.comet-support-enabled="true"
Expand Down

0 comments on commit ae115fd

Please sign in to comment.