OpenStack in a snap!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

834 lines
22 KiB

  1. name: microstack
  2. version: stein
  3. base: core18
  4. summary: OpenStack on your laptop.
  5. description: |
  6. Microstack gives you an easy way to develop and test OpenStack
  7. workloads on your laptop.
  8. grade: stable
  9. confinement: classic
  10. environment:
  11. LD_LIBRARY_PATH: $SNAP/lib:$SNAP/lib/$SNAPCRAFT_ARCH_TRIPLET:$SNAP/usr/lib:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET
  12. PATH: $SNAP/usr/sbin:$SNAP/usr/bin:$SNAP/sbin:$SNAP/bin:/snap/core18/current/bin:$PATH
  13. LC_ALL: C
  14. OS_PLACEMENT_CONFIG_DIR: $SNAP/etc/nova/
  15. apps:
  16. # Openstack
  17. openstack:
  18. command: openstack-wrapper openstack
  19. # plugs:
  20. # - network
  21. # OpenStack Service Configuration
  22. init:
  23. command: microstack_init
  24. # plugs:
  25. # - network
  26. # Keystone
  27. keystone-uwsgi:
  28. command: snap-openstack launch keystone-uwsgi
  29. daemon: simple
  30. # plugs:
  31. # - network-bind
  32. keystone-manage:
  33. command: snap-openstack launch keystone-manage
  34. # plugs:
  35. # - network
  36. # Nova
  37. nova-uwsgi:
  38. command: snap-openstack launch nova-uwsgi
  39. daemon: simple
  40. # plugs:
  41. # - network-bind
  42. nova-api:
  43. command: snap-openstack launch nova-api-os-compute
  44. daemon: simple
  45. # plugs:
  46. # - network-bind
  47. nova-conductor:
  48. command: snap-openstack launch nova-conductor
  49. daemon: simple
  50. # plugs:
  51. # - network
  52. nova-scheduler:
  53. command: snap-openstack launch nova-scheduler
  54. daemon: simple
  55. # plugs:
  56. # - network
  57. nova-compute:
  58. command: snap-openstack launch nova-compute
  59. daemon: simple
  60. # plugs:
  61. # - network-bind
  62. # - network-control
  63. # - firewall-control
  64. # - hardware-observe
  65. # - libvirt
  66. # - openvswitch
  67. nova-api-metadata:
  68. command: snap-openstack launch nova-api-metadata
  69. daemon: simple
  70. # plugs:
  71. # - network-bind
  72. # - firewall-control
  73. nova-manage:
  74. command: snap-openstack launch nova-manage
  75. # plugs:
  76. # - network
  77. # Neutron
  78. neutron-api:
  79. command: snap-openstack launch neutron-server
  80. daemon: simple
  81. # plugs:
  82. # - network-bind
  83. neutron-openvswitch-agent:
  84. command: snap-openstack launch neutron-openvswitch-agent
  85. daemon: simple
  86. # plugs:
  87. # - network-bind
  88. # - network-control
  89. # - network-observe
  90. # - firewall-control
  91. # - process-control
  92. # - system-observe
  93. # - openvswitch
  94. neutron-l3-agent:
  95. command: snap-openstack launch neutron-l3-agent
  96. daemon: simple
  97. # plugs:
  98. # - network-bind
  99. # - network-control
  100. # - network-observe
  101. # - firewall-control
  102. # - process-control
  103. # - system-observe
  104. # - openvswitch
  105. neutron-dhcp-agent:
  106. command: snap-openstack launch neutron-dhcp-agent
  107. daemon: simple
  108. # plugs:
  109. # - network
  110. # - network-bind
  111. # - network-control
  112. # - network-observe
  113. # - process-control
  114. # - system-observe
  115. # - openvswitch
  116. neutron-metadata-agent:
  117. command: snap-openstack launch neutron-metadata-agent
  118. daemon: simple
  119. # plugs:
  120. # - network
  121. # - network-bind
  122. # - network-control
  123. neutron-ovs-cleanup:
  124. command: snap-openstack launch neutron-ovs-cleanup
  125. # plugs:
  126. # - network
  127. # - network-control
  128. # - openvswitch
  129. neutron-netns-cleanup:
  130. command: snap-openstack launch neutron-netns-cleanup
  131. # plugs:
  132. # - network
  133. # - network-control
  134. neutron-db-manage:
  135. command: snap-openstack launch neutron-db-manage
  136. # plugs:
  137. # - network
  138. # Glance
  139. glance-api:
  140. command: snap-openstack launch glance-api
  141. daemon: simple
  142. # plugs:
  143. # - network-bind
  144. registry:
  145. command: snap-openstack launch glance-registry
  146. daemon: simple
  147. # plugs:
  148. # - network
  149. # - network-bind
  150. glance-manage:
  151. command: snap-openstack launch glance-manage
  152. # plugs:
  153. # - network
  154. # Openstack Shared Services
  155. nginx:
  156. command: snap-openstack launch nginx
  157. daemon: forking
  158. # plugs:
  159. # - network-bind
  160. # Openvswitch
  161. ovs-vswitchd:
  162. command: ovs-wrapper $SNAP/share/openvswitch/scripts/ovs-ctl --no-ovsdb-server --no-monitor --system-id=random start
  163. stop-command: ovs-wrapper $SNAP/share/openvswitch/scripts/ovs-ctl --no-ovsdb-server stop
  164. passthrough:
  165. after: [ovsdb-server]
  166. daemon: forking
  167. # plugs:
  168. # - network
  169. # - network-bind
  170. # - network-control
  171. # - openvswitch-support
  172. # - process-control
  173. # - system-trace
  174. ovsdb-server:
  175. command: ovs-wrapper $SNAP/share/openvswitch/scripts/ovs-ctl --no-ovs-vswitchd --no-monitor --system-id=random start
  176. stop-command: ovs-wrapper $SNAP/share/openvswitch/scripts/ovs-ctl --no-ovs-vswitchd stop
  177. daemon: forking
  178. # plugs:
  179. # - network
  180. # - network-bind
  181. # - network-control
  182. # - openvswitch-support
  183. # - process-control
  184. # - system-trace
  185. ovs-vsctl:
  186. command: ovs-wrapper $SNAP/bin/ovs-vsctl
  187. # plugs:
  188. # - network
  189. ovs-appctl:
  190. command: ovs-wrapper $SNAP/bin/ovs-appctl
  191. # plugs:
  192. # - network
  193. ovs-ofctl:
  194. command: ovs-wrapper $SNAP/bin/ovs-ofctl
  195. # plugs:
  196. # - network
  197. ovs-dpctl:
  198. command: ovs-wrapper $SNAP/bin/ovs-dpctl
  199. # plugs:
  200. # - network
  201. external-bridge:
  202. command: bin/setup-br-ex
  203. daemon: oneshot
  204. passthrough:
  205. after: [ovs-vswitchd]
  206. # plugs:
  207. # - network
  208. # Libvirt/Qemu
  209. libvirtd:
  210. command: libvirtd
  211. daemon: simple
  212. environment:
  213. LD_LIBRARY_PATH: $SNAP/lib:$SNAP/lib/$SNAPCRAFT_ARCH_TRIPLET:$SNAP/usr/lib:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/pulseaudio
  214. virtlogd:
  215. command: virtlogd
  216. daemon: simple
  217. virsh:
  218. command: virsh
  219. # MySQL
  220. mysqld:
  221. command: mysql-start-server
  222. daemon: simple
  223. # plugs:
  224. # - process-control
  225. # - network
  226. # - network-bind
  227. mysql:
  228. command: mysql-start-client
  229. # plugs:
  230. # - process-control
  231. # - network
  232. # RabbitMQ
  233. rabbitmq-server:
  234. command: rabbitmq-server
  235. daemon: simple
  236. # plugs:
  237. # - network-bind
  238. environment:
  239. HOME: $SNAP_COMMON/lib/rabbitmq
  240. rabbitmqctl:
  241. command: rabbitmqctl
  242. # plugs:
  243. # - network
  244. environment:
  245. HOME: $SNAP_COMMON/lib/rabbitmq
  246. rabbitmq-plugins:
  247. command: rabbitmq-plugins
  248. environment:
  249. HOME: $SNAP_COMMON/lib/rabbitmq
  250. # Memcached
  251. memcached:
  252. command: memcached -u root -v
  253. daemon: simple
  254. # plugs:
  255. # - network-bind
  256. # Cinder
  257. cinder-uwsgi:
  258. command: snap-openstack launch cinder-uwsgi
  259. # daemon: simple
  260. # plugs:
  261. # - network-bind
  262. cinder-backup:
  263. command: snap-openstack launch cinder-backup
  264. # daemon: simple
  265. # plugs:
  266. # - network
  267. cinder-manage:
  268. command: snap-openstack launch cinder-manage
  269. # plugs:
  270. # - network
  271. cinder-scheduler:
  272. command: snap-openstack launch cinder-scheduler
  273. # daemon: simple
  274. # plugs:
  275. # - network
  276. cinder-volume:
  277. command: snap-openstack launch cinder-volume
  278. # daemon: simple
  279. # plugs:
  280. # - network
  281. # Horizon
  282. horizon-uwsgi:
  283. command: snap-openstack launch horizon-uwsgi
  284. daemon: simple
  285. # plugs:
  286. # - network-bind
  287. # Utility to launch a vm. Creates security groups, floating ips,
  288. # and other necessities as well.
  289. launch:
  290. command: bin/launch.sh
  291. # plugs:
  292. # - network
  293. parts:
  294. # Add Ubuntu Cloud Archive sources.
  295. # Allows us to fetch things such as updated libvirt.
  296. uca-sources:
  297. plugin: nil
  298. build-packages:
  299. - ubuntu-cloud-keyring
  300. - software-properties-common
  301. - dpkg-dev # We'll need to manipulate sources later.
  302. override-build: |
  303. add-apt-repository -s cloud-archive:stein
  304. apt-key update
  305. apt update
  306. snapcraftctl build
  307. # OpenStack Python Projects, keyed off Keystone
  308. openstack-projects:
  309. plugin: python
  310. python-version: python3
  311. after:
  312. - uca-sources
  313. - patches
  314. constraints:
  315. - https://raw.githubusercontent.com/openstack/requirements/stable/stein/upper-constraints.txt
  316. source: http://tarballs.openstack.org/keystone/keystone-stable-stein.tar.gz
  317. python-packages:
  318. - libvirt-python
  319. - oslo.cache[dogpile]
  320. - pymysql
  321. - uwsgi
  322. - git+https://opendev.org/x/snap.openstack#egg=snap.openstack
  323. - http://tarballs.openstack.org/nova/nova-stable-stein.tar.gz
  324. - http://tarballs.openstack.org/neutron/neutron-stable-stein.tar.gz
  325. - http://tarballs.openstack.org/glance/glance-stable-stein.tar.gz
  326. - http://tarballs.openstack.org/cinder/cinder-stable-stein.tar.gz
  327. - http://tarballs.openstack.org/horizon/horizon-stable-stein.tar.gz
  328. - python-cinderclient
  329. - python-openstackclient
  330. - python-swiftclient
  331. build-packages:
  332. - gcc
  333. - git
  334. - libffi-dev
  335. - libssl-dev
  336. - libvirt-dev
  337. - libxml2-dev
  338. - libxslt1-dev
  339. stage-packages:
  340. - conntrack
  341. - coreutils
  342. - haproxy
  343. - python3-dev
  344. override-prime: |
  345. snapcraftctl prime
  346. # Patch Openstack Dashboard (horizon) settings files.
  347. for patch in ${SNAPCRAFT_STAGE}/patches/horizon/*.patch; do
  348. echo "Applying $(basename "$patch") ..."
  349. patch \
  350. --batch \
  351. --forward \
  352. --strip 1 \
  353. --input "$patch"
  354. echo
  355. done
  356. # Uncomment the below line for better python-libvirt debugging output.
  357. # patch --batch --forward --strip 1 --input ../project/patches/nova/nova_log_error.patch
  358. # Now that everything is built, let's disable user site-packages
  359. # as stated in PEP-0370
  360. sed -i usr/lib/python3.6/site.py -e 's/^ENABLE_USER_SITE = None$/ENABLE_USER_SITE = False/'
  361. # This is the last step, let's now compile all our pyc files.
  362. # Ignore errors due to syntax issues in foobar python 2.
  363. ./usr/bin/python3.6 -m compileall . || true
  364. organize:
  365. lib/python3.6/site-packages/openstack_dashboard/local/local_settings.py.example: lib/python3.6/site-packages/openstack_dashboard/local/local_settings.py
  366. keystone-config:
  367. after: [openstack-projects]
  368. plugin: dump
  369. source: http://tarballs.openstack.org/keystone/keystone-stable-stein.tar.gz
  370. organize:
  371. etc/*.conf: etc/keystone/
  372. etc/*.ini: etc/keystone/
  373. etc/*.json: etc/keystone/
  374. etc/*.templates: etc/keystone/
  375. filesets:
  376. etc:
  377. - etc/keystone/*
  378. stage: [$etc]
  379. prime: [$etc]
  380. openstack-wrapper:
  381. source: ./snap-wrappers/openstack
  382. plugin: dump
  383. after:
  384. - openstack-projects
  385. organize:
  386. openstack-wrapper: bin/openstack-wrapper
  387. nova-config:
  388. after: [openstack-projects]
  389. plugin: dump
  390. source: http://tarballs.openstack.org/nova/nova-stable-stein.tar.gz
  391. filesets:
  392. etc:
  393. - etc/nova/*
  394. stage: [$etc]
  395. prime: [$etc]
  396. neutron-config:
  397. after: [openstack-projects]
  398. plugin: dump
  399. source: http://tarballs.openstack.org/neutron/neutron-stable-stein.tar.gz
  400. organize:
  401. etc/*.conf: etc/neutron/
  402. etc/*.ini: etc/neutron/
  403. etc/*.json: etc/neutron/
  404. etc/rootwrap.d/*: etc/neutron/rootwrap.d/
  405. filesets:
  406. etc:
  407. - etc/neutron/*
  408. stage: [$etc]
  409. prime: [$etc]
  410. glance-config:
  411. after: [openstack-projects]
  412. plugin: dump
  413. source: http://tarballs.openstack.org/glance/glance-stable-stein.tar.gz
  414. organize:
  415. etc/*.conf: etc/glance/
  416. etc/*.ini: etc/glance/
  417. etc/*.json: etc/glance/
  418. filesets:
  419. etc:
  420. - etc/glance/*
  421. stage: [$etc]
  422. prime: [$etc]
  423. cinder-config:
  424. after: [openstack-projects]
  425. plugin: dump
  426. source: http://tarballs.openstack.org/cinder/cinder-stable-stein.tar.gz
  427. organize:
  428. etc/*.conf: etc/cinder/
  429. etc/*.ini: etc/cinder/
  430. etc/*.json: etc/cinder/
  431. etc/*.templates: etc/cinder/
  432. filesets:
  433. etc:
  434. - etc/cinder/*
  435. stage: [$etc]
  436. prime: [$etc]
  437. horizon-config:
  438. after: [openstack-projects]
  439. plugin: dump
  440. source: http://tarballs.openstack.org/horizon/horizon-stable-stein.tar.gz
  441. organize:
  442. etc/*.conf: etc/horizon/
  443. filesets:
  444. etc:
  445. - etc/horizon/*
  446. stage: [$etc]
  447. prime: [$etc]
  448. # Snap patches
  449. patches:
  450. source: patches/
  451. plugin: dump
  452. organize:
  453. '*' : patches/
  454. prime:
  455. - -*
  456. openvswitch:
  457. # TODO: figure out a better way to fetch the version
  458. source: http://openvswitch.org/releases/openvswitch-2.10.2.tar.gz
  459. plugin: autotools
  460. build-packages:
  461. - libssl-dev
  462. - try: [libnuma-dev]
  463. - libcap-ng-dev
  464. - libpcap-dev
  465. - libunbound-dev
  466. - python-all
  467. - python-six
  468. - python-setuptools
  469. stage-packages:
  470. - uuid-runtime
  471. - libunbound2
  472. configflags:
  473. - "--localstatedir=/var/snap/$SNAPCRAFT_PROJECT_NAME/common"
  474. - "--sysconfdir=/var/snap/$SNAPCRAFT_PROJECT_NAME/etc"
  475. after:
  476. - patches
  477. override-build: |
  478. # Apply patches
  479. for patch in ${SNAPCRAFT_STAGE}/patches/openvswitch/*.patch; do
  480. echo "Applying $(basename "$patch") ..."
  481. patch \
  482. --batch \
  483. --forward \
  484. --strip 1 \
  485. --input "$patch"
  486. echo
  487. done
  488. snapcraftctl build
  489. ovs-wrapper:
  490. source: ./snap-wrappers/ovs
  491. plugin: dump
  492. after:
  493. - openvswitch
  494. organize:
  495. ovs-wrapper: bin/ovs-wrapper
  496. nginx:
  497. source: http://www.nginx.org/download/nginx-1.13.0.tar.gz
  498. plugin: autotools
  499. after:
  500. - patches
  501. configflags:
  502. - --prefix=/usr
  503. - "--http-log-path=/var/snap/$SNAPCRAFT_PROJECT_NAME/common/log/nginx-access.log"
  504. - "--error-log-path=/var/snap/$SNAPCRAFT_PROJECT_NAME/common/log/nginx-error.log"
  505. - "--lock-path=/var/snap/$SNAPCRAFT_PROJECT_NAME/common/lock/nginx.lock"
  506. - "--pid-path=/var/snap/$SNAPCRAFT_PROJECT_NAME/common/run/nginx.pid"
  507. - "--http-client-body-temp-path=/var/snap/$SNAPCRAFT_PROJECT_NAME/common/lib/nginx_client_body"
  508. - "--http-proxy-temp-path=/var/snap/$SNAPCRAFT_PROJECT_NAME/common/lib/nginx_proxy"
  509. - "--http-fastcgi-temp-path=/var/snap/$SNAPCRAFT_PROJECT_NAME/common/lib/nginx_fastcgi"
  510. - "--http-uwsgi-temp-path=/var/snap/$SNAPCRAFT_PROJECT_NAME/common/lib/nginx_uwsgi"
  511. - "--http-scgi-temp-path=/var/snap/$SNAPCRAFT_PROJECT_NAME/common/lib/nginx_scgi"
  512. - --with-http_ssl_module
  513. build-packages:
  514. - libpcre3-dev
  515. - libssl-dev
  516. - python-six
  517. override-build: |
  518. # Apply patches
  519. for patch in ${SNAPCRAFT_STAGE}/patches/nginx/*.patch; do
  520. echo "Applying $(basename "$patch") ..."
  521. patch \
  522. --batch \
  523. --forward \
  524. --strip 1 \
  525. --input "$patch"
  526. echo
  527. done
  528. snapcraftctl build
  529. # libvirt/qemu
  530. qemu:
  531. source: .
  532. source-subdir: qemu-3.1+dfsg
  533. plugin: autotools
  534. after:
  535. - openstack-projects
  536. - uca-sources
  537. stage-packages:
  538. - seabios
  539. - ipxe-qemu
  540. - try:
  541. - libnuma1
  542. - libspice-server1
  543. - libasound2
  544. - libasyncns0
  545. - libbluetooth3
  546. - libboost-iostreams1.62.0
  547. - libboost-random1.62.0
  548. - libboost-system1.62.0
  549. - libboost-thread1.62.0
  550. - libcaca0
  551. - libfdt1
  552. - libflac8
  553. - libglu1-mesa
  554. - libiscsi7
  555. - libjpeg-turbo8
  556. - libnspr4
  557. - libnss3
  558. - libogg0
  559. - libopus0
  560. - libpixman-1-0
  561. - libpulse0
  562. - librados2
  563. - librbd1
  564. - libsdl1.2debian
  565. - libslang2
  566. - libsndfile1
  567. - libusb-1.0-0
  568. - libusbredirparser1
  569. - libvorbis0a
  570. - libvorbisenc2
  571. - libx11-6
  572. - libxau6
  573. - libxcb1
  574. - libxdmcp6
  575. - libxen-dev
  576. - libxext6
  577. - libpng16-16
  578. build-packages:
  579. - acpica-tools
  580. - libaio-dev
  581. - libasound2-dev
  582. - libattr1-dev
  583. - libbluetooth-dev
  584. - libcap-dev
  585. - libcap-ng-dev
  586. - libcurl4-gnutls-dev
  587. - libfdt-dev
  588. - gnutls-dev
  589. - libiscsi-dev
  590. - libncurses5-dev
  591. - try: [libnuma-dev]
  592. - libpixman-1-dev
  593. - libpulse-dev
  594. - librados-dev
  595. - librbd-dev
  596. - libsasl2-dev
  597. - libsdl1.2-dev
  598. - try: [libspice-server-dev, libspice-protocol-dev]
  599. - libusb-1.0-0-dev
  600. - libusbredirparser-dev
  601. - linux-libc-dev
  602. - uuid-dev
  603. - xfslibs-dev
  604. - libjpeg-dev
  605. - zlib1g-dev
  606. - libpng-dev
  607. - wget
  608. - dpkg-dev
  609. - gcc
  610. configflags:
  611. - --disable-blobs
  612. - --prefix=/snap/$SNAPCRAFT_PROJECT_NAME/current
  613. - --localstatedir=/var/snap/$SNAPCRAFT_PROJECT_NAME/common
  614. - --sysconfdir=/var/snap/$SNAPCRAFT_PROJECT_NAME/common
  615. - --firmwarepath=/snap/$SNAPCRAFT_PROJECT_NAME/current/usr/share/seabios:/snap/$SNAPCRAFT_PROJECT_NAME/current/usr/share/qemu:/snap/$SNAPCRAFT_PROJECT_NAME/current/usr/lib/ipxe/qemu
  616. - --disable-user
  617. - --disable-linux-user
  618. - --enable-system
  619. - --target-list=x86_64-softmmu
  620. override-build: |
  621. # I think that snapcraft is creating this dir, which breaks the below.xo
  622. rm -Rf qemu-3.1+dfsg
  623. apt source qemu
  624. # Fix issue with running apt source as root
  625. dpkg-source --before-build qemu-3.1+dfsg
  626. snapcraftctl build
  627. organize:
  628. # Hack to shift installed qemu back to root of snap
  629. # required to ensure that pathing to files etc works at
  630. # runtime
  631. # * is not used to avoid directory merge conflicts
  632. snap/microstack/current/: ./
  633. kvm-support:
  634. plugin: nil
  635. stage-packages:
  636. - try: [msr-tools]
  637. libvirt:
  638. source: .
  639. source-subdir: libvirt-5.0.0
  640. after:
  641. - openstack-projects
  642. - qemu
  643. - uca-sources
  644. plugin: autotools
  645. build-packages:
  646. - libxml2-dev
  647. - libxml-libxml-perl
  648. - libcurl4-gnutls-dev
  649. - libncurses5-dev
  650. - libreadline-dev
  651. - zlib1g-dev
  652. - libgcrypt20-dev
  653. - libgnutls28-dev
  654. - libyajl-dev
  655. - libpcap0.8-dev
  656. - libaudit-dev
  657. - libdevmapper-dev
  658. - libpciaccess-dev
  659. - libnl-3-dev
  660. - libnl-route-3-dev
  661. - libxml2-utils
  662. - uuid-dev
  663. - try: [libnuma-dev]
  664. - python-all
  665. - python-six
  666. - wget
  667. - dpkg-dev
  668. - xsltproc
  669. stage-packages:
  670. - dmidecode
  671. - dnsmasq
  672. - libxml2
  673. - libyajl2
  674. - try: [libnuma1]
  675. - libcurl3-gnutls
  676. - libpcap0.8
  677. - libpciaccess0
  678. configflags:
  679. - --with-qemu
  680. - --without-bhyve
  681. - --without-xen
  682. - --without-openvz
  683. - --without-vmware
  684. - --without-xenapi
  685. - --without-esx
  686. - --without-hyperv
  687. - --without-lxc
  688. - --without-vz
  689. - --without-vbox
  690. - --without-uml
  691. - --without-sasl
  692. - --without-storage-iscsi
  693. - --without-storage-sheepdog
  694. - --without-storage-rbd
  695. - --without-storage-lvm
  696. - --without-selinux
  697. - --prefix=/snap/$SNAPCRAFT_PROJECT_NAME/current
  698. - --localstatedir=/var/snap/$SNAPCRAFT_PROJECT_NAME/common
  699. - --sysconfdir=/var/snap/$SNAPCRAFT_PROJECT_NAME/common
  700. - DNSMASQ=/snap/$SNAPCRAFT_PROJECT_NAME/current/usr/sbin/dnsmasq
  701. - DMIDECODE=/snap/$SNAPCRAFT_PROJECT_NAME/current/usr/sbin/dmidecode
  702. - OVSVSCTL=/snap/$SNAPCRAFT_PROJECT_NAME/current/bin/ovs-vsctl
  703. - IPTABLES_PATH=/snap/$SNAPCRAFT_PROJECT_NAME/current/sbin/iptables
  704. - IP6TABLES_PATH=/snap/$SNAPCRAFT_PROJECT_NAME/current/sbin/ip6tables
  705. override-build: |
  706. # I think that snapcraft is creating this dir, which breaks the below.
  707. rm -Rf libvirt-5.0.0
  708. apt source libvirt
  709. # Fix issue with running apt source as root
  710. dpkg-source --before-build libvirt-5.0.0
  711. snapcraftctl build
  712. organize:
  713. # Hack to shift installed libvirt back to root of snap
  714. # required to ensure that pathing to files etc works at
  715. # runtime
  716. # * is not used to avoid directory merge conflicts
  717. snap/microstack/current/: ./
  718. # MySQL
  719. mysql-server:
  720. plugin: dump
  721. source: ./snap-wrappers/mysql
  722. stage-packages:
  723. - mysql-server
  724. - mysql-client
  725. organize:
  726. mysql-start-server: bin/mysql-start-server
  727. mysql-start-client: bin/mysql-start-client
  728. # RabbitMQ
  729. rabbitmq-server:
  730. source: ./snap-wrappers/rabbitmq
  731. plugin: dump
  732. stage-packages:
  733. - rabbitmq-server
  734. override-build: |
  735. rm -f $SNAPCRAFT_PART_INSTALL/usr/bin/erl
  736. rm -f $SNAPCRAFT_PART_INSTALL/usr/lib/rabbitmq/bin/rabbitmq-script-wrapper
  737. # NOTE(jamespage): The versioned path below is brittle.
  738. rm -f $SNAPCRAFT_PART_INSTALL/usr/lib/rabbitmq/lib/rabbitmq_server-3.5.7/sbin/rabbitmq-defaults
  739. snapcraftctl build
  740. organize:
  741. rabbitmq-script-wrapper: usr/lib/rabbitmq/bin/rabbitmq-script-wrapper
  742. rabbitmq-defaults: usr/lib/rabbitmq/lib/rabbitmq_server-3.5.7/sbin/rabbitmq-defaults
  743. erl: usr/bin/erl
  744. # Memcached Token Caching
  745. memcached:
  746. plugin: nil
  747. stage-packages:
  748. - memcached
  749. # Cinder LVM backend
  750. lvm2:
  751. source: http://www.sourceware.org/pub/lvm2/releases/LVM2.2.02.172.tgz
  752. plugin: autotools
  753. configflags:
  754. - --with-confdir=/var/snap/$SNAPCRAFT_PROJECT_NAME/common/etc/
  755. - --with-default-system-dir=/var/snap/$SNAPCRAFT_PROJECT_NAME/common/etc/
  756. build-attributes: [no-patchelf]
  757. # Networking tools
  758. iptables:
  759. source: http://iptables.netfilter.org/projects/iptables/files/iptables-1.6.0.tar.bz2
  760. plugin: autotools
  761. build-packages:
  762. - libnftnl-dev
  763. stage-packages:
  764. - libatm1
  765. # Additional utilties for hypervisor networking
  766. - iproute2
  767. - bridge-utils
  768. - ipset
  769. configflags:
  770. - --disable-nftables
  771. - --prefix=/snap/$SNAPCRAFT_PROJECT_NAME/current
  772. override-build: |
  773. snapcraftctl build
  774. cp --remove-destination $SNAPCRAFT_PART_INSTALL/snap/$SNAPCRAFT_PROJECT_NAME/current/sbin/xtables-multi \
  775. $SNAPCRAFT_PART_INSTALL/snap/$SNAPCRAFT_PROJECT_NAME/current/bin/iptables-xml
  776. organize:
  777. # Hack to shift installed iptables back to root of snap
  778. # required to ensure that pathing to files etc works at
  779. # runtime
  780. # * is not used to avoid directory merge conflicts
  781. snap/microstack/current/: ./
  782. # Templates and other files to be overlaid over the snap.
  783. overlay:
  784. plugin: dump
  785. source: snap-overlay
  786. # Optionally interactive init script
  787. init:
  788. plugin: python
  789. python-version: python3
  790. python-packages:
  791. - pymysql
  792. - wget
  793. source: tools/init