Skip to content

Commit e997815

Browse files
Merge pull request #44 from ccdc-opensource/CSD-5935
CSD-5935 Update readme and added macrohub yml file
2 parents cbb9e7f + 08e3b89 commit e997815

6 files changed

+311
-40
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ docker-compose.*.yml
77
!docker-compose.disable-user-access.yml
88
!docker-compose.sample-db-config.yml
99
!docker-compose.port-configuration.yml
10+
!docker-compose.macromolecule-hub.yml
11+
!docker-compose.sample-enable-sso.yml
12+
1013

1114
# Other
1215
**.swp

README.md

+41-13
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# On-Site WebCSD
22

3-
On-Site WebCSD is currently only available to CCDC Research Partners and other invited groups.
3+
On-Site WebCSD is currently only available to CCDC industrial customers and other invited groups.
44

55
This readme contains information required for installation and updates of On-Site WebCSD.
66

7-
Please use the latest version from the release tab https://github.com/ccdc-opensource/on-site-webcsd/releases, using main may not work as it is not an official release. Releases prior to version 1.0.0 are alpha releases which will not contain all the functionality currently provided in On-Site WebCSD.
7+
Please use the latest non alpha version from the release tab <https://github.com/ccdc-opensource/on-site-webcsd/releases>, using main may not work as it is not an official release. Releases prior to version 1.0.0 or with <version>-alpha are alpha releases which will not contain all the functionality currently provided in On-Site WebCSD.
88

99
Terms and conditions can be found in the license.md file.
1010

11-
Additional information including user configuration and troubleshooting can be found in the wiki at https://github.com/ccdc-opensource/on-site-webcsd/wiki.
11+
Additional information including user configuration and troubleshooting can be found in the wiki at <https://github.com/ccdc-opensource/on-site-webcsd/wiki>.
1212

1313
## Prerequisites
1414

@@ -23,9 +23,12 @@ Click on the release you want to use, and download the source code zip and unpac
2323

2424
## Initial recommended specification
2525

26-
Recommended requirements:
26+
Recommended requirements for On-Site WebCSD:
2727
170GB free hd space, 32GB ram, 8 core cpu.
2828

29+
Recommended requirements for On-Site WebCSD including Macromolecule Hub:
30+
400GB free hd space, 32GB ram, 8 core cpu.
31+
2932
On-Site WebCSD should work with any linux OS that meets the requirements to run Docker, but official support is provided by CCDC on the following platforms:
3033

3134
- Linux - Intel compatible, 64-bit:
@@ -38,6 +41,11 @@ On-Site WebCSD should work with any linux OS that meets the requirements to run
3841

