Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* FCREPO-2402 - Adds initial config to allow for using AWS S3 for binary storage
* Adds garbageCollection block to new repository.json files based on FCREPO-2406
* Adds cacheSize setting to new repository.json files based on changes recommended in FCREPO-2105
  • Loading branch information
bbranan authored and escowles committed Apr 9, 2017
1 parent cd5b69e commit 3a8b785
Show file tree
Hide file tree
Showing 5 changed files with 143 additions and 0 deletions.
37 changes: 37 additions & 0 deletions fcrepo-configs/src/main/resources/config/file-s3/repository.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"name" : "repo",
"jndiName" : "",
"workspaces" : {
"predefined" : ["default"],
"default" : "default",
"allowCreation" : true,
"cacheSize" : 10000
},
"storage" : {
"persistence": {
"type": "file",
"path" : "${fcrepo.object.directory:target/objects}"
},
"binaryStorage" : {
"type" : "s3",
"username" : "${aws.accessKeyId}",
"password" : "${aws.secretKey}",
"bucketName" : "${aws.bucket}"
}
},
"security" : {
"anonymous" : {
"roles" : ["readonly","readwrite","admin"],
"useOnFailedLogin" : false
},
"providers" : [
{ "classname" : "org.fcrepo.auth.common.BypassSecurityServletAuthenticationProvider" }
]
},
"garbageCollection" : {
"threadPool" : "modeshape-gc",
"initialTime" : "00:00",
"intervalInHours" : 24
},
"node-types" : ["fedora-node-types.cnd"]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"name" : "repo",
"jndiName" : "",
"workspaces" : {
"predefined" : ["default"],
"default" : "default",
"allowCreation" : true,
"cacheSize" : 10000
},
"storage" : {
"persistence": {
"type" : "db",
"connectionUrl": "jdbc:mysql://${fcrepo.mysql.host:localhost}:${fcrepo.mysql.port:3306}/fcrepo?createDatabaseIfNotExist=true",
"driver" : "com.mysql.jdbc.Driver",
"username" : "${fcrepo.mysql.username}",
"password" : "${fcrepo.mysql.password}"
},
"binaryStorage" : {
"type" : "s3",
"username" : "${aws.accessKeyId}",
"password" : "${aws.secretKey}",
"bucketName" : "${aws.bucket}"
}
},
"security" : {
"anonymous" : {
"roles" : ["readonly","readwrite","admin"],
"useOnFailedLogin" : false
},
"providers" : [
{ "classname" : "org.fcrepo.auth.common.BypassSecurityServletAuthenticationProvider" }
]
},
"garbageCollection" : {
"threadPool" : "modeshape-gc",
"initialTime" : "00:00",
"intervalInHours" : 24
},
"node-types" : ["fedora-node-types.cnd"]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"name" : "repo",
"jndiName" : "",
"workspaces" : {
"predefined" : ["default"],
"default" : "default",
"allowCreation" : true,
"cacheSize" : 10000
},
"storage" : {
"persistence": {
"type" : "db",
"connectionUrl": "jdbc:postgresql://${fcrepo.postgresql.host:localhost}:${fcrepo.postgresql.port:5432}/fcrepo",
"driver" : "org.postgresql.Driver",
"username" : "${fcrepo.postgresql.username}",
"password" : "${fcrepo.postgresql.password}"
},
"binaryStorage" : {
"type" : "s3",
"username" : "${aws.accessKeyId}",
"password" : "${aws.secretKey}",
"bucketName" : "${aws.bucket}"
}
},
"security" : {
"anonymous" : {
"roles" : ["readonly","readwrite","admin"],
"useOnFailedLogin" : false
},
"providers" : [
{ "classname" : "org.fcrepo.auth.common.BypassSecurityServletAuthenticationProvider" }
]
},
"garbageCollection" : {
"threadPool" : "modeshape-gc",
"initialTime" : "00:00",
"intervalInHours" : 24
},
"node-types" : ["fedora-node-types.cnd"]
}
24 changes: 24 additions & 0 deletions fcrepo-webapp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,30 @@
<artifactId>spring-web</artifactId>
</dependency>

<!-- AWS S3 client dependencies -->
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-s3</artifactId>
<version>${aws.client.version}</version>
<scope>runtime</scope>
<exclusions>
<exclusion>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-core</artifactId>
</exclusion>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-core</artifactId>
<version>${aws.client.version}</version>
<scope>runtime</scope>
</dependency>

<!-- test gear -->
<dependency>
<groupId>net.sourceforge.htmlunit</groupId>
Expand Down
2 changes: 2 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@
<!-- JCBC dependencies -->
<postgresql.version>9.4.1211</postgresql.version>
<mysql.version>5.1.38</mysql.version>
<!-- AWS S3 dependencies -->
<aws.client.version>1.11.95</aws.client.version>
<!-- test gear -->
<awaitility.version>1.7.0</awaitility.version>
<grizzly.version>2.3.28</grizzly.version>
Expand Down

0 comments on commit 3a8b785

Please sign in to comment.