4.1. Plugin Server Setup Guide¶
What is a Plugin?
A plug-in is a piece of code that integrates with our main server to perform a specific function. In the context of our product, a plugin is nothing but a .fp bundle (i.e. Kind of app, zip).
What is a Plugin Server?
Plugin server is a server which hosts/runs plugins. It is like our main server with a specialized purpose of running plugins. The main server will call a plugin server to execute specific plugin and get the desired output.
4.1.1. Plugin Server Setup¶
Enabling plugin capabilities in the main server is a three step process:
Install plugin server build (Step 1)
Setting up a plugin server (Step 2).
Copying .fb bundles in the plugin server (Step 3).
Configuring the main server with the plugin server (Step 4).
Copy SSL certificate, generated by AD server, into plugin server. (optional)(step 5)
Note
The plugin server can be setup in the main server or separately.
4.1.1.1. Install Plugin Server Build (Step 1)¶
Start your server and install the plugin server build into a directory.
4.1.1.2. Plugin Server Configuration (Step 2)¶
Open server terminal and go to the directory containing plugin_server_CI. First change permission with the following command.
sudo chmod 777 plugin_server_CI
Initiate installation of plugin server with the following command:
sudo ./plugin_server_CI
Wait for the installation to finish. You will get the below screen.
4.1.1.3. Copying Plugin Bundle in the Plugin Server (Step 3)¶
Transfer plugin .fp file/files to the plugin server.
Log in as root with Sudo -i. Go to the directory of the .fp files.
Now copy the .fp file/files to the plugin folder.
cp *.fp /opt/flotomate/plugin-server/plugins
Now go to the plugins directory.
Run ls-la and check user; if user is root then change that to fmtuser and fmtusergroup.
chown fmtuser:fmtusergroup *.fp
Restart plugin service in the plugin server with the following command:
sudo systemctl restart ft-plugin-server.service
4.1.1.4. Main Server Configuration (Step 4)¶
Open terminal of the main server. We will now input the IP address of the plugin server in the services-config.yaml file.
Login as root: sudo -i. Go to the config folder using the command:
cd /opt/flotomate/main-server/config
Open services-config.yaml using nano:
nano services-config.yaml
Go down to the services section and update the plugin server address.
Save your changes, and restart the main-server with the following command:
systemctl restart ft-main-server.service
Now you are done with installing the server.
4.1.1.5. Import SSL Certificate to the Plugin Server (Step 5 Optional)¶
If an admin wishes to add users or change passwords, using a plugin, in Active Directory, he will need to install an SSL certificate generated by the Active Directory server and then install the certificate into the keystore of the plugin server.
Learn how to create SSL Certificate.
Installing certificate in the plugin server:
Copy certificate to the plugin server.
Open directory where the certificate is copied.
Run the following command to add the certificate in the keystore.
Setup will ask for the certificate password and whether you trust the certificate or not, type yes for trust.
Restart plugin server: sudo systemctl restart ft-plugin-server.service.