Package ingest is implemented as a service integrated with a Fedora 4 repository. The service is run in an Apache Karaf OSGi container. Karaf configuration may be done either through text files in the {karaf.home}/etc directory, or through the Web Console. If using the Web Console, and assuming the system is installed at http://some.server.name, the default configuration gives access to the configuration manager Karaf installation at http://<some.server.name>:8181/system/console/configMgr. Regardless of how Karaf is configured, the Fedora root container is at http://<some.server.name>:8080/fcrepo/rest. When using the Web Console for configuration, the port 8181 URL is where configuration for Email Notification, Deposit Workflows etc. will be done, and the fedora location is where deposited content may be browsed.
Again, Karaf configurtion may be done with the web console. Either go to the Karaf Configuration Manager location above, or go to OSGI-> components from the main menu in the Web Console at http://<some.server.name>:8181. You will be prompted for credentials - the dafault username and password are "karaf". Some Data Conservancy specific items will require some configuration. These can be found by scrolling down to the org.dataconservancy.* features in the configuraion screen. Any of these may be edited by clicking on the edit icon to raise an edit popup dialog box, and then saving changes by clicking on the "Save" button in the popup.
- org.dataconservancy.packaging.impl.PackageFileAnalyzerFactory
- Package extract dir (The directory for temporary unpacking package contents as necessary). This defaults to /tmp, but you may change it to whatever you wish.
- org.dataconservancy.packaging.ingest.camel.impl.EmailNotifications
- Mail smtp host - the SMTP server used to send email notifications (defaults to smtp.gmail.com)
- Mail smtp port - the SMTP port number(optional, must be 465 when using the default smtp host)
- Mail smtp user- Username used to authenticate when sending notifications (required if using default host)
- Mail smtp pass - Password used to authenticate when sending notifocations (required if using default host)
- Mail to - email addresses which are the recipients of messages sent by the system - comma separated list if more than one
- org.dataconservancy.packaging.ingest.camel.PackageFileDepositWorkflow - Package deposit dir - The full filesystem path to a directory which will be monitored for package files to be processed for this workflow - Deposit location - the URI to which packages will be deposited - Package fail dir - the full filesystem path to a directory where failed packages will be placed
You will likely want to create several PackageFileDepositWorkflow configurations - at least one for each URI in Fedora that we will be depositing into. For example, suppose we start with an empty Fedora instance, and we wish to create a project to which we can deposit collections. The first thing to do is to check the PackageFileAnalyzerFactory setting for Package extract dir. Next, configure the EmailNotifications to use the appropriate outgoing smtp settings and recipient(s). Finally, configure a workflow to put the project into the top Fedora home location (say, http://<some.server.name:8080>/fcrepo/rest if that is how the system will be configured). We will click on the "+" icon at the org.dataconservancy.packaging.ingest.camel.impl.PackageFileDepositWorkflow to bring up a dialog box to add a workflow. The default Deposit location will be the home Fedora location (e.g. http://localhost:8080/fcrepo/rest). We will need to supply a Deposit dir into which we will place packages to be deposited to this top level home, and also a Package fail dir which is the location into which packages failing deposit for any reason will be placed. We will need to configure other workflows later.
Once we have the top level Fedora home container configured to accept deposits, we can use the Package Tool Gui (PTG) to create a package containing an empty directory representing the project we wish to deposit. In the PTG we fill in the required elements on the first screen and select the empty directory as our content location. When we get to the package editing screen, we see just one top node representing our empty directory, and it is identified as having type Collection. We change this type to Project, and then go on and save this simple Package. We finally place this Package into the Package deposit dir as configured in the above PackageFileDepositWorkflow. When the system finds this package, it will attempt to deposit it, and will send email notification to the "Mail to" address(es) configured in the EmailNotifications feature.
After the transaction succeeds, you will be able to see the project as a child under the home Fedora location. This project will be listed under its URI (for example http://<some.server.name>:8080/fcrepo/rest/MyProject). If you wish to deposit other packages (like collections for example) into this project, you need to set up a new PackageFileDepositWorkflow which has this project's URI as the deposit location, and Package deposit dir and Package fail dir locations to suit you. Then, you may create packages with the PTG and place them into this new Package deposit dir, and the system will deposit them into the project created above. You will be able to browse the new project structure at the Fedora URL. You will see a URI representing the collection object which was the root node of the Package which you just deposited into the project (say, http://<some.server.name>:8080/fcrepo/rest/MyProject/MyCollection). If you wish to deposit other Packages into this container (and not the project container) you will need to configure a new workflow for this Deposit dir, exactly as you did above for the project container.
The PackageFileDepositWorkflow configurations are the key to attaching trees of business objects to the desired parent in the Fedora container structure. Once the PackageFileDepositWorkflow for the parent container has been configured, if a Package is placed in that workflow's Package deposit dir, the package tree will show up under the parent's URI (the Deposit location for the workflow).