mirror of
https://github.com/ansible/awx.git
synced 2026-03-13 15:09:32 -02:30
Initial work for packaging .deb
This commit is contained 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 *.css *.ico *.png *.gif *.jpg
|
||||||
recursive-include awx/ui/static *.eot *.svg *.ttf *.woff *.otf
|
recursive-include awx/ui/static *.eot *.svg *.ttf *.woff *.otf
|
||||||
recursive-include config *
|
recursive-include config *
|
||||||
|
recursive-include config/deb *
|
||||||
|
recursive-include config/rpm *
|
||||||
recursive-exclude awx devonly.py
|
recursive-exclude awx devonly.py
|
||||||
recursive-exclude awx/settings local_settings.py*
|
recursive-exclude awx/settings local_settings.py
|
||||||
include *.py *.txt *.md
|
include *.py *.txt *.md
|
||||||
include MANIFEST.in
|
include MANIFEST.in
|
||||||
include COPYING
|
include COPYING
|
||||||
|
|||||||
12
Makefile
12
Makefile
@@ -9,7 +9,9 @@ RELEASE=awx-1.2b2
|
|||||||
|
|
||||||
# Remove temporary build files, compiled Python files.
|
# Remove temporary build files, compiled Python files.
|
||||||
clean:
|
clean:
|
||||||
|
rm -rf dist/*
|
||||||
rm -rf build rpm-build *.egg-info
|
rm -rf build rpm-build *.egg-info
|
||||||
|
rm -rf debian deb-build
|
||||||
find . -type f -regex ".*\.py[co]$$" -delete
|
find . -type f -regex ".*\.py[co]$$" -delete
|
||||||
|
|
||||||
# Fetch from origin, rebase local commits on top of origin commits.
|
# 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 '_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm' \
|
||||||
--define "_sourcedir %{_topdir}" \
|
--define "_sourcedir %{_topdir}" \
|
||||||
-ba packaging/rpm/awx.spec
|
-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 ""
|
||||||
|
|||||||
13
config/awx_supervisor.conf
Normal file
13
config/awx_supervisor.conf
Normal 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
36
config/deb/settings.py
Normal 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
|
||||||
@@ -32,7 +32,7 @@ LOGGING['handlers']['syslog'] = {
|
|||||||
|
|
||||||
SERVER_EMAIL = 'root@localhost'
|
SERVER_EMAIL = 'root@localhost'
|
||||||
DEFAULT_FROM_EMAIL = 'webmaster@localhost'
|
DEFAULT_FROM_EMAIL = 'webmaster@localhost'
|
||||||
EMAIL_SUBJECT_PREFIX = '[AWX] '
|
EMAIL_SUBJECT_PREFIX = '[AnsibleWorks] '
|
||||||
|
|
||||||
EMAIL_HOST = 'localhost'
|
EMAIL_HOST = 'localhost'
|
||||||
EMAIL_PORT = 25
|
EMAIL_PORT = 25
|
||||||
31
setup.py
31
setup.py
@@ -15,8 +15,10 @@ etcpath = "/etc/awx"
|
|||||||
homedir = "/var/lib/awx"
|
homedir = "/var/lib/awx"
|
||||||
if os.path.exists("/etc/debian_version"):
|
if os.path.exists("/etc/debian_version"):
|
||||||
webconfig = "/etc/apache2/conf.d"
|
webconfig = "/etc/apache2/conf.d"
|
||||||
|
settingsconf = "config/deb/settings.py"
|
||||||
else:
|
else:
|
||||||
webconfig = "/etc/httpd/conf.d"
|
webconfig = "/etc/httpd/conf.d"
|
||||||
|
settingsconf = "config/rpm/settings.py"
|
||||||
|
|
||||||
#####################################################################
|
#####################################################################
|
||||||
# Helper Functions
|
# Helper Functions
|
||||||
@@ -71,20 +73,19 @@ setup(
|
|||||||
packages=['awx'],
|
packages=['awx'],
|
||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
zip_safe=False,
|
zip_safe=False,
|
||||||
install_requires=[
|
#install_requires=[
|
||||||
'Django>=1.5',
|
# 'Django>=1.5', yes
|
||||||
'django-celery',
|
# 'django-celery', yes
|
||||||
'django-extensions',
|
# 'django-extensions', yes
|
||||||
'django-filter',
|
# 'django-filter',
|
||||||
'django-jsonfield',
|
# 'django-jsonfield',
|
||||||
'django-taggit',
|
# 'django-taggit',
|
||||||
'djangorestframework>=2.3.0,<2.4.0',
|
# 'djangorestframework>=2.3.0,<2.4.0',
|
||||||
'pexpect',
|
# 'pexpect',
|
||||||
'python-dateutil',
|
# 'python-dateutil', yes
|
||||||
'PyYAML',
|
# 'PyYAML', yes
|
||||||
'requests',
|
# 'South>=0.8,<2.0',
|
||||||
'South>=0.8,<2.0',
|
#],
|
||||||
],
|
|
||||||
setup_requires=[],
|
setup_requires=[],
|
||||||
classifiers=[
|
classifiers=[
|
||||||
'Development Status :: 4 - Beta',
|
'Development Status :: 4 - Beta',
|
||||||
@@ -110,7 +111,7 @@ setup(
|
|||||||
("%s" % homedir, ["awx/wsgi.py",
|
("%s" % homedir, ["awx/wsgi.py",
|
||||||
"awx/static/favicon.ico",
|
"awx/static/favicon.ico",
|
||||||
]),
|
]),
|
||||||
("%s" % etcpath, ["config/settings.py"]),
|
("%s" % etcpath, [settingsconf,]),
|
||||||
("%s" % webconfig, ["config/awx.conf"]),
|
("%s" % webconfig, ["config/awx.conf"]),
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user