Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Demo docker system and bug fixing #194

Merged
merged 28 commits into from
Jul 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
91ca4a2
fixed path shared folder in docker compose conf
saramonzon Jul 18, 2023
b2948d9
added try catch in samba check testing conf
saramonzon Jul 20, 2023
0d324f6
fixed apache group issues and log path error in install.sh
saramonzon Jul 20, 2023
330111a
improved error message when proper user id is not found in sampleshee…
saramonzon Jul 20, 2023
0b40200
rm docker param from install script
saramonzon Jul 20, 2023
7fe3d08
added option to provide downloaded demo data to docker install script
saramonzon Jul 20, 2023
34c9014
added new param docker install with path to demo data
saramonzon Jul 24, 2023
f5bdbf7
Revert "rm docker param from install script"
saramonzon Jul 24, 2023
d71dc59
fixed bug in sed install.sh
saramonzon Jul 25, 2023
7ddbf3c
fix logging info in crontab update run
saramonzon Jul 25, 2023
148a6c1
fixed and added correct configuration run test
saramonzon Jul 25, 2023
e553fc7
removed crontab add from install.sh
saramonzon Jul 25, 2023
4cacfe8
fixed output_label to false if param not provided
saramonzon Jul 25, 2023
eb7b0d9
removed unused import
saramonzon Jul 25, 2023
44e9f3f
deleted unused file in conf, created test folder with samplesheet tes…
saramonzon Jul 25, 2023
f3aeb44
fixed service api when no context is passed to serializer
saramonzon Jul 26, 2023
9667cf0
fixed first install tables configuration for service and resolution s…
saramonzon Jul 26, 2023
803fc37
added json with test data for docker system
saramonzon Jul 26, 2023
2e09028
changed name and removed blank lines in test samplesheet
saramonzon Jul 26, 2023
874c468
error in resolution states first install tables
saramonzon Jul 26, 2023
c36401c
changed names in documents folder to snake case, added tests to rsync…
saramonzon Jul 26, 2023
980b801
changed order in docker install sh for dummy data import
saramonzon Jul 27, 2023
84e7f14
added again first install tables in docker install sh
saramonzon Jul 27, 2023
3e9e3c6
fixing minor bugs docker install
saramonzon Jul 27, 2023
fa5dc2e
added species in test_data.json
saramonzon Jul 27, 2023
1995c8c
removed organization name from wetlab index
saramonzon Jul 27, 2023
3c46617
docker system working with test data
saramonzon Jul 27, 2023
54f0943
added collection kit values to admin
saramonzon Jul 27, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ RUN apt-get update && apt-get upgrade -y
RUN apt-get install -y \
git wget lsb-core lsb-release

RUN git clone https://github.com/BU-ISCIII/iskylims.git /srv/iskylims
RUN git clone https://github.com/saramonzon/iskylims.git /srv/iskylims
WORKDIR /srv/iskylims
RUN git checkout develop

Expand All @@ -23,4 +23,4 @@ ENV PYTHONPATH="/opt/iskylims/virtualenv/lib/python3.10/site-packages:${PYTHONPA
# Expose
EXPOSE 8001
# Start the application
CMD ["python3", "/opt/iskylims/manage.py", "runserver", "0:8001"]
CMD ["python3", "/opt/iskylims/manage.py", "runserver", "0:8001"]
130 changes: 84 additions & 46 deletions conf/first_install_tables.json
Original file line number Diff line number Diff line change
Expand Up @@ -1333,48 +1333,6 @@
"generated_at": "2023-01-23T17:15:24.556"
}
},
{
"model": "drylab.resolutionstates",
"pk": 1,
"fields": {
"state_value": "Recorded"
}
},
{
"model": "drylab.resolutionstates",
"pk": 2,
"fields": {
"state_value": "In Progress"
}
},
{
"model": "drylab.resolutionstates",
"pk": 3,
"fields": {
"state_value": "Delivery"
}
},
{
"model": "drylab.resolutionstates",
"pk": 4,
"fields": {
"state_value": "Cancelled"
}
},
{
"model": "drylab.resolutionstates",
"pk": 5,
"fields": {
"state_value": "Rejected"
}
},
{
"model": "drylab.resolutionstates",
"pk": 6,
"fields": {
"state_value": "Queued"
}
},
{
"model": "wetlab.poolstates",
"pk": 1,
Expand Down Expand Up @@ -1803,12 +1761,20 @@
},
{
"model": "wetlab.runconfigurationtest",
"pk": 4,
"pk": 2,
"fields": {
"run_test_name": "NextSeq_Test",
"run_test_name": "NextSeq_Test_001",
"run_test_folder": "NextSeq_Test"
}
},
{
"model": "wetlab.runconfigurationtest",
"pk": 3,
"fields": {
"run_test_name": "NovaSeq_Test_001",
"run_test_folder": "NovaSeq_Test"
}
},
{
"model": "wetlab.configsetting",
"pk": 1,
Expand Down Expand Up @@ -20050,10 +20016,82 @@
"model": "drylab.servicestate",
"pk": 8,
"fields": {
"state_value": "waiting_information",
"state_display": "Waiting Information",
"state_value": "on_hold",
"state_display": "On hold",
"description": "Service is on hold, waiting for user provides more information",
"show_in_stats": true
}
},
{
"model": "drylab.resolutionstates",
"pk": 1,
"fields": {
"state_value": "recorded",
"state_display": "Recorded",
"description": "Resolution has been successful recorded in iSkyLIMS"
}
},
{
"model": "drylab.resolutionstates",
"pk": 2,
"fields": {
"state_value": "approved",
"state_display": "Approved",
"description": "Resolution request has been accepted"
}
},
{
"model": "drylab.resolutionstates",
"pk": 3,
"fields": {
"state_value": "rejected",
"state_display": "Rejected",
"description": "Resolution can not be handle because is not in porfoloio or for any other reason"
}
},
{
"model": "drylab.resolutionstates",
"pk": 4,
"fields": {
"state_value": "queued",
"state_display": "Queued",
"description": "Resolution is the the list, waiting for a bioinformatic to be handled"
}
},
{
"model": "drylab.resolutionstates",
"pk": 5,
"fields": {
"state_value": "in_progress",
"state_display": "In Progress",
"description": "Bioinformatic is working on the Resolution"
}
},
{
"model": "drylab.resolutionstates",
"pk": 6,
"fields": {
"state_value": "delivered",
"state_display": "Delivered",
"description": "Resolution wascompleted and results were sent to the user"
}
},
{
"model": "drylab.resolutionstates",
"pk": 7,
"fields": {
"state_value": "archived",
"state_display": "Archived",
"description": null
}
},
{
"model": "drylab.resolutionstates",
"pk": 8,
"fields": {
"state_value": "on_hold",
"state_display": "On hold",
"description": "Resolution is on hold, waiting for user provides more information"
}
}
]
20 changes: 0 additions & 20 deletions conf/logging_test_config.ini

