Browse Source

Introduce proper packaging for fuel-nailgun deb package

Closes-bug: #1665311
Related blueprint: distributed-serialization

Change-Id: I0c11d18ed456c253971a312f9fb5a41220549be5
Vladimir Kuklin 2 years ago
parent
commit
2f522172ce

+ 76
- 8
debian/control View File

@@ -1,11 +1,80 @@
1 1
 Source: fuel-nailgun
2
-Section: unknown
3
-Priority: net
4
-Maintainer: Mirantis Producta <product@mirantis.com>
5
-Build-Depends: debhelper (>= 8.0.0), python-setuptools
6
-X-Python-Version: 2.6, 2.7
7
-Standards-Version: 3.9.2
8
-Homepage: mirantis.com
2
+Section: python
3
+Priority: optional
4
+Maintainer: Mirantis <product@mirantis.com>
5
+Build-Depends: debhelper (>= 9),
6
+               dh-python,
7
+               dh-systemd,
8
+               openstack-pkg-tools,
9
+               python-all,
10
+               python-setuptools (>= 16.0),
11
+               python-pbr (>= 1.8),
12
+               python-yaml (>= 3.1.0),
13
+               git,
14
+Standards-Version: 3.9.4
15
+Homepage: https://launchpad.net/fuel
16
+
17
+Package: fuel-nailgun
18
+Architecture: all
19
+Depends: fuel-openstack-metadata,
20
+         python-alembic (>= 0.8.4),
21
+         python-amqplib (>= 1.0.2),
22
+         python-anyjson (>= 0.3.3),
23
+         python-babel (>= 2.3.4),
24
+         python-crypto (>= 2.6.1),
25
+         python-decorator (>= 3.4.0),
26
+         python-fysom (>= 1.0.11),
27
+         python-iso8601 (>= 0.1.11),
28
+         python-jinja2 (>= 2.8),
29
+         python-jsonschema (>= 2.3.0),
30
+         python-keystoneclient (>= 1.7.0),
31
+         python-keystonemiddleware (>= 4.0.0),
32
+         python-kombu (>= 3.0.25),
33
+         python-mako (>= 0.9.1),
34
+         python-markupsafe (>= 0.18),
35
+         python-migrate (>= 0.9.6),
36
+         python-netaddr (>= 0.7.12),
37
+         python-netifaces (>= 0.10.4),
38
+         python-oslo-config (>= 1:1.2.1),
39
+         python-oslo-serialization (>= 1.0.0),
40
+         python-oslo-db (>= 1.0.0),
41
+         python-paste (>= 1.7.5.1),
42
+         python-ply (>= 3.4),
43
+         python-psycopg2 (>= 2.5.1),
44
+         python-requests (>= 2.10.0),
45
+         python-simplejson (>= 3.3.0),
46
+         python-six (>= 1.9.0),
47
+         python-sqlalchemy (>= 1.0.10),
48
+         python-stevedore (>= 1.10.0),
49
+         python-urllib3 (>= 1.15.1),
50
+         python-webpy (>= 0.37),
51
+         python-wsgilog (>= 0.3),
52
+         python-yaml (>= 3.10),
53
+         python-novaclient (>= 2.29.0),
54
+         python-networkx (>= 1.8),
55
+         python-cinderclient (>= 1.6.0),
56
+         python-pydot-ng (>= 1.0.0),
57
+         python-uwsgidecorators (>= 2.0.12),
58
+         python-yaql (>= 1.1.0),
59
+         python-tz (>= 2013.6),
60
+         ${python:Depends},
61
+         ${misc:Depends}
62
+Description: fuel-web (nailgun) implements REST API and deployment data management.
63
+ It manages disk volumes configuration data, networks configuration data
64
+ and any other environment specific data which are necessary for successful deployment.
65
+ It has required orchestration logic to build instructions for provisioning
66
+ and deployment in a right order. Nailgun uses SQL database to store its data
67
+ and AMQP service to interact with workers.
68
+
69
+Package: fuel-openstack-metadata
70
+Architecture: all
71
+Depends: ${misc:Depends}
72
+Description: fuel-web (nailgun) implements REST API and deployment data management.
73
+ It manages disk volumes configuration data, networks configuration data
74
+ and any other environment specific data which are necessary for successful deployment.
75
+ It has required orchestration logic to build instructions for provisioning
76
+ and deployment in a right order. Nailgun uses SQL database to store its data
77
+ and AMQP service to interact with workers.
9 78
 
10 79
 Package: fencing-agent
11 80
 Architecture: all
@@ -16,4 +85,3 @@ Depends: ohai,
16 85
   ruby-json,
17 86
   ${misc:Depends}
18 87
 Description: Fencing agent
19
- .

+ 28
- 0
debian/copyright View File

