1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-27 00:55:06 +03:00

Initial work for packaging .deb

This commit is contained in:
James Cammarata 2013-06-23 15:40:07 -04:00
parent 07657926b9
commit c2a0004c6c
6 changed files with 81 additions and 17 deletions

View File

@ -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

View File

@ -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 ""

View File

@ -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

36
config/deb/settings.py Normal file
View File

@ -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

View File

@ -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

View File

@ -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"]),
]
),