[chef] Re: Need some help for django-deployment


Chronological Thread 
  • From: Noah Kantrowitz < >
  • To:
  • Subject: [chef] Re: Need some help for django-deployment
  • Date: Fri, 15 Feb 2013 12:58:54 -0800

You'll want to spell that 
"run_context.resource_collection.find('service[apache2]').run_action(:reload)"
 I think.

--Noah

On Feb 15, 2013, at 12:54 PM, Arnold Krille wrote:

> Hi folks,
> 
> I do have a little problem with the deployment of our django-app. Maybe
> you guys (and girls) can help?
> 
> Its nothing fancy yet, just a postgresql (on a different machine) and
> django served via wsgi on apache2.
> 
> The snipped below from our recipe does everything alright in
> updating the source from the repo and deploying it. But the one thing
> it doesn't do is restarting the apache2. I tried adding notifies at
> several places, I even did put an execute-block in after_restart but I
> can't get apache2 to restart when the deployment switched to a new
> revision.
> 
> Do you have an idea?
> 
> Thanks in advance,
> 
> Arnold
> 
> 
> Recipe snip:
> 
> application "ohf2" do
>  path root_dir
>  owner "www-data"
>  group "www-data"
> 
>  scm_provider Chef::Provider::Subversion
>  svn_username "<bla>"
>  svn_password "<blub>"
>  repository
> "https://development.bcs.bcs/svn/bcspackages/branches/ohf2alpha";
> 
>  migrate true
> 
>  django do
>    packages ["pytz", "django", "django_extensions", "django-mptt",
> "south", "psycopg2"]
>    debug false
>    settings_template 'settings_local.py.erb'
>    local_settings_file "settings_local.py"
> 
>    migration_command root_dir+"/shared/env/bin/python manage.py syncdb
> --noinput && "+root_dir+"/shared/env/bin/python manage.py migrate
> --delete-ghost-migrations --noinput &&
> "+root_dir+"/shared/env/bin/python manage.py runscript
> load_initial_data"
>    collectstatic true
> 
>    database do
>      database "ohf2alpha"¬ adapter "postgresql_psycopg2"
>      username dbuser
>      password dbpass
>      host dbservername
>    end
> 
>  end
> 
>  after_restart do
>    notifies :restart, "service[apache2]", :immediately
>  end
> end

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail




Archive powered by MHonArc 2.6.16.

§