4. Plugin finished, deploy it in Abiquo

When the plugin is finished, deploy it in the Abiquo system. 

Create the jar with the plugin

This is an easy step, that you probably already know, but for completeness we will describe it anyway.

Go to your plugin main directory and build the plugin with maven:

Build plugin jar
mvn clean package

 

Build plugin jar output example
[INFO] Scanning for projects... [WARNING] [WARNING] Some problems were encountered while building the effective model for org.example:myownplugin:jar:1.0-SNAPSHOT [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-javadoc-plugin is missing. @ com.abiquo:platform:4.0.4, /home/sergi/.m2/repository/com/abiquo/platform/4.0.4/platform-4.0.4.pom, line 2223, column 29 [WARNING] [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. [WARNING] [WARNING] For this reason, future Maven versions might no longer support building such malformed projects. [WARNING] [INFO] [INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1 [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building Custom Abiquo Backup Plugin 1.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ myownplugin --- [INFO] [INFO] --- maven-enforcer-plugin:1.2:enforce (enforce-maven) @ myownplugin --- [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ myownplugin --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 1 resource [INFO] [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ myownplugin --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 2 source files to /tmp/mvn/myownplugin/target/classes [INFO] [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ myownplugin --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 9 resources [INFO] [INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ myownplugin --- [INFO] No sources to compile [INFO] [INFO] --- maven-surefire-plugin:2.17:test (default-test) @ myownplugin --- [INFO] Surefire report directory: /tmp/mvn/myownplugin/target/surefire-reports ------------------------------------------------------- T E S T S ------------------------------------------------------- Running TestSuite Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.248 sec - in TestSuite Results : Tests run: 0, Failures: 0, Errors: 0, Skipped: 0 [INFO] [INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ myownplugin --- [INFO] Building jar: /tmp/mvn/myownplugin/target/myownplugin-1.0-SNAPSHOT.jar [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.808 s [INFO] Finished at: 2017-11-23T18:36:59+01:00 [INFO] Final Memory: 24M/619M [INFO] -----------------------------------------------------------------------

You will get the plugin jar in the target directory of your project

Plugin jar path view
target ├── classes ├── generated-sources ├── maven-archiver ├── maven-status ├── myownplugin-1.0-SNAPSHOT.jar ├── surefire-reports └── test-classes 6 directories, 1 file


Place the plugin jar in Abiquo components

Once you have created the jar, place it in the Abiquo components that will use it.

That means in the three Tomcat webapps:

  • API

  • Virtual Factory

  • Cloud Provider Proxy

Keep in mind if you have a monolithic installation or a distributed one in order to don't forget any of your environments.

Then, follow the steps:

1. Stop tomcat
2. Copy your jar to the tomcat webapps
3. Start Tomcat

When Tomcat starts, look at the logs for each webapp to check that your plugin has been loaded.

In api.log, virtualfactory.log and cpp.log there should be a line similar to the following, but with your plugin type.

Log line example

Request a license

You will need a license to run any plugin that is loaded in Abiquo.

So this means that custom plugins will also need a license.

So you should request a license for your plugin type.

Add it to Abiquo and enjoy your integration!

Copyright © 2006-2024, Abiquo Holdings SL. All rights reserved