blob: d6d1fb407899704a29876eefe64fb40a29a4e574 [file] [log] [blame]
Brian O'Connor9e1352f2016-04-29 17:13:33 -07001KARAF = '//lib:apache-karaf'
2BRANDING = '//tools/package/branding:onos-tools-package-branding'
3
4FEATURES = [
5 '//features:onos-thirdparty-base',
6 '//features:onos-thirdparty-web',
7 '//features:onos-api',
8 '//features:onos-core',
9 '//features:onos-incubator',
10 '//features:onos-rest',
11 '//features:onos-gui',
12 '//features:onos-cli',
13#'//features:onos-security',
14]
15
16#FIXME this list is currently mirrored from the root Buck file
17APPS = [
Ray Milkey4abe8442016-05-05 11:21:33 -070018 # Drivers
Brian O'Connor9e1352f2016-04-29 17:13:33 -070019 '//drivers/default:onos-drivers-default-oar',
Ray Milkey4abe8442016-05-05 11:21:33 -070020 '//drivers/corsa:onos-drivers-corsa-oar',
Hyunsun Moondf6372b2016-07-07 17:37:20 -070021 '//drivers/ovsdb:onos-drivers-ovsdb-oar',
Brian O'Connor9e1352f2016-04-29 17:13:33 -070022
23 # Providers
24 '//providers/bgp:onos-providers-bgp-oar',
25 '//providers/host:onos-providers-host-oar',
26 '//providers/lldp:onos-providers-lldp-oar',
27 '//providers/netcfghost:onos-providers-netcfghost-oar',
28 '//providers/netcfglinks:onos-providers-netcfglinks-oar',
29 '//providers/netconf:onos-providers-netconf-oar',
30 '//providers/openflow/message:onos-providers-openflow-message-oar',
31 '//providers/ovsdb:onos-providers-ovsdb-oar',
32 '//providers/pcep:onos-providers-pcep-oar',
33 '//providers/null:onos-providers-null-oar',
34 '//providers/openflow/base:onos-providers-openflow-base-oar',
Thomas Vachuska777dbd72016-05-04 10:10:11 -070035 '//providers/openflow/app:onos-providers-openflow-app-oar',
Brian O'Connor9e1352f2016-04-29 17:13:33 -070036 '//providers/rest:onos-providers-rest-oar',
37 '//providers/isis:onos-providers-isis-oar',
Ray Milkey43702bf2016-05-04 10:40:55 -070038 '//providers/ovsdb/host:onos-providers-ovsdb-host-oar',
39 '//providers/ovsdb/base:onos-providers-ovsdb-base-oar',
Brian O'Connor9e1352f2016-04-29 17:13:33 -070040
41 # Apps
42 '//apps/dhcp:onos-apps-dhcp-oar',
Jonathan Hart0403df52016-06-22 13:54:45 -070043 '//apps/dhcprelay:onos-apps-dhcprelay-oar',
Brian O'Connor9e1352f2016-04-29 17:13:33 -070044 '//apps/fwd:onos-apps-fwd-oar',
Brian O'Connor9e1352f2016-04-29 17:13:33 -070045 '//apps/acl:onos-apps-acl-oar',
46 '//apps/bgprouter:onos-apps-bgprouter-oar',
47 '//apps/proxyarp:onos-apps-proxyarp-oar',
48 '//apps/segmentrouting:onos-apps-segmentrouting-oar',
49 '//apps/gangliametrics:onos-apps-gangliametrics-oar',
50 '//apps/graphitemetrics:onos-apps-graphitemetrics-oar',
Brian O'Connor9e1352f2016-04-29 17:13:33 -070051 '//apps/influxdbmetrics:onos-apps-influxdbmetrics-oar',
52 '//apps/metrics:onos-apps-metrics-oar',
53 '//apps/mfwd:onos-apps-mfwd-oar',
54 '//apps/mlb:onos-apps-mlb-oar',
55 '//apps/openstackinterface:onos-apps-openstackinterface-oar',
56 '//apps/openstacknetworking:onos-apps-openstacknetworking-oar',
Hyunsun Moonb974fca2016-06-30 21:20:39 -070057 '//apps/openstacknetworking/routing:onos-apps-openstacknetworking-routing-oar',
58 '//apps/openstacknetworking/switching:onos-apps-openstacknetworking-switching-oar',
Brian O'Connor9e1352f2016-04-29 17:13:33 -070059 '//apps/mobility:onos-apps-mobility-oar',
60 '//apps/optical:onos-apps-optical-oar',
61 '//apps/pathpainter:onos-apps-pathpainter-oar',
62 '//apps/pcep-api:onos-apps-pcep-api-oar',
63 '//apps/pim:onos-apps-pim-oar',
64 '//apps/reactive-routing:onos-apps-reactive-routing-oar',
65 '//apps/sdnip:onos-apps-sdnip-oar',
66 '//apps/virtualbng:onos-apps-virtualbng-oar',
Brian O'Connor9e1352f2016-04-29 17:13:33 -070067 '//apps/vpls:onos-apps-vpls-oar',
68 '//apps/vrouter:onos-apps-vrouter-oar',
69 '//apps/vtn:onos-apps-vtn-oar',
70 '//apps/faultmanagement:onos-apps-faultmanagement-oar',
71 '//apps/openstacknode:onos-apps-openstacknode-oar',
72 '//apps/cpman/app:onos-apps-cpman-app-oar',
73 '//apps/xosclient:onos-apps-xosclient-oar',
Hyunsun Moon1424ac92016-07-09 15:45:13 -070074 '//apps/scalablegateway:onos-apps-scalablegateway-oar',
Ray Milkey03a5caa2016-06-02 10:13:27 -070075 '//apps/events:onos-apps-events-oar',
76 '//apps/test/election:onos-apps-test-election-oar',
77 '//apps/test/distributed-primitives:onos-apps-test-distributed-primitives-oar',
78 '//apps/test/intent-perf:onos-apps-test-intent-perf-oar',
Madan Jampani1e60faf2016-06-02 14:26:42 -070079 '//apps/test/loadtest:onos-apps-test-loadtest-oar',
Ray Milkey03a5caa2016-06-02 10:13:27 -070080 '//apps/test/demo:onos-apps-test-demo-oar',
Brian O'Connor9e1352f2016-04-29 17:13:33 -070081]
82
83#TODO move to buck-tools
84export_file (
85 name = 'onos-prep-karaf',
86)
87
88genrule(
89 name = 'onos-karaf',
90 srcs = glob(['bin/*', 'etc/*', 'init/*']),
91 bash = '$(location :onos-prep-karaf) $OUT $(location %s) %s $(location %s)'\
92 % (KARAF, ONOS_VERSION, BRANDING),
93 out = 'karaf.zip',
94)
95
96compile_features(
97 name = 'onos-features',
98 features = FEATURES,
99)
100
101staged_repos = ['$(location %s-repo)' % f for f in FEATURES]
102staged_apps = ['$(location %s)' % a for a in APPS]
103
104# feature_coords = 'foo:bar:1.3'
105sources = [ '$(location :onos-features)', ]
106sources += staged_repos + staged_apps
107
108genrule(
109 name = 'onos-package',
Brian O'Connor92ec2132016-05-03 17:30:25 -0700110 out = 'onos.tar.gz',
Thomas Vachuska0483bee2016-05-04 19:37:51 -0700111 bash = '$(exe //buck-tools:onos-stage) $OUT $(location :onos-karaf) ' + ' '.join(sources),
Brian O'Connor9e1352f2016-04-29 17:13:33 -0700112 visibility = [ 'PUBLIC' ],
Ray Milkey43702bf2016-05-04 10:40:55 -0700113)
Thomas Vachuska5f54c6f2016-05-04 19:19:51 -0700114
115genrule(
116 name = 'onos-run',
117 out = 'onos-run',
118 srcs = [ 'onos-run-karaf' ],
119 bash = 'sed "s#ONOS_TAR=#ONOS_TAR=$(location :onos-package)#" $SRCS > $OUT; chmod +x $OUT',
120 executable = True,
121 visibility = [ 'PUBLIC' ],
Ray Milkey4abe8442016-05-05 11:21:33 -0700122)