Chapter 5: Contrail Config :

"The IF-MAP specification defines a set of base operations that can be used to store and query an object graph. The contrail VNC defines an object model (vnc_cfg.xsd) that expresses network virtualization concepts as IF-MAP identifiers and metadata relations.

The configuration node APIs are autogenerated from this schema.

Several APIs expose higher level concepts that need to be translated to lower level objects. For instance a network-policy may result in both an "access-control list" (ACL) as well as importing network reachability across virtual-networks. The ACL is implemented by the data-plane, while the routing information import/export function is implemented by the control-node. The "schema-transformer" process performs this function whenever necessary."

The above definition has copied from contrail architecture document.

The above diagram is general contrail-config node diagram available in contrail vnc arch document.

Services :

Contrail API

" Provides northbound REST interface for orchestration program to configure the system. API server interacts with ifmap server to update the config; it also reads and writes information into Cassandra database for any new network object creation or update."

The above definition has copied from juniper site.

Contrail API works in ACTIVE/ACTIVE Mode. To acheive the data sync across all Contrail API process,

  • Contrail API writes the User config data in to RABBITMQ
  • Contrail API reads the config data from RABBITMQ.

Contrail API Interacts with Cassandra for storing/retriving the data. Converts the data in to lower model and write in to IFMAP Server(contrail-controller consume this).

Contrail Schema and SVC Monitor interacts with Contrail API for creating the schema transformed objects and service objects(service instances).

REST API Port : 8082

Introspect Port : 8084

Contrail Discovery

This is Kind of tracking service, It lists the available services and services consumed details. For Example Collector is used all other services(api,discovery,schema,control,analytics-api etc) to send the SANDESH logs.

How this works:

Services register(publish) themselves with DISCOVERY. This is called as PUBLISHERS. Discovery expects the Keepalive in frequent interval from the registered services to know the liveliness(UP status). This is exposed(http://discovery:5998/services\ by REST API

Ex: Collector is a Service, which published in Discovery.

Service "A" want to use other specific services. This is called as SUBSCRIBERS. Subscriber post this info to the Discovery. Example: contrail-api service want to use Collector service to send logs.

In short, All services will use discovery. So in their config file discover server details should be there.

Contrail system run multiple instance of each process for high-availability and load balancing purposes. Contrail discovery perform this.

For more details : click here

Contrail Schema

"The Contrail schema process does the low level configuration. For example, when a user creates a virtual network, the schema transformer receives the notification through the rabbitmq bus. It will contact the contrail-api server to fetch the details. It will then create a routing instance, a route target for that virtual network so the user does not have to create it manually. Contrail-schema itself does not create the objects; instead, it interacts with the contrail-api server to have these objects created. The api-server writes them to the Cassandra database.

If more than one instance(schema) is running, the service has only one active instance and other instances are backup."

The above definition has copied from juniper site.

In simple terms,

In Neutron terminiolgy, To create a new Virtual Network, Single API(create network) is sufficient to take care of network creation and performing the switching stuff.

In opencontrail, To create a new Virtual Network, Three(may be more) associated object creations are required (create a Virtual Network, Routing Instance, Route target). Schema transfer will do(using contrail API) this upon receiving the "Create Network" API Request.

Many such Neutron API, requires such low level object creations in contrail. Schema transfer does this work.

Contrail Schema operates in Active/Passive Mode. To acheive this, its using the zookeeper for the MASTER election.

Contrail Service Monitor

"contrail-svc-monitor: Service monitor brings up and monitors any service instance that are spawned. If more than one instance is running, the service has only one active instance and other instances are backup."

The above definition has copied from juniper site.

Contrail Device Manager

"contrail-device-manager: The device manager daemon monitors configuration events from the API server, creating any necessary configurations for all physical routers it is managing, and programs those physical routers. The physical routers are configured to be part of any of the virtual networks configured in the Contrail cluster, facilitating communication between the physical routers and the Contrail control nodes. Contrail policy configurations can be used to control this communication. If more than one instance is running, the service has only one active instance and the other instances are backup."

The above definition has copied from juniper site.

So this is for PRODUCTION stuff. So for beginners, we dont have to worry about this.

References:

https://github.com/Juniper/contrail-controller/wiki/OpenContrail-Internal-Services

http://juniper.github.io/contrail-vnc/architecture.html

https://www.juniper.net/documentation/en_US/release-independent/contrail/information-products/pathway-pages/api-server/index.html

http://configuration-schema-documentation.s3-website-us-west-1.amazonaws.com/R3.2/rest_details.html#discovering-api-server-resources

results matching ""

    No results matching ""