Search
⌃K

PyCharm

Velocity environments can be created and interacted with directly from the PyCharm IDE.

Install the PyCharm extension

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.

Configure the PyCharm extension

To configure the PyCharm extension, you need to define a new Run Configuration for your project.
  1. 1.
    Open the Edit Configurations dialog by clicking Run > Edit Configurations,or by clicking the triangle on your existing project's run configuration definition.
  2. 2.
    Click + 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.

Develop and debug locally using the PyCharm extension

Select your Velocity environment

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.

Start the Velocity portal

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.

Running your code connected to the remote environment

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. 1.
    Velocity will run veloctl env develop --attach command and create a tunnel from your local machine to the dependencies running in the remote cluster.
  2. 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.

Access Velocity service details and logs

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.

Close the portal and destroy your environment

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.