This page describes how to set up the data in a Metrici instance from scratch.
A plain install only sets up the admin user. It does not set up any accounts. Setting up a fresh instance involves:
- Installing standard libraries.
- Creating an account for the admin user.
- Creating an account for the "accounts" account authority, which will be used to create user accounts.
Important!
This page only describes how to set up the initial accounts in a new Metrici instance. It does not describe how to set up the software itself, which is described elsewhere.
When you are setting up software, be very careful if you copy configuration from another server. In particular:
- If you are using cloud storage, set up appropriate access keys and configure Metrici accordingly. Be careful not to use access keys from another instance or you might delete/overwrite files from the other instance.
- Create, install and backup your GPG encryption keys, and configure Metrici accordingly.
- Consider whether you are running the software with a separate background processing server, and configure accordingly. If you are running a separate background server, remember that the system data loads are performed on the background server, and this must be started at least once for the application server to work.
Steps
Step 1 - Create the admin password
The instructions below assume you do not have a separate background server. If you do have a separate background server, perform step 1 on that server, not the Metrici instance.
Modify config.xml in the WEB-INF directory to include the line at the bottom of list of includes.
<include>${configdir}admin_password_config.xml</include>
Startup Metrici. If this is the first time, wait 2 minutes for the derivation of system nodes to complete.
Sign in as admin with password password. Change the password. Shut down Metrici. Remove the modification to config.xml. Start Metrici up again.
If you don't have a theme, use the link app/theme.jsp?themeScope=user to set the theme to system.app.DefaultTheme. Later on, you can set it back to a standard theme.
Step 2 - Import standard libraries
Export the definitive library folder. Import it in to the new instance.
If you get an error because the file is too big to upload, modify your Tomcat server.xml so that the appropriate Connector element has a larger maxPostSize. Set to -1 for unlimited post size.
You are likely to get a timeout error when the import is complete. This does not mean that the data has not loaded, but that there is so much going on there has been a timeout somewhere. Carry on and let the nodes recalculate (see below).
Let the imported nodes recalculate - see the log to see how derivation is performing. There are a number of recursive relationships within library, and it is worth performing a full recalculate on library.core.MemberTypeType and waiting for derivation to complete, and then a second full recalculate.
Also check that library.account_manager.main, second tab. There should be 20+ steps. If there are not, perform a full recalculate on library.process.ActionType.
Once everything looks OK and there are no derivation left, re-import the library, settng the action to overwrite. This time it should find nothing to do, and should not timeout. However, if there were errors, re-importing the library should fix them.
Step 3 - Create the Admin package
As admin, navigate to library/aggregator/AggregatorPackageType, and use the New Aggregator Package link (from the More menu) to a node with a reference of "admin".
Step 4 - Import admin.library
Export the definitive admin.library folder. Import it to the new instance.
Step 5 - Complete setup of the admin account
As admin, go to the settings page and turn off session protection.
Paste all of admin setup into the submit service request box, and run it.
This should set up the admin account. Click on home and check that the admin home page is set and contains Library, Account templates, Accounts, Admin Library and Permissions.
Step 6 - Create the account authority account
From admin/account_templates, use the create link on "Admin account template" to create a new account. Call the account "Accounts" and give it a reference of "accounts".
Step 7 - Complete setup of the account authority
Sign in as accounts.
If you get an error, permissions are still being granted and wait a little while, or sign back in as admin, and check the permission manifest manager.
Go to the settings page and turn off session protection.
Paste all of accounts setup into the submit service request box, and run it.
This should set up the accounts account. Click on home and check that the accounts home page has Account templates and Accounts folders.
Step 8 - Grant permissions
This step permits the "accounts" user to be an account authority and permits anyone to create a new basic account.
Sign in as admin.
Go to admin/permissions/AccountAuthorityPermissions and recalculate the node twice.
Go to admin/permissions/AccountTemplatePermissions and recalculate the node twice.
Using the new instance
For simple tests, create folders in admin to try things out.
To create a new account, run accounts/account_templates/basic_account?method=execute&action=signUp