Skip to content

Commit

Permalink
Merge pull request #108 from ligato/pantheon-dev
Browse files Browse the repository at this point in the history
Pantheon dev
  • Loading branch information
rastislavs authored Sep 8, 2017
2 parents 7c9fb8b + 51abc5c commit dff4fb1
Show file tree
Hide file tree
Showing 413 changed files with 59,450 additions and 21,484 deletions.
22 changes: 18 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Release v1.0.4 (2017-09-08)

## Major Themes

- [Kafka Partitions](messaging/kafka)
- Implemented new methods that allow to specificy partitions & offset parameters:
* publish: Mux.NewSyncPublisherToPartition() & Mux.NewAsyncPublisherToPartition()
* watch: ProtoWatcher.WatchPartition()
- Minimalistic examples & documentation for Kafka API will be improved in a later release.
- [Flavors](flavors)
- reduced to only [local.FlavorVppLocal](flavors/linuxlocal/local_flavor.go) & [vpp.Flavor](flavors/vpp/vpp_flavor.go)
- [goVpp]
- updated version waits until vpp is ready to accept a new connection

# Release v1.0.3 (2017-09-05)

## Major Themes
Expand All @@ -18,7 +32,7 @@ VPP version v17.10-rc0~265-g809bc74 (upgraded because of VPP MEMIF fixes).
## Major Themes

Algorithms for applying northbound configuration (stored in ETCD key value data store)
to VPP in the proper order of VPP binary API calls implemented in [Default VPP plugin](plugins/defaultplugins):
to VPP in the proper order of VPP binary API calls implemented in [Default VPP plugin](plugins/defaultplugins):
- network interfaces, especially:
- MEMIFs (optimized dataplane network interface tailored for a container to container network connectivity)
- VETHs (standard Linux Virtual Ethernet network interface)
Expand All @@ -36,7 +50,7 @@ Data Synchronization during startup for network interfaces & L2 BD

Data replication and events:
- Updating operational data in ETCD (VPP indexes such as sw_if_index) and statistics (port counters).
- Updating statistics in Redis (optional once redis.conf available - see flag in FlavorRedis).
- Updating statistics in Redis (optional once redis.conf available - see flags).
- Publishing link up/down events to Kafka message bus.

Miscellaneous:
Expand All @@ -57,14 +71,14 @@ based on [idxvpp](idxvpp) threadsafe map tailored for VPP data
with advanced features (multiple watchers, secondary indexes).

VPP Agent is embeddable in different software projects and with different systems
by using [Linux Local Flavor](flavors/linuxlocal) to reuse VPP Agent algorithms.
by using [Local Flavor](flavors/local) to reuse VPP Agent algorithms.
For doing this there is [VPP Agent client version 1](clientv1):
* local client - for embedded VPP Agent (communication inside one operating system process, VPP Agent effectively used as a library)
* remote client - for remote configuration of VPP Agent (while integrating for example with control plane)

## Known Issues
A rarely occurring problem during startup with binary API connectivity.
VPP rejects binary API connectivity when VPP Agent tries to connect
VPP rejects binary API connectivity when VPP Agent tries to connect
too early (plan fix this behavior in next release).

## Compatibility
Expand Down
21 changes: 10 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -100,27 +100,26 @@ endef
# run test examples
define test_examples
@echo "# Testing examples"
@./vendor/github.com/ligato/cn-infra/scripts/test_examples.sh
@echo "# done"
endef

# build examples only
define build_examples_only
@echo "# building examples"
@cd examples/govpp_call && go build -v
@cd examples/idx_bd_cache && go build -v
@cd examples/idx_iface_cache && go build -v
@cd examples/idx_mapping_lookup && go build -v
@cd examples/idx_mapping_watcher && go build -v
@cd examples/localclient_linux && go build -v
@cd examples/localclient_vpp && go build -v
@cd examples/govpp_call && go build -v -i
@cd examples/idx_bd_cache && go build -v -i
@cd examples/idx_iface_cache && go build -v -i
@cd examples/idx_mapping_lookup && go build -v -i
@cd examples/idx_mapping_watcher && go build -v -i
@cd examples/localclient_linux && go build -v -i
@cd examples/localclient_vpp && go build -v -i
@echo "# done"
endef

# build vpp agent only
define build_vpp_agent_only
@echo "# building vpp agent"
@cd cmd/vpp-agent && go build -v ${LDFLAGS}
@cd cmd/vpp-agent && go build -v -i ${LDFLAGS}
@echo "# done"
endef

