Configure Choreo Connect with Consul Discovery (without service mesh)¶
As the number of services grows within your organization, you may have multiple nodes running the same service.
You might spin up new nodes as traffic increases to service and take down some nodes as traffic decreases.
Therefore, nodes that want to communicate with other nodes require a mechanism to discover how many nodes are up and running and how to connect to them(service discovery).
Further, they need to know which nodes are healthy to send traffic to(health checks).
You might have different versions of the same service running dedicated for multiple purposes such as production, development, and testing(tagging).
Consul's features such as service discovery, health checks, and tagging system can be used as needed without building a full service mesh.
In this case, if you need to let end-users consume your services, you can use Choreo Connect as the API gateway.
This part of the document describes how to set up Choreo Connect with Consul for service discovery.
Step 1 - Setup Consul¶
Set up Consul securely.
For more instructions, see the Consul official documentation.
Step 2 - Configure Choreo Connect¶
[adapter.consul] enable = true url = "https://169.254.1.1:8501" pollInterval = 5 aclToken = "d3a2a719-4221-8c65-5212-58d4727427ac" mgwServiceName = "" serviceMeshEnabled = false caCertFile = "/home/wso2/security/truststore/consul/consul-agent-ca.pem" certFile = "/home/wso2/security/truststore/consul/local-dc-client-consul-0.pem" keyFile = "/home/wso2/security/truststore/consul/local-dc-client-consul-0-key.pem"
- Change the
urlto the URL of the Consul agent you want to connect to.
- Change the
aclTokento the token you generated from the previous step.
serviceMeshEnabledshould be set to
- You can leave the
mgwServiceNameempty as the property is not needed.
- Add the
keyFileyou generated from the previous step.
- Then start Choreo Connect.
Step 3 - Deploy the API¶
You can use either WSO2 API Manager or APICTL to deploy APIs as described in how to define the endpoints guide.Top