talk@lists.collectionspace.org

WE HAVE SUNSET THIS LISTSERV - Join us at collectionspace@lyrasislists.org

View all threads

Re: [Talk] Any 1.6 -> 1.7 changes that might have affected schema modification?

JS
Joe Slag
Wed, Jun 8, 2011 4:34 PM

I've been taking a look at the sparse tenant bindings file this morning. I
tried adapting the example, but seem to have done something wrong as the UI
is now refusing to allow login.

Here's my stab at adapting the sample Hearst tenent-bindings file:
https://gist.github.com/6cf91c5fd3ce881838e1

Since there's already a hearstmuseum binding file in the source tree with
tenantBinding id 2, I bumped that to 3 for our file.

server/cspace/log/server.log has a number of possibly related lines in it.
I've pulled out what looks like the relevant part at
https://gist.github.com/76914b850371c48a025d

any clues in either my tenant-bindings.xml or in the server.log excerpt
about what I'm missing?

thanks,
Joe

On Tue, Jun 7, 2011 at 9:37 PM, Aron Roberts aron@socrates.berkeley.eduwrote:

Hi Joe,

A couple more things that might possibly have differed between 1.6 and
1.7, and may not yet be updated in the documentation on how to add custom
fields; these are likely documented elsewhere:

  • You can now maintain a very sparse tenant bindings file,
    for your tenant.

    In that file, you only need to include any settings for your
    tenant that differ from the prototype (default) settings.

    All other configuration is picked up from a prototype file.

You can see an example of this - the addition of a custom part
(in this case, part 3) to CollectionObject / Cataloging records,
with its own namespace and schema, for a specific tenant, in:

<
https://source.collectionspace.org/collection-space/src/services/trunk/services/common/src/main/cspace/config/services/tenants/hearstmuseum/tenant-bindings.delta.xml

I've been taking a look at the sparse tenant bindings file this morning. I tried adapting the example, but seem to have done something wrong as the UI is now refusing to allow login. Here's my stab at adapting the sample Hearst tenent-bindings file: https://gist.github.com/6cf91c5fd3ce881838e1 Since there's already a hearstmuseum binding file in the source tree with tenantBinding id 2, I bumped that to 3 for our file. server/cspace/log/server.log has a number of possibly related lines in it. I've pulled out what looks like the relevant part at https://gist.github.com/76914b850371c48a025d any clues in either my tenant-bindings.xml or in the server.log excerpt about what I'm missing? thanks, Joe On Tue, Jun 7, 2011 at 9:37 PM, Aron Roberts <aron@socrates.berkeley.edu>wrote: > Hi Joe, > > A couple more things that might possibly have differed between 1.6 and > 1.7, and may not yet be updated in the documentation on how to add custom > fields; these are likely documented elsewhere: > > - You can now maintain a very sparse tenant bindings file, > for your tenant. > > In that file, you only need to include any settings for your > tenant that differ from the prototype (default) settings. > > All other configuration is picked up from a prototype file. > > You can see an example of this - the addition of a custom part > (in this case, part 3) to CollectionObject / Cataloging records, > with its own namespace and schema, for a specific tenant, in: > > < > https://source.collectionspace.org/collection-space/src/services/trunk/services/common/src/main/cspace/config/services/tenants/hearstmuseum/tenant-bindings.delta.xml > > > >
AR
Aron Roberts
Wed, Jun 8, 2011 6:48 PM

Hi Joe,

First off, are logins failing just for your own tenancy, or for all
tenancies (including collectionspace.org)?

