Use the Application Accelerator IntelliJ plug-in

This topic tells you about the Application Accelerator IntelliJ plug-in. The plug-in is used to explore and generate projects from the defined accelerators in Tanzu Application Platform (commonly called TAP) using IntelliJ.

Dependencies

To use the IntelliJ plug-in to explore and generate projects, the plug-in must either:

Install the plug-in

The VMware Tanzu Application Accelerator plug-in for IntelliJ is available from the JetBrains Marketplace.

To install the plug-in from the JetBrains Marketplace:

  1. Open IntelliJ.
  2. Open the command palette, enter Plugins, and click Plugins.
  3. Select the Marketplace tab in the Plugins Settings dialog box.
  4. In the search box, enter Tanzu.
  5. Click Tanzu Application Accelerator then click Install.

Configure the plug-in

Before using the plug-in, you must configure it as follows:

  1. Go to the IntelliJ menu, select IntelliJ IDEA > Preferences > Tools > Tanzu Application Accelerator.

  2. Configure the plug-in to either use Tanzu Developer Portal or the local engine server:

    • For Tanzu Developer Portal:

      In the Tanzu Developer Portal text box, add your Tanzu Developer Portal URL. For example, https://tap-gui.myclusterdomain.myorg.com.

      To get the fully-qualified domain name, if you have access to the Tanzu Application Platform cluster that is running Tanzu Developer Portal, run:

      kubectl get httpproxy tap-gui -n tap-gui
      

      Tanzu Application Accelerator preferences.

    • For the local engine server:

      To use the local engine server to explore and generate projects based on local files without requiring access to Tanzu Developer Portal, follow the instructions in Use a local Application Accelerator engine server.

  3. Click Apply and OK.

Use the plug-in

You can use the IntelliJ extension to generate a project and to export your accelerator configuration.

Generate a project

To use the IntelliJ plug-in to generate a project:

  1. To explore the defined accelerators, click New Project, then click Tanzu Application Accelerator.

    The IntelliJ UI with the New Project button highlighted.

    Tanzu Application Accelerator New Project wizard is open.

  2. Choose one of the defined accelerators and configure the options.

    Options page is open.

  3. Click Next.

  4. (Optional) Fill the text boxes required to create the Git repository. A personal access token from the Git provider is required. This is stored in a secured location for future use.

    Note

    You can leave the values blank if you do not require a repository.

  5. Click Next to go to the review step.

  6. Click Next to download the project.

    After the project has downloaded, the Create button is enabled. You can now create and open the project.

Export accelerator configuration options

For faster iteration while writing accelerators, you can export the accelerator options in the Review and Generate Step to a JSON file. You can use this file to generate your project again from the CLI.

To export your options using the IntelliJ extension:

  1. Select the accelerator that you want to use in the new project wizard described in Generate a project earlier, and configure the options.

  2. In the Review and Generate Step, enter a filename into the Export Options text box.

    The export options field.

  3. Click Export, then select a location to save the file.

Retrieving the URL for the Tanzu Developer Portal

If you have access to the Tanzu Application Platform cluster that is running the Tanzu Application Platform GUI, run the following command to determine the fully-qualified domain name:

kubectl get httpproxy tap-gui -n tap-gui

The result is similar to:

NAME      FQDN                                      TLS SECRET     STATUS   STATUS DESCRIPTION
tap-gui   tap-gui.tap.tapdemo.myorg.com             tap-gui-cert   valid    Valid HTTPProxy

Download and Install Self-Signed Certificates

To enable communication between the Application Accelerator plug-in and a Tanzu Application Platform GUI instance that is secured using TLS, you must download and install the certificates locally.

Prerequisites

yq is required to process the YAML output.

Procedure

  1. Find the name of the Tanzu Developer Portal certificate. The name of the certificate might look different to the following example.

    kubectl get secret -n cert-manager
    
    NAME                                           TYPE                             DATA   AGE
    canonical-registry-secret                      kubernetes.io/dockerconfigjson   1      18d
    cert-manager-webhook-ca                        Opaque                           3      18d
    postgres-operator-ca-certificate               kubernetes.io/tls                3      18d
    tanzu-sql-with-mysql-operator-ca-certificate   kubernetes.io/tls                3      18d
    tap-ingress-selfsigned-root-ca                 kubernetes.io/tls                3      18d <------- This is the certificate that is needed
    
  2. Download the certificate:

    kubectl get secret -n cert-manager tap-ingress-selfsigned-root-ca -o yaml | yq '.data."ca.crt"' | base64 -d > ca.crt
    
  3. Install the certificate on your local system and restart any applications that use the certificate. After restarting, the application uses the certificate to communicate with the endpoints using TLS.

    macOS
    Run:
    sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain ca.crt
    

    For more information, see Installing a root CA certificate in the trust store in the Ubuntu documentation.

    Windows
    Complete the following steps:
    1. Use Windows Explorer to navigate to the directory where the certificate was downloaded and select the certificate.
    2. In the Certificate window, click Install Certificate….
    3. Change the Store Location from Current User to Local Machine. Click Next.
    4. Select Place all certificates in the following store, click Browse, and select Trusted Root Certification Authorities
    5. Click Finish.
    6. A pop-up window stating The import was successful. is displayed.

Update the plug-in

To update to a later version, repeat the steps in Install the plug-in. You do not need to uninstall your current version.

Uninstall the plug-in

To uninstall the VMware Tanzu Application Accelerator plug-in for IntelliJ:

  1. Open the Preferences pane and go to Plugins.
  2. Select the extension, click the gear icon, and click Uninstall.
  3. Restart IntelliJ.
check-circle-line exclamation-circle-line close-line
Scroll to top icon