Skip to content

Commit

Permalink
Merge pull request #2 from rollno748/ver1
Browse files Browse the repository at this point in the history
Merging to master
  • Loading branch information
rollno748 committed Sep 5, 2023
2 parents b5fb0f1 + ca05dfd commit c33b1fc
Show file tree
Hide file tree
Showing 34 changed files with 2,152 additions and 614 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.idea
target
dependencies-reduced-pom.xml
62 changes: 58 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,65 @@
# Jmeter-local-plugins-manager
Intranet Plugin Manager for Jmeter to avoid downloading plugins from Internet
Intranet Plugin Manager for JMeter - which downloads the plugins from internet periodically.

## Motive
Some organization will not have/provide access to internet on certain hosts - This will enable the team to create an own server to manage the plugins

## Features
1. Downloads the plugins and dependent libraries to local repository
2. Creates and exposes modified API with to get the Plugins info for Jmeter
3. Creates periodic backup before update
1. Downloads the plugins, and it's associated dependent libraries to local storage.
2. Stores all the information to SQLITE DB.
3. Enables a UI to upload custom plugin which are restricted to share outside of organization.
4. Creates and exposes modified API with to get the Plugins info for Jmeter Plugin manager
5. Easily configurable scheduler to check for the newly available plugins/versions in the market.


## Required Components
1. Java 8 or above

## Architecture


## How to Set up

* Download the source code and compile or Download the releases
* Create config to override configuration for application
* Run the jar (java -jar jmeter-local-plugins-manager-2.0.jar)


## Available APIs

| Service | HTTP Method | URI |
|:-------------------|:-----------:|:----------------------------------------|
| App Running Status | GET | http://<hostname/IP>:\<port>/v1/ |
| Upload Plugin | GET | http://<hostname/IP>:\<port>/v1/upload |
| Get Plugins | GET | http://<hostname/IP>:\<port>/v1/plugins |


## Uploading Custom plugin
![Custom Upload Form](/img/upload-form.jpg)


## How it works ?

* Its acts as an independent server which polls plugins manager for update (which is configurable)
* It creates the required directories to store the plugins and its dependencies to the local
* It checks the permission on the local directories before storing the files
* Exposes 3 APIs in intranet
- Public plugins api
- Custom Plugins api
- Merged (Public and Custom) Plugins api

## Tools used
- Spark java framework
- Sqlite DB


## 💲 Support Me
<!-- [<a href="https://www.buymeacoffee.com/rollno748" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" height="45px" width="162px" alt="Buy Me A Coffee"></a>](https://www.buymeacoffee.com/rollno748) -->
If this project help you reduce time to develop, you can give me a cup of coffee :)

[![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://ko-fi.com/rollno748)

Please rate a star(:star2:) - If you like it.

Please open up a bug(:beetle:) - If you experience abnormalities.

Binary file added img/upload-form.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
103 changes: 83 additions & 20 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,52 +2,115 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.perftalks.jmeter.pluginsmanager</groupId>
<groupId>io.perfwise.local.pluginsmanager</groupId>
<artifactId>jmeter-local-plugins-manager</artifactId>
<version>1.0</version>
<version>2.0</version>

<properties>
<log-4j-version>2.8.2</log-4j-version>
<jackson-mapper-version>LATEST</jackson-mapper-version>
<org-json-version>1.9.11</org-json-version>
<spark-java>2.9.4</spark-java>
<sqlite-version>3.42.0.0</sqlite-version>
<commons-cli-vesion>1.5.0</commons-cli-vesion>
<httpclient-version>4.5.14</httpclient-version>
<json-version>20230618</json-version>
<gson-version>2.8.9</gson-version>
<jackson-databind-version>2.12.5</jackson-databind-version>
<jsoup-version>1.16.1</jsoup-version>
<logback-version>1.2.6</logback-version>
<commons-fileupload>1.5</commons-fileupload>
</properties>

<dependencies>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>${log-4j-version}</version>
<groupId>com.sparkjava</groupId>
<artifactId>spark-core</artifactId>
<version>${spark-java}</version>
</dependency>
<dependency>
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
<version>${sqlite-version}</version>
</dependency>
<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
<version>${commons-cli-vesion}</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>${httpclient-version}</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>${jackson-mapper-version}</version>
<version>${json-version}</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>${gson-version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson-databind-version}</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${logback-version}</version>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>${commons-fileupload}</version>
</dependency>
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>${jsoup-version}</version>
</dependency>

</dependencies>

<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>config.properties</include>
<include>**/*</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<!-- Build an executable JAR -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.1.0</version>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix>
<mainClass>com.perftalks.jmeter.app.AppRunner</mainClass>
</manifest>
</archive>
<source>8</source>
<target>8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>io.perfwise.local.pluginsmanager.LocalPluginsManager</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
27 changes: 0 additions & 27 deletions src/main/java/com/perftalks/jmeter/app/AppRunner.java

This file was deleted.

36 changes: 0 additions & 36 deletions src/main/java/com/perftalks/jmeter/app/PluginsManager.java

This file was deleted.

100 changes: 0 additions & 100 deletions src/main/java/com/perftalks/jmeter/repo/rest/HTTPRequests.java

This file was deleted.

Loading

0 comments on commit c33b1fc

Please sign in to comment.