Static IP Services
If you have jobs that need to connect to external systems using a static IP address, you can use the
ipm service type and gateway to connect to the IP Manager.
The IP Manager (IPM) is an optional cluster component that provides static (fixed) IP services to jobs in Apcera. You use IPM if you want one or more services in Apcera to use a static IP address. The IPM provider tracks the private/public IP mappings that are configured and provides validations for the services you create.
You use IPM for network egress from a job when the external service requires the use of a static IP address. You can think of IPM as an egress broker that enforces the use of a static IP. One example use case for using IPM is to integrate with a legacy system such as an email server that requires a static IP.
Implementing static IP services
Implementing static IP services requires your cluster to have the IPM component installed and configured. This is typically done by the Apcera administrator from whom you can obtain the IPM connection details.
Assuming your cluster has provisioned the IPM component, you can use the
ipm service gateway and type to implement static IP address services in Apcera.
The workflow is as follows:
- Step 1: Register IPM as a provider
- Step 2: Create the static IP service
- Step 3: Bind jobs to the static IP service
Registering IPM provider
To register the IPM provider with the job::/apcera/service-gateways::ipm, use the following command syntax:
apc provider register /apcera/providers::ipm --type ipm --url http://<IP TO IPM>:<PORT>
-t) is the service type, and
-u) is the IP address and port of IPM.
apc provider register /apcera/providers::ipm --type ipm --url http://10.0.0.240:8787
In this example, the IP address for the IPM host is a local network IP. In many (if not most) environments the IP address for the IPM host will be a publicly routable IP address. In some cases the IP address for the IPM host will be a local (private) IP if the external IP is exposed through a Network Address Translation (NAT) system on the target platform (such as AWS). For most networks the public IP will be bound directly to the host running IPM. In either case, the IP mappings in
cluster.confneed to be configured accordingly. See here for details.
Creating static IP services
Once you have registered the IPM provider, the next step is to create a static IP service. To create the static IP service, you pass in the IP address of the IPM host as the argument to the
Here is the command syntax:
apc service create <service-name> --provider /apcera/providers::ipm -- -ip <STATIC IP>
apc service create my-static-service --provider /apcera/providers::ipm -- -ip 188.8.131.52
As a good practice, use the the static IP address as the service name. Doing so will make it clear that this service implements a static IP address.
For example (using shortcut parameters and batch mode):
apc service create 184.108.40.206 -p /apcera/providers::ipm --batch -- -ip 220.127.116.11
Binding jobs to the static IP service
The last step in the process is to bind one or more jobs to the static IP service. Binding a job to the service ensures that your app will always use the static (fixed) IP address you have specified for the service.
To create such a binding, use the following command syntax:
apc service bind <service-name> -job <JOB FQN>
Or, if you used the static IP as the service name, the command would resemble the following:
apc service bind <STATIC_IP> -j <JOB FQN>
apc service bind 18.104.22.168 -job my-job
22.214.171.124 is the service name and the static IP address.