diff --git a/MANIFEST.in b/MANIFEST.in index fe0395bf41..d41947e7b7 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -5,8 +5,10 @@ recursive-include awx/ui *.html *.js recursive-include awx/ui/static *.css *.ico *.png *.gif *.jpg recursive-include awx/ui/static *.eot *.svg *.ttf *.woff *.otf recursive-include config * +recursive-include config/deb * +recursive-include config/rpm * recursive-exclude awx devonly.py -recursive-exclude awx/settings local_settings.py* +recursive-exclude awx/settings local_settings.py include *.py *.txt *.md include MANIFEST.in include COPYING diff --git a/Makefile b/Makefile index 0a49ec0785..58224eab50 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,9 @@ RELEASE=awx-1.2b2 # Remove temporary build files, compiled Python files. clean: + rm -rf dist/* rm -rf build rpm-build *.egg-info + rm -rf debian deb-build find . -type f -regex ".*\.py[co]$$" -delete # Fetch from origin, rebase local commits on top of origin commits. @@ -122,3 +124,13 @@ rpm: sdist --define '_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm' \ --define "_sourcedir %{_topdir}" \ -ba packaging/rpm/awx.spec + +deb: sdist + cp -r packaging/debian ./ + chmod 755 debian/rules + fakeroot debian/rules clean + fakeroot dh_install + fakeroot debian/rules binary + +install: + $(PYTHON) setup.py install egg_info -b "" diff --git a/config/awx_supervisor.conf b/config/awx_supervisor.conf new file mode 100644 index 0000000000..380ca34bf6 --- /dev/null +++ b/config/awx_supervisor.conf @@ -0,0 +1,13 @@ +[program:ansibleworks-celeryd] +autorestart = true +logfile = /var/log/supervisor/ansibleworks-celeryd.log +stopwaitsecs = 600 +log_stdout = true +command = /usr/bin/ansibleworks-manage celeryd -B -l info --autoscale=20,2 +user = ansibleworks +autostart = true +directory = /var/lib/ansibleworks +log_stderr = true +logfile_maxbytes = 50MB +logfile_backups = 999 + diff --git a/config/deb/settings.py b/config/deb/settings.py new file mode 100644 index 0000000000..c53f6a479a --- /dev/null +++ b/config/deb/settings.py @@ -0,0 +1,36 @@ +ADMINS = ( + #('Joe Admin', 'joeadmin@example.com'), +) + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.postgresql_psycopg2', + 'NAME': 'awx', + 'USER': 'awx', + 'PASSWORD': 'AWsecret', + 'HOST': '', + 'PORT': '', + } +} + +STATIC_ROOT = '/var/lib/awx/public/static' + +PROJECTS_ROOT = '/var/lib/awx/projects' + +SECRET_KEY = file('/etc/awx/SECRET_KEY', 'rb').read().strip() + +ALLOWED_HOSTS = ['*'] + +LOGGING = { + 'version': 1, +} + +SERVER_EMAIL = 'root@localhost' +DEFAULT_FROM_EMAIL = 'webmaster@localhost' +EMAIL_SUBJECT_PREFIX = '[AnsibleWorks] ' + +EMAIL_HOST = 'localhost' +EMAIL_PORT = 25 +EMAIL_HOST_USER = '' +EMAIL_HOST_PASSWORD = '' +EMAIL_USE_TLS = False diff --git a/config/settings.py b/config/rpm/settings.py similarity index 95% rename from config/settings.py rename to config/rpm/settings.py index ab821fbcd4..1ecde70c37 100644 --- a/config/settings.py +++ b/config/rpm/settings.py @@ -32,7 +32,7 @@ LOGGING['handlers']['syslog'] = { SERVER_EMAIL = 'root@localhost' DEFAULT_FROM_EMAIL = 'webmaster@localhost' -EMAIL_SUBJECT_PREFIX = '[AWX] ' +EMAIL_SUBJECT_PREFIX = '[AnsibleWorks] ' EMAIL_HOST = 'localhost' EMAIL_PORT = 25 diff --git a/setup.py b/setup.py index 31d93305d9..428cf1af44 100755 --- a/setup.py +++ b/setup.py @@ -15,8 +15,10 @@ etcpath = "/etc/awx" homedir = "/var/lib/awx" if os.path.exists("/etc/debian_version"): webconfig = "/etc/apache2/conf.d" + settingsconf = "config/deb/settings.py" else: webconfig = "/etc/httpd/conf.d" + settingsconf = "config/rpm/settings.py" ##################################################################### # Helper Functions @@ -71,20 +73,19 @@ setup( packages=['awx'], include_package_data=True, zip_safe=False, - install_requires=[ - 'Django>=1.5', - 'django-celery', - 'django-extensions', - 'django-filter', - 'django-jsonfield', - 'django-taggit', - 'djangorestframework>=2.3.0,<2.4.0', - 'pexpect', - 'python-dateutil', - 'PyYAML', - 'requests', - 'South>=0.8,<2.0', - ], + #install_requires=[ + # 'Django>=1.5', yes + # 'django-celery', yes + # 'django-extensions', yes + # 'django-filter', + # 'django-jsonfield', + # 'django-taggit', + # 'djangorestframework>=2.3.0,<2.4.0', + # 'pexpect', + # 'python-dateutil', yes + # 'PyYAML', yes + # 'South>=0.8,<2.0', + #], setup_requires=[], classifiers=[ 'Development Status :: 4 - Beta', @@ -110,7 +111,7 @@ setup( ("%s" % homedir, ["awx/wsgi.py", "awx/static/favicon.ico", ]), - ("%s" % etcpath, ["config/settings.py"]), + ("%s" % etcpath, [settingsconf,]), ("%s" % webconfig, ["config/awx.conf"]), ] ),