summaryrefslogtreecommitdiffstats
path: root/docker/bgp_demo/init
diff options
context:
space:
mode:
Diffstat (limited to 'docker/bgp_demo/init')
-rwxr-xr-xdocker/bgp_demo/init/init.sh35
-rw-r--r--docker/bgp_demo/init/io-fd-hc2vpp-integration_vpp-integration-distribution_1-18-01-SNAPSHOT-module-config27
-rw-r--r--docker/bgp_demo/init/io-fd-honeycomb_minimal-distribution_1-18-01-SNAPSHOT-module-config24
-rw-r--r--docker/bgp_demo/init/vpp1.cmd4
-rw-r--r--docker/bgp_demo/init/vpp2.cmd4
5 files changed, 94 insertions, 0 deletions
diff --git a/docker/bgp_demo/init/init.sh b/docker/bgp_demo/init/init.sh
new file mode 100755
index 000000000..14e60aa0b
--- /dev/null
+++ b/docker/bgp_demo/init/init.sh
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+# Starts and initializes vpp.
+# Then starts honeycomb
+#
+
+NODE_ID=$1
+NODE_NAME=vpp$1
+
+echo "Enable tuntap interface in startup.conf"
+echo -e "tuntap {\n enable\n}\n" >> /etc/vpp/startup.conf
+
+/hc2vpp/vpp/start.sh
+echo "Waiting for vpp to start"
+sleep 5
+
+# Configure veth interfaces using VPP CLI
+# (not fully supported by hc2vpp 18.01)
+echo "Configuring vpp"
+vppctl exec /hc2vpp/bgp_demo/init/$NODE_NAME.cmd
+
+# Update address of interface BGP is listening on
+IP="10.12.1.${NODE_ID}"
+jshon -s $IP -i "bgp-binding-address" -I -F /opt/honeycomb/config/bgp.json
+
+# Set AS number
+AS_NUMBER=$((65000+NODE_ID))
+jshon -n $AS_NUMBER -i "bgp-as-number" -I -F /opt/honeycomb/config/bgp.json
+
+# Update module configuration
+# Enables BGP and disables some of the modules not used in the example
+cp /hc2vpp/bgp_demo/init/*-module-config /opt/honeycomb/modules
+
+echo "Starting honeycomb"
+/hc2vpp/honeycomb/start.sh
diff --git a/docker/bgp_demo/init/io-fd-hc2vpp-integration_vpp-integration-distribution_1-18-01-SNAPSHOT-module-config b/docker/bgp_demo/init/io-fd-hc2vpp-integration_vpp-integration-distribution_1-18-01-SNAPSHOT-module-config
new file mode 100644
index 000000000..f236d4eab
--- /dev/null
+++ b/docker/bgp_demo/init/io-fd-hc2vpp-integration_vpp-integration-distribution_1-18-01-SNAPSHOT-module-config
@@ -0,0 +1,27 @@
+// This is list of hc2vpp modules based on configuration file from /opt/honeycomb/modules
+//
+// BGP modules (disabled by default) were enabled.
+// Modules not used in the demo were disabled to reduce footprint.
+//
+io.fd.hc2vpp.common.integration.VppCommonModule
+io.fd.hc2vpp.management.VppManagementModule
+// io.fd.hc2vpp.lisp.LispModule
+// io.fd.hc2vpp.lisp.gpe.GpeModule
+io.fd.hc2vpp.v3po.V3poModule
+// io.fd.hc2vpp.iface.role.InterfaceRoleModule
+io.fd.hc2vpp.l3.InterfaceL3Module
+io.fd.hc2vpp.l3.SubInterfaceL3Module
+// io.fd.hc2vpp.l3.ProxyArpModule
+io.fd.hc2vpp.vpp.classifier.VppClassifierModule
+// io.fd.hc2vpp.vpp.classifier.InterfaceClassifierAclModule
+// io.fd.hc2vpp.vpp.classifier.SubInterfaceClassifierAclModule
+// io.fd.hc2vpp.nat.NatModule
+io.fd.hc2vpp.routing.RoutingModule
+// io.fd.hc2vpp.acl.AclModule
+// io.fd.hc2vpp.dhcp.DhcpModule
+// io.fd.hc2vpp.policer.PolicerModule
+io.fd.hc2vpp.mpls.MplsModule
+// io.fd.hc2vpp.vppnsh.impl.VppNshModule
+// io.fd.hc2vpp.vppioam.impl.VppIoamModule
+io.fd.hc2vpp.bgp.inet.BgpInetModule
+io.fd.hc2vpp.bgp.prefix.sid.BgpPrefixSidModule \ No newline at end of file
diff --git a/docker/bgp_demo/init/io-fd-honeycomb_minimal-distribution_1-18-01-SNAPSHOT-module-config b/docker/bgp_demo/init/io-fd-honeycomb_minimal-distribution_1-18-01-SNAPSHOT-module-config
new file mode 100644
index 000000000..476a1a1a5
--- /dev/null
+++ b/docker/bgp_demo/init/io-fd-honeycomb_minimal-distribution_1-18-01-SNAPSHOT-module-config
@@ -0,0 +1,24 @@
+// This is list of honeycomb modules based on configuration file from /opt/honeycomb/modules
+//
+// BGP modules (disabled by default) used in the demo were enabled.
+//
+io.fd.honeycomb.infra.distro.schema.YangBindingProviderModule
+io.fd.honeycomb.infra.distro.schema.SchemaModule
+io.fd.honeycomb.infra.distro.data.ConfigAndOperationalPipelineModule
+io.fd.honeycomb.infra.distro.data.context.ContextPipelineModule
+io.fd.honeycomb.infra.distro.initializer.InitializerPipelineModule
+io.fd.honeycomb.northbound.CredentialsModule
+io.fd.honeycomb.northbound.netconf.NetconfModule
+io.fd.honeycomb.northbound.netconf.NetconfReadersModule
+io.fd.honeycomb.northbound.restconf.RestconfModule
+io.fd.honeycomb.infra.distro.cfgattrs.CfgAttrsModule
+io.fd.honeycomb.infra.bgp.BgpModule
+io.fd.honeycomb.infra.bgp.BgpReadersModule
+io.fd.honeycomb.infra.bgp.BgpWritersModule
+// io.fd.honeycomb.northbound.bgp.extension.EvpnModule
+io.fd.honeycomb.northbound.bgp.extension.InetModule
+// io.fd.honeycomb.northbound.bgp.extension.L3VpnV4Module
+// io.fd.honeycomb.northbound.bgp.extension.L3VpnV6Module
+io.fd.honeycomb.northbound.bgp.extension.LabeledUnicastModule
+// io.fd.honeycomb.northbound.bgp.extension.LinkstateModule
+// io.fd.honeycomb.footprint.FootprintModule \ No newline at end of file
diff --git a/docker/bgp_demo/init/vpp1.cmd b/docker/bgp_demo/init/vpp1.cmd
new file mode 100644
index 000000000..5760f167b
--- /dev/null
+++ b/docker/bgp_demo/init/vpp1.cmd
@@ -0,0 +1,4 @@
+create host-interface name veth12
+set int state host-veth12 up
+set int ip address host-veth12 10.12.1.1/24
+set interface unnumbered tuntap-0 use host-veth12
diff --git a/docker/bgp_demo/init/vpp2.cmd b/docker/bgp_demo/init/vpp2.cmd
new file mode 100644
index 000000000..07f2005e0
--- /dev/null
+++ b/docker/bgp_demo/init/vpp2.cmd
@@ -0,0 +1,4 @@
+create host-interface name veth21
+set int state host-veth21 up
+set int ip address host-veth21 10.12.1.2/24
+set interface unnumbered tuntap-0 use host-veth21