| 1 | = i2b2 - Create Project |
| 2 | |
| 3 | This is the procedure to create a new project in i2b2. Most of the process is carried out by Jeff's create project scripts, but there is some preparation work that could perhaps be incorporated into the scripts at some point. |
| 4 | |
| 5 | == Procesdure |
| 6 | |
| 7 | === 1. Create Databases |
| 8 | |
| 9 | Run the following SQL script. Change [!ProjectName] to be the actual project name: |
| 10 | |
| 11 | {{{ |
| 12 | #!sql |
| 13 | CREATE DATABASE [ProjectName]_MetaData |
| 14 | GO |
| 15 | CREATE DATABASE [ProjectName]_Data |
| 16 | GO |
| 17 | CREATE DATABASE [ProjectName]_WorkData |
| 18 | GO |
| 19 | |
| 20 | CREATE LOGIN [ProjectName]_MetaData WITH PASSWORD = '[ProjectName]_MetaData'; |
| 21 | GO |
| 22 | CREATE LOGIN [ProjectName]_Data WITH PASSWORD = '[ProjectName]_Data'; |
| 23 | GO |
| 24 | CREATE LOGIN [ProjectName]_WorkData WITH PASSWORD = '[ProjectName]_WorkData'; |
| 25 | GO |
| 26 | |
| 27 | USE [ProjectName]_MetaData |
| 28 | CREATE USER [ProjectName]_MetaData FOR LOGIN [ProjectName]_MetaData |
| 29 | GO |
| 30 | EXEC sp_addrolemember N'db_owner', N'[ProjectName]_MetaData' |
| 31 | GO |
| 32 | |
| 33 | USE [ProjectName]_Data |
| 34 | CREATE USER [ProjectName]_Data FOR LOGIN [ProjectName]_Data |
| 35 | GO |
| 36 | EXEC sp_addrolemember N'db_owner', N'[ProjectName]_Data' |
| 37 | GO |
| 38 | |
| 39 | USE [ProjectName]_WorkData |
| 40 | CREATE USER [ProjectName]_WorkData FOR LOGIN [ProjectName]_WorkData |
| 41 | GO |
| 42 | EXEC sp_addrolemember N'db_owner', N'[ProjectName]_WorkData' |
| 43 | GO |
| 44 | |
| 45 | }}} |
| 46 | |
| 47 | |
| 48 | === 2. Run Project Creation scripts |
| 49 | |
| 50 | i. As the scripts have some hard coded elements it is necessary to take a copy of the procedures directory and change the hard coded values. Therefore, copy the /usr/local/i2b2-procedures-1.1-production directory. |
| 51 | i. In the new procedures directory, amend the file config/config.properties. The following values need amending. |
| 52 | |
| 53 | * project.name |
| 54 | * crc.ds.jndi.name |
| 55 | * ont.ds.jndi.name |
| 56 | * work.ds.jndi.name |
| 57 | * db.project.data.databasename |
| 58 | * db.project.data.username |
| 59 | * db.project.data.password |
| 60 | * db.project.meta.databasename |
| 61 | * db.project.meta.username |
| 62 | * db.project.meta.password |
| 63 | * db.project.work.databasename |
| 64 | * db.project.work.username |
| 65 | * db.project.work.password |
| 66 | * import.user |
| 67 | * import.password |
| 68 | * import.pmURL |
| 69 | * import.domainID |
| 70 | * import.projectID |
| 71 | |
| 72 | iii. In the same directory, edit the file defaults.sh. |