Installing Tanzu Dev Tools for Visual Studio Code
This topic explains how to install the VMware Tanzu Developer Tools for Visual Studio Code.
Before installing the Tanzu Developer Tools IDE extension, you must have:
- The Kubernetes command-line tool. For more information, see the Kubernetes documentation.
- Tilt v0.23.2 or later. You only need to install the Tilt component. Docker Desktop and local Kubernetes are not prerequisites for VMware Tanzu Dev Tools for Visual Studio Code.
- The Tanzu CLI. See Install the Tanzu CLI.
- The Tanzu CLI apps plug-ins. See Install the Tanzu CLI plug-ins
- A cluster with Tanzu Application Platform, the default Supply Chain, and their dependencies. Download these from Tanzu Network. For installation instructions, see Installing the Tanzu CLI.
To install VMware Tanzu Developer Tools for Visual Studio Code:
- Download Tanzu Developer Tools for Visual Studio Code from Tanzu Network.
- Open VSCode. From the Command Palette (
P), run “Extensions: Install from VSIX…”. Select the extension file,
- When you do not already have a Java Development Kit(JDK) installed, the Java extension pack prompts you to install one. Accept the dialog box to install the Extension Pack for Java and the YAML Language Support by Red Hat. These are required to support debug and code snippets, respectively.
- Ensure Language Support for Java is running in Standard Mode.
When the JDK and Language Support for Java are configured correctly, you see that the integrated development environment creates a directory “target” where the code is compiled.
To configure VMware Tanzu Developer Tools for Visual Studio Code:
Ensure that you are targeting the correct cluster. For more information, see the Kubernetes documentation.
Navigate to the Tanzu settings.
- If on Windows, select File > Preferences > Settings > Extensions > Tanzu.
- If on macOS, select Code > Preferences > Settings > Extensions > Tanzu.
Configure as follows:
- Source Image (required): Set the location where an image containing source code is published. For example,
- Local Path (optional): Set the path on the local file system to a directory of source code to build. The current directory is the default path.
- Namespace (optional): Set the namespace to deploy workloads in. The namespace specified in
kubeconfig is the default namespace.
To quickly get you started, use the sample application with the necessary configuration files.
Option 1: Application Accelerator
Set up Application Accelerator.
Search for the Tanzu Java Web App.
Add the required configuration information and generate the application.
Unzip and open in VSCode.
Option 2: Sample repository
git clone to clone the tanzu-java-web-app repository from GitHub.
Go to the
Tiltfile and replace
your-registry.io/project with your registry server and repository.
Note: To start with existing applications, see Code Snippets in the Tanzu Dev Tools Usage documentation.
To uninstall the Tanzu Dev Tools extension:
Navigate to the extensions menu.
Right-click the Tanzu Dev Tools extension and select Uninstall.