You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Adrian Crum <ad...@hlmksw.com> on 2009/06/04 19:11:52 UTC
Discussion: Seed and Demo Data Files
I'm getting ready to deploy the latest trunk to our production server,
and I have encountered a few problems with the way the seed data is set up.
In order to get the latest features to work with my existing database, I
have to run ant run-install-seed. The problem is, there is a lot of demo
data in the seed files. And I really mean a LOT. After running
run-install-seed, my database contains a lot of demo data that I had
previously removed.
I would like to suggest the following best practices:
1. Keep seed-initial, seed, and demo data in separate XML files.
2. Name the files accordingly, so their purpose is clear. Example:
[component name]InitialData.xml, [component name]SeedData.xml, and
[component name]DemoData.xml.
Right now I'm working on sorting out the data for the accounting
component. The AccountingSecurityData.xml file is loaded as seed data,
but it contains both seed AND demo data: security permissions are seed
data, assigning those permissions to demo security groups is demo data.
The AccountingTypeData.xml file is loaded as seed data, but it also
contains both seed and demo data. Those are just two examples.
I can commit some of my work as an example of what changes need to be made.
What do you think?
-Adrian
Re: Discussion: Seed and Demo Data Files
Posted by Pranay Pandey <pr...@hotwaxmedia.com>.
Hi Adrian,
The data which is client specific should go in ext, so When we say run-
install-extseed it will go with seed data which is required for ext
data.
Adding suffix like you suggested is a good idea IMO. Lets see what
others have to say.
Thanks & Regards
--
Pranay Pandey
HotWax Media | http://www.hotwaxmedia.com
On Jun 4, 2009, at 10:41 PM, Adrian Crum wrote:
> I'm getting ready to deploy the latest trunk to our production
> server, and I have encountered a few problems with the way the seed
> data is set up.
>
> In order to get the latest features to work with my existing
> database, I have to run ant run-install-seed. The problem is, there
> is a lot of demo data in the seed files. And I really mean a LOT.
> After running run-install-seed, my database contains a lot of demo
> data that I had previously removed.
>
> I would like to suggest the following best practices:
>
> 1. Keep seed-initial, seed, and demo data in separate XML files.
> 2. Name the files accordingly, so their purpose is clear. Example:
> [component name]InitialData.xml, [component name]SeedData.xml, and
> [component name]DemoData.xml.
>
> Right now I'm working on sorting out the data for the accounting
> component. The AccountingSecurityData.xml file is loaded as seed
> data, but it contains both seed AND demo data: security permissions
> are seed data, assigning those permissions to demo security groups
> is demo data. The AccountingTypeData.xml file is loaded as seed
> data, but it also contains both seed and demo data. Those are just
> two examples.
>
> I can commit some of my work as an example of what changes need to
> be made.
>
> What do you think?
>
> -Adrian
Re: Discussion: Seed and Demo Data Files
Posted by Jacopo Cappellato <ja...@hotwaxmedia.com>.
On Jun 5, 2009, at 7:03 PM, Adam Heath wrote:
> Adrian Crum wrote:
>> Sharing some more thoughts on this...
>>
>> I tried doing a test run of installing seed-initial and seed data
>> only.
>> I couldn't get logged in because the admin user login is in demo
>> data -
>> not seed. I moved it to seed-initial - since the account should
>> only be
>> created/updated during the initial install (from my perspective
>> anyway).
>> I still couldn't log in because all of the components put their admin
>> permissions in the FULLADMIN security group, and I had left the
>> security
>> group assignments in demo data. So, that security group would have
>> to be
>> part of seed data too.
>
> No.
>
> There's an ant target you are supposed to call that created the admin
> user login.
>
That is correct; Adrian, please refer to this quick notes:
http://docs.ofbiz.org/display/~jacopoc/Quick+Start+Guide+1+-+Getting
+and+Running+OFBiz+in+5+steps
this is an extract from that page:
"If you don't want to load the demo data but only the seed data, use
the following command:
ant run-install-extseed create-admin-user-login
and when prompted, enter a user login id that will be created for you
(the initial temporary password is "ofbiz"). Or you can also pass the
user login id as a parameters with the following command:
ant run-install-extseed load-admin-user-login -DuserLoginId=<ENTER-A-
USER-LOGIN-HERE>"
Hope it helps,
Jacopo
Re: Discussion: Seed and Demo Data Files
Posted by David E Jones <da...@hotwaxmedia.com>.
On Jun 5, 2009, at 11:03 AM, Adam Heath wrote:
> Adrian Crum wrote:
>> Sharing some more thoughts on this...
>>
>> I tried doing a test run of installing seed-initial and seed data
>> only.
>> I couldn't get logged in because the admin user login is in demo
>> data -
>> not seed. I moved it to seed-initial - since the account should
>> only be
>> created/updated during the initial install (from my perspective
>> anyway).
>> I still couldn't log in because all of the components put their admin
>> permissions in the FULLADMIN security group, and I had left the
>> security
>> group assignments in demo data. So, that security group would have
>> to be
>> part of seed data too.
>
> No.
>
> There's an ant target you are supposed to call that created the admin
> user login.
Yes, this is a good point.
Don't confuse the term "seed" with the system being all configured and
ready to run, or implying that any part of it should be expected to
run as desired (including login).
The definitions in the entityengine.xml file where these are defined
might be helpful:
seed = OFBiz and External Seed Data - to be maintained along
with source and updated whenever a system deployment is updated
seed-initial = OFBiz and External Seed Data - to be maintained along
with source like other seed data, but only loaded initially and not
updated when a system is updated except manually reviewing each line
demo = OFBiz Only Demo Data
ext = External General Data (custom)
ext-test = External Test Data (custom)
ext-demo = External Demo Data (custom)
The admin user is, IMO (and based on discussions a bit ago), is part
of demo data and not seed or seed-initial.
Based on that, Adrian do you still think there is a big issue with
data that is in seed versus demo data files? I'm guessing there are
still some small issues with that, but hopefully it's not as big a
deal as you thought before...
-David
Re: Discussion: Seed and Demo Data Files
Posted by BJ Freeman <bj...@free-man.net>.
I just did an install using your 5 steps.
here is the results.
the Themes are not loaded
The backend defaults to bluelight style
however there is no way to select any styles.
other than those, it went great.
Jacopo Cappellato sent the following on 6/6/2009 1:47 AM:
> On Jun 5, 2009, at 7:03 PM, Adam Heath wrote:
>
>> Adrian Crum wrote:
>>> Sharing some more thoughts on this...
>>>
>>> I tried doing a test run of installing seed-initial and seed data only.
>>> I couldn't get logged in because the admin user login is in demo data -
>>> not seed. I moved it to seed-initial - since the account should only be
>>> created/updated during the initial install (from my perspective anyway).
>>> I still couldn't log in because all of the components put their admin
>>> permissions in the FULLADMIN security group, and I had left the security
>>> group assignments in demo data. So, that security group would have to be
>>> part of seed data too.
>>
>> No.
>>
>> There's an ant target you are supposed to call that created the admin
>> user login.
>>
>
> That is correct; Adrian, please refer to this quick notes:
>
> http://docs.ofbiz.org/display/~jacopoc/Quick+Start+Guide+1+-+Getting+and+Running+OFBiz+in+5+steps
>
>
> this is an extract from that page:
>
> "If you don't want to load the demo data but only the seed data, use the
> following command:
> ant run-install-extseed create-admin-user-login
> and when prompted, enter a user login id that will be created for you
> (the initial temporary password is "ofbiz"). Or you can also pass the
> user login id as a parameters with the following command:
>
> ant run-install-extseed load-admin-user-login
> -DuserLoginId=<ENTER-A-USER-LOGIN-HERE>"
>
> Hope it helps,
>
> Jacopo
--
BJ Freeman
http://www.businessesnetwork.com/automation
http://bjfreeman.elance.com
http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro
Systems Integrator.
Re: Discussion: Seed and Demo Data Files
Posted by Adam Heath <do...@brainfood.com>.
Adrian Crum wrote:
> Sharing some more thoughts on this...
>
> I tried doing a test run of installing seed-initial and seed data only.
> I couldn't get logged in because the admin user login is in demo data -
> not seed. I moved it to seed-initial - since the account should only be
> created/updated during the initial install (from my perspective anyway).
> I still couldn't log in because all of the components put their admin
> permissions in the FULLADMIN security group, and I had left the security
> group assignments in demo data. So, that security group would have to be
> part of seed data too.
No.
There's an ant target you are supposed to call that created the admin
user login.
Re: Discussion: Seed and Demo Data Files
Posted by Adrian Crum <ad...@hlmksw.com>.
Sharing some more thoughts on this...
I tried doing a test run of installing seed-initial and seed data only.
I couldn't get logged in because the admin user login is in demo data -
not seed. I moved it to seed-initial - since the account should only be
created/updated during the initial install (from my perspective anyway).
I still couldn't log in because all of the components put their admin
permissions in the FULLADMIN security group, and I had left the security
group assignments in demo data. So, that security group would have to be
part of seed data too.
The goal I was aiming for was to set up a trial new installation that
had only the data needed to get the system running. It ended up being a
bigger task than I anticipated, so I dropped it.
The bottom line is, I started out thinking the boundary between seed
data and demo data is clear-cut and it would be easy to separate the
two, but it isn't.
-Adrian
David E Jones wrote:
>
> I haven't really reviewed this for a while, and it's really frustrating
> to hear this assessment.
>
> This is definitely a critical effort, especially for those who are
> maintaining production instances and need to update seed data every time
> they update code. It's a probably we (hopefully!) all have.
>
> As for the file naming conventions, to keep it simple we should probably
> just say "[descriptive prefix]" instead of "[component-name]", kind of
> along the lines of what Mridul mentioned.
>
> On a related note, the main documentation for this is in the build.xml
> file (in the ofbiz-home directory)... and I've been thinking that maybe
> we should have something in the Best Practices Guide, or in a sub-page
> of that. Maybe then more people would find it and use it.
>
> -David
>
>
> On Jun 4, 2009, at 11:11 AM, Adrian Crum wrote:
>
>> I'm getting ready to deploy the latest trunk to our production server,
>> and I have encountered a few problems with the way the seed data is
>> set up.
>>
>> In order to get the latest features to work with my existing database,
>> I have to run ant run-install-seed. The problem is, there is a lot of
>> demo data in the seed files. And I really mean a LOT. After running
>> run-install-seed, my database contains a lot of demo data that I had
>> previously removed.
>>
>> I would like to suggest the following best practices:
>>
>> 1. Keep seed-initial, seed, and demo data in separate XML files.
>> 2. Name the files accordingly, so their purpose is clear. Example:
>> [component name]InitialData.xml, [component name]SeedData.xml, and
>> [component name]DemoData.xml.
>>
>> Right now I'm working on sorting out the data for the accounting
>> component. The AccountingSecurityData.xml file is loaded as seed data,
>> but it contains both seed AND demo data: security permissions are seed
>> data, assigning those permissions to demo security groups is demo
>> data. The AccountingTypeData.xml file is loaded as seed data, but it
>> also contains both seed and demo data. Those are just two examples.
>>
>> I can commit some of my work as an example of what changes need to be
>> made.
>>
>> What do you think?
>>
>> -Adrian
>
>
Re: Discussion: Seed and Demo Data Files
Posted by David E Jones <da...@hotwaxmedia.com>.
I haven't really reviewed this for a while, and it's really
frustrating to hear this assessment.
This is definitely a critical effort, especially for those who are
maintaining production instances and need to update seed data every
time they update code. It's a probably we (hopefully!) all have.
As for the file naming conventions, to keep it simple we should
probably just say "[descriptive prefix]" instead of "[component-
name]", kind of along the lines of what Mridul mentioned.
On a related note, the main documentation for this is in the build.xml
file (in the ofbiz-home directory)... and I've been thinking that
maybe we should have something in the Best Practices Guide, or in a
sub-page of that. Maybe then more people would find it and use it.
-David
On Jun 4, 2009, at 11:11 AM, Adrian Crum wrote:
> I'm getting ready to deploy the latest trunk to our production
> server, and I have encountered a few problems with the way the seed
> data is set up.
>
> In order to get the latest features to work with my existing
> database, I have to run ant run-install-seed. The problem is, there
> is a lot of demo data in the seed files. And I really mean a LOT.
> After running run-install-seed, my database contains a lot of demo
> data that I had previously removed.
>
> I would like to suggest the following best practices:
>
> 1. Keep seed-initial, seed, and demo data in separate XML files.
> 2. Name the files accordingly, so their purpose is clear. Example:
> [component name]InitialData.xml, [component name]SeedData.xml, and
> [component name]DemoData.xml.
>
> Right now I'm working on sorting out the data for the accounting
> component. The AccountingSecurityData.xml file is loaded as seed
> data, but it contains both seed AND demo data: security permissions
> are seed data, assigning those permissions to demo security groups
> is demo data. The AccountingTypeData.xml file is loaded as seed
> data, but it also contains both seed and demo data. Those are just
> two examples.
>
> I can commit some of my work as an example of what changes need to
> be made.
>
> What do you think?
>
> -Adrian
Re: Discussion: Seed and Demo Data Files
Posted by Jacques Le Roux <ja...@les7arts.com>.
+1 for differentiating data files names
+1 for good examples commited (or if easier shown somewhere)
Jacques
From: "Adrian Crum" <ad...@hlmksw.com>
> I'm getting ready to deploy the latest trunk to our production server,
> and I have encountered a few problems with the way the seed data is set up.
>
> In order to get the latest features to work with my existing database, I
> have to run ant run-install-seed. The problem is, there is a lot of demo
> data in the seed files. And I really mean a LOT. After running
> run-install-seed, my database contains a lot of demo data that I had
> previously removed.
>
> I would like to suggest the following best practices:
>
> 1. Keep seed-initial, seed, and demo data in separate XML files.
> 2. Name the files accordingly, so their purpose is clear. Example:
> [component name]InitialData.xml, [component name]SeedData.xml, and
> [component name]DemoData.xml.
>
> Right now I'm working on sorting out the data for the accounting
> component. The AccountingSecurityData.xml file is loaded as seed data,
> but it contains both seed AND demo data: security permissions are seed
> data, assigning those permissions to demo security groups is demo data.
> The AccountingTypeData.xml file is loaded as seed data, but it also
> contains both seed and demo data. Those are just two examples.
>
> I can commit some of my work as an example of what changes need to be made.
>
> What do you think?
>
> -Adrian
>