Support Support Downloads Knowledge Base Service Request Manager My Juniper Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

[CSO] How to execute regional restful apis in Contrail Service Orchestration small and medium deployments

0

0

Article ID: KB35335 KB Last Updated: 10 Dec 2019Version: 1.0
Summary:

Starting with CSO (Contrail Service Orchestration) 4.0, it can be installed in three deployment modes: Small, Medium and Large deployment. Refer to the documentation on Contrail Service Orchestration Overview

Regional Microservices virtual machine (Regional msvm) will be created only in Large deployment mode. Small and Medium deployments will not have separate Regional msvm. Refer to the documentation on Minimum Requirements for Servers and VMs.

This article explains how to execute regional Restful API's in Small and Medium deployment modes. Restful API's are used for troubleshooting purposes.

Cause:

As per /etc/haproxy/haproxy.cfg configuration in central microservice VM, regional API's such as ems-regional, dms-regional, device-connectivity, cms-regional, config-service, etc., are bound to port 444.

Snippet of haproxy.cfg configuration:

frontend regional-main-frontend
..
bind *:444 ssl crt-list /etc/cert-list
..
acl csp-ems-regional_acl14 url_beg -i /ems-regional
use_backend regional-main-csp-ems-regional-backend if csp-ems-regional_acl14
..
acl csp-dms-regional_acl15 url_beg -i /dms-regional
use_backend regional-main-csp-dms-regional-backend if csp-dms-regional_acl15
Solution:

Steps to execute regional restful API's in Small and Medium deployments as of CSO 4.1.1 version.

  1. Generate a token. Refer to KB34116 - How to execute Contrail Service Orchestrator HTTP API requests through CLI  for step by step instructions on how to generate token.

  2. Once token is generated, use the URL below to execute regional Restful API's. Make sure port 444 is used in the URL,otherwise regional restful API's will not work.

    Small Deployment: 

    URL:  https://<Central Microservices VM IP>:444/ems-regional   
    Example: curl  -k -H "x-auth-token:$TOKEN" -H "content-type: application/json" https://< Central Microservices VM IP>:444/ems-regional/device/  -X GET

    Medium Deployment:

    URL: https://<Central Microservices VIP IP>:444/ems-regional 
    Example: curl  -k -H "x-auth-token:$TOKEN" -H "content-type: application/json" https://< Central Microservices VIP IP>:444/ems-regional/device/  -X GET


Note: In Large deployments, these regional restful API's will be executed using Regional Microservices VIP IP and standard https port (i.e., 443). Hence, it is not necessary to specify port 443 explicitly (i.e., https://<CSO Regional Microservices VIP IP>/ems-regional/)

Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Security Alerts and Vulnerabilities

Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search