diff --git a/files/gunicorn.service b/files/gunicorn.service deleted file mode 100644 index ff331e9..0000000 --- a/files/gunicorn.service +++ /dev/null @@ -1,15 +0,0 @@ -[Unit] -Description=Run gunicorn as a system service -After=network.target - -[Service] -Type=simple -User=devops -Group=devops -WorkingDirectory=/opt/mars/marssite -ExecStart=/opt/mars/venv/bin/gunicorn --config /etc/gunicorn-conf.py marssite.wsgi -Restart=on-failure - -# test enable, start using puppet -[Install] -WantedBy=multi-user.target diff --git a/manifests/install.pp b/manifests/install.pp index 9093c51..b96d6b8 100644 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -45,7 +45,7 @@ #!include augeas ensure_resource('package', ['git', ], {'ensure' => 'present'}) package{ ['epel-release', 'jemalloc', 'ganglia', - 'nginx', + 'nginx', 'supervisor', 'xinetd'] : } group { 'tada': @@ -358,17 +358,16 @@ ensure => 'present', source => 'puppet:///modules/marsnat/uwsgi_params', } - file { '/etc/systemd/system/gunicorn.service' : - ensure => 'present', - owner => 'root', - group => 'root', - mode => '0644', - replace => true, - source => 'puppet:///modules/marsnat/gunicorn.service' + file { '/etc/supervisord.d' : + ensure => 'directory', + } + file { '/etc/supervisord.d/supervisor-app.conf' : + ensure => 'file', + source => 'puppet:///modules/marsnat/nginx/supervisor-app.conf', } - ~> service {'gunicorn': - ensure => 'running', - subscribe => [ Vcsrepo['/opt/mars'] ], + file { '/etc/supervisord.conf' : + ensure => 'file', + source => 'puppet:///modules/marsnat/nginx/supervisord.conf', } file { '/etc/gunicorn-conf.py' : ensure => 'file',