3942
On-Site WebCSD can be configured to read from in-house databases. To enable these databases, copy and rename the file `docker-compose.sample-db-config.yml` to `docker-compose.db-config.yml` and edit the `volumes` section to point to any in-house databases and edit the `environment` section to configure the application to recognise these databases. More information is given in the notes & example sections of the sample file. This acts as an [override file](https://docs.docker.com/compose/extends/) which you will have to include in the startup command.
4043

44+
## CSD-Theory Database Configuration
45+
46+
If wanting to use WebCSD with CSD-Theory, ensure the steps in [link](#In-house Database Configuration) have been followed.
47+
There are examples of CSD-Theory configurations in the `docker-compose.sample-db-config.yml` file.
48+
4149
## Installation
4250

4351
After unpacking the release source code onto the server on which the software will be installed you will need to go into the on-site-webcsd directory and copy the environment file `sample.env` as `.env` then populate with suitable values.
@@ -56,20 +64,33 @@ CSD_DB_PASSWORD=A password of your choosing
5664
CSD_CACHE_PASSWORD=A password of your choosing
5765
```
5866

59-
Where stated, some of these variables will be provided by CCDC; all other variables are for the user to generate and set. Once the variables file has been populated, login to the CCDC container registry and bring up the stack:
67+
Where stated, some of these variables will be provided by CCDC; all other variables are for the user to generate and set.
68+
Once the variables file has been populated, login to the CCDC container registry and bring up the stack:
6069

6170
```
6271
docker login -u <user> -p <password> ccdcrepository.azurecr.io
6372
6473
# or to be prompted for the password
6574
docker login -u <user> --password-stdin ccdcrepository.azurecr.io
6675
67-
#Use one of the following two commands depending on if you have in-house database configuration
68-
#Use this command if you have no in-house database configuration
76+
# As of v2.0.0, containers run as non root users. Because of this you will need to run the following in the on-site-webcsd directory:
77+
sudo chown -R ccdc:ccdc userdata/
78+
79+
# You will also need to ensure the user "ccdc" has read access to any in-house or CSP databases by using the command above on relevant directories.
80+
81+
#Use one of the following commands:
82+
83+
#Use this command if you have no in-house databases and don't want to use macromolecule hub
6984
docker compose up -d
7085
71-
#Use this command if you have in-house database configuration
86+
#Use this command if you have in-house databases and don't want to use macromolecule hub
7287
docker compose -f docker-compose.yml -f docker-compose.db-config.yml up -d
88+
89+
#Use this command if you have in-house databases and want macromolecule hub
90+
docker compose -f docker-compose.macromolecule-hub.yml -f docker-compose.db-config.yml up -d
91+
92+
#Use this command if you have no in-house databases and want macromolecule hub
93+
docker compose -f docker-compose.macromolecule-hub.yml up -d
7394
```
7495

7596
## Updates
@@ -83,12 +104,19 @@ Once the latest installation files have been obtained, to update the software, p
83104
docker compose pull
84105

85106
docker compose down
86-
#Use one of the following two commands depending on if you have in-house database configuration
87-
#Use this command if you have no in-house database configuration
107+
#Use one of the following commands:
108+
109+
#Use this command if you have no in-house databases and don't want to use macromolecule hub
88110
docker compose up -d
89111

90-
#Use this command if you have in-house database configuration
112+
#Use this command if you have in-house databases and don't want to use macromolecule hub
91113
docker compose -f docker-compose.yml -f docker-compose.db-config.yml up -d
114+
115+
#Use this command if you have in-house databases and want macromolecule hub
116+
docker compose -f docker-compose.macromolecule-hub.yml -f docker-compose.db-config.yml up -d
117+
118+
#Use this command if you have no in-house databases and want macromolecule hub
119+
docker compose -f docker-compose.macromolecule-hub.yml up -d
92120
```
93121

94122
## Verifying the Installation/Update
@@ -105,8 +133,8 @@ For more information see the [Docker volumes documentation](https://docs.docker.
105133

106134
## Usage
107135

108-
To access the WebCSD service locally go to http://localhost in a browser.
136+
To access the WebCSD service locally go to <http://localhost> in a browser.
109137

110138
## Contact support
111139

112-
If you experience any difficulties with installing or using On-Site WebCSD, please contact our support team at support@ccdc.cam.ac.uk who will be happy to assist you.
140+
If you experience any difficulties with installing or using On-Site WebCSD, please contact our support team at <support@ccdc.cam.ac.uk> who will be happy to assist you.

docker-compose.macromolecule-hub.yml

+220
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,220 @@
1+
version: "3.6"
2+
3+
x-labels: &k8s-labels
4+
kompose.image-pull-secret: pullsecret
5+
6+
services:
7+
webcsd:
8+
environment:
9+
- CsdRepository__ServiceLocation=webcsdbackend
10+
- CspRepository__ServiceLocation=webcsd-theory
11+
- CsdRepository__SketcherFeatures__1=Proteins
12+
depends_on:
13+
- ccdc-csd-searchservice
14+
- csd-request-entry
15+
image: ccdcrepository.azurecr.io/onsite/webcsd:2.0.0
16+
ports:
17+
- 80:80
18+
volumes:
19+
- ./userdata:/app/OnSite
20+
labels:
21+
<<: *k8s-labels
22+
kompose.service.type: LoadBalancer
23+
kompose.service.expose: "true"
24+
25+
webcsdbackend:
26+
depends_on:
27+
- ccdc-csd-searchservice
28+
- csd-request-entry
29+
image: ccdcrepository.azurecr.io/onsite/webcsdbackend:2.0.0
30+
environment:
31+
- ServiceSettings__StructureInfoLocation=/csd-data/structure-links.csv
32+
- CCDC_LICENSING_CONFIGURATION=${CCDC_LICENSING_CONFIGURATION}
33+
- ServiceSettings__Databases__1__Name=PDB Database
34+
- ServiceSettings__Databases__1__DbeName=pdb
35+
- ServiceSettings__Databases__1__ConnectionString=dbe
36+
labels:
37+
<<: *k8s-labels
38+
expose:
39+
- 80
40+
41+
redis:
42+
labels:
43+
<<: *k8s-labels
44+
image: redis
45+
user: redis
46+
restart: always
47+
command: redis-server --requirepass ${CSD_CACHE_PASSWORD}
48+
expose:
49+
- 6379
50+
51+
database-server:
52+
labels:
53+
<<: *k8s-labels
54+
image: ccdcrepository.azurecr.io/onsite/macromolecule-hub-database:2.0.0
55+
# This can be removed next time db image is updated
56+
user: postgres
57+
restart: always
58+
environment:
59+
- POSTGRES_PASSWORD=${CSD_DB_PASSWORD}
60+
command:
61+
- "postgres"
62+
- "-c"
63+
- "max_connections=1000"
64+
expose:
65+
- 5432
66+
67+
ccdc-csd-substructuresearch:
68+
labels:
69+
<<: *k8s-labels
70+
image: ccdcrepository.azurecr.io/onsite/ccdc-csd-substructuresearch-api:2.0.0
71+
depends_on:
72+
- database-server
73+
- ccdc-csd-resultstore
74+
- ccdc-csd-substructure-filter
75+
- ccdc-csd-fingerprint
76+
- ccdc-csd-deposition
77+
environment:
78+
- StructureSearchReadConnection=Server=database-server;Port=5432;Database=csd-database;User Id=postgres;Password=${CSD_DB_PASSWORD};SearchPath=substructure
79+
- PdbReadConnection=Server=database-server;Port=5432;Database=csd-database;User Id=postgres;Password=${CSD_DB_PASSWORD};SearchPath=structure_optimisation
80+
- SubstructureSearchDatabaseConfiguration__Databases__1__Name=pdb
81+
- SubstructureSearchDatabaseConfiguration__Databases__1__SettingsKey=PdbReadConnection
82+
expose:
83+
- 80
84+
85+
ccdc-csd-deposition:
86+
labels:
87+
<<: *k8s-labels
88+
image: ccdcrepository.azurecr.io/onsite/ccdc-csd-deposition-api:2.0.0
89+
depends_on:
90+
- database-server
91+
environment:
92+
- CsdDepositionReadConnection=Server=database-server;Port=5432;Database=csd-database;User Id=postgres;Password=${CSD_DB_PASSWORD};SearchPath=csd_schema
93+
- DepositionPdbReadConnection=Server=database-server;Port=5432;Database=csd-database;User Id=postgres;Password=${CSD_DB_PASSWORD};SearchPath=pdb_schema
94+
- DatabaseConfiguration__Databases__1__Name=pdb
95+
- DatabaseConfiguration__Databases__1__SettingsKey=DepositionPdbReadConnection
96+
expose:
97+
- 80
98+
99+
ccdc-csd-textnumericsearch:
100+
labels:
101+
<<: *k8s-labels
102+
depends_on:
103+
- database-server
104+
image: ccdcrepository.azurecr.io/onsite/ccdc-csd-textnumericsearch-api:2.0.0
105+
environment:
106+
- CsdReadConnection=Server=database-server;Port=5432;Database=csd-database;User Id=postgres;Password=${CSD_DB_PASSWORD};SearchPath=csd_schema
107+
- PdbReadConnection=Server=database-server;Port=5432;Database=csd-database;User Id=postgres;Password=${CSD_DB_PASSWORD};SearchPath=pdb_schema
108+
- DatabaseConfiguration__Databases__1__Name=pdb
109+
- DatabaseConfiguration__Databases__1__SettingsKey=PdbReadConnection
110+
expose:
111+
- 80
112+
113+
ccdc-csd-searchservice:
114+
labels:
115+
<<: *k8s-labels
116+
depends_on:
117+
- ccdc-csd-textnumericsearch
118+
- ccdc-csd-substructuresearch
119+
- ccdc-csd-resultstore
120+
- ccdc-csd-similaritysearch
121+
image: ccdcrepository.azurecr.io/onsite/ccdc-csd-searchservice-api:2.0.0
122+
expose:
123+
- 80
124+
125+
csd-request-entry:
126+
labels:
127+
<<: *k8s-labels
128+
depends_on:
129+
- ccdc-csd-deposition
130+
- ccdc-csd-crystal-structure-export
131+
image: ccdcrepository.azurecr.io/onsite/csd-request-entry-api:2.0.0
132+
expose:
133+
- 80
134+
135+
ccdc-csd-formulasearch:
136+
labels:
137+
<<: *k8s-labels
138+
depends_on:
139+
- database-server
140+
image: ccdcrepository.azurecr.io/onsite/ccdc-csd-formulasearch-api:2.0.0
141+
environment:
142+
- FormulaSearchReadConnection=Server=database-server;Port=5432;Database=csd-database;User Id=postgres;Password=${CSD_DB_PASSWORD};SearchPath=formula
143+
expose:
144+
- 80
145+
146+
ccdc-csd-unitcellsearch:
147+
labels:
148+
<<: *k8s-labels
149+
depends_on:
150+
- database-server
151+
- ccdc-csd-reducedcell-calculation-service
152+
image: ccdcrepository.azurecr.io/onsite/ccdc-csd-unit-cell-search:2.0.0
153+
environment:
154+
- UnitCellSearchReadConnection=Server=database-server;Port=5432;Database=csd-database;User Id=postgres;Password=${CSD_DB_PASSWORD};SearchPath=unitcell
155+
- UnitCellPdbReadConnection=Server=database-server;Port=5432;Database=csd-database;User Id=postgres;Password=${CSD_DB_PASSWORD};SearchPath=pdb_cell_optimisation
156+
- DatabaseConfiguration__Databases__1__Name=pdb
157+
- DatabaseConfiguration__Databases__1__SettingsKey=UnitCellPdbReadConnection
158+
expose:
159+
- 80
160+
161+
ccdc-csd-resultstore:
162+
labels:
163+
<<: *k8s-labels
164+
image: ccdcrepository.azurecr.io/onsite/ccdc-csd-resultstore-api:2.0.0
165+
environment:
166+
- OrderedCachePassword=${CSD_CACHE_PASSWORD}
167+
expose:
168+
- 80
169+
170+
ccdc-csd-similaritysearch:
171+
depends_on:
172+
- database-server
173+
- ccdc-csd-fingerprint
174+
image: ccdcrepository.azurecr.io/onsite/ccdc-csd-structure-similarity-search:2.0.0
175+
environment:
176+
- StructureSimilaritySearchReadConnection=Server=database-server;Port=5432;Database=csd-database;User Id=postgres;Password=${CSD_DB_PASSWORD};SearchPath=similarity
177+
178+
ccdc-csd-fingerprint:
179+
labels:
180+
<<: *k8s-labels
181+
image: ccdcrepository.azurecr.io/onsite/ccdc-csd-fingerprint-service:2.0.0
182+
expose:
183+
- 80
184+
restart: unless-stopped
185+
186+
ccdc-csd-substructure-filter:
187+
labels:
188+
<<: *k8s-labels
189+
image: ccdcrepository.azurecr.io/onsite/ccdc-csd-substructure-filter-service:2.0.0
190+
expose:
191+
- 80
192+
restart: unless-stopped
193+
194+
ccdc-csd-crystal-structure-export:
195+
labels:
196+
<<: *k8s-labels
197+
image: ccdcrepository.azurecr.io/onsite/ccdc-csd-crystal-structure-export-service:2.0.0
198+
expose:
199+
- 80
200+
restart: unless-stopped
201+
202+
ccdc-csd-reducedcell-calculation-service:
203+
labels:
204+
<<: *k8s-labels
205+
image: ccdcrepository.azurecr.io/onsite/ccdc-csd-reducedcell-calculation-service:2.0.0
206+
expose:
207+
- 80
208+
restart: unless-stopped
209+
210+
webcsd-theory:
211+
labels:
212+
<<: *k8s-labels
213+
image: ccdcrepository.azurecr.io/onsite/csd-theory:2.0.0
214+
environment:
215+
- CCDC_LICENSING_CONFIGURATION=${CCDC_LICENSING_CONFIGURATION}
216+
expose:
217+
- 80
218+
219+
volumes:
220+
csd_data: {}

docker-compose.sample-db-config.yml

+8-7
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@ services:
99
- /path/to/database-1:/csd-data/database-1
1010
- /path/to/database-2:/csd-data/database-2
1111
environment:
12-
- ServiceSettings__Databases__1__Name=database-1
13-
- ServiceSettings__Databases__1__ConnectionString=/csd-data/database-1
14-
- ServiceSettings__Databases__2__Name=database-2
15-
- ServiceSettings__Databases__2__ConnectionString=/csd-data/database-2
12+
- ServiceSettings__Databases__2__Name=database-1
13+
- ServiceSettings__Databases__2__ConnectionString=/csd-data/database-1
14+
- ServiceSettings__Databases__3__Name=database-2
15+
- ServiceSettings__Databases__3__ConnectionString=/csd-data/database-2
1616
# Notes:
1717
# The path in which the databases must be mounted is `/csd-data`.
1818
# For each database there must be 2 corresponding environment variables:
1919
# - ServiceSettings__Databases__N__Name=<database name>
2020
# - ServiceSettings__Databases__N__ConnectionString=<database path>
2121
# where
22-
# - N is a unique integer for each pair of variables
22+
# - N is a unique integer for each database, which should start from 2
2323
# - <database name> is how the name of the database will appear in the UI
2424
# - <database path> should match the right side of the volume definition above.
2525
#
@@ -87,7 +87,6 @@ services:
8787
# volumes:
8888
# - /path/to/CSD-Theory Landscape Database:/app/databases
8989
# This will create a persistent volume and claim for the location of the landscape database.
90-
# Please refer to the README regarding additional steps required for implementing CSD Theory.
9190
#########################################################################################################
9291

9392
# IMPORTANT: The CSD Search database must also be included in the webcsdbackend volumes.
@@ -106,10 +105,12 @@ services:
106105
# to use these databases the csd-theory section of the file will look like this
107106
#
108107
# services:
109-
# csd-theory:
108+
# webcsd-theory:
110109
# volumes:
111110
# - /usr/local/data/metadata-db.db:/app/CSPDatabase.db
112111
# - /usr/local/data/landscape-db.csdsqlx:/app/databases/landscape-db.csdsqlx
112+
# environment:
113+
# - ReportSettings__CspStructureDatabaseConnectionString=/app/databases/landscape-db.csdsqlx
113114
#
114115
# Also add an entry to webcsdbackend for the landscape database
115116
#

0 commit comments

Comments
 (0)