Brian O'Connor | 9e1352f | 2016-04-29 17:13:33 -0700 | [diff] [blame] | 1 | KARAF = '//lib:apache-karaf' |
| 2 | BRANDING = '//tools/package/branding:onos-tools-package-branding' |
| 3 | |
| 4 | FEATURES = [ |
| 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 |
| 17 | APPS = [ |
Ray Milkey | 4abe844 | 2016-05-05 11:21:33 -0700 | [diff] [blame] | 18 | # Drivers |
Brian O'Connor | 9e1352f | 2016-04-29 17:13:33 -0700 | [diff] [blame] | 19 | '//drivers/default:onos-drivers-default-oar', |
Ray Milkey | 4abe844 | 2016-05-05 11:21:33 -0700 | [diff] [blame] | 20 | '//drivers/corsa:onos-drivers-corsa-oar', |
Brian O'Connor | 9e1352f | 2016-04-29 17:13:33 -0700 | [diff] [blame] | 21 | |
| 22 | # Providers |
| 23 | '//providers/bgp:onos-providers-bgp-oar', |
| 24 | '//providers/host:onos-providers-host-oar', |
| 25 | '//providers/lldp:onos-providers-lldp-oar', |
| 26 | '//providers/netcfghost:onos-providers-netcfghost-oar', |
| 27 | '//providers/netcfglinks:onos-providers-netcfglinks-oar', |
| 28 | '//providers/netconf:onos-providers-netconf-oar', |
| 29 | '//providers/openflow/message:onos-providers-openflow-message-oar', |
| 30 | '//providers/ovsdb:onos-providers-ovsdb-oar', |
| 31 | '//providers/pcep:onos-providers-pcep-oar', |
| 32 | '//providers/null:onos-providers-null-oar', |
| 33 | '//providers/openflow/base:onos-providers-openflow-base-oar', |
Thomas Vachuska | 777dbd7 | 2016-05-04 10:10:11 -0700 | [diff] [blame] | 34 | '//providers/openflow/app:onos-providers-openflow-app-oar', |
Brian O'Connor | 9e1352f | 2016-04-29 17:13:33 -0700 | [diff] [blame] | 35 | '//providers/rest:onos-providers-rest-oar', |
| 36 | '//providers/isis:onos-providers-isis-oar', |
Ray Milkey | 43702bf | 2016-05-04 10:40:55 -0700 | [diff] [blame] | 37 | '//providers/ovsdb/host:onos-providers-ovsdb-host-oar', |
| 38 | '//providers/ovsdb/base:onos-providers-ovsdb-base-oar', |
Brian O'Connor | 9e1352f | 2016-04-29 17:13:33 -0700 | [diff] [blame] | 39 | |
| 40 | # Apps |
| 41 | '//apps/dhcp:onos-apps-dhcp-oar', |
Jonathan Hart | 0403df5 | 2016-06-22 13:54:45 -0700 | [diff] [blame] | 42 | '//apps/dhcprelay:onos-apps-dhcprelay-oar', |
Brian O'Connor | 9e1352f | 2016-04-29 17:13:33 -0700 | [diff] [blame] | 43 | '//apps/fwd:onos-apps-fwd-oar', |
Brian O'Connor | 9e1352f | 2016-04-29 17:13:33 -0700 | [diff] [blame] | 44 | '//apps/acl:onos-apps-acl-oar', |
| 45 | '//apps/bgprouter:onos-apps-bgprouter-oar', |
| 46 | '//apps/proxyarp:onos-apps-proxyarp-oar', |
| 47 | '//apps/segmentrouting:onos-apps-segmentrouting-oar', |
| 48 | '//apps/gangliametrics:onos-apps-gangliametrics-oar', |
| 49 | '//apps/graphitemetrics:onos-apps-graphitemetrics-oar', |
Brian O'Connor | 9e1352f | 2016-04-29 17:13:33 -0700 | [diff] [blame] | 50 | '//apps/influxdbmetrics:onos-apps-influxdbmetrics-oar', |
| 51 | '//apps/metrics:onos-apps-metrics-oar', |
| 52 | '//apps/mfwd:onos-apps-mfwd-oar', |
| 53 | '//apps/mlb:onos-apps-mlb-oar', |
| 54 | '//apps/openstackinterface:onos-apps-openstackinterface-oar', |
| 55 | '//apps/openstacknetworking:onos-apps-openstacknetworking-oar', |
| 56 | '//apps/openstacknetworking/openstackrouting:onos-apps-openstacknetworking-openstackrouting-oar', |
| 57 | '//apps/openstacknetworking/openstackswitching:onos-apps-openstacknetworking-openstackswitching-oar', |
| 58 | '//apps/mobility:onos-apps-mobility-oar', |
| 59 | '//apps/optical:onos-apps-optical-oar', |
| 60 | '//apps/pathpainter:onos-apps-pathpainter-oar', |
| 61 | '//apps/pcep-api:onos-apps-pcep-api-oar', |
| 62 | '//apps/pim:onos-apps-pim-oar', |
| 63 | '//apps/reactive-routing:onos-apps-reactive-routing-oar', |
| 64 | '//apps/sdnip:onos-apps-sdnip-oar', |
| 65 | '//apps/virtualbng:onos-apps-virtualbng-oar', |
Brian O'Connor | 9e1352f | 2016-04-29 17:13:33 -0700 | [diff] [blame] | 66 | '//apps/vpls:onos-apps-vpls-oar', |
| 67 | '//apps/vrouter:onos-apps-vrouter-oar', |
| 68 | '//apps/vtn:onos-apps-vtn-oar', |
| 69 | '//apps/faultmanagement:onos-apps-faultmanagement-oar', |
| 70 | '//apps/openstacknode:onos-apps-openstacknode-oar', |
| 71 | '//apps/cpman/app:onos-apps-cpman-app-oar', |
| 72 | '//apps/xosclient:onos-apps-xosclient-oar', |
Ray Milkey | 03a5caa | 2016-06-02 10:13:27 -0700 | [diff] [blame] | 73 | '//apps/events:onos-apps-events-oar', |
| 74 | '//apps/test/election:onos-apps-test-election-oar', |
| 75 | '//apps/test/distributed-primitives:onos-apps-test-distributed-primitives-oar', |
| 76 | '//apps/test/intent-perf:onos-apps-test-intent-perf-oar', |
Madan Jampani | 1e60faf | 2016-06-02 14:26:42 -0700 | [diff] [blame] | 77 | '//apps/test/loadtest:onos-apps-test-loadtest-oar', |
Ray Milkey | 03a5caa | 2016-06-02 10:13:27 -0700 | [diff] [blame] | 78 | '//apps/test/demo:onos-apps-test-demo-oar', |
Brian O'Connor | 9e1352f | 2016-04-29 17:13:33 -0700 | [diff] [blame] | 79 | ] |
| 80 | |
| 81 | #TODO move to buck-tools |
| 82 | export_file ( |
| 83 | name = 'onos-prep-karaf', |
| 84 | ) |
| 85 | |
| 86 | genrule( |
| 87 | name = 'onos-karaf', |
| 88 | srcs = glob(['bin/*', 'etc/*', 'init/*']), |
| 89 | bash = '$(location :onos-prep-karaf) $OUT $(location %s) %s $(location %s)'\ |
| 90 | % (KARAF, ONOS_VERSION, BRANDING), |
| 91 | out = 'karaf.zip', |
| 92 | ) |
| 93 | |
| 94 | compile_features( |
| 95 | name = 'onos-features', |
| 96 | features = FEATURES, |
| 97 | ) |
| 98 | |
| 99 | staged_repos = ['$(location %s-repo)' % f for f in FEATURES] |
| 100 | staged_apps = ['$(location %s)' % a for a in APPS] |
| 101 | |
| 102 | # feature_coords = 'foo:bar:1.3' |
| 103 | sources = [ '$(location :onos-features)', ] |
| 104 | sources += staged_repos + staged_apps |
| 105 | |
| 106 | genrule( |
| 107 | name = 'onos-package', |
Brian O'Connor | 92ec213 | 2016-05-03 17:30:25 -0700 | [diff] [blame] | 108 | out = 'onos.tar.gz', |
Thomas Vachuska | 0483bee | 2016-05-04 19:37:51 -0700 | [diff] [blame] | 109 | bash = '$(exe //buck-tools:onos-stage) $OUT $(location :onos-karaf) ' + ' '.join(sources), |
Brian O'Connor | 9e1352f | 2016-04-29 17:13:33 -0700 | [diff] [blame] | 110 | visibility = [ 'PUBLIC' ], |
Ray Milkey | 43702bf | 2016-05-04 10:40:55 -0700 | [diff] [blame] | 111 | ) |
Thomas Vachuska | 5f54c6f | 2016-05-04 19:19:51 -0700 | [diff] [blame] | 112 | |
| 113 | genrule( |
| 114 | name = 'onos-run', |
| 115 | out = 'onos-run', |
| 116 | srcs = [ 'onos-run-karaf' ], |
| 117 | bash = 'sed "s#ONOS_TAR=#ONOS_TAR=$(location :onos-package)#" $SRCS > $OUT; chmod +x $OUT', |
| 118 | executable = True, |
| 119 | visibility = [ 'PUBLIC' ], |
Ray Milkey | 4abe844 | 2016-05-05 11:21:33 -0700 | [diff] [blame] | 120 | ) |