diff options
| author | Bruce Ashfield <bruce.ashfield@windriver.com> | 2013-10-31 00:22:52 -0400 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2013-11-25 15:25:34 -0500 |
| commit | a5a59d040b5db77a06346a516d30566a21d41586 (patch) | |
| tree | 4de8d0e5f26396e1a66f668eec38d7b3bbb1465f /meta-openstack/recipes-devtools/python/python-neutron_git.bb | |
| parent | 0a962a285a529def3d3649544214bc36c9292d18 (diff) | |
| download | meta-cloud-services-a5a59d040b5db77a06346a516d30566a21d41586.tar.gz | |
python-quantum/python-neutron: update to havana version
Updating the OpenStack networking component to the havana release version.
As part of this switch, we rename the components from quantum to neutron
and switch to a git based build for the client and servers.
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'meta-openstack/recipes-devtools/python/python-neutron_git.bb')
| -rw-r--r-- | meta-openstack/recipes-devtools/python/python-neutron_git.bb | 190 |
1 files changed, 190 insertions, 0 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-neutron_git.bb b/meta-openstack/recipes-devtools/python/python-neutron_git.bb new file mode 100644 index 0000000..588849a --- /dev/null +++ b/meta-openstack/recipes-devtools/python/python-neutron_git.bb | |||
| @@ -0,0 +1,190 @@ | |||
| 1 | DESCRIPTION = "Neutron (virtual network service)" | ||
| 2 | HOMEPAGE = "https://launchpad.net/neutron" | ||
| 3 | SECTION = "devel/python" | ||
| 4 | LICENSE = "Apache-2.0" | ||
| 5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=1dece7821bf3fd70fe1309eaa37d52a2" | ||
| 6 | |||
| 7 | PR = "r0" | ||
| 8 | SRCNAME = "neutron" | ||
| 9 | |||
| 10 | SRC_URI = "git://github.com/openstack/${SRCNAME}.git;branch=stable/havana \ | ||
| 11 | file://ovs_neutron_plugin.ini \ | ||
| 12 | file://linuxbridge_conf.ini \ | ||
| 13 | file://neutron-server.init \ | ||
| 14 | file://neutron-agent.init \ | ||
| 15 | " | ||
| 16 | SRCREV="a3f8cf3513c01ed2f92af9d49a92a67a67f80308" | ||
| 17 | PV="2013.2+git${SRCPV}" | ||
| 18 | |||
| 19 | S = "${WORKDIR}/git" | ||
| 20 | |||
| 21 | inherit setuptools update-rc.d identity hosts | ||
| 22 | |||
| 23 | do_install_append() { | ||
| 24 | TEMPLATE_CONF_DIR=${S}${sysconfdir}/ | ||
| 25 | NEUTRON_CONF_DIR=${D}${sysconfdir}/neutron | ||
| 26 | |||
| 27 | sed -e "s:%SERVICE_TENANT_NAME%:${SERVICE_TENANT_NAME}:g" \ | ||
| 28 | ${TEMPLATE_CONF_DIR}/neutron.conf > ${WORKDIR}/neutron.conf | ||
| 29 | sed -e "s:%SERVICE_USER%:${SRCNAME}:g" -i ${WORKDIR}/neutron.conf | ||
| 30 | sed -e "s:%SERVICE_PASSWORD%:${SERVICE_PASSWORD}:g" \ | ||
| 31 | -i ${WORKDIR}/neutron.conf | ||
| 32 | sed -e "s:^# core_plugin.*:core_plugin = neutron.plugins.openvswitch.ovs_neutron_plugin.OVSNeutronPluginV2:g" \ | ||
| 33 | -i ${WORKDIR}/neutron.conf | ||
| 34 | |||
| 35 | echo "rabbit_host = ${CONTROLLER_IP}" >> ${WORKDIR}/neutron.conf | ||
| 36 | |||
| 37 | for file in ovs_neutron_plugin.ini linuxbridge_conf.ini | ||
| 38 | do | ||
| 39 | sed -e "s:%DB_USER%:${DB_USER}:g" -i ${WORKDIR}/${file} | ||
| 40 | sed -e "s:%DB_PASSWORD%:${DB_PASSWORD}:g" -i ${WORKDIR}/${file} | ||
| 41 | sed -e "s:%CONTROLLER_IP%:${CONTROLLER_IP}:g" -i ${WORKDIR}/${file} | ||
| 42 | sed -e "s:%CONTROLLER_HOST%:${CONTROLLER_HOST}:g" -i ${WORKDIR}/${file} | ||
| 43 | done | ||
| 44 | |||
| 45 | install -d ${NEUTRON_CONF_DIR} | ||
| 46 | install -d ${NEUTRON_CONF_DIR}/plugins/openvswitch | ||
| 47 | install -d ${NEUTRON_CONF_DIR}/plugins/linuxbridge | ||
| 48 | |||
| 49 | install -m 600 ${WORKDIR}/neutron.conf ${NEUTRON_CONF_DIR}/ | ||
| 50 | install -m 600 ${WORKDIR}/ovs_neutron_plugin.ini ${NEUTRON_CONF_DIR}/plugins/openvswitch/ | ||
| 51 | install -m 600 ${WORKDIR}/linuxbridge_conf.ini ${NEUTRON_CONF_DIR}/plugins/linuxbridge/ | ||
| 52 | install -m 600 ${S}/etc/api-paste.ini ${NEUTRON_CONF_DIR}/ | ||
| 53 | install -m 600 ${S}/etc/policy.json ${NEUTRON_CONF_DIR}/ | ||
| 54 | |||
| 55 | install -d ${D}${localstatedir}/log/${SRCNAME} | ||
| 56 | |||
| 57 | PLUGIN=openvswitch | ||
| 58 | if ${@base_contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then | ||
| 59 | install -d ${D}${sysconfdir}/init.d | ||
| 60 | sed "s:@plugin@:/etc/neutron/plugins/$PLUGIN/ovs_neutron_plugin.ini:" \ | ||
| 61 | < ${WORKDIR}/neutron-server.init >${WORKDIR}/neutron-server.init.sh | ||
| 62 | install -m 0755 ${WORKDIR}/neutron-server.init.sh ${D}${sysconfdir}/init.d/neutron-server | ||
| 63 | sed "s:@suffix@:$PLUGIN:" < ${WORKDIR}/neutron-agent.init >${WORKDIR}/neutron-$PLUGIN.init.sh | ||
| 64 | install -m 0755 ${WORKDIR}/neutron-$PLUGIN.init.sh ${D}${sysconfdir}/init.d/neutron-$PLUGIN-agent | ||
| 65 | fi | ||
| 66 | } | ||
| 67 | |||
| 68 | pkg_postinst_${SRCNAME} () { | ||
| 69 | if [ "x$D" != "x" ]; then | ||
| 70 | exit 1 | ||
| 71 | fi | ||
| 72 | |||
| 73 | # This is to make sure postgres is configured and running | ||
| 74 | if ! pidof postmaster > /dev/null; then | ||
| 75 | /etc/init.d/postgresql-init | ||
| 76 | /etc/init.d/postgresql start | ||
| 77 | sleep 5 | ||
| 78 | fi | ||
| 79 | |||
| 80 | sudo -u postgres createdb ovs_neutron | ||
| 81 | } | ||
| 82 | |||
| 83 | pkg_postinst_${SRCNAME}-plugin-openvswitch () { | ||
| 84 | if [ "x$D" != "x" ]; then | ||
| 85 | exit 1 | ||
| 86 | fi | ||
| 87 | |||
| 88 | /etc/init.d/openvswitch-switch start | ||
| 89 | ovs-vsctl --no-wait -- --may-exist add-br br-int | ||
| 90 | } | ||
| 91 | |||
| 92 | PACKAGES += " \ | ||
| 93 | ${SRCNAME} \ | ||
| 94 | ${SRCNAME}-doc \ | ||
| 95 | ${SRCNAME}-server \ | ||
| 96 | ${SRCNAME}-plugin-openvswitch \ | ||
| 97 | ${SRCNAME}-plugin-linuxbridge \ | ||
| 98 | ${SRCNAME}-dhcp-agent \ | ||
| 99 | ${SRCNAME}-l3-agent \ | ||
| 100 | ${SRCNAME}-metadata-agent \ | ||
| 101 | ${SRCNAME}-extra-agents \ | ||
| 102 | " | ||
| 103 | |||
| 104 | FILES_${PN} = "${libdir}/*" | ||
| 105 | |||
| 106 | FILES_${SRCNAME} = " \ | ||
| 107 | ${bindir}/neutron-db-manage \ | ||
| 108 | ${bindir}/neutron-rootwrap \ | ||
| 109 | ${bindir}/neutron-debug \ | ||
| 110 | ${bindir}/neutron-netns-cleanup \ | ||
| 111 | ${bindir}/neutron-ovs-cleanup \ | ||
| 112 | ${sysconfdir}/${SRCNAME}/* \ | ||
| 113 | ${localstatedir}/* \ | ||
| 114 | " | ||
| 115 | |||
| 116 | FILES_${SRCNAME}-server = "${bindir}/neutron-server \ | ||
| 117 | ${sysconfdir}/init.d/neutron-server \ | ||
| 118 | " | ||
| 119 | |||
| 120 | FILES_${SRCNAME}-plugin-openvswitch = " \ | ||
| 121 | ${bindir}/neutron-openvswitch-agent \ | ||
| 122 | ${sysconfdir}/${SRCNAME}/plugins/openvswitch/ovs_neutron_plugin.ini \ | ||
| 123 | ${sysconfdir}/init.d/neutron-openvswitch-agent \ | ||
| 124 | " | ||
| 125 | |||
| 126 | FILES_${SRCNAME}-plugin-linuxbridge = " \ | ||
| 127 | ${bindir}/neutron-linuxbridge-agent \ | ||
| 128 | ${sysconfdir}/${SRCNAME}/plugins/linuxbridge/linuxbridge_conf.ini \ | ||
| 129 | ${sysconfdir}/init.d/neutron-linuxbridge-agent \ | ||
| 130 | " | ||
| 131 | |||
| 132 | FILES_${SRCNAME}-dhcp-agent = "${bindir}/neutron-dhcp-agent \ | ||
| 133 | ${bindir}/neutron-dhcp-agent-dnsmasq-lease-update \ | ||
| 134 | ${sysconfdir}/${SRCNAME}/dhcp_agent.ini \ | ||
| 135 | ${sysconfdir}/init.d/dhcp_agent \ | ||
| 136 | " | ||
| 137 | |||
| 138 | FILES_${SRCNAME}-l3-agent = "${bindir}/neutron-l3-agent \ | ||
| 139 | ${sysconfdir}/${SRCNAME}/l3_agent.ini \ | ||
| 140 | ${sysconfdir}/init.d/l3_agent \ | ||
| 141 | " | ||
| 142 | |||
| 143 | FILES_${SRCNAME}-metadata-agent = "${bindir}/neutron-metadata-agent \ | ||
| 144 | ${sysconfdir}/${SRCNAME}/metadata_agent.ini \ | ||
| 145 | ${sysconfdir}/init.d/metadata_agent \ | ||
| 146 | " | ||
| 147 | |||
| 148 | FILES_${SRCNAME}-extra-agents = "${bindir}/*" | ||
| 149 | |||
| 150 | FILES_${SRCNAME}-doc = "${datadir}/*" | ||
| 151 | |||
| 152 | RDEPENDS_${PN} += "python-paste \ | ||
| 153 | python-pastedeploy \ | ||
| 154 | python-routes \ | ||
| 155 | python-amqplib \ | ||
| 156 | python-anyjson \ | ||
| 157 | python-alembic \ | ||
| 158 | python-eventlet \ | ||
| 159 | python-greenlet \ | ||
| 160 | python-httplib2 \ | ||
| 161 | python-iso8601 \ | ||
| 162 | python-kombu \ | ||
| 163 | python-netaddr \ | ||
| 164 | python-neutronclient \ | ||
| 165 | python-sqlalchemy \ | ||
| 166 | python-webob \ | ||
| 167 | python-keystoneclient \ | ||
| 168 | python-oslo.config \ | ||
| 169 | python-pyudev \ | ||
| 170 | python-novaclient \ | ||
| 171 | python-mako \ | ||
| 172 | python-markupsafe \ | ||
| 173 | python-pyparsing \ | ||
| 174 | " | ||
| 175 | |||
| 176 | RDEPENDS_${SRCNAME} = "${PN} \ | ||
| 177 | postgresql postgresql-client python-psycopg2" | ||
| 178 | |||
| 179 | RDEPENDS_${SRCNAME}-server = "${SRCNAME}" | ||
| 180 | RDEPENDS_${SRCNAME}-plugin-openvswitch = "${SRCNAME} openvswitch-switch " | ||
| 181 | RDEPENDS_${SRCNAME}-plugin-linuxbridge = "${SRCNAME} bridge-utils" | ||
| 182 | RDEPENDS_${SRCNAME}-dhcp-agent = "${SRCNAME} dnsmasq" | ||
| 183 | RDEPENDS_${SRCNAME}-l3-agent = "${SRCNAME} ${SRCNAME}-metadata-agent iputils" | ||
| 184 | |||
| 185 | RRECOMMENDS_${SRCNAME}-server = "${SRCNAME}-plugin-openvswitch" | ||
| 186 | |||
| 187 | INITSCRIPT_PACKAGES = "${SRCNAME}-server ${SRCNAME}-plugin-openvswitch ${SRCNAME}-plugin-linuxbridge" | ||
| 188 | INITSCRIPT_NAME_${SRCNAME}-server = "neutron-server" | ||
| 189 | INITSCRIPT_NAME_${SRCNAME}-plugin-openvswitch = "neutron-openvswitch-agent" | ||
| 190 | INITSCRIPT_NAME_${SRCNAME}-plugin-linuxbridge = "neutron-linuxbridge-agent" | ||
