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.

831 lines
21KB

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