Second, what tenant file did you create for walkerart.org
(https://gist.github.com/6cf91c5fd3ce881838e1): what is it named, and
where is it located in the source tree?  Have you placed this in, say,
services/common/src/main/cspace/config/services/tenants/walkerart/tenant-bindings-delta.xml?

Third, if you are at a point where you can drop and re-create
databases without considerable pain, can you run 'ant undeploy deploy
create_db import', if you haven't already?  This will help ensure that
the import process will create the two default user accounts for your
new tenancy, one associated with the tenant administrator role and a
second associated with the tenant reader role.

Aron

On Wed, Jun 8, 2011 at 9:34 AM, Joe Slag joe@slagwerks.com wrote:

I've been taking a look at the sparse tenant bindings file this morning. I
tried adapting the example, but seem to have done something wrong as the UI
is now refusing to allow login.
Here's my stab at adapting the sample Hearst tenent-bindings file:
  https://gist.github.com/6cf91c5fd3ce881838e1
Since there's already a hearstmuseum binding file in the source tree with
tenantBinding id 2, I bumped that to 3 for our file.
server/cspace/log/server.log has a number of possibly related lines in it.
I've pulled out what looks like the relevant part at
  https://gist.github.com/76914b850371c48a025d
any clues in either my tenant-bindings.xml or in the server.log excerpt
about what I'm missing?
thanks,
Joe
On Tue, Jun 7, 2011 at 9:37 PM, Aron Roberts aron@socrates.berkeley.edu
wrote:

Hi Joe,

 A couple more things that might possibly have differed between 1.6 and
1.7, and may not yet be updated in the documentation on how to add custom
fields; these are likely documented elsewhere:

 - You can now maintain a very sparse tenant bindings file,
   for your tenant.

   In that file, you only need to include any settings for your
   tenant that differ from the prototype (default) settings.

   All other configuration is picked up from a prototype file.

 You can see an example of this - the addition of a custom part
 (in this case, part 3) to CollectionObject / Cataloging records,
 with its own namespace and schema, for a specific tenant, in:

https://source.collectionspace.org/collection-space/src/services/trunk/services/common/src/main/cspace/config/services/tenants/hearstmuseum/tenant-bindings.delta.xml

Hi Joe, First off, are logins failing just for your own tenancy, or for all tenancies (including collectionspace.org)? Second, what tenant file did you create for walkerart.org (https://gist.github.com/6cf91c5fd3ce881838e1): what is it named, and where is it located in the source tree? Have you placed this in, say, services/common/src/main/cspace/config/services/tenants/walkerart/tenant-bindings-delta.xml? Third, if you are at a point where you can drop and re-create databases without considerable pain, can you run 'ant undeploy deploy create_db import', if you haven't already? This will help ensure that the import process will create the two default user accounts for your new tenancy, one associated with the tenant administrator role and a second associated with the tenant reader role. Aron On Wed, Jun 8, 2011 at 9:34 AM, Joe Slag <joe@slagwerks.com> wrote: > I've been taking a look at the sparse tenant bindings file this morning. I > tried adapting the example, but seem to have done something wrong as the UI > is now refusing to allow login. > Here's my stab at adapting the sample Hearst tenent-bindings file: >   https://gist.github.com/6cf91c5fd3ce881838e1 > Since there's already a hearstmuseum binding file in the source tree with > tenantBinding id 2, I bumped that to 3 for our file. > server/cspace/log/server.log has a number of possibly related lines in it. > I've pulled out what looks like the relevant part at >   https://gist.github.com/76914b850371c48a025d > any clues in either my tenant-bindings.xml or in the server.log excerpt > about what I'm missing? > thanks, > Joe > On Tue, Jun 7, 2011 at 9:37 PM, Aron Roberts <aron@socrates.berkeley.edu> > wrote: >> >> Hi Joe, >> >>  A couple more things that might possibly have differed between 1.6 and >> 1.7, and may not yet be updated in the documentation on how to add custom >> fields; these are likely documented elsewhere: >> >>  - You can now maintain a very sparse tenant bindings file, >>    for your tenant. >> >>    In that file, you only need to include any settings for your >>    tenant that differ from the prototype (default) settings. >> >>    All other configuration is picked up from a prototype file. >> >>  You can see an example of this - the addition of a custom part >>  (in this case, part 3) to CollectionObject / Cataloging records, >>  with its own namespace and schema, for a specific tenant, in: >> >> >> <https://source.collectionspace.org/collection-space/src/services/trunk/services/common/src/main/cspace/config/services/tenants/hearstmuseum/tenant-bindings.delta.xml> >> >> >
JS
Joe Slag
Wed, Jun 8, 2011 8:52 PM

On Wed, Jun 8, 2011 at 1:48 PM, Aron Roberts aron@socrates.berkeley.eduwrote:

Hi Joe,

First off, are logins failing just for your own tenancy, or for all
tenancies (including collectionspace.org)?

I've just been using the default admin@collectionspace.org account for
development

Second, what tenant file did you create for walkerart.org
(https://gist.github.com/6cf91c5fd3ce881838e1): what is it named, and
where is it located in the source tree?  Have you placed this in, say,

services/common/src/main/cspace/config/services/tenants/walkerart/tenant-bindings-delta.xml?

almost; I'd been using tenants/wac/tenant-bindings.xml.

Third, if you are at a point where you can drop and re-create
databases without considerable pain, can you run 'ant undeploy deploy
create_db import', if you haven't already?  This will help ensure that
the import process will create the two default user accounts for your
new tenancy, one associated with the tenant administrator role and a
second associated with the tenant reader role.

Sure, can do.

thanks,
Joe

Aron

On Wed, Jun 8, 2011 at 1:48 PM, Aron Roberts <aron@socrates.berkeley.edu>wrote: > Hi Joe, > > First off, are logins failing just for your own tenancy, or for all > tenancies (including collectionspace.org)? > I've just been using the default admin@collectionspace.org account for development > > Second, what tenant file did you create for walkerart.org > (https://gist.github.com/6cf91c5fd3ce881838e1): what is it named, and > where is it located in the source tree? Have you placed this in, say, > > services/common/src/main/cspace/config/services/tenants/walkerart/tenant-bindings-delta.xml? > almost; I'd been using tenants/wac/tenant-bindings.xml. > > Third, if you are at a point where you can drop and re-create > databases without considerable pain, can you run 'ant undeploy deploy > create_db import', if you haven't already? This will help ensure that > the import process will create the two default user accounts for your > new tenancy, one associated with the tenant administrator role and a > second associated with the tenant reader role. > > Sure, can do. thanks, Joe > Aron > >
AR
Aron Roberts
Wed, Jun 8, 2011 9:03 PM

On Wed, Jun 8, 2011 at 1:52 PM, Joe Slag joe@slagwerks.com wrote:

 Second, what tenant file did you create for walkerart.org
(https://gist.github.com/6cf91c5fd3ce881838e1): what is it named, and
where is it located in the source tree?  Have you placed this in, say,

services/common/src/main/cspace/config/services/tenants/walkerart/tenant-bindings-delta.xml?

almost; I'd been using tenants/wac/tenant-bindings.xml.

It looks like this filename might need to be (exactly)
'tenant-bindings.delta.xml (with a dot between 'tenant-bindings' and
'delta.xml' - I erroneously wrote this with a dash above):

from services/common/src/main/java/org/collectionspace/services/common/config/TenantBindingConfigReaderImpl.java:

final private static String TENANT_BINDINGS_FILENAME_PREFIX = "tenant-bindings";
final private static String TENANT_BINDINGS_DELTA_FILENAME =
TENANT_BINDINGS_FILENAME_PREFIX + ".delta.xml";

This does represent a recent change, from what I understand; the
per-tenant 'delta' tenant-bindings files were previously named
"tenant-bindings.xml".

Aron

 Third, if you are at a point where you can drop and re-create
databases without considerable pain, can you run 'ant undeploy deploy
create_db import', if you haven't already?  This will help ensure that
the import process will create the two default user accounts for your
new tenancy, one associated with the tenant administrator role and a
second associated with the tenant reader role.

Sure, can do.
thanks,
Joe

Aron

On Wed, Jun 8, 2011 at 1:52 PM, Joe Slag <joe@slagwerks.com> wrote: >>  Second, what tenant file did you create for walkerart.org >> (https://gist.github.com/6cf91c5fd3ce881838e1): what is it named, and >> where is it located in the source tree?  Have you placed this in, say, >> >> services/common/src/main/cspace/config/services/tenants/walkerart/tenant-bindings-delta.xml? > > almost; I'd been using tenants/wac/tenant-bindings.xml. It looks like this filename might need to be (exactly) 'tenant-bindings.delta.xml (with a dot between 'tenant-bindings' and 'delta.xml' - I erroneously wrote this with a dash above): from services/common/src/main/java/org/collectionspace/services/common/config/TenantBindingConfigReaderImpl.java: final private static String TENANT_BINDINGS_FILENAME_PREFIX = "tenant-bindings"; final private static String TENANT_BINDINGS_DELTA_FILENAME = TENANT_BINDINGS_FILENAME_PREFIX + ".delta.xml"; This does represent a recent change, from what I understand; the per-tenant 'delta' tenant-bindings files *were* previously named "tenant-bindings.xml". Aron > >> >>  Third, if you are at a point where you can drop and re-create >> databases without considerable pain, can you run 'ant undeploy deploy >> create_db import', if you haven't already?  This will help ensure that >> the import process will create the two default user accounts for your >> new tenancy, one associated with the tenant administrator role and a >> second associated with the tenant reader role. >> > > Sure, can do. > thanks, > Joe > >> >> Aron >> >
JS
Joe Slag
Wed, Jun 8, 2011 9:41 PM

Looks like that code landed just after release 1.7 -- I first see the delta
in r4761, but 1.7 was branched in 4756.

If I'm reading that correctly, then, no sparse tenant-bindings until we
upgrade to 1.8?

thanks,
Joe

On Wed, Jun 8, 2011 at 4:03 PM, Aron Roberts aron@socrates.berkeley.eduwrote:

On Wed, Jun 8, 2011 at 1:52 PM, Joe Slag joe@slagwerks.com wrote:

Second, what tenant file did you create for walkerart.org
(https://gist.github.com/6cf91c5fd3ce881838e1): what is it named, and
where is it located in the source tree?  Have you placed this in, say,

services/common/src/main/cspace/config/services/tenants/walkerart/tenant-bindings-delta.xml?

almost; I'd been using tenants/wac/tenant-bindings.xml.

It looks like this filename might need to be (exactly)
'tenant-bindings.delta.xml (with a dot between 'tenant-bindings' and
'delta.xml' - I erroneously wrote this with a dash above):

from
services/common/src/main/java/org/collectionspace/services/common/config/TenantBindingConfigReaderImpl.java:

final private static String TENANT_BINDINGS_FILENAME_PREFIX =
"tenant-bindings";
final private static String TENANT_BINDINGS_DELTA_FILENAME =
TENANT_BINDINGS_FILENAME_PREFIX + ".delta.xml";

This does represent a recent change, from what I understand; the
per-tenant 'delta' tenant-bindings files were previously named
"tenant-bindings.xml".

Aron

Third, if you are at a point where you can drop and re-create
databases without considerable pain, can you run 'ant undeploy deploy
create_db import', if you haven't already?  This will help ensure that
the import process will create the two default user accounts for your
new tenancy, one associated with the tenant administrator role and a
second associated with the tenant reader role.

Sure, can do.
thanks,
Joe

Aron

Looks like that code landed just after release 1.7 -- I first see the delta in r4761, but 1.7 was branched in 4756. If I'm reading that correctly, then, no sparse tenant-bindings until we upgrade to 1.8? thanks, Joe On Wed, Jun 8, 2011 at 4:03 PM, Aron Roberts <aron@socrates.berkeley.edu>wrote: > On Wed, Jun 8, 2011 at 1:52 PM, Joe Slag <joe@slagwerks.com> wrote: > >> Second, what tenant file did you create for walkerart.org > >> (https://gist.github.com/6cf91c5fd3ce881838e1): what is it named, and > >> where is it located in the source tree? Have you placed this in, say, > >> > >> > services/common/src/main/cspace/config/services/tenants/walkerart/tenant-bindings-delta.xml? > > > > almost; I'd been using tenants/wac/tenant-bindings.xml. > > It looks like this filename might need to be (exactly) > 'tenant-bindings.delta.xml (with a dot between 'tenant-bindings' and > 'delta.xml' - I erroneously wrote this with a dash above): > > from > services/common/src/main/java/org/collectionspace/services/common/config/TenantBindingConfigReaderImpl.java: > > final private static String TENANT_BINDINGS_FILENAME_PREFIX = > "tenant-bindings"; > final private static String TENANT_BINDINGS_DELTA_FILENAME = > TENANT_BINDINGS_FILENAME_PREFIX + ".delta.xml"; > > This does represent a recent change, from what I understand; the > per-tenant 'delta' tenant-bindings files *were* previously named > "tenant-bindings.xml". > > Aron > > > > >> > >> Third, if you are at a point where you can drop and re-create > >> databases without considerable pain, can you run 'ant undeploy deploy > >> create_db import', if you haven't already? This will help ensure that > >> the import process will create the two default user accounts for your > >> new tenancy, one associated with the tenant administrator role and a > >> second associated with the tenant reader role. > >> > > > > Sure, can do. > > thanks, > > Joe > > > >> > >> Aron > >> > > >
AR
Aron Roberts
Wed, Jun 8, 2011 10:09 PM

Hi Joe,

You're correct.  I think I understand my confusion: the work that my
colleague Richard Millet did to support sparse tenant-bindings -
including the switchover to the 'tenant-bindings.delta.xml' filename -
was made a week prior to cutting the Services v1.7 tag, but only to
services trunk, not to the v1.7 services release branch.  So the
ability to use sparse tenant bindings is not in the v1.7 final
release, but rather is a feature introduced early in v1.8.

As you're implying, this means that if you're working with v1.7,
you'll still make the changes directly to a (monolithic)
tenant-bindings.xml file for your tenancy (which is basically will be
a 'clone and edit' of one of the existing tenant-bindings.xml files
provided in that release, for collectionspace or hearstmuseum), rather
than to a sparse tenant-bindings.delta.xml file that would need to
contain just your custom schema change.

That also means that the existing wiki documentation on adding a
custom field to tenant-bindings.xml is still (more or less) current.
My apologies for leading you astray with this 'sparse tenant-bindings'
suggestion, earlier today.

can you run 'ant undeploy deploy create_db import', if you haven't already?

Sure, can do.

Great!  Let us know how this goes!

Aron

--

On Wed, Jun 8, 2011 at 2:41 PM, Joe Slag joe@slagwerks.com wrote:

Looks like that code landed just after release 1.7 -- I first see the delta
in r4761, but 1.7 was branched in 4756.
If I'm reading that correctly, then, no sparse tenant-bindings until we
upgrade to 1.8?
thanks,
Joe

On Wed, Jun 8, 2011 at 4:03 PM, Aron Roberts aron@socrates.berkeley.edu
wrote:

On Wed, Jun 8, 2011 at 1:52 PM, Joe Slag joe@slagwerks.com wrote:

 Second, what tenant file did you create for walkerart.org
(https://gist.github.com/6cf91c5fd3ce881838e1): what is it named, and
where is it located in the source tree?  Have you placed this in, say,

services/common/src/main/cspace/config/services/tenants/walkerart/tenant-bindings-delta.xml?

almost; I'd been using tenants/wac/tenant-bindings.xml.

 It looks like this filename might need to be (exactly)
'tenant-bindings.delta.xml (with a dot between 'tenant-bindings' and
'delta.xml' - I erroneously wrote this with a dash above):

from
services/common/src/main/java/org/collectionspace/services/common/config/TenantBindingConfigReaderImpl.java:

final private static String TENANT_BINDINGS_FILENAME_PREFIX =
"tenant-bindings";
final private static String TENANT_BINDINGS_DELTA_FILENAME =
TENANT_BINDINGS_FILENAME_PREFIX + ".delta.xml";

 This does represent a recent change, from what I understand; the
per-tenant 'delta' tenant-bindings files were previously named
"tenant-bindings.xml".

Aron

 Third, if you are at a point where you can drop and re-create
databases without considerable pain, can you run 'ant undeploy deploy
create_db import', if you haven't already?  This will help ensure that
the import process will create the two default user accounts for your
new tenancy, one associated with the tenant administrator role and a
second associated with the tenant reader role.

Sure, can do.
thanks,
Joe

Aron

Hi Joe, You're correct. I think I understand my confusion: the work that my colleague Richard Millet did to support sparse tenant-bindings - including the switchover to the 'tenant-bindings.delta.xml' filename - was made a week prior to cutting the Services v1.7 tag, but only to services trunk, not to the v1.7 services release branch. So the ability to use sparse tenant bindings is not in the v1.7 final release, but rather is a feature introduced early in v1.8. As you're implying, this means that if you're working with v1.7, you'll still make the changes directly to a (monolithic) tenant-bindings.xml file for your tenancy (which is basically will be a 'clone and edit' of one of the existing tenant-bindings.xml files provided in that release, for collectionspace or hearstmuseum), rather than to a sparse tenant-bindings.delta.xml file that would need to contain just your custom schema change. That also means that the existing wiki documentation on adding a custom field to tenant-bindings.xml is still (more or less) current. My apologies for leading you astray with this 'sparse tenant-bindings' suggestion, earlier today. >> can you run 'ant undeploy deploy create_db import', if you haven't already? > Sure, can do. Great! Let us know how this goes! Aron -- On Wed, Jun 8, 2011 at 2:41 PM, Joe Slag <joe@slagwerks.com> wrote: > Looks like that code landed just after release 1.7 -- I first see the delta > in r4761, but 1.7 was branched in 4756. > If I'm reading that correctly, then, no sparse tenant-bindings until we > upgrade to 1.8? > thanks, > Joe > > On Wed, Jun 8, 2011 at 4:03 PM, Aron Roberts <aron@socrates.berkeley.edu> > wrote: >> >> On Wed, Jun 8, 2011 at 1:52 PM, Joe Slag <joe@slagwerks.com> wrote: >> >>  Second, what tenant file did you create for walkerart.org >> >> (https://gist.github.com/6cf91c5fd3ce881838e1): what is it named, and >> >> where is it located in the source tree?  Have you placed this in, say, >> >> >> >> >> >> services/common/src/main/cspace/config/services/tenants/walkerart/tenant-bindings-delta.xml? >> > >> > almost; I'd been using tenants/wac/tenant-bindings.xml. >> >>  It looks like this filename might need to be (exactly) >> 'tenant-bindings.delta.xml (with a dot between 'tenant-bindings' and >> 'delta.xml' - I erroneously wrote this with a dash above): >> >> from >> services/common/src/main/java/org/collectionspace/services/common/config/TenantBindingConfigReaderImpl.java: >> >> final private static String TENANT_BINDINGS_FILENAME_PREFIX = >> "tenant-bindings"; >> final private static String TENANT_BINDINGS_DELTA_FILENAME = >> TENANT_BINDINGS_FILENAME_PREFIX + ".delta.xml"; >> >>  This does represent a recent change, from what I understand; the >> per-tenant 'delta' tenant-bindings files *were* previously named >> "tenant-bindings.xml". >> >> Aron >> >> > >> >> >> >>  Third, if you are at a point where you can drop and re-create >> >> databases without considerable pain, can you run 'ant undeploy deploy >> >> create_db import', if you haven't already?  This will help ensure that >> >> the import process will create the two default user accounts for your >> >> new tenancy, one associated with the tenant administrator role and a >> >> second associated with the tenant reader role. >> >> >> > >> > Sure, can do. >> > thanks, >> > Joe >> > >> >> >> >> Aron >> >> >> > > >