Velocity environments can be created and interacted with directly from the PyCharm IDE.
The extension is compatible with PyCharm 2020.1 and above
To install the Velocity plugin, navigate to Plugins, search for Velocity Environments and click Install, or get it from the JetBrains Marketplace.
- 1.Open the Edit Configurations dialog by clicking Run > Edit Configurations,or by clicking the triangle on your existing project's run configuration definition.
+to add the new Velocity configuration type, which will be available after you have installed the Velocity extension.
3. Edit the configuration:
- Specify the name of the new Velocity Run Configuration.
- Specify the name of your existing Run Configuration. Tip: If you don't remember the name of the existing run configuration, you can use the list on the left to refresh your memory.
- Specify the name of the Velocity service that you want to develop locally.
- For detailed output messages you can enable the Verbose output.
First, you'll need to select your desired Velocity environment. To do so, click on the environment tab in the lower right corner of the IDE, and select an available environment from the list.
Alternatively, you can click the
+sign on the left sidebar menu to create a new environment.
With your desired environment set, select the same environment in the left pane, and click the green triangle (play button) in the left sidebar menu. This will start a connection manager in the background of your local environment, which will allow you develop Velocity services locally.
In order to run your code connected to the remote environment, simply select the Velocity Run Configuration you added and click the Run or Debug icons.
When you run or debug your code using the Velocity Run Configuration, the following steps will occur:
- 1.Velocity will run
veloctl env develop --attachcommand and create a tunnel from your local machine to the dependencies running in the remote cluster.
- 2.Your original run configuration will be triggered with injected environment variables that connect your service to the remove environment.
Once the above steps have completed, you can update your designated service locally, and your changes will be reflected in its interactions with the remote services as you work.
With the service selected in the left pane, click Info or Logs as needed.
NOTE: You can use "CTRL+F" (or "Command+F" on a Mac) to search logs.
To close the portal, with your desired environment selected, click the red square (stop button), and to destroy your environment from Velocity, click the trash icon.