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