On 12/02/2011, at 12:41 AM, Dave Johnson wrote:
That sounds like the db:seed rake task hasn't run which now needs
to be
run after db:migrate. (Make sure you have the solr process started as
well before you seed the db...rake sunspot:solr:start)
Ok. Added the solr process start and db:rake to deltacloud-configure.
ie. changed it from:
export RAILS_ENV=production
cd /usr/share/deltacloud-aggregator
rake db:create:all
rake db:migrate
rake dc:create_user[admin,password,admin@deltacloud.org,Admin,istrator]
to:
export RAILS_ENV=production
cd /usr/share/deltacloud-aggregator
rake db:create:all
rake db:migrate
rake sunspot:solr:start
sleep 5
rake db:seed
rake dc:create_user[admin,password,admin@deltacloud.org,Admin,istrator]
That works. The "sleep 5" seems to be needed though, otherwise the seed
task has trouble connecting (tried several times):
+ rake sunspot:solr:start
(in /usr/share/deltacloud-aggregator)
+ rake db:seed
(in /usr/share/deltacloud-aggregator)
rake aborted!
Connection refused - connect(2)
I only tried "5" as the delay, less may work as well.
Seems like a dodgy approach, but it works.
Guess we need to update the deltacloud-configure script next.
Regards and best wishes,
Justin Clift