Expand All @@ -135,14 +134,14 @@ endef
# build vpp-agent-ctl only
define build_vpp_agent_ctl_only
@echo "# building vpp-agent-ctl"
@cd cmd/vpp-agent-ctl && go build -v
@cd cmd/vpp-agent-ctl && go build -v -i
@echo "# done"
endef

# build-only agentctl
define build_agentctl_only
@echo "# building agentctl"
@cd cmd/agentctl && go build -v
@cd cmd/agentctl && go build -v -i
@echo "# done"
endef

Expand Down
6 changes: 3 additions & 3 deletions examples/govpp_call/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (

"git.fd.io/govpp.git/api"
"github.com/ligato/cn-infra/core"
"github.com/ligato/cn-infra/flavors/localdeps"
"github.com/ligato/cn-infra/flavors/local"
log "github.com/ligato/cn-infra/logging/logrus"
"github.com/ligato/cn-infra/utils/safeclose"
"github.com/ligato/vpp-agent/flavors/vpp"
Expand Down Expand Up @@ -85,7 +85,7 @@ func (ef *ExampleFlavor) Inject() (allReadyInjected bool) {
}
ef.Flavor.Inject()

ef.GovppExample.PluginInfraDeps = *ef.FlavorLocal.InfraDeps("govpp-example")
ef.GovppExample.PluginInfraDeps = *ef.Flavor.InfraDeps("govpp-example")
ef.GovppExample.GoVppmux = &ef.GoVPP

return true
Expand Down Expand Up @@ -114,7 +114,7 @@ type ExamplePlugin struct {
// Deps is a helper struct which is grouping all dependencies injected to the plugin
type Deps struct {
GoVppmux *govppmux.GOVPPPlugin
localdeps.PluginInfraDeps // injected
local.PluginInfraDeps // injected
}

// Init members of plugin
Expand Down
10 changes: 5 additions & 5 deletions examples/idx_bd_cache/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"github.com/ligato/cn-infra/core"
"github.com/ligato/cn-infra/datasync"
"github.com/ligato/cn-infra/datasync/kvdbsync"
"github.com/ligato/cn-infra/flavors/localdeps"
"github.com/ligato/cn-infra/flavors/local"
log "github.com/ligato/cn-infra/logging/logrus"
"github.com/ligato/cn-infra/utils/safeclose"
"github.com/ligato/vpp-agent/flavors/vpp"
Expand Down Expand Up @@ -70,10 +70,10 @@ func (ef *ExampleFlavor) Inject() (allReadyInjected bool) {
ef.Flavor.Inject()

// Inject infra + transport (publisher, watcher) to example plugin
ef.IdxBdCacheExample.PluginInfraDeps = *ef.FlavorLocal.InfraDeps("idx-bd-cache-example")
ef.IdxBdCacheExample.PluginInfraDeps = *ef.Flavor.InfraDeps("idx-bd-cache-example")
ef.IdxBdCacheExample.Publisher = &ef.ETCDDataSync
ef.IdxBdCacheExample.Agent1 = ef.Flavor.FlavorEtcd.ETCDDataSync.OfDifferentAgent("agent1", ef)
ef.IdxBdCacheExample.Agent2 = ef.Flavor.FlavorEtcd.ETCDDataSync.OfDifferentAgent("agent2", ef)
ef.IdxBdCacheExample.Agent1 = ef.Flavor.ETCDDataSync.OfDifferentAgent("agent1", ef)
ef.IdxBdCacheExample.Agent2 = ef.Flavor.ETCDDataSync.OfDifferentAgent("agent2", ef)

return true
}
Expand Down Expand Up @@ -105,7 +105,7 @@ type Deps struct {
Publisher datasync.KeyProtoValWriter // injected
Agent1 *kvdbsync.Plugin // injected
Agent2 *kvdbsync.Plugin // injected
localdeps.PluginInfraDeps // injected
local.PluginInfraDeps // injected
}

// Init transport & bdIndexes then watch, publish & lookup
Expand Down
10 changes: 5 additions & 5 deletions examples/idx_iface_cache/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"github.com/ligato/cn-infra/core"
"github.com/ligato/cn-infra/datasync"
"github.com/ligato/cn-infra/datasync/kvdbsync"
"github.com/ligato/cn-infra/flavors/localdeps"
"github.com/ligato/cn-infra/flavors/local"
log "github.com/ligato/cn-infra/logging/logrus"
"github.com/ligato/cn-infra/utils/safeclose"
"github.com/ligato/vpp-agent/flavors/vpp"
Expand Down Expand Up @@ -70,10 +70,10 @@ func (ef *ExampleFlavor) Inject() (allReadyInjected bool) {
ef.Flavor.Inject()

// Inject infra + transport (publisher, watcher) to example plugin
ef.IdxIfaceCacheExample.PluginInfraDeps = *ef.FlavorLocal.InfraDeps("idx-iface-cache-example")
ef.IdxIfaceCacheExample.PluginInfraDeps = *ef.Flavor.InfraDeps("idx-iface-cache-example")
ef.IdxIfaceCacheExample.Publisher = &ef.ETCDDataSync
ef.IdxIfaceCacheExample.Agent1 = ef.Flavor.FlavorEtcd.ETCDDataSync.OfDifferentAgent("agent1", ef)
ef.IdxIfaceCacheExample.Agent2 = ef.Flavor.FlavorEtcd.ETCDDataSync.OfDifferentAgent("agent2", ef)
ef.IdxIfaceCacheExample.Agent1 = ef.Flavor.ETCDDataSync.OfDifferentAgent("agent1", ef)
ef.IdxIfaceCacheExample.Agent2 = ef.Flavor.ETCDDataSync.OfDifferentAgent("agent2", ef)

return true
}
Expand Down Expand Up @@ -105,7 +105,7 @@ type Deps struct {
Publisher datasync.KeyProtoValWriter // injected
Agent1 *kvdbsync.Plugin // injected
Agent2 *kvdbsync.Plugin // injected
localdeps.PluginInfraDeps // injected
local.PluginInfraDeps // injected
}

// Init initializes transport & SwIfIndexes then watch, publish & lookup
Expand Down
3 changes: 1 addition & 2 deletions examples/idx_mapping_lookup/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import (

"github.com/ligato/cn-infra/core"
"github.com/ligato/cn-infra/flavors/local"
"github.com/ligato/cn-infra/flavors/localdeps"
"github.com/ligato/cn-infra/logging/logroot"
log "github.com/ligato/cn-infra/logging/logrus"
"github.com/ligato/vpp-agent/idxvpp"
Expand Down Expand Up @@ -101,7 +100,7 @@ type ExamplePlugin struct {

// Deps is a helper struct which is grouping all dependencies injected to the plugin
type Deps struct {
localdeps.PluginLogDeps // injected
local.PluginLogDeps // injected
}

// Init is the entry point into the plugin that is called by Agent Core when the Agent is coming up.
Expand Down
3 changes: 1 addition & 2 deletions examples/idx_mapping_watcher/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (
"github.com/ligato/cn-infra/core"
"github.com/ligato/cn-infra/datasync"
"github.com/ligato/cn-infra/flavors/local"
"github.com/ligato/cn-infra/flavors/localdeps"
"github.com/ligato/cn-infra/logging/logroot"
log "github.com/ligato/cn-infra/logging/logrus"
"github.com/ligato/vpp-agent/idxvpp"
Expand Down Expand Up @@ -109,7 +108,7 @@ type ExamplePlugin struct {

// Deps is a helper struct which is grouping all dependencies injected to the plugin
type Deps struct {
localdeps.PluginLogDeps // injected
local.PluginLogDeps // injected
}

// Init is the entry point into the plugin that is called by Agent Core when the Agent is coming up.
Expand Down
12 changes: 6 additions & 6 deletions examples/idx_veth_cache/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"github.com/ligato/cn-infra/core"
"github.com/ligato/cn-infra/datasync"
"github.com/ligato/cn-infra/datasync/kvdbsync"
"github.com/ligato/cn-infra/flavors/localdeps"
"github.com/ligato/cn-infra/flavors/local"
"github.com/ligato/cn-infra/logging"
log "github.com/ligato/cn-infra/logging/logrus"
"github.com/ligato/cn-infra/utils/safeclose"
Expand Down Expand Up @@ -97,11 +97,11 @@ func (ef *ExampleFlavor) Inject() (allReadyInjected bool) {
ef.Flavor.Inject()

// Inject infra + transport (publisher, watcher) to example plugin
ef.IdxVethCacheExample.PluginInfraDeps = *ef.FlavorLocal.InfraDeps("idx-veth-cache-example")
ef.IdxVethCacheExample.PluginInfraDeps = *ef.Flavor.InfraDeps("idx-veth-cache-example")
ef.IdxVethCacheExample.Linux = &ef.Linux
ef.IdxVethCacheExample.Publisher = &ef.ETCDDataSync
ef.IdxVethCacheExample.Agent1 = ef.Flavor.FlavorEtcd.ETCDDataSync.OfDifferentAgent("agent1", ef)
ef.IdxVethCacheExample.Agent2 = ef.Flavor.FlavorEtcd.ETCDDataSync.OfDifferentAgent("agent2", ef)
ef.IdxVethCacheExample.Agent1 = ef.Flavor.ETCDDataSync.OfDifferentAgent("agent1", ef)
ef.IdxVethCacheExample.Agent2 = ef.Flavor.ETCDDataSync.OfDifferentAgent("agent2", ef)

return true
}
Expand All @@ -121,7 +121,7 @@ type ExamplePlugin struct {
Deps

// Linux plugin dependency
Linux *linuxplugin.Plugin
Linux linuxplugin.API

linuxIfIdxLocal linux_if.LinuxIfIndex
linuxIfIdxAgent1 linux_if.LinuxIfIndex
Expand All @@ -138,7 +138,7 @@ type Deps struct {
Publisher datasync.KeyProtoValWriter // injected
Agent1 *kvdbsync.Plugin // injected
Agent2 *kvdbsync.Plugin // injected
localdeps.PluginInfraDeps // injected
local.PluginInfraDeps // injected
}

// Init initializes example plugin
Expand Down
18 changes: 9 additions & 9 deletions examples/localclient_linux/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (

"github.com/ligato/cn-infra/logging"
log "github.com/ligato/cn-infra/logging/logrus"
"github.com/ligato/vpp-agent/flavors/linuxlocal"
"github.com/ligato/vpp-agent/flavors/local"
)

// init sets the default logging level
Expand All @@ -48,7 +48,7 @@ func main() {
// Init close channel to stop the example
closeChannel := make(chan struct{}, 1)

flavor := linuxlocal.FlavorVppLocal{}
flavor := local.FlavorVppLocal{}
// Example plugin and dependencies
examplePlugin := &core.NamedPlugin{PluginName: PluginID, Plugin: &ExamplePlugin{}}
// Create new agent
Expand Down Expand Up @@ -127,12 +127,12 @@ func (plugin *ExamplePlugin) reconfigureLinuxAndVPP(ctx context.Context) {
// simulate configuration change exactly 20seconds after resync
err := localclient.DataChangeRequest(PluginID).
Put().
LinuxInterface(&veth11Ns1). /* move veth11 into the namespace "ns1" */
LinuxInterface(&veth11Ns1). /* move veth11 into the namespace "ns1" */
LinuxInterface(&veth12WithMtu). /* reconfigure veth12 -- explicitly set Mtu to 1000 */
LinuxInterface(&veth21Ns2). /* create veth21-veth22 pair, put veth21 into the namespace "ns2" */
LinuxInterface(&veth22). /* enable veth22, keep default configuration */
VppInterface(&afpacket2). /* create afpacket2 interface and attach it to veth2 */
BD(&BDAfpackets). /* put afpacket1 and afpacket2 into the same bridge domain */
LinuxInterface(&veth21Ns2). /* create veth21-veth22 pair, put veth21 into the namespace "ns2" */
LinuxInterface(&veth22). /* enable veth22, keep default configuration */
VppInterface(&afpacket2). /* create afpacket2 interface and attach it to veth2 */
BD(&BDAfpackets). /* put afpacket1 and afpacket2 into the same bridge domain */
Delete().
VppInterface(tap1.Name). /* remove the tap interface */
Send().ReceiveReply()
Expand Down Expand Up @@ -316,10 +316,10 @@ var (
MacAge: 0, /* means disable aging */
Interfaces: []*vpp_l2.BridgeDomains_BridgeDomain_Interfaces{
{
Name: "afpacket1",
Name: "afpacket1",
BridgedVirtualInterface: false,
}, {
Name: "afpacket2",
Name: "afpacket2",
BridgedVirtualInterface: false,
},
},
Expand Down
2 changes: 1 addition & 1 deletion examples/localclient_vpp/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func main() {
// Init close channel to stop the example
closeChannel := make(chan struct{}, 1)

flavor := local.Flavor{}
flavor := local.FlavorVppLocal{}

// Example plugin
examplePlugin := &core.NamedPlugin{PluginName: PluginID, Plugin: &ExamplePlugin{}}
Expand Down
60 changes: 0 additions & 60 deletions flavors/linuxlocal/local_flavor.go

This file was deleted.

Loading

0 comments on commit dff4fb1

Please sign in to comment.