Skip to main content

Applying a Plugin to an already registered Application

In this section, you will find a guide on how to apply a Plugin to an already registered application.


warning

If you haven't created an Application yet, see the Create Application guide first.

Even after you have already registered an Application in your Workspace, you can:

  • Apply a new Plugin;
  • Apply the same Plugin again.

You can do this in two ways:

  1. Apply a Plugin only locally to your Application;
  2. Apply a Plugin and update the registration of your Application on the [StackSpot Platform](https://app.stackspot.com/login.
danger

You cannot manually edit the stk.yaml file of an Application or Infrastructure should. You can modify the Plugins in your Application or Infrastructure. To do so, use the following commands:

  • To modify the version or settings of a Plugin:
stk update plugin
  • To remove a Plugin:
stk remove plugin
  • To add new features to your project:
stk apply plugin

To do this, follow the steps below:

Requirements

  • Log in to your StackSpot account on the STK CLI - stk login;
  • Have an Application created and registered in a Workspace;
  • The Plugin you will apply must belong to a Stack from the Workspace where you have registered the Application.
warning

When applying Infrastructure Plugins, Connectors are created from the Connections Interfaces the Plugin must generate. You must use an alias for these Connectors when applying Infrastructure Plugins, and they must follow the following rules:

  • The alias must not exist in your current Application or Infrastructure yaml file;
  • The alias must not have the same name as a Connector that exists in your account;
  • The alias must respect the following regular expression, where the minimum length is two characters, and the maximum is 50 characters: ((^(?!^\d+$)[a-z\d]{2,})( -[a-z\d]+)*$).

How to apply a Plugin to an already registered Application

Step 1. In your terminal, access your Application Workspace. Execute the command:

stk use Workspace

Step 2. Go to your Application directory:

cd <application-name> 

Step 3. On the StackSpot Platform, check the Stacks and Plugins available within your Workspace:

  1. After you log in to the Platform, go to the Workspace you are using on the STK CLI;

  2. On the left side menu, click on 'Stacks';

  3. Select the Stack version you want to use the Plugins and click on it;

  4. Click on the 'Plugins' tab and see the Plugins available.


Step 4. Choose the Plugin you want to apply and click on the 'Plugin details' button. Use the path that shows up on the top of the screen and execute the command:

stk apply plugin <account>/<stack@version>/<plugin-name> 

For example:

stk apply Plugin growth/java-rest-api@3.1.2/feign-plugin

Answer the questions in the STK CLI. You have applied a Plugin to your already registered Application.

Repeat the process with any other Plugin you want to apply.

Update the Application in the Workspace

To update your Workspace Application with the new Plugins, you must do a new deploy again.

To do that, follow the steps below:

Step 1. In your terminal, after applying the Plugin, execute the deploy command:

stk deploy app --version <version> --env <environment-id> -w

Step 2. If the deployment returns successfully, you can see the Plugin inside your Application in your Workspace on the StackSpot Platform.