summaryrefslogtreecommitdiffstats
path: root/meta-openstack/recipes-devtools/python/python-heat_git.bb
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@windriver.com>2013-11-12 23:49:08 -0500
committerBruce Ashfield <bruce.ashfield@windriver.com>2013-11-25 15:25:37 -0500
commit53bb70159334a0219b3212ddfb5027b1b571b3a7 (patch)
tree8f5dce9e862915d45728f3224ea4908816e645b5 /meta-openstack/recipes-devtools/python/python-heat_git.bb
parentb19d3153e1569f29597f9fb95b51b58c9660a55e (diff)
downloadmeta-cloud-services-53bb70159334a0219b3212ddfb5027b1b571b3a7.tar.gz
heat: introduce python-heat, heat-engine, heat-api*
Introducing the OpenStack Havana heat component. This initial integration covers the basic integration with keystone and horizon, but does not fully enable stack management. Subsequent updates will enable the full functionality. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'meta-openstack/recipes-devtools/python/python-heat_git.bb')
-rw-r--r--meta-openstack/recipes-devtools/python/python-heat_git.bb154
1 files changed, 154 insertions, 0 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-heat_git.bb b/meta-openstack/recipes-devtools/python/python-heat_git.bb
new file mode 100644
index 0000000..e7b2bdf
--- /dev/null
+++ b/meta-openstack/recipes-devtools/python/python-heat_git.bb
@@ -0,0 +1,154 @@
1DESCRIPTION = "OpenStack Orchestration"
2HOMEPAGE = "https://launchpad.net/heat"
3SECTION = "devel/python"
4LICENSE = "Apache-2.0"
5LIC_FILES_CHKSUM = "file://LICENSE;md5=1dece7821bf3fd70fe1309eaa37d52a2"
6
7PR = "r0"
8SRCNAME = "heat"
9
10SRC_URI = "git://github.com/openstack/${SRCNAME}.git;branch=stable/havana \
11 file://heat.conf \
12 file://heat.init \
13"
14
15SRCREV="e6979b0f81c2cbc87cb353cfa29790b68d70a193"
16PV="2013.2+git${SRCPV}"
17S = "${WORKDIR}/git"
18
19do_install_append() {
20 TEMPLATE_CONF_DIR=${S}${sysconfdir}/${SRCNAME}
21 HEAT_CONF_DIR=${D}${sysconfdir}/${SRCNAME}
22
23 sed -e "s:%SERVICE_TENANT_NAME%:${SERVICE_TENANT_NAME}:g" \
24 ${TEMPLATE_CONF_DIR}/api-paste.ini > ${WORKDIR}/api-paste.ini
25 sed -e "s:%SERVICE_USER%:${SRCNAME}:g" -i ${WORKDIR}/api-paste.ini
26 sed -e "s:%SERVICE_PASSWORD%:${SERVICE_PASSWORD}:g" -i ${WORKDIR}/api-paste.ini
27 sed -e "s:%CONTROLLER_IP%:${CONTROLLER_IP}:g" -i ${WORKDIR}/api-paste.ini
28
29 sed -e "s:%DB_USER%:${DB_USER}:g" -i ${WORKDIR}/heat.conf
30 sed -e "s:%DB_PASSWORD%:${DB_PASSWORD}:g" -i ${WORKDIR}/heat.conf
31
32 sed -e "s:%CONTROLLER_IP%:${CONTROLLER_IP}:g" -i ${WORKDIR}/heat.conf
33 sed -e "s:%CONTROLLER_HOST%:${CONTROLLER_HOST}:g" -i ${WORKDIR}/heat.conf
34
35 sed -e "s:%COMPUTE_IP%:${COMPUTE_IP}:g" -i ${WORKDIR}/heat.conf
36 sed -e "s:%COMPUTE_HOST%:${COMPUTE_HOST}:g" -i ${WORKDIR}/heat.conf
37
38 sed -e "s:%ADMIN_PASSWORD%:${ADMIN_PASSWORD}:g" -i ${WORKDIR}/heat.conf
39 sed -e "s:%SERVICE_TENANT_NAME%:${SERVICE_TENANT_NAME}:g" -i ${WORKDIR}/heat.conf
40
41 install -d ${HEAT_CONF_DIR}
42 install -m 600 ${WORKDIR}/heat.conf ${HEAT_CONF_DIR}
43 install -m 600 ${TEMPLATE_CONF_DIR}/*.json ${HEAT_CONF_DIR}
44 install -d ${HEAT_CONF_DIR}/templates
45 install -m 600 ${TEMPLATE_CONF_DIR}/templates/* ${HEAT_CONF_DIR}/templates
46 install -d ${HEAT_CONF_DIR}/environment.d
47 install -m 600 ${TEMPLATE_CONF_DIR}/environment.d/* ${HEAT_CONF_DIR}/environment.d
48 install -m 664 ${WORKDIR}/api-paste.ini ${HEAT_CONF_DIR}
49
50 if ${@base_contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
51 install -d ${D}${sysconfdir}/init.d
52
53 sed 's:@suffix@:api:' < ${WORKDIR}/heat.init >${WORKDIR}/heat-api.init.sh
54 install -m 0755 ${WORKDIR}/heat-api.init.sh ${D}${sysconfdir}/init.d/heat-api
55
56 sed 's:@suffix@:api-cfn:' < ${WORKDIR}/heat.init >${WORKDIR}/heat-api-cfn.init.sh
57 install -m 0755 ${WORKDIR}/heat-api-cfn.init.sh ${D}${sysconfdir}/init.d/heat-api-cfn
58
59 sed 's:@suffix@:engine:' < ${WORKDIR}/heat.init >${WORKDIR}/heat-engine.init.sh
60 install -m 0755 ${WORKDIR}/heat-engine.init.sh ${D}${sysconfdir}/init.d/heat-engine
61 fi
62}
63
64pkg_postinst_${SRCNAME}-engine () {
65 if [ "x$D" != "x" ]; then
66 exit 1
67 fi
68
69 # This is to make sure postgres is configured and running
70 if ! pidof postmaster > /dev/null; then
71 /etc/init.d/postgresql-init
72 /etc/init.d/postgresql start
73 sleep 5
74 fi
75
76 mkdir /var/log/heat
77 sudo -u postgres createdb heat
78 heat-manage db_sync
79}
80
81inherit setuptools identity hosts update-rc.d
82
83PACKAGES += "${SRCNAME}-common ${SRCNAME}-api ${SRCNAME}-api-cfn ${SRCNAME}-engine"
84
85FILES_${PN} = "${libdir}/*"
86
87FILES_${SRCNAME}-common = "${sysconfdir}/${SRCNAME}/* \
88"
89
90FILES_${SRCNAME}-api = "${bindir}/heat-api \
91 ${sysconfdir}/init.d/heat-api \
92"
93FILES_${SRCNAME}-api-cfn = "${bindir}/heat-api-cfn \
94 ${sysconfdir}/init.d/heat-api-cfn \
95"
96
97FILES_${SRCNAME}-engine = "${bindir}/heat-engine \
98 ${bindir}/* \
99 ${sysconfdir}/init.d/heat-engine \
100"
101
102RDEPENDS_${PN} += " \
103 python-sqlalchemy \
104 python-amqplib \
105 python-anyjson \
106 python-eventlet \
107 python-kombu \
108 python-lxml \
109 python-routes \
110 python-webob \
111 python-greenlet \
112 python-lockfile \
113 python-pastedeploy \
114 python-paste \
115 python-sqlalchemy-migrate \
116 python-stevedore \
117 python-suds \
118 python-paramiko \
119 python-babel \
120 python-iso8601 \
121 python-setuptools-git \
122 python-glanceclient \
123 python-keystoneclient \
124 python-swiftclient \
125 python-oslo.config \
126 python-msgpack \
127 python-pecan \
128 python-amqp \
129 python-singledispatch \
130 python-flask \
131 python-werkzeug \
132 python-itsdangerous \
133 python-happybase \
134 python-wsme \
135 python-eventlet \
136 python-pymongo \
137 python-thrift \
138 python-simplegeneric \
139 python-webtest \
140 python-waitress \
141 python-pyyaml \
142 python-pip \
143 python-pytz \
144 "
145
146RDEPENDS_${SRCNAME}-engine = "${PN} ${SRCNAME}-common postgresql postgresql-client python-psycopg2 tgt"
147RDEPENDS_${SRCNAME}-api = "${SRCNAME}-engine"
148RDEPENDS_${SRCNAME}-api-cfn = "${SRCNAME}-engine"
149
150INITSCRIPT_PACKAGES = "${SRCNAME}-api ${SRCNAME}-api-cfn ${SRCNAME}-engine"
151INITSCRIPT_NAME_${SRCNAME}-api = "${SRCNAME}-api"
152INITSCRIPT_NAME_${SRCNAME}-api-cfn = "${SRCNAME}-api-cfn"
153INITSCRIPT_NAME_${SRCNAME}-engine = "${SRCNAME}-engine"
154