Environment Start/Stop

CLI Tutorial: Environment Start and Stop

Starting and stopping environments are among the most common environment-management operations available through the platform CLI.

Using these commands appropriately can help reduce resource costs, especially for development and testing environments that are not required continuously. For example, an environment can be stopped overnight and started again when development resumes.

Before You Begin

  • Connect to the platform account through SSH Gate.
  • Confirm the exact name of the environment that should be managed.
  • Ensure that no important process is running before stopping the environment.
Replace the {env_name} placeholder in each command with the actual environment name.

Stop an Environment

1Run the stop command

To stop an environment that is temporarily not required, execute:

~/jelastic/environment/control/stopenv --envName {env_name}

The environment is stopped and remains unavailable until it is started again.

Service availability: Stopping an environment makes its applications and services unavailable. Use this operation only when downtime is acceptable.

Check the CLI Result

The CLI returns a structured response after processing the command. A response containing the following property indicates that the operation completed successfully:

"result": 0
A result value of 0 means that the command completed without errors.

Start an Environment

2Run the start command

When the environment is required again, execute the corresponding startenv method:

~/jelastic/environment/control/startenv --envName {env_name}

The platform starts the environment and makes its application services operational again.

Startup time: Wait until all required environment nodes return to the running state before testing or sending production traffic to the application.

Practical Usage

Development Environments Stop environments outside working hours and start them again when development resumes.
Testing Environments Keep temporary testing infrastructure stopped when no test cycle is active.
  • Confirm the environment name before running either command.
  • Review the returned result value.
  • Allow enough time for all nodes to stop or start.
  • Verify application availability after starting the environment.

What’s next?