Adding Flex Replicas in Connected Mode
Before You Begin
Before getting started, ensure you have completed the following tasks:
Add a Flex Replica as a Linux Service
Adding a Flex Replica as a Linux Service includes the following tasks:
-
Copy and paste the registration file created during registration to your Linux machine or VM.
-
Run the Flex Gateway start command.
Copy the Registration File
Copy the registration.yaml
file to the following location on your Linux machine or VM:
-
/usr/local/share/mulesoft/flex-gateway/conf.d
Start Commands
Start Flex Gateway with the following command:
sudo systemctl start flex-gateway
ssh
Verify that the Flex Gateway service is running successfully:
systemctl list-units flex-gateway*
ssh
You should see a list of services. Flex Gateway is successfully running if each service has a status of active
.
UNIT LOAD ACTIVE SUB DESCRIPTION flex-gateway-fluent-reloader.path loaded active waiting flex-gateway-fluent-reloader.path flex-gateway-agent.service loaded active running flex-gateway-agent.service flex-gateway-envoy.service loaded active running flex-gateway-envoy.service flex-gateway-fluent.service loaded active running flex-gateway-fluent.service flex-gateway.service loaded active exited Application
text
Now if you check in Runtime Manager after clicking Flex Gateway in the left navigation, your Flex Gateway will have an additional replica listed. You may need to refresh the page.
Add a Flex Replica in a Docker Container
To add a Flex Replica in a Docker Container you must run the Flex Gateway start command using the same registration.yaml
file created during registration. If you are running the container locally, you will also need to use a different port.
Start Command
Before executing the start command below, update the absolute path to the directory where your Flex Gateway registration files reside.
docker run --rm \ -p 8080:8080 \ -v <absolute-path-to-directory-with-gateway-registration-files>/:/usr/local/share/mulesoft/flex-gateway/conf.d \ mulesoft/flex-gateway
ssh
Specify an optional name you want to assign to your Flex Replica by including the following: -e FLEX_NAME=<name-for-flex-replica> \ .
|
Now if you check in Runtime Manager after clicking Flex Gateway in the left navigation, your Flex Gateway will have an additional replica listed. You may need to refresh the page.