-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsnapcraft.yaml
1613 lines (1536 loc) · 47 KB
/
snapcraft.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
name: microstack
version: ussuri
base: core20
summary: OpenStack on your laptop.
description: |
Microstack gives you an easy way to develop and test OpenStack
workloads on your laptop.
grade: devel
confinement: strict
environment:
LC_ALL: C
PATH: $SNAP/usr/sbin:$SNAP/usr/bin:$SNAP/sbin:$SNAP/bin:$SNAP/usr/local/bin:$SNAP/usr/local/sbin:$PATH
# OS_PLACEMENT_CONFIG_DIR: $SNAP/etc/nova/
# Standard library components must have priority in module name resolution: https://storyboard.openstack.org/#!/story/2007806
PYTHONPATH: $PYTHONPATH:/usr/lib/python3.8:/usr/lib/python3/dist-packages:$SNAP/usr/lib/python3.8:$SNAP/lib/python3.8/site-packages:$SNAP/usr/lib/python3/dist-packages
PYTHONWARNINGS: ignore
# Needed by a targetcli dependency.
GI_TYPELIB_PATH: $SNAP/usr/lib/x86_64-linux-gnu/girepository-1.0
system-usernames:
snap_daemon: shared
layout:
/usr/local/bin:
bind: $SNAP/usr/local/bin
/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/ceph:
bind: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/ceph
/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qemu:
bind: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qemu
/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/pulseaudio:
bind: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/pulseaudio
/usr/lib/libvirt:
bind: $SNAP/usr/lib/libvirt
/usr/share/libvirt:
bind: $SNAP/usr/share/libvirt
/usr/share/qemu:
bind: $SNAP/usr/share/qemu
# Keystone really wants to look here for its fernet keys for some reason
/etc/keystone/fernet-keys:
bind: $SNAP_COMMON/fernet-keys
# Libvirt has a hard-coded path for the apparmor directory.
/etc/apparmor.d:
bind: $SNAP_COMMON/etc/apparmor.d
# os-brick has a hard-coded location for the iscsi initiator name file.
/etc/iscsi:
bind: $SNAP_COMMON/etc/iscsi
# NOTE: /var/target is there since vhost-scsi module is a holder of target-core-mod (see
# the content of /sys/module/target_core_mod/holders). This prevents rtslib from being
# able to change the value of /sys/kernel/config/target/dbroot to /etc/target. At the same time,
# rtslib saves configuration to /etc/target/saveconfig.json by default. Hence both bind mounts
# point to the same target directory.
# LIO: the preferred db_root directory documented both in the kernel target code and rtslib.
/etc/target:
bind: $SNAP_COMMON/etc/target
# LIO: the default db_root directory documented both in the kernel target code and rtslib.
/var/target:
bind: $SNAP_COMMON/etc/target
# LIO: Debian targetcli and rtslib carry a patch that changes the preferred dbroot from /etc/target
# to /etc/rtslib-fb-target.
/etc/rtslib-fb-target:
bind: $SNAP_COMMON/etc/target
apps:
# Openstack
openstack:
command: bin/openstack-wrapper openstack
plugs:
- network
# TODO: - microstack-support
# A proxy command to avoid calling <namespace>.<command>.
# TODO: potentially remove the individual commands completely in favor of this.
microstack:
command: bin/microstack
plugs:
- network
- mount-observe
- network-bind
- firewall-control
- network-control
- ssh-keys
- system-observe
- hardware-observe
# TODO: - microstack-support
# OpenStack Service Configuration
init:
command: bin/microstack_init
plugs:
- network
- mount-observe # rabbitmq-ctl
- network-bind # rabbitmq-ctl?
- firewall-control # iptables
- network-control # iptables
- ssh-keys # write ssh key
- system-observe # rabbitmq ?
- hardware-observe # rabbitmq ?
# TODO: - microstack-support
add-compute:
command: bin/microstack_add_compute
plugs:
- network
# Keystone
keystone-uwsgi:
command: bin/snap-openstack launch keystone-uwsgi
daemon: simple
plugs:
- network-bind
- network
- network-control
# TODO: - microstack-support
keystone-manage:
command: bin/snap-openstack launch keystone-manage
plugs:
- network
# TODO: - microstack-support
nova-api:
command: bin/snap-openstack launch nova-api-os-compute
daemon: simple
plugs:
- network
- network-bind
- network-control
# TODO: - microstack-support
nova-conductor:
command: bin/snap-openstack launch nova-conductor
daemon: simple
plugs:
- network
- network-control
# TODO: - microstack-support
nova-scheduler:
command: bin/snap-openstack launch nova-scheduler
daemon: simple
plugs:
- network
- network-bind
- network-control
# TODO: - microstack-support
nova-compute:
command: bin/snap-openstack launch nova-compute
after: [libvirtd]
daemon: simple
plugs:
- network
- network-bind
- network-control
- firewall-control
- hardware-observe
# TODO: - microstack-support
# Needs access to block devices so that blockdev --flushbufs works.
- block-devices
nova-api-metadata:
command: bin/snap-openstack launch nova-api-metadata
daemon: simple
plugs:
- network
- network-bind
- firewall-control
# TODO: - microstack-support
nova-manage:
command: bin/snap-openstack launch nova-manage
plugs:
- network
# TODO: - microstack-support
nova-spicehtml5proxy:
command: bin/snap-openstack launch nova-spicehtml5proxy
daemon: simple
plugs:
- network
- network-bind
- network-control
# TODO: - microstack-support
# Neutron
neutron-api:
command: bin/snap-openstack launch neutron-server
daemon: simple
plugs:
- network
- network-bind
- network-control
# TODO: - microstack-support
neutron-ovn-metadata-agent:
command: bin/snap-openstack launch neutron-ovn-metadata-agent
daemon: simple
plugs:
- network
- network-bind
- network-control
- network-observe
# TODO: - microstack-support
neutron-ovs-cleanup:
command: bin/snap-openstack launch neutron-ovs-cleanup
plugs:
- network
- network-control
# TODO: - microstack-support
# NOTE(dmitriis): Upstream Neutron does not support cleaning up ovnmeta-<uuid> namespaces
# as of Ussuri which is a bug.
neutron-netns-cleanup:
command: bin/snap-openstack launch neutron-netns-cleanup
plugs:
- network
- network-control
# TODO: - microstack-support
neutron-db-manage:
command: bin/snap-openstack launch neutron-db-manage
plugs:
- network
# TODO: - microstack-support
# Glance
glance-api:
command: bin/snap-openstack launch glance-api
daemon: simple
plugs:
- network
- network-bind
- mount-observe
- network-control
# TODO: - microstack-support
registry:
command: bin/snap-openstack launch glance-registry
daemon: simple
plugs:
- network
- network-bind
- network-control
# TODO: - microstack-support
glance-manage:
command: bin/snap-openstack launch glance-manage
plugs:
- network
# TODO: - microstack-support
# Placement
placement-uwsgi:
command: bin/snap-openstack launch placement-uwsgi
daemon: simple
plugs:
- network
- network-bind
- mount-observe
- network-control
# TODO: - microstack-support
placement-manage:
command: bin/snap-openstack launch placement-manage
plugs:
- network
# TODO: - microstack-support
# Openstack Shared Services
nginx:
command: bin/snap-openstack launch nginx
daemon: forking
plugs:
- network
- network-bind
# TODO: - microstack-support
# Openvswitch
ovs-vswitchd:
command: bin/ovs-wrapper $SNAP/usr/local/share/openvswitch/scripts/ovs-ctl --no-ovsdb-server --no-monitor start
stop-command: bin/ovs-wrapper $SNAP/usr/local/share/openvswitch/scripts/ovs-ctl --no-ovsdb-server stop
after: [ovsdb-server]
daemon: forking
plugs:
- network
- network-bind
- network-control
# NETLINK_NETFILTER SOCK_RAW sockets
- firewall-control
- openvswitch-support
- process-control
- system-trace
- hardware-observe
- hugepages-control
# TODO: - microstack-support
ovsdb-server:
command: bin/ovs-wrapper $SNAP/usr/local/share/openvswitch/scripts/ovs-ctl --no-ovs-vswitchd --no-monitor start
stop-command: bin/ovs-wrapper $SNAP/usr/local/share/openvswitch/scripts/ovs-ctl --no-ovs-vswitchd stop
daemon: forking
plugs:
- network
- network-bind
- network-control
- openvswitch-support
- process-control
- system-trace
# TODO: - microstack-support
ovn-ovsdb-server-nb:
command: bin/ovn-wrapper $SNAP/usr/local/share/ovn/scripts/ovn-ctl start_nb_ovsdb
stop-command: bin/ovn-wrapper $SNAP/usr/local/share/ovn/scripts/ovn-ctl stop_nb_ovsdb
daemon: forking
plugs:
- network
- network-bind
- network-control
- openvswitch-support
- process-control
- system-trace
# TODO: - microstack-support
ovn-ovsdb-server-sb:
command: bin/ovn-wrapper $SNAP/usr/local/share/ovn/scripts/ovn-ctl start_sb_ovsdb
stop-command: bin/ovn-wrapper $SNAP/usr/local/share/ovn/scripts/ovn-ctl stop_sb_ovsdb
daemon: forking
plugs:
- network
- network-bind
- network-control
- openvswitch-support
- process-control
- system-trace
# TODO: - microstack-support
ovn-northd:
command: bin/ovn-wrapper $SNAP/usr/local/share/ovn/scripts/ovn-ctl start_northd
stop-command: bin/ovn-wrapper $SNAP/usr/local/share/ovn/scripts/ovn-ctl stop_northd
daemon: forking
plugs:
- network
- network-bind
- network-control
- openvswitch-support
- process-control
- system-trace
# TODO: - microstack-support
after:
- ovn-ovsdb-server-nb
- ovn-ovsdb-server-sb
ovn-controller:
command: bin/ovn-wrapper $SNAP/usr/local/share/ovn/scripts/ovn-ctl start_controller
stop-command: bin/ovn-wrapper $SNAP/usr/local/share/ovn/scripts/ovn-ctl stop_controller
daemon: forking
plugs:
- network
- network-bind
- network-control
- openvswitch-support
- process-control
- system-trace
# TODO: - microstack-support
after:
- ovsdb-server
- ovs-vswitchd
ovn-appctl:
command: bin/ovn-wrapper $SNAP/usr/local/bin/ovn-appctl
plugs:
- network
- network-bind
# TODO: - microstack-support
ovn-trace:
command: bin/ovn-wrapper $SNAP/usr/local/bin/ovn-trace
plugs:
- network
- network-bind
# TODO: - microstack-support
ovn-detrace:
command: bin/ovn-wrapper $SNAP/usr/local/bin/ovn-detrace
plugs:
- network
- network-bind
# TODO: - microstack-support
ovn-nbctl:
command: bin/ovn-wrapper $SNAP/usr/local/bin/ovn-nbctl
plugs:
- network
- network-bind
# TODO: - microstack-support
ovn-sbctl:
command: bin/ovn-wrapper $SNAP/usr/local/bin/ovn-sbctl
plugs:
- network
- network-bind
- process-control
# TODO: - microstack-support
ovs-vsctl:
command: bin/ovs-wrapper $SNAP/usr/local/bin/ovs-vsctl
plugs:
- network
- process-control
# TODO: - microstack-support
ovs-appctl:
command: bin/ovs-wrapper $SNAP/usr/local/bin/ovs-appctl
plugs:
- network
- process-control
# TODO: - microstack-support
ovs-ofctl:
command: bin/ovs-wrapper $SNAP/usr/local/bin/ovs-ofctl
plugs:
- network
- process-control
# TODO: - microstack-support
ovs-dpctl:
command: bin/ovs-wrapper $SNAP/usr/local/bin/ovs-dpctl
plugs:
- network
- process-control
# TODO: - microstack-support
external-bridge:
command: bin/wait-on-init setup-br-ex
daemon: oneshot
after: [ovs-vswitchd]
plugs:
- network
- network-control
- process-control
# TODO: - microstack-support
# Libvirt/Qemu
libvirtd:
command: usr/sbin/libvirtd --pid $SNAP_DATA/libvirt.pid
daemon: simple
plugs:
- network
- network-bind
- network-control
- netlink-connector
- netlink-audit
- libvirt
- opengl
- raw-usb
- hardware-observe
- hugepages-control
- kvm
- kernel-module-observe
- process-control
- mount-observe
- block-devices
# TODO: - microstack-support
# Make sure KillMode=process is set in the resulting systemd unit instead of
# the default KillMode=control-group to avoid the situation where stopping
# libvirtd causes the forced power off scenario for all VMs; it also affects
# snap refreshes as libvirtd is restarted in this case.
# Removing the snap will still result in VMs being forcefully powered off which
# is intended.
stop-mode: sigterm
virtlogd:
command: usr/sbin/virtlogd --pid $SNAP_DATA/virtlogd.pid
daemon: simple
plugs:
- network
- network-bind
- network-control
# TODO: - microstack-support
virsh:
command: usr/bin/virsh
plugs:
- network
# TODO: - microstack-support
# MySQL
mysqld:
command: bin/mysql-start-server
daemon: simple
plugs:
- process-control
- network
- network-bind
# TODO: - microstack-support
mysql:
command: bin/mysql-start-client
plugs:
- process-control
- network
# TODO: - microstack-support
# RabbitMQ
rabbitmq-server:
command: usr/sbin/rabbitmq-server
daemon: simple
plugs:
- network-bind
- network
- mount-observe
- log-observe
# TODO: - microstack-support
environment:
HOME: $SNAP_COMMON/lib/rabbitmq
rabbitmqctl:
command: usr/sbin/rabbitmqctl
plugs:
- network
- mount-observe
# TODO: - microstack-support
environment:
HOME: $SNAP_COMMON/lib/rabbitmq
rabbitmq-plugins:
command: usr/sbin/rabbitmq-plugins
environment:
HOME: $SNAP_COMMON/lib/rabbitmq
# TODO: - microstack-support
# Memcached
memcached:
command: usr/bin/memcached -u root -v
daemon: simple
plugs:
- network
- network-bind
# TODO: - microstack-support
# Cinder
cinder-uwsgi:
command: bin/snap-openstack launch cinder-uwsgi
daemon: simple
plugs:
- network
- network-bind
# TODO: - microstack-support
cinder-backup:
command: bin/snap-openstack launch cinder-backup
daemon: simple
plugs:
- network
- mount-observe
# TODO: - microstack-support
cinder-manage:
command: bin/snap-openstack launch cinder-manage
plugs:
- network
- mount-observe
# TODO: - microstack-support
cinder-scheduler:
command: bin/snap-openstack launch cinder-scheduler
daemon: simple
plugs:
- network
- mount-observe
# TODO: - microstack-support
cinder-volume:
command: bin/snap-openstack launch cinder-volume
daemon: simple
plugs:
- network
- network-bind
- mount-observe
- block-devices
# setpriority by LVM tools.
- process-control
# TODO: - microstack-support
after:
- setup-lvm-loopdev
# Restores LIO kernel target configuration.
target:
command: bin/target-start
stop-command: bin/target-stop
daemon: oneshot
plugs:
- network
- network-bind
- mount-observe
- block-devices
# TODO: - microstack-support
after:
- setup-lvm-loopdev
environment:
TARGETCLI_HOME: $SNAP_USER_COMMON/.targetcli
iscsid:
command: bin/iscsid-start
daemon: forking
plugs:
- network
- network-bind
# NETLINK_ISCSI protocol sockets
- network-control
# TODO: - microstack-support
- block-devices
- process-control
after:
# Make sure iscsid is stopped before target configuration is cleaned up.
- target
# TODO: this is a --devmode workaround since the microstack-support interface is not merged yet.
load-modules:
command: bin/load-modules
daemon: oneshot
plugs:
- kernel-module-control
setup-lvm-loopdev:
command: bin/setup-lvm-loopdev
daemon: oneshot
plugs:
- network
- block-devices
- mount-observe
# loop device control etc.
# LVM tools use setpriority to set it to -18 which is prohibited in the default snapd templates.
- process-control
# TODO: - microstack-support
after:
- load-modules
# Horizon
horizon-uwsgi:
command: bin/snap-openstack launch horizon-uwsgi
daemon: simple
plugs:
- network
- network-bind
# TODO: - microstack-support
# Utility to launch a vm. Creates security groups, floating ips,
# and other necessities as well.
launch:
command: bin/microstack_launch
plugs:
- network
- network-control # could also be mount-observe
# TODO: - microstack-support
# Cluster
cluster-uwsgi:
command: bin/snap-openstack launch cluster-uwsgi
daemon: simple
plugs:
- network
- network-bind
# TODO: - microstack-support
telegraf:
command: bin/telegraf
daemon: simple
filebeat:
# this is to avoid conflict with filebeat package
command: bin/filebeat
daemon: simple
nrpe:
command: bin/nrpe
daemon: simple
parts:
# Add Ubuntu Cloud Archive sources.
# Allows us to fetch things such as updated libvirt.
uca-sources:
plugin: nil
build-packages:
- ubuntu-cloud-keyring
- software-properties-common
- dpkg-dev # We'll need to manipulate sources later.
#stage-packages:
# The two dependencies below are added to avoid errors during
# the build step of the openstack-projects part (see LP: #1864589).
- python3-dev
- python3-distutils
override-build: |
# add-apt-repository -s cloud-archive:ussuri
# apt-key update
# apt update
snapcraftctl build
# OpenStack Python Projects, keyed off Keystone
openstack-projects:
plugin: python
# python-version: python3
after:
- uca-sources
- libvirt
- patches
constraints:
- ${SNAPCRAFT_STAGE}/patches/upper-constraints.txt
source: http://tarballs.openstack.org/keystone/keystone-stable-ussuri.tar.gz
build-packages:
- gcc
- git
- libffi-dev
- libssl-dev
- libxml2-dev
- libxslt1-dev
- python3-dev
- libsystemd-dev
stage-packages:
- procps # sysctl utility is used by Neutron agents.
- conntrack
- coreutils
- haproxy
- libmagic1
- petname
- libsystemd0
- libpython3.8
- spice-html5
- sg3-utils
# LIO userspace dependencies
# Will also pull rtslib-fb to work with ConfigFS.
- targetcli-fb
python-packages:
- wheel
- libvirt-python
- oslo.cache[dogpile]
- pymysql
- uwsgi
- git+https://opendev.org/x/snap.openstack#egg=snap.openstack
- nova==21.1.1
- neutron===16.2.0
- glance==20.0.1
- cinder==16.2.1
- openstack-placement==3.0.0
- horizon==18.3.2
- python-cinderclient
- python-openstackclient
- python-swiftclient
# Workaround for https://bugs.launchpad.net/snapcraft/+bug/1860768
# This is a package required for the launch script, per the bug
# above. We include it here so that we don't try to rebuild dist
# stuff:
- petname
- systemd-python
# Used by spice-html5 proxy.
- websockify
# For debugging purposes.
- rpdb
build-environment: &python-build-environment
- PIP_COMPILE: 'false' # disable .pyc generation in pip
- PYTHONDONTWRITEBYTECODE: 'false' # disable .pyc generation by setup.py
- SOURCE_DATE_EPOCH: '1591640328'
override-prime: |
snapcraftctl prime
# Patch Openstack Dashboard (horizon) settings files.
for patch in ${SNAPCRAFT_STAGE}/patches/horizon/*.patch; do
echo "Applying $(basename "$patch") ..."
patch \
--batch \
--forward \
--strip 1 \
--input "$patch"
echo
done
# Now that everything is built, let's disable user site-packages
# as stated in PEP-0370
# sed -i usr/lib/python3.8/site.py -e 's/^ENABLE_USER_SITE = None$/ENABLE_USER_SITE = False/'
# Uncomment the below line for better python-libvirt debugging output.
# patch --batch --forward --strip 1 --input ../project/patches/nova/nova_log_error.patch
organize:
lib/python3.8/site-packages/openstack_dashboard/local/local_settings.py.example: lib/python3.8/site-packages/openstack_dashboard/local/local_settings.py
override-build: |
snapcraftctl build
rm $SNAPCRAFT_PART_INSTALL/pyvenv.cfg
--strip 1 \
--input "$patch"
echo
done
# Now that everything is built, let's disable user site-packages
# as stated in PEP-0370
# sed -i usr/lib/python3.8/site.py -e 's/^ENABLE_USER_SITE = None$/ENABLE_USER_SITE = False/'
# Uncomment the below line for better python-libvirt debugging output.
# patch --batch --forward --strip 1 --input ../project/patches/nova/nova_log_error.patch
organize:
lib/python3.8/site-packages/openstack_dashboard/local/local_settings.py.example: lib/python3.8/site-packages/openstack_dashboard/local/local_settings.py
override-build: |
snapcraftctl build
rm $SNAPCRAFT_PART_INSTALL/pyvenv.cfg
rm $SNAPCRAFT_PART_INSTALL/bin/activate
rm $SNAPCRAFT_PART_INSTALL/bin/activate.csh
rm $SNAPCRAFT_PART_INSTALL/bin/activate.fish
# see LP: #1882994
rm $SNAPCRAFT_PART_INSTALL/bin/python3
rm $SNAPCRAFT_PART_INSTALL/bin/python
keystone-config:
after: [openstack-projects]
plugin: dump
source: http://tarballs.openstack.org/keystone/keystone-stable-ussuri.tar.gz
organize:
etc/*.conf: etc/keystone/
etc/*.ini: etc/keystone/
etc/*.json: etc/keystone/
etc/*.templates: etc/keystone/
filesets:
etc:
- etc/keystone/*
stage: [$etc]
prime: [$etc]
openstack-wrapper:
source: ./snap-wrappers/openstack
plugin: dump
after:
- openstack-projects
organize:
openstack-wrapper: bin/openstack-wrapper
init-wrapper:
source: ./snap-wrappers/init
plugin: dump
organize:
wait-on-init: bin/wait-on-init
nova-config:
after: [openstack-projects]
plugin: dump
source: http://tarballs.openstack.org/nova/nova-stable-ussuri.tar.gz
filesets:
etc:
- etc/nova/*
stage: [$etc]
prime: [$etc]
glance-config:
after: [openstack-projects]
plugin: dump
source: http://tarballs.openstack.org/glance/glance-stable-ussuri.tar.gz
organize:
etc/*.conf: etc/glance/
etc/*.ini: etc/glance/
etc/*.json: etc/glance/
filesets:
etc:
- etc/glance/*
stage: [$etc]
prime: [$etc]
placement-config:
after: [openstack-projects]
plugin: dump
source: http://tarballs.openstack.org/placement/placement-stable-ussuri.tar.gz
organize:
etc/*.conf: etc/placement/
etc/*.ini: etc/placement/
etc/*.json: etc/placement/
filesets:
etc:
- etc/placement/*
stage: [$etc]
prime: [$etc]
cinder-config:
after: [openstack-projects]
plugin: dump
source: http://tarballs.openstack.org/cinder/cinder-stable-ussuri.tar.gz
organize:
etc/*.conf: etc/cinder/
etc/*.ini: etc/cinder/
etc/*.json: etc/cinder/
etc/*.templates: etc/cinder/
filesets:
etc:
- etc/cinder/*
stage: [$etc]
prime: [$etc]
horizon-config:
after: [openstack-projects]
plugin: dump
source: http://tarballs.openstack.org/horizon/horizon-stable-ussuri.tar.gz
organize:
etc/*.conf: etc/horizon/
filesets:
etc:
- etc/horizon/*
stage: [$etc]
prime: [$etc]
# Snap patches
patches:
after:
- uca-sources
source: patches/
plugin: dump
build-packages:
- curl
override-build: |
# Create ${SNAPCRAFT_STAGE}/patches/upper-constraints
# Fetch upstream file
curl https://raw.githubusercontent.com/openstack/requirements/stable/ussuri/upper-constraints.txt --output ./upper-constraints.txt
snapcraftctl build
organize:
'*' : patches/
prime:
- -*
openvswitch:
source: https://github.com/openvswitch/ovs/archive/v2.14.0.tar.gz
plugin: autotools
build-packages:
- autoconf
- binutils
- bsdmainutils
- build-essential
- gettext
- git
- libarchive-zip-perl
- libcap-ng-dev
- libpcap-dev
- on arm64:
- libnuma-dev
- on ppc64el:
- libnuma-dev
- on amd64:
- libnuma-dev
- libssl-dev
- libtimedate-perl
- libtool
- libunbound-dev
- pkg-config
- python-all-dev
- python-setuptools
- python3-all-dev
- python3-setuptools
- python3-sphinx
- sphinx-common
- zlib1g-dev
stage-packages:
- libevent-2.1-7
- kmod
- libcap-ng0
- libssl1.1
- libunbound8
- netbase
- ethtool
- procps
- uuid-runtime
autotools-configure-parameters:
- "--localstatedir=/var/snap/$SNAPCRAFT_PROJECT_NAME/common"
- "--sysconfdir=/var/snap/$SNAPCRAFT_PROJECT_NAME/etc"
after:
- patches
override-build: |
snapcraftctl build
tar -cvzf $SNAPCRAFT_STAGE/openvswitch.tar.gz .
ovs-wrapper:
source: ./snap-wrappers/ovs
plugin: dump
after:
- openvswitch
organize:
ovs-wrapper: bin/ovs-wrapper
# Nova os-vif code makes libvirt plug a VM interface into an integration bridge
# which relies on ovs-vsctl execution. Since we use modified paths, some environment
# variables need to be set.
ovs-vsctl: bin/ovs-vsctl
ovn:
after: [openvswitch, patches]
source: https://github.com/ovn-org/ovn/archive/v20.03.0.tar.gz
plugin: autotools
autotools-configure-parameters:
- --sysconfdir=/var/snap/$SNAPCRAFT_PROJECT_NAME/common/etc
- --localstatedir=/var/snap/$SNAPCRAFT_PROJECT_NAME/common/var
- --with-ovs-source=$SNAPCRAFT_PART_BUILD/openvswitch
override-pull: |
snapcraftctl pull
rm -rf openvswitch
mkdir openvswitch
tar -C openvswitch -xvzf $SNAPCRAFT_STAGE/openvswitch.tar.gz
rm -f $SNAPCRAFT_STAGE/openvswitch.tar.gz
override-build: |
snapcraftctl build
build-packages:
- autoconf
- binutils
- build-essential
- git
- libssl-dev
- libtool
- python3-all-dev
- sphinx-common
stage-packages:
- libevent-2.1-7
- libunbound8
organize:
snap/$SNAPCRAFT_PROJECT_NAME/current/share: /share
filesets:
exclude-duplicate-manpages:
- -share/man/man*/ovsdb*
- -usr/local/share/man/man*/ovsdb*
stage:
- $exclude-duplicate-manpages
prime:
- $exclude-duplicate-manpages
ovn-wrapper:
source: ./snap-wrappers/ovn
plugin: dump
after:
- ovn
organize:
ovn-wrapper: bin/ovn-wrapper
nginx:
source: http://www.nginx.org/download/nginx-1.19.0.tar.gz
plugin: autotools
autotools-configure-parameters:
- --prefix=/usr
- "--http-log-path=/var/snap/$SNAPCRAFT_PROJECT_NAME/common/log/nginx-access.log"
- "--error-log-path=/var/snap/$SNAPCRAFT_PROJECT_NAME/common/log/nginx-error.log"
- "--lock-path=/var/snap/$SNAPCRAFT_PROJECT_NAME/common/lock/nginx.lock"