CN-WAN Reader

GitHub
GitHub go.mod Go version

Go Report Card
OpenAPI version
GitHub Workflow Status
GitHub release (latest semver)
Docker Image Version (latest semver)
DevNet published

CN-WAN Reader watches a service registry for changes and sends events to an external handler for processing.

The CN-WAN Reader is part of the Cloud Native SD-WAN (CN-WAN) project. Please check the CN-WAN documentation for the general project overview and architecture. You can contact the CN-WAN team at cnwan@cisco.com.

Overview

The CN-WAN Reader makes use of the service discovery pattern by connecting to a service registry and observing changes in published services/endpoints. Detected changes are then processed and sent as events to an adaptor, which can be created following the OpenAPI specification included in this repository.

Please follow this readme to know more about OpenAPI, Adaptors and Supported Service Registries.

Supported Service Registries

Currently, the CN-WAN Reader can discover services/endpoints published to Google Cloud's Service directory and AWS Cloud Map.

Google Cloud Service Directory

In order to connect correctly, a service account is needed. To learn more about Google Cloud Service Accounts, you can also consult this guide. Finally, you can read Service Directory's documentation to know more about how it works.

Finally, please make sure your service account has at least role roles/servicedirectory.viewer. We suggest you create service account just for the CN-WAN Reader with the aforementioned role.

AWS Cloud Map

You will need valid credentials in able to watch changes correctly.

In order to use CN-WAN Reader with Cloud Map, your IAM identity needs to have at least policy AWSCloudMapReadOnlyAccess or above.

Please note that, as of now, the reader is only able to read up to 100 services at a time and 100 instances per service. While this should more than enough for the vast majority of use-cases, if demand for supporting a higher number is there, the reader will be able to read more on next updates.

Documentation

To learn how to install or use the program, please follow documentation provided in the docs directory.

You can start by reading Installation or Docker Installation if you want to install and run the program inside a docker container.

OpenAPI Specification

The CN-WAN Reader acts as a client, sending detected changes in form of events to an external handler - an Adaptor - for processing. Therefore, any program interested in receiving and processing these events must generate the server code starting from the OpenAPI specification, or you can just implement the appropriate endpoint in your already existing server.

The specification, along with documentation on what you need to implement and what data is sent by the CN-WAN Reader, is included in this repository at this link.

To learn more about OpenAPI please take a look at this repository. To generate your code, you can use the OpenAPI Generator.

Contributing

Thank you for interest in contributing to this project. Before starting, please make sure you know and agree to our Code of conduct.

  1. Fork it
  2. Download your fork
    git clone https://github.com/your_username/cnwan-reader && cd cnwan-reader
  3. Create your feature branch
    git checkout -b my-new-feature
  4. Make changes and add them
    git add .
  5. Commit your changes
    git commit -m 'Add some feature'
  6. Push to the branch
    git push origin my-new-feature
  7. Create new pull request to this repository

License

CN-WAN Reader is released under the Apache 2.0 license. See LICENSE

View code on GitHub

Code Exchange Community

Get help, share code, and collaborate with other developers in the Code Exchange community.View Community
Disclaimer:
Cisco provides Code Exchange for convenience and informational purposes only, with no support of any kind. This page contains information and links from third-party websites that are governed by their own separate terms. Reference to a project or contributor on this page does not imply any affiliation with or endorsement by Cisco.