Skip to content

Commit

Permalink
Merge branch 'master' into ExportExceptionFixesForRoundTrip
Browse files Browse the repository at this point in the history
  • Loading branch information
jcschaff committed Sep 18, 2023
2 parents d9b88a5 + 0efa9a3 commit 2eed8fc
Show file tree
Hide file tree
Showing 161 changed files with 12,217 additions and 595 deletions.
2 changes: 0 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@ COPY ./vcell-client/target/vcell-client-0.0.1-SNAPSHOT.jar \
./vcell-admin/target/maven-jars/*.jar \
./vcell-cli/target/vcell-cli-0.0.1-SNAPSHOT.jar \
./vcell-cli/target/maven-jars/*.jar \
./non-maven-java-libs/com/oracle/ojdbc6/11.2.0.4/ojdbc6-11.2.0.4.jar \
./non-maven-java-libs/com/oracle/ucp/11.2.0.4/ucp-11.2.0.4.jar \
./non-maven-java-libs/org/sbml/libcombine/libCombineLinux64/0.2.7/libCombineLinux64-0.2.7.jar \
/usr/local/app/vcell/lib/

Expand Down
4 changes: 2 additions & 2 deletions README_Debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ If VCell client simulation list view says 'hasdata=no' but there is data
-----Find sim id (click 'i' button when sim is selected) -> theSimID
-----log into vcell-node1 (or any node not in DMZ, not vcellapi or vcellapi-beta)
-----Check data exists, give cmd " ls /share/apps/vcell3/users/boris/SimID_theSimID* "
-----open oracle db tool (toad,sql,squirrel), log into vcell@vcell-db.cam.uchc.edu and do query " select * from vc_simulationjob where simref=theSimID; "
-----open oracle db tool (toad,sql,squirrel), log into vcell@vcell-oracle.cam.uchc.edu and do query " select * from vc_simulationjob where simref=theSimID; "
-----If the query column 'hasdata' is blank then do update " update vc_simulationJob set hasdata='Y' where simref=theSimID; " and " commit; "
-----log into vcellapi(Rel) or vcellapi-beta(Alpha)
-----Restart VCell docker scheduler service with cmd " sudo docker service update --force --detach=false vcell{rel,alpha}_sched "
Expand Down Expand Up @@ -131,7 +131,7 @@ client local run alpha
-Dvcell.server.dbPassword=
-Dvcell.server.dbUserid=vcell
-Dvcell.server.dbDriverName=oracle.jdbc.driver.OracleDriver
-Dvcell.server.dbConnectURL=jdbc:oracle:thin:@vcell-db.cam.uchc.edu:1521:vcelldborcl
-Dvcell.server.dbConnectURL=jdbc:oracle:thin:@vcell-oracle.cam.uchc.edu:1521:ORCLPDB1
-Dvcell.server.id=alpha\_7.0.0\_51
-Dvcell.mongodb.database=TEST
-Dvcell.mongodb.host.internal=vcellapi-beta.cam.uchc.edu
Expand Down
2 changes: 1 addition & 1 deletion README_flow_control.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ all solvers call vcell-solver/VCellMessaging/src/SimulationMessaging.cpp.setWork
--SimulationDispatcherEngine.onworkerEvent(...)
---SimulationStateMachine.onWorkerEvent(...)
----SimulationDatabaseDirect.updateSimulationJobStatus(...)
-----AdminDBToplevel.updateSimulationJobStatus(...) (**updates Oracle** real database host vcell-db.cam.uchc.edu, NOT vcell-db container)
-----AdminDBToplevel.updateSimulationJobStatus(...) (**updates Oracle** real database host vcell-oracle.cam.uchc.edu, NOT vcell-db container)
----StatusMessage.sendToClient(...) (sends to AMQint container clientStatus topic)
**activemqint container**
-recieves sim status message on the 'clientStatus' topic
Expand Down
20 changes: 10 additions & 10 deletions README_orphan.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,21 +79,21 @@ vcellNagios.sh calls Rel web service https://vcellapi/health?check={login,sim}
**DBBackupAndClean**
vcell-node1:/opt/build/frm/dbbackupclean
//Normal, without debug
java -cp ./maven-jars/*:./vcell-server-0.0.1-SNAPSHOT.jar:./ojdbc6-11.2.0.4.jar:./ucp-11.2.0.4.jar:./vcell-oracle-0.0.1-SNAPSHOT.jar -Dvcell.server.dbDriverName=oracle.jdbc.driver.OracleDriver cbit.vcell.modeldb.DBBackupAndClean delsimsdisk vcell-db vcell /opt/build/frm/dbpw.txt vcelldborcl.cam.uchc.edu /tmp /share/apps/vcell3/users
java -cp ./maven-jars/*:./vcell-server-0.0.1-SNAPSHOT.jar:./ojdbc6-11.2.0.4.jar:./ucp-11.2.0.4.jar:./vcell-oracle-0.0.1-SNAPSHOT.jar -Dvcell.server.dbDriverName=oracle.jdbc.driver.OracleDriver cbit.vcell.modeldb.DBBackupAndClean delsimsdisk vcell-oracle vcell /opt/build/frm/dbpw.txt ORCLPDB1 /tmp /share/apps/vcell3/users

//Normal, without debug, single user only
java -Xms200m -Xmx1500m -cp ./maven-jars/*:./vcell-server-0.0.1-SNAPSHOT.jar:./ojdbc6-11.2.0.4.jar:./ucp-11.2.0.4.jar:./vcell-oracle-0.0.1-SNAPSHOT.jar -Dvcell.server.dbDriverName=oracle.jdbc.driver.OracleDriver cbit.vcell.modeldb.DBBackupAndClean delsimsdisk2 vcell-db vcell /opt/build/frm/dbpw.txt vcelldborcl.cam.uchc.edu /tmp /share/apps/vcell3/users Juliajessica
java -Xms200m -Xmx1500m -cp ./maven-jars/*:./vcell-server-0.0.1-SNAPSHOT.jar:./ojdbc6-11.2.0.4.jar:./ucp-11.2.0.4.jar:./vcell-oracle-0.0.1-SNAPSHOT.jar -Dvcell.server.dbDriverName=oracle.jdbc.driver.OracleDriver cbit.vcell.modeldb.DBBackupAndClean delsimsdisk2 vcell-oracle vcell /opt/build/frm/dbpw.txt ORCLPDB1 /tmp /share/apps/vcell3/users Juliajessica

//With debug (note: eclipse debug config: vcell-server,vcell-node1,30301)
java -agentlib:jdwp=transport=dt_socket,server=y,address=30301,suspend=y -cp ./maven-jars/*:./vcell-server-0.0.1-SNAPSHOT.jar:./ojdbc6-11.2.0.4.jar:./ucp-11.2.0.4.jar:./vcell-oracle-0.0.1-SNAPSHOT.jar -Dvcell.server.dbDriverName=oracle.jdbc.driver.OracleDriver cbit.vcell.modeldb.DBBackupAndClean delsimsdisk vcell-db vcell /opt/build/frm/dbpw.txt vcelldborcl.cam.uchc.edu /tmp /share/apps/vcell3/users
java -agentlib:jdwp=transport=dt_socket,server=y,address=30301,suspend=y -cp ./maven-jars/*:./vcell-server-0.0.1-SNAPSHOT.jar:./ojdbc6-11.2.0.4.jar:./ucp-11.2.0.4.jar:./vcell-oracle-0.0.1-SNAPSHOT.jar -Dvcell.server.dbDriverName=oracle.jdbc.driver.OracleDriver cbit.vcell.modeldb.DBBackupAndClean delsimsdisk vcell-oracle vcell /opt/build/frm/dbpw.txt ORCLPDB1 /tmp /share/apps/vcell3/users

//DBBackupAndClean Scheduled Task (vcell-db.cam.uchc.edu->'scheduled task'->'Task Scheduler Library'->cleanAndBackupDB->properties->Actions->'Edit...')
//DBBackupAndClean Scheduled Task (vcell-oracle.cam.uchc.edu->'scheduled task'->'Task Scheduler Library'->cleanAndBackupDB->properties->Actions->'Edit...')
Program/script: "C:\Program Files (x86)\Java\jre1.8.0_121\bin\java.exe"
Add arguments: -jar DBBackupAndClean_Ampli.jar cleanandbackup vcell-db vcell cbittech vcelldborcl.cam.uchc.edu \\cfs05\vcell\temp \\cfs03\shared\archive\vcell\VCDBdumps
Add arguments: -jar DBBackupAndClean_Ampli.jar cleanandbackup vcell-oracle vcell password ORCLPDB1 \\cfs05\vcell\temp \\cfs03\shared\archive\vcell\VCDBdumps
Start in: C:\fromDBS3


**Delete large listener.log file**
**Delete large listener.log file - obsolete - oracle now containerized running on vcell-oracle machine **
log in to vcell-db (a windows host) as admin user using 'Remote Desktop Connection'
start 'cmd' window as system administrator (start->'command prompt->'rt-click, 'run as administrator')
//make sure of path to listener log
Expand Down Expand Up @@ -130,22 +130,22 @@ NOTE: enter following after 'java' for debug (-agentlib:jdwp=transport=dt_socket
4a. Run to generate .csv report, expects vcellDB password to be enetered on console

java -cp ./dbbackupclean/ojdbc6-11.2.0.4.jar:./dbbackupclean/ucp-11.2.0.4.jar:./dbbackupclean/vcell-oracle-0.0.1-SNAPSHOT.jar:./cbit_vcell_tools_IonItems.jar
cbit.vcell.tools.IonItems 'jdbc:oracle:thin:@vcell-db.cam.uchc.edu:1521:vcelldborcl' '/share/apps/vcell3/users' publicmodelwithsims false | tee ./pubModelsSimIdOnly.txt
cbit.vcell.tools.IonItems 'jdbc:oracle:thin:@vcell-oracle.cam.uchc.edu:1521:ORCLPDB1' '/share/apps/vcell3/users' publicmodelwithsims false | tee ./pubModelsSimIdOnly.txt

4b. Run to save vcml of published modesl with sims that have no data or exceptions removed from vcml

java -cp ./dbbackupclean/ojdbc6-11.2.0.4.jar:./dbbackupclean/ucp-11.2.0.4.jar:./dbbackupclean/vcell-oracle-0.0.1-SNAPSHOT.jar:./cbit_vcell_tools_IonItems.jar:./maven- jars/jhdf5_2.10-2.9.jar
-Djava.library.path="./natlibs" cbit.vcell.tools.IonItems "jdbc:oracle:thin:@vcell-db.cam.uchc.edu:1521:vcelldborcl" "/share/apps/vcell3/users" publishedmodelvcml /share/apps/vcell3/users/ionvcml 0 0
-Djava.library.path="./natlibs" cbit.vcell.tools.IonItems "jdbc:oracle:thin:@vcell-oracle.cam.uchc.edu:1521:ORCLPDB1" "/share/apps/vcell3/users" publishedmodelvcml /share/apps/vcell3/users/ionvcml 0 0

4c. Run to read vcml saved from 4b and compare to vcml from db and print the sims that had to be removed

java -cp ./dbbackupclean/ojdbc6-11.2.0.4.jar:./dbbackupclean/ucp-11.2.0.4.jar:./dbbackupclean/vcell-oracle-0.0.1-SNAPSHOT.jar:./cbit_vcell_tools_IonItems.jar:./maven-jars/jhdf5_2.10-2.9.jar
-Djava.library.path="./natlibs" cbit.vcell.tools.IonItems "jdbc:oracle:thin:@vcell-db.cam.uchc.edu:1521:vcelldborcl" /share/apps/vcell3/users/ionvcml publishedmodelvcmldiff
-Djava.library.path="./natlibs" cbit.vcell.tools.IonItems "jdbc:oracle:thin:@vcell-oracle.cam.uchc.edu:1521:ORCLPDB1" /share/apps/vcell3/users/ionvcml publishedmodelvcmldiff
4d. Run to save vcml from TestSuit

java -cp ./dbbackupclean/ojdbc6-11.2.0.4.jar:./dbbackupclean/ucp-11.2.0.4.jar:./dbbackupclean/vcell-oracle-0.0.1-SNAPSHOT.jar:./cbit_vcell_tools_IonItems.jar:./maven-jars/jhdf5_2.10-2.9.jar
-Djava.library.path="./natlibs" cbit.vcell.tools.IonItems "jdbc:oracle:thin:@vcell-db.cam.uchc.edu:1521:vcelldborcl" /share/apps/vcell3/users/ionts testsuitemodelvcml
-Djava.library.path="./natlibs" cbit.vcell.tools.IonItems "jdbc:oracle:thin:@vcell-oracle.cam.uchc.edu:1521:ORCLPDB1" /share/apps/vcell3/users/ionts testsuitemodelvcml

***----------------------------------------------------------------------------------------------------------***

Expand Down
71 changes: 71 additions & 0 deletions docker/README_Oracle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# grab dump from VCell-db.cam.uchc.edu, windows 2008, Oracle 11g enterprise
### character set is WE8MSWIN1252

### export from vcell-db using datapump for vcell schema
in vcell-db database, named directory ```E_DATA_PUMP_DIR``` maps to ```e:\db```

scn = 1430710053 (compute from sql below)
```sql
select current_scn from v$database
```
expdp system/<<password>>@vcelldborcl directory=E_DATA_PUMP_DIR dumpfile=vcelldb_dump_2023_08_19.dmp logfile=vcelldb_dump_2023_08_19.log schemas=vcell flashback_scn=1430710053

# build new oracle database image on vcell-oracle.cam.uchc.edu

### check out github repo for oracle docker containers
### download ```LINUX.X64_193000_db_home.zip``` and install in ./19.3.0/ directory
### build the container (from docker-images/OracleDatabase/SingleInstance/)

```bash
./buildContainerImage.sh -s -v 19.3.0 -o '--build-arg SLIMMING=false'
```
### tag and push image to container repository
```bash
docker tag <<image name>> ghcr.io/virtualcell/oracle-database:19.3.0-se2
docker push ghcr.io/virtualcell/oracle-database:19.3.0-se2
```
## create /data/oradata, /data/backup directories and set permissions to allow container oracle/dba rw access.
## running the container on vcell-oracle (for the first time)
```bash
sudo docker run --detach --restart=always \
--name oracle-database \
-p 1521:1521 -p 5500:5500 \
--ulimit nofile=1024:65536 --ulimit nproc=2047:16384 --ulimit stack=10485760:33554432 --ulimit memlock=3221225472 \
-e ORACLE_SID=ORCLCDB \
-e ORACLE_PDB=ORCLPDB1 \
-e ORACLE_PWD=<<password>> \
-e INIT_CPU_COUNT=4 \
-e ORACLE_EDITION=standard \
-e ENABLE_TCPS=false \
-e ORACLE_CHARACTERSET=WE8MSWIN1252 \
-e ENABLE_ARCHIVELOG=true \
-v /data/oradata:/opt/oracle/oradata \
-v /data/backup:/opt/oracle/backup \
ghcr.io/virtualcell/oracle-database:19.3.0-se2
```
```bash
sudo docker logs -f oracle-database
```
## register directory object EXT_DATA_PUMP_DIR for /opt/oracle/backup (host /data/backup)
```sql
create or replace directory EXT_DATA_PUMP_DIR as '/opt/oracle/backup';
```
## add user vcell (((Command doesn't work)))
sqlplus system/<<password>>@ORCLPDB1
```sql
create directory EXT_DATA_PUMP_DIR as '/opt/oracle/backup';
```
## run the import
```bash
docker exec -it oracle-database /bin/bash
impdp system/<<password>>@ORCLPDB1 schemas=vcell table_exists_action=REPLACE directory=EXT_DATA_PUMP_DIR dumpfile=FRMDEV2ORCL_VCELL_2023_08_19_17_05_08.DMP logfile=FRMDEV2ORCL_VCELL_2023_08_19_17_05_08.log
impdp system/<<password>>@ORCLPDB1 schemas=vcell table_exists_action=REPLACE directory=EXT_DATA_PUMP_DIR dumpfile=FRMDEV2ORCL_VCELL_2023_08_19_17_05_08.DMP logfile=FRMDEV2ORCL_VCELL_2023_08_19_17_05_08.log.3
```
2 changes: 1 addition & 1 deletion docker/README_serviceInfo.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ nmym8qspowiu1d850ok9vwtk2 vcell-node4.cam.uchc.edu Ready A
kn3y3t1rw8skyua80j841ohng vcellapi-beta.cam.uchc.edu Ready Active Reachable 18.03.0-ce
```

## vcell-db.cam.uchc.edu, NOT Docker, (VCell database)
## vcell-oracle.cam.uchc.edu, NOT Docker, (VCell database)
Oracle database, has all models, sim status, all user data, everything

## vcell-docker.cam.uchc.edu, NOT Swarm node, (VCell docker registry) [details](build/README_Registry.md)
Expand Down
8 changes: 5 additions & 3 deletions docker/build/Dockerfile-admin-dev
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@ FROM ubuntu:18.04
RUN apt-get -y update && \
apt-get install -y curl openjdk-8-jre dnsutils && \
mkdir -p /usr/local/app/lib


RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata
RUN unlink /etc/localtime || true
RUN ln -s /usr/share/zoneinfo/America/New_York /etc/localtime

WORKDIR /usr/local/app

COPY ./vcell-server/target/vcell-server-0.0.1-SNAPSHOT.jar \
./vcell-server/target/maven-jars/*.jar \
./vcell-oracle/target/vcell-oracle-0.0.1-SNAPSHOT.jar \
./vcell-oracle/target/maven-jars/*.jar \
./non-maven-java-libs/com/oracle/ojdbc6/11.2.0.4/ojdbc6-11.2.0.4.jar \
./non-maven-java-libs/com/oracle/ucp/11.2.0.4/ucp-11.2.0.4.jar \
./vcell-api/target/vcell-api-0.0.1-SNAPSHOT.jar \
./vcell-api/target/maven-jars/*.jar \
./vcell-admin/target/vcell-admin-0.0.1-SNAPSHOT.jar \
Expand Down
9 changes: 6 additions & 3 deletions docker/build/Dockerfile-api-dev
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@ FROM ubuntu:18.04
RUN apt-get -y update && \
apt-get install -y curl openjdk-8-jre dnsutils && \
mkdir -p /usr/local/app/lib


RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata
RUN unlink /etc/localtime || true
RUN ln -s /usr/share/zoneinfo/America/New_York /etc/localtime

WORKDIR /usr/local/app

COPY ./vcell-server/target/vcell-server-0.0.1-SNAPSHOT.jar \
./vcell-server/target/maven-jars/*.jar \
./vcell-oracle/target/vcell-oracle-0.0.1-SNAPSHOT.jar \
./vcell-oracle/target/maven-jars/*.jar \
./non-maven-java-libs/com/oracle/ojdbc6/11.2.0.4/ojdbc6-11.2.0.4.jar \
./non-maven-java-libs/com/oracle/ucp/11.2.0.4/ucp-11.2.0.4.jar \
./vcell-api/target/vcell-api-0.0.1-SNAPSHOT.jar \
./vcell-api/target/maven-jars/*.jar \
./lib/
Expand Down Expand Up @@ -62,6 +64,7 @@ ENTRYPOINT java \
-Dvcell.server.dbDriverName="${dbdriver}" \
-Dvcell.server.dbUserid="${dbuser}" \
-Dvcell.db.pswdfile="${dbpswdfile}" \
-Duser.timezone="${userTimezone}" \
-Dvcell.jms.int.host.internal="${jmshost_int_internal}" \
-Dvcell.jms.int.port.internal="${jmsport_int_internal}" \
-Dvcell.jms.blobMessageUseMongo=true \
Expand Down
4 changes: 4 additions & 0 deletions docker/build/Dockerfile-batch-dev
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ RUN apt-get -y update && \
# wget --no-check-certificate https://download.opensuse.org/repositories/home:/fbergman:/COPASI/xUbuntu_17.10/amd64/python-copasi_4.22.170-1_amd64.deb && \
# gdebi -n -q python-copasi_4.22.170-1_amd64.deb

RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata
RUN unlink /etc/localtime || true
RUN ln -s /usr/share/zoneinfo/America/New_York /etc/localtime

RUN mkdir -p /usr/local/app/localsolvers && ln -s /vcellbin /usr/local/app/localsolvers/linux64
WORKDIR /usr/local/app

Expand Down
8 changes: 5 additions & 3 deletions docker/build/Dockerfile-data-dev
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,18 @@ RUN mkdir -p /usr/local/app && \
apk update && \
apk add --no-cache ttf-dejavu && \
apk add openssh-client && \
apk add screen
apk add screen tzdata

ENV TZ=America/New_York
RUN unlink /etc/localtime || true
RUN ln -s /usr/share/zoneinfo/America/New_York /etc/localtime

WORKDIR /usr/local/app

COPY ./vcell-server/target/vcell-server-0.0.1-SNAPSHOT.jar \
./vcell-server/target/maven-jars/*.jar \
./vcell-oracle/target/vcell-oracle-0.0.1-SNAPSHOT.jar \
./vcell-oracle/target/maven-jars/*.jar \
./non-maven-java-libs/com/oracle/ojdbc6/11.2.0.4/ojdbc6-11.2.0.4.jar \
./non-maven-java-libs/com/oracle/ucp/11.2.0.4/ucp-11.2.0.4.jar \
./lib/


Expand Down
8 changes: 5 additions & 3 deletions docker/build/Dockerfile-db-dev
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,18 @@ FROM openjdk:8u151-jdk-alpine3.7

RUN mkdir -p /usr/local/app && \
apk update && \
apk add screen
apk add screen tzdata

ENV TZ=America/New_York
RUN unlink /etc/localtime || true
RUN ln -s /usr/share/zoneinfo/America/New_York /etc/localtime

WORKDIR /usr/local/app

COPY ./vcell-server/target/vcell-server-0.0.1-SNAPSHOT.jar \
./vcell-server/target/maven-jars/*.jar \
./vcell-oracle/target/vcell-oracle-0.0.1-SNAPSHOT.jar \
./vcell-oracle/target/maven-jars/*.jar \
./non-maven-java-libs/com/oracle/ojdbc6/11.2.0.4/ojdbc6-11.2.0.4.jar \
./non-maven-java-libs/com/oracle/ucp/11.2.0.4/ucp-11.2.0.4.jar \
./lib/


Expand Down
8 changes: 5 additions & 3 deletions docker/build/Dockerfile-sched-dev
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,18 @@ RUN mkdir -p /usr/local/app && \
apk update && \
apk add openssh-client && \
apk add curl && \
apk add screen
apk add screen tzdata

ENV TZ=America/New_York
RUN unlink /etc/localtime || true
RUN ln -s /usr/share/zoneinfo/America/New_York /etc/localtime

WORKDIR /usr/local/app

COPY ./vcell-server/target/vcell-server-0.0.1-SNAPSHOT.jar \
./vcell-server/target/maven-jars/*.jar \
./vcell-oracle/target/vcell-oracle-0.0.1-SNAPSHOT.jar \
./vcell-oracle/target/maven-jars/*.jar \
./non-maven-java-libs/com/oracle/ojdbc6/11.2.0.4/ojdbc6-11.2.0.4.jar \
./non-maven-java-libs/com/oracle/ucp/11.2.0.4/ucp-11.2.0.4.jar \
./lib/


Expand Down
6 changes: 5 additions & 1 deletion docker/build/Dockerfile-submit-dev
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ FROM openjdk:8u151-jdk-alpine3.7
RUN mkdir -p /usr/local/app && \
apk update && \
apk add openssh-client && \
apk add screen
apk add screen tzdata

ENV TZ=America/New_York
RUN unlink /etc/localtime || true
RUN ln -s /usr/share/zoneinfo/America/New_York /etc/localtime

WORKDIR /usr/local/app

Expand Down
6 changes: 4 additions & 2 deletions docker/build/Dockerfile-web-dev
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@ RUN apt-get -y update && \
apt-get install -y curl openjdk-8-jre wget dnsutils && \
mkdir -p /usr/local/app/lib

RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata
RUN unlink /etc/localtime || true
RUN ln -s /usr/share/zoneinfo/America/New_York /etc/localtime

WORKDIR /usr/local/app

COPY ./vcell-web/target/vcell-web-0.0.1-SNAPSHOT.jar \
./vcell-web/target/maven-jars/*.jar \
./vcell-oracle/target/vcell-oracle-0.0.1-SNAPSHOT.jar \
./vcell-oracle/target/maven-jars/*.jar \
./non-maven-java-libs/com/oracle/ojdbc6/11.2.0.4/ojdbc6-11.2.0.4.jar \
./non-maven-java-libs/com/oracle/ucp/11.2.0.4/ucp-11.2.0.4.jar \
./lib/


Expand Down
1 change: 1 addition & 0 deletions docker/database/backup_scripts/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
password.txt
15 changes: 15 additions & 0 deletions docker/database/backup_scripts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## Nightly Oracle database backups

### Data Pump dump to /data/backup
cron job runs `archivedb.sh` every 1:00am as `root`

```
0 1 * * * /data/backup/scripts/archivedb.sh >> /data/backup/backup.cron-log 2>&1
```

### Compress and Archive to ~vcell/database_backups
cron job runs `move_files_to_vcellhome.sh` every 9:00pm as `vcell`

```
0 21 * * * /data/backup/scripts/move_files_to_vcellhome.sh >> /data/backup/move_files.cron-log 2>&1
```
11 changes: 11 additions & 0 deletions docker/database/backup_scripts/archivedb.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

# run export of oracle 19c database running in the container named 'oracle-database' using the Data Pump 'expdp' command
sudo docker exec oracle-database /opt/oracle/backup/scripts/run.sh 2>&1 | tee -a /data/backup/archivedb_$(date +%Y_%m_%d_%H_%M_%S).log

# change permission so that vcell can move them in a separate script and cron job
chmod 666 /data/backup/*.log
chmod 666 /data/backup/*.dmp

# copy move dump file to remote storage
echo "vcell runs separate script to archive to ~/vcell/database_backups"
29 changes: 29 additions & 0 deletions docker/database/backup_scripts/move_files_to_vcellhome.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash

echo ""
echo "========= starting move of database backups at $(date) ========"

cd /data/backup || echo "failed to cd to /data/backup" || exit 1

echo ""
echo "---- before compressing/moving files ----"
ls -oth
echo "-----------------------------------------"
echo ""

echo "compressing all .dmp files in /data/backup"
gzip ./*.dmp

# move
echo "moving all .log and .dmp.gz files to ~/vcell/database_backups"
mv /data/backup/*.log ~vcell/database_backups
mv /data/backup/*.dmp.gz ~vcell/database_backups

echo ""
echo "---- after compressing/moving files ----"
ls -oth
echo "-----------------------------------------"
echo ""

echo "========== done moving files $(date) ========================"
echo ""
3 changes: 3 additions & 0 deletions docker/database/backup_scripts/newscn.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
set heading off
Select CURRENT_SCN from v$database;
quit
Loading

0 comments on commit 2eed8fc

Please sign in to comment.