CLOUD PAAS / DEVELOPMENT TOOLS

CLI Tutorial: Public IPs (External Addresses) Swap

This guide has been reviewed and reformatted for Ruk-Com Cloud PaaS. Screens may vary slightly by platform version.

Click or tap a screenshot to view it at its original size.

Objective

This guide explains how to use CLI Tutorial: Public IPs (External Addresses) Swap on Ruk-Com Cloud PaaS, with ordered procedures and practical verification points.

Before you begin

  • Sign in with an account permitted to manage the relevant environment.
  • Confirm the target environment, region and resources before saving changes.
  • Create a backup or rollback plan before changing a production system.

Switch operationPublic IPUseful for routing incoming requests to the desired environment or application, for example changing test and production environments.

The SwapExtIps CLI method is used to exchange external IPs between two containers. In cases where only one node has a public IP, that node will be moved (reassigned) to the second instance. This method can work on nodes of the same or different environment. But they must be within the scope of the same account. This is done through the command:

~/jelastic/environment/binder/swapextips --envName {env_name} --sourceNodeId {source_node_id} --targetNodeId {target_node_id} [--sourceIp {source_ip}] [--targetIp {target_ip}]

Specify the parameters as follows:

  • {env_name}- The name of the environment to which the currently transferred external IP is attached.
  • {source_node_id}- The node identifier from the given environment whose IP should be switched/moved.
  • {target_node_id}- ID of target node (Can be in any environment in the account)
  • {source_ip}and{target_ip}- Optional parameters for 2 specific addresses to be interchanged. (If not specified, all external IPs from the source node will be transferred to the target node and vice versa.)

Note:
- Before using CLI methodsSwapExtIpsIt should be ensured that the source and destination nodes (environments) both run insideregionsame

-Before the release of Jelastic 5.8This method is not supported for IPv6 and can only be used for IPv4.

-Before launching Jelastic6.0 IP switching will fail if the environment hascustom domainAlready tied up

- This process may cause the associated public IP to disappear for a short period of time (up to 10 seconds).

- The following nodes will automatically restart to initialize new listening addresses after operation:GlassFish, Apache PHP, Apache Ruby, NGINX PHP, NGINX Ruby

- Depends on the included services A manual restart may be required for Elastic VPSandDocker Containerscustomized to adapt to changing IP address

- It is recommended to check the access status throughSLBagain for both nodes after IP switching operation.

Wait a moment. Your IP will be exchanged between the specified nodes and details will be provided in the action response.

Once you get an idea of how to work with our CLI, you can automate your environment management, for example by creating consistent scripts for frequently used chains of operations. You can find complete information about all available commands and methods in the documentation.Jelastic API