Add ubuntu package building
Add all the scripts needed to build debian packages Change-Id: I41cc6f9439bb1edb29d3a17f2d507d104eca8643
This commit is contained in:
parent
1ee10bd980
commit
2e7af3a043
7
.gitignore
vendored
7
.gitignore
vendored
@ -7,3 +7,10 @@ build
|
||||
.cache
|
||||
*.swp
|
||||
doc/html
|
||||
debian/files
|
||||
debian/libra.debhelper.log
|
||||
debian/libra.postinst.debhelper
|
||||
debian/libra.preinst.debhelper
|
||||
debian/libra.prerm.debhelper
|
||||
debian/libra.substvars
|
||||
debian/libra/
|
||||
|
5
debian/changelog
vendored
Normal file
5
debian/changelog
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
libra (1.0-1) UNRELEASED; urgency=low
|
||||
|
||||
* Initial release.
|
||||
|
||||
-- Andrew Hutchings <andrew@linuxjedi.co.uk> Thu, 16 Nov 2012 14:26:59 +0000
|
1
debian/compat
vendored
Normal file
1
debian/compat
vendored
Normal file
@ -0,0 +1 @@
|
||||
9
|
16
debian/control
vendored
Normal file
16
debian/control
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
Source: libra
|
||||
Section: python
|
||||
Priority: optional
|
||||
Maintainer: Andrew Hutchings (LinuxJedi)
|
||||
Build-Depends: debhelper (>=9), python-support (>=1.0), cdbs (>=0.4.111), python-all-dev, python-eventlet (>=0.9), python-gearman (>=2.0), python-daemon (>=1.5), python-novaclient (>=2.9), python-requests (>=0.12)
|
||||
Build-Depends-Indep: python-sphinx (>=1.0), rst2pdf (>=0.16)
|
||||
Standards-Version: 3.9.4
|
||||
Homepage: https://launchpad.net/libra
|
||||
|
||||
Package: libra
|
||||
Architecture: all
|
||||
XB-Python-Version: ${python-Versions}
|
||||
Depends: ${misc:Depends}, ${python:Depends}
|
||||
Provides: ${python:Provides}
|
||||
Description: Tools for an Openstack Load Balancer as a Service
|
||||
|
21
debian/copyright
vendored
Normal file
21
debian/copyright
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
Format: http://dep.debian.net/deps/dep5
|
||||
Upstream-Name: libra
|
||||
Source: https://launchpad.net/libra/
|
||||
|
||||
Files: *
|
||||
Copyright: 2012 Hewlett-Packard Development Company, L.P.
|
||||
License: Apache 2.0
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
.
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
.
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
.
|
||||
On Debian systems, the complete text of the Apache License 2.0 can
|
||||
be found in "/usr/share/common-licenses/Apache-2.0"
|
25
debian/libra.postinst
vendored
Executable file
25
debian/libra.postinst
vendored
Executable file
@ -0,0 +1,25 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
if [ "$1" = "configure" ]; then
|
||||
if [ -z "`id -u libra 2> /dev/null`" ]; then
|
||||
adduser --system --group --home /usr/lib/libra --gecos "Libra load balancer" \
|
||||
--no-create-home --disabled-password --quiet libra || true
|
||||
fi
|
||||
|
||||
ucf --three-way /usr/share/libra/sample_libra.cfg /etc/libra.cfg
|
||||
|
||||
if [ ! -d /var/log/libra ]; then
|
||||
mkdir /var/log/libra
|
||||
chown libra:libra /var/log/libra
|
||||
fi
|
||||
|
||||
if [ ! -d /var/run/libra ]; then
|
||||
mkdir /var/run/libra
|
||||
chown libra:libra /var/run/libra
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
#DEBHELPER#
|
12
debian/libra_pool_mgm.upstart
vendored
Normal file
12
debian/libra_pool_mgm.upstart
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
description "pool_mgm"
|
||||
|
||||
start on (net-device-up
|
||||
and local-filesystems
|
||||
and runlevel [2345])
|
||||
stop on runlevel [!2345]
|
||||
|
||||
script
|
||||
libra_pool_mgm -c /etc/libra.cfg
|
||||
|
||||
end script
|
||||
|
@ -6,10 +6,7 @@ start on (net-device-up
|
||||
stop on runlevel [!2345]
|
||||
|
||||
script
|
||||
mkdir /var/run/libra
|
||||
chown haproxy /var/run/libra
|
||||
chgrp haproxy /var/run/libra
|
||||
libra_worker -c /etc/libra.cnf
|
||||
libra_worker -c /etc/libra.cfg
|
||||
|
||||
end script
|
||||
|
1
debian/pyversions
vendored
Normal file
1
debian/pyversions
vendored
Normal file
@ -0,0 +1 @@
|
||||
2.7-
|
11
debian/rules
vendored
Executable file
11
debian/rules
vendored
Executable file
@ -0,0 +1,11 @@
|
||||
#!/usr/bin/make -f
|
||||
# -*- makefile -*-
|
||||
|
||||
WITH_PYTHON2 = $(shell test -f /usr/bin/dh_python2 && echo "--with python2")
|
||||
|
||||
%:
|
||||
dh $@ ${WITH_PYTHON2}
|
||||
|
||||
override_dh_installinit:
|
||||
dh_installinit --name=libra_worker
|
||||
dh_installinit --name=libra_pool_mgm --no-start
|
@ -24,8 +24,8 @@ verbose = true
|
||||
# The [worker] section is specific to the libra_worker utility.
|
||||
|
||||
[worker]
|
||||
user = haproxy
|
||||
group = haproxy
|
||||
user = libra
|
||||
group = libra
|
||||
driver = haproxy
|
||||
reconnect_sleep = 60
|
||||
stats_poll = 300
|
||||
@ -36,9 +36,11 @@ logfile = /var/log/libra/libra_worker.log
|
||||
# The [mgm] section is specific to the libra_mgm utility.
|
||||
|
||||
[mgm]
|
||||
user = libra
|
||||
group = libra
|
||||
pid = /var/run/libra/libra_mgm.pid
|
||||
logfile = /var/log/libra/libra_mgm.log
|
||||
datadir = /etc/libra/
|
||||
datadir = /var/run/libra/
|
||||
nova_auth_url = https://region-a.geo-1.identity.hpcloudsvc.com:35357/v2.0/
|
||||
nova_user = username
|
||||
nova_pass = password
|
||||
|
Loading…
x
Reference in New Issue
Block a user