Velocity run configurations
Use configurations to run Velocity sessions
Most IDEs use configurations to run, debug, and test your code (often referred to as run, launch or debug configurations). Each configuration is a named set of startup properties that define what to execute, and what parameters and environment to use. Velocity works with the native IDE functionality to create a Velocity configuration, building a dedicated Dockerfile image that is then used for your Velocity coding and debugging sessions.
You can create multiple Velocity configurations for different purposes, and you can use these to share with other developers, enabling them to more easily work on the same project.
Once you install Velocity in your IDE, you can launch the wizard (see more here for VS Code or here for JetBrains) to build a configuration. You can now also:
edit existing configurations (see Manage configurations)
share configurations (see Sharing Velocity configurations)
Build a configuration from scratch
From the area in your IDE where configurations are edited, click Velocity, similar to the following:
Then, click Add new run configuration...
From the Target tab, complete the workload details. From the Build tab, enter additional build details:
Read about all parameters, details, valid values and more here.
Once the configuration is built, you can Edit Configurations... at any time.
For more help with getting started, see the walkthrough for your IDE: JetBrains walkthrough and Visual Studio Code walkthrough.
Manage configurations
To manage and edit your configurations, navigate to the Velocity area or to the area for configuration editing in your IDE:
From any JetBrains IDE choose Edit Configurations... from the top of the IDE and then choose the relevant configuration to open parameters and options:
Configuration options vary depending on the language of your project. Select the relevant tab as follows:
Target - to update Kubernetes-specific fields, such as your Kubernetes context, namespace and deployment values.
Build - to add or update Docker-specific build commands, additional arguments and build context.
Refer toVelocity configuration optionsfor more guidance.
Velocity configuration options
All values that can be included in a Velocity configuration are as described in the following table:
Field | Languages supported | Description | Available from |
---|---|---|---|
Configuration based on | All | Workload: Velocity runs sessions by using the existing project image, syncing and changing files on top of that image. When basing your configuration on the workload, you only need the target pod details. The Workload option is only available for Python projects. When creating a configuration based on workload, you'll also need to configure Path mappings. Dockerfile: Velocity runs sessions by building the entire Docker image from scratch, replacing the existing project image with the newly built one. One creating a configuration based on the Dockerfile via the wizard, Velocity usually recognizes and populates the necessary details automatically. |
|
Configuration name | All | You can create multiple configurations for any project. Give each a unique name that suggests the goal of the run configuration - for example, the name of the application you're developing |
|
Dockerfile | All | The path to the Dockerfile associated with the service that you're developing; this field is only available from the wizard when building your configuration based on the Dockerfile |
|
Build context path/Build platform architecture | All | The build context is the set of files that your build can access. The positional argument that you pass to the build command specifies the context (for example, the local path) that you want to use for the build. Read more here about Docker. Get more help with build arguments in Velocity configurations here. |
|
Remote executable path | All | The path to the file system on a remote machine where executable programs are located |
|
Kubernetes context | All | The Kubernetes cluster that you're working in |
|
Kubernetes namespace | All | The namespace in which your deployed service is running |
|
Kubernetes workload | All | The specific Kubernetes workload that you're developing |
|
Workload command | All | Enter any relevant workload commands for your build, using either Shell or Exec syntax; see Set the container command for more information |
|
(Local application) build command | All | Only if the build command isn't included, enter the command and any relevant parameters |
|
Docker (build) arguments | All | If the build requires specified arguments, enter the arguments and their values; see Add a build argument for more information |
|
Environment variables | All | Add any relevant variables and their values directly from the Velocity area in your IDE, or from an external .env file; see Add environment variables for more information |
|
Application SSH key | All | See Add an SSH key for more information |
|
Docker secrets | All |
| |
Path mappings (local and remote paths) | All | Map the path from where your source code resides in your local environment to the target pod; see Path mappings for more information |
|
Remote interpreter path | Python | The path for the programming language interpreter on a remote server |
|
Port forwarding | All | Set a list of port forwards to remote services for local access |
|
Last updated