This file was deleted.

2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ services:
- /etc/localtime:/etc/localtime:ro
- /usr/share/zoneinfo:/usr/share/zoneinfo
- ngs_data_vol:/mnt
command: '-S -s "ngs_data;/mnt;yes;yes;no;samba_user;none;none;ngs data samba share" -u "samba_user;sambapasswd" -p'
command: '-S -s "ngs_data;/mnt/test_ngs_data;yes;yes;no;samba_user;none;none;ngs data samba share" -u "samba_user;sambapasswd" -p'

app:
build: .
Expand Down
96 changes: 90 additions & 6 deletions docker_install.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,81 @@
#!/usr/bin/bash

ISKYLIMS_VERSION="3.0.0"

usage() {
cat << EOF
This script install and upgrade the iskylims app.

usage : $0 --demo_data
Optional input data:
--demo_data | provide already dowloaded demo data from zenodo


Examples:
Install demo docker system
bash $0

Provide already downloaded data from zenodo (compressed)
bash $0 --demo_data /path/to/iskylims_demo_data.tar.gz
EOF
}

# translate long options to short
reset=true

for arg in "$@"
do
if [ -n "$reset" ]; then
unset reset
set -- # this resets the "$@" array so we can rebuild it
fi
case "$arg" in
# OPTIONAL
--demo_data) set -- "$@" -d ;;

# ADITIONAL
--help) set -- "$@" -h ;;
--version) set -- "$@" -v ;;
# PASSING VALUE IN PARAMETER
*) set -- "$@" "$arg" ;;
esac
done

# SETTING DEFAULT VALUES
demo_data=false

# PARSE VARIABLE ARGUMENTS WITH getops
options=":d:vh"
while getopts $options opt; do
case $opt in
d)
demo_data=$OPTARG
;;
h )
usage
exit 1
;;
v )
echo $ISKYLIMS_VERSION
exit 1
;;
\?)
echo "Invalid Option: -$OPTARG" 1>&2
usage
exit 1
;;
: )
echo "Option -$OPTARG requires an argument." >&2
exit 1
;;
* )
echo "Unimplemented option: -$OPTARG" >&2;
exit 1
;;
esac
done
shift $((OPTIND-1))

echo "Deploying test containers..."
docker compose build --no-cache
docker compose up -d
Expand All @@ -12,22 +88,30 @@ docker exec -it iskylims_app python3 manage.py migrate
docker exec -it iskylims_app python3 manage.py makemigrations django_utils core wetlab drylab
docker exec -it iskylims_app python3 manage.py migrate

echo "Loading in database initial data"
docker exec -it iskylims_app python3 manage.py loaddata conf/first_install_tables.json

echo "Creating super user "
docker exec -it iskylims_app python3 manage.py createsuperuser

echo "Loading in database initial data"
docker exec -it iskylims_app python3 manage.py loaddata conf/first_install_tables.json
docker exec -it iskylims_app python3 manage.py loaddata test/test_data.json

echo "Download testing files and copy it to samba container"
wget https://zenodo.org/record/8091169/files/iskylims_demo_data.tar.gz
docker cp iskylims_demo_data.tar.gz samba:/mnt
if [ "$demo_data" == "false" ];then
wget https://zenodo.org/record/8091169/files/iskylims_demo_data.tar.gz
demo_data="./iskylims_demo_data.tar.gz"
fi
docker cp $demo_data samba:/mnt
docker exec -it samba tar -xf /mnt/iskylims_demo_data.tar.gz -C /mnt

echo "deleting compress testing file"
docker exec -it samba rm /mnt/iskylims_demo_data.tar.gz
rm iskylims_demo_data.tar.gz

if [ "$demo_data" == "false" ];then
rm -f $demo_data
fi

echo "Running crontab"
docker exec -it iskylims_app python3 manage.py crontab add
docker exec -it iskylims_app cron

echo "You can now access iskylims via: http://localhost:8001"
Loading
Loading