@@ -0,0 +1,28 @@
1
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
2
+Upstream-Name: fuel-web
3
+Source: https://github.com/openstack/fuel-web.git
4
+
5
+Files: *
6
+Copyright: (c) 2016, Mirantis, Inc.
7
+License: Apache-2
8
+
9
+Files: debian/*
10
+Copyright: (c) 2016, Mirantis, Inc.
11
+License: Apache-2
12
+
13
+License: Apache-2
14
+ Licensed under the Apache License, Version 2.0 (the "License");
15
+ you may not use this file except in compliance with the License.
16
+ You may obtain a copy of the License at
17
+ .
18
+    http://www.apache.org/licenses/LICENSE-2.0
19
+ .
20
+ Unless required by applicable law or agreed to in writing, software
21
+ distributed under the License is distributed on an "AS IS" BASIS,
22
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23
+ See the License for the specific language governing permissions and
24
+ limitations under the License.
25
+ .
26
+ On Debian-based systems the full text of the Apache version 2.0 license
27
+ can be found in `/usr/share/common-licenses/Apache-2.0'.
28
+

+ 1
- 0
debian/docs View File

@@ -0,0 +1 @@
1
+README.md

+ 2
- 0
debian/fencing-agent.dirs View File

@@ -0,0 +1,2 @@
1
+opt/nailgun/bin
2
+etc/cron.d

+ 2
- 1
debian/fencing-agent.install View File

@@ -1 +1,2 @@
1
-bin/fencing-agent.rb /opt/nailgun/bin
1
+bin/fencing-agent.rb opt/nailgun/bin
2
+bin/fencing-agent.cron etc/cron.d

+ 4
- 0
debian/fuel-nailgun.dirs View File

@@ -0,0 +1,4 @@
1
+etc/nailgun
2
+var/log/nailgun
3
+usr/bin
4
+usr/share

+ 2
- 0
debian/fuel-nailgun.install View File

@@ -0,0 +1,2 @@
1
+nailgun/nailgun/settings.yaml /etc/nailgun/
2
+systemd/* /lib/systemd/system/

+ 2
- 0
debian/fuel-openstack-metadata.dirs View File

@@ -0,0 +1,2 @@
1
+usr/share/fuel-openstack-metadata
2
+etc

+ 2
- 0
debian/fuel-openstack-metadata.install View File

@@ -0,0 +1,2 @@
1
+nailgun/nailgun/fixtures/openstack.yaml usr/share/fuel-openstack-metadata
2
+fuel_openstack_version etc

+ 12
- 0
debian/openstack-version View File

@@ -0,0 +1,12 @@
1
+#! /usr/bin/env python2
2
+
3
+import sys
4
+import yaml
5
+
6
+if len(sys.argv) == 2:
7
+    openstack_yaml = open(sys.argv[1])
8
+    yaml = yaml.safe_load(openstack_yaml)
9
+    elems = filter(lambda r: r['fields'].get('name'), yaml)
10
+    print elems[0]['fields']['version']
11
+else:
12
+    print """Usage: {} OPENSTACK_YAML""".format(sys.argv[0])

+ 38
- 7
debian/rules View File

@@ -1,15 +1,46 @@
1 1
 #!/usr/bin/make -f
2
+# -*- makefile -*-
3
+
2 4
 DH_VERBOSE=1
3 5
 
4
-topdir=$(shell pwd)
6
+PYTHONS:=$(shell pyversions -vr)
7
+
8
+include /usr/share/openstack-pkg-tools/pkgos.make
9
+
10
+#export OSLO_PACKAGE_VERSION=$(shell dpkg-parsechangelog | grep Version: | cut -d' ' -f2 | sed -e 's/^[[:digit:]]*://' -e 's/[-].*//' -e 's/~/.0/' | head -n 1)
5 11
 
6 12
 %:
7
-	dh $@ --with python2
13
+	dh $@ --with python2,systemd
8 14
 
9
-override_dh_auto_install:
10
-	dh_auto_install
11 15
 override_dh_auto_build:
12
-	dh_clean
13 16
 	dh_auto_build
14
-override_dh_auto_clean:
15
-	dh_auto_clean
17
+	python $(CURDIR)/debian/openstack-version nailgun/nailgun/fixtures/openstack.yaml > $(CURDIR)/fuel_openstack_version
18
+
19
+override_dh_auto_install:
20
+	cd nailgun \
21
+	set -e ; for pyvers in $(PYTHONS); do \
22
+		python$$pyvers setup.py install --install-layout=deb \
23
+			--root $(CURDIR)/debian/fuel-nailgun; \
24
+	done
25
+
26
+override_dh_clean:
27
+	rm -rf  build
28
+	dh_clean -O--buildsystem=python_distutils
29
+	rm -f debian/nailgun-common.postinst
30
+	rm -f debian/*.service debian/*.init debian/*.upstart
31
+
32
+override_dh_systemd_enable: gen-init-configurations
33
+	dh_systemd_enable --no-enable
34
+
35
+override_dh_systemd_start: gen-init-configurations
36
+	dh_systemd_start --no-start
37
+
38
+# Commands not to run
39
+override_dh_installcatalogs:
40
+override_dh_installemacsen override_dh_installifupdown:
41
+override_dh_installinfo override_dh_installmenu override_dh_installmime:
42
+override_dh_installmodules override_dh_installlogcheck:
43
+override_dh_installpam override_dh_installppp override_dh_installudev override_dh_installwm:
44
+override_dh_installxfonts override_dh_gconf override_dh_icons override_dh_perl override_dh_usrlocal:
45
+override_dh_installcron override_dh_installdebconf:
46
+override_dh_installlogrotate override_dh_installgsettings:

Loading…
Cancel
Save