If you are using the OC Reporter application in the Octopus Cloud, you can skip this chapter.
Requirements
To ensure OC Reporter operates correctly, the server on which you install the application must meet the requirements shown below.
Hardware Requirements
| vCPU Cores | 8 |
|---|---|
| RAM | 8 GB |
| Disk | 100 GB |
Software Requirements
| Operating system | Linux Windows Server 2012 or newer |
|---|---|
| Webserver | Windows
|
| Database | MariaDB 10.x x64 with collation “utf8_general_ci” or “utf8mb4_general_ci”. |
| PHP | Version: 8.1 or higher x64 php.ini
|
| PHP extensions | php_pdo_mysql php_mysqli php_mbstring php_bz2 php_curl php_exif php_fileinfo php_ftp php_gd2 php_gettext php_gmp php_imap php_intl php_ldap php_openssl php_pdo_sqlite php_soap php_sockets php_sqlite3 php_xmlrpc php_xls PHP ZipArchive |
Network Requirements
| Internet connection | HTTPs 443 to https://splareporter2.octopus.cloud https://splareporter2api.octopus.cloud https://splamanager.octopuscloud.ch Internet connection is required for updates and tenant authentication checks. |
|---|
Installation
The installation for OC Reporter requires an IIS web server on Windows. Download the OC Reporter installation package and execute the following installations steps for OC Reporter:
- Create a folder on the server, where you want to deploy OC Reporter. By convention, we recommend creating a folder C:\inetpub\oc_reporter.
- Extract the installation files into the C:\inetpub\oc_reporter folder.
- The next step is to create an OC Reporter IIS website.
- Open the IIS Manager on the machine where you want to install OC Reporter.
- In IIS Manager, select Add new website.
- Enter in Site name the value OC Reporter
- For Physical path select the folder app\public of the OC Reporter installation, e.g. C:\inetpub\oc_reporter\app\public
- In the Binding section, you define the endpoint URL for OC Reporter. Choose the binding Type and the Port.
- Click OK to add the new website.
- Once the OC Reporter IIS website is created, you need to assign the appropriate permissions to the C:\inetpub\oc_reporter folder.
- Right-click the C:\inetpub\oc_reporter folder and select Security.
- Give the IUSR user full control to this folder and its subfolders.
- Install PHP 8.1 x64 (or higher), from the official repositories/files for PHP for Windows X64 NTS.
- Install MariaDB 10.11 LTS x64 for Windows, and note the MariaDB root password.
- Set-up PHP FastCGI and Handler mappings under the OC Reporter website. PHP Handler mapping should point to the correct PHP script path (*.php), and php-cgi.exe path for the installed PHP version, and should be set with the following PHP script verbs: GET,HEAD,POST,PUT,DELETE. PHP CGI (FastCGI) configuration should point to the relevant php-cgi.exe path, as per the installed PHP version. Additional FastCGI parameters to be set: instanceMaxRequests (10000), ActivityTimeout (7200), RequestTimeout (7200). Add a 'Default Document' parameter on the IIS web server GUI, and set its value to Index.php (required so that IIS can load default index files of PHP applications).
- When PHP, and MariaDB are installed, open the C:\inetpub\oc_reporter\app\public folder and locate the octopus.onprem.json file.
- Rename octopus.onprem.json to octopus.json.
- Open the octopus.json file with Notepad++ or a similar editor. You can download Notepad++ from this website.
- In the octopus.json file, change the following parameters:
-
In app.tenant, enter your OCID.
-
In app.tenant_access_token, enter your access token.
-
In cronjob.key, define the cronjob key. This can be any key, enter, for example, octo99. The cronjob key is used only for the OC Reporter software catalog update process.
-
To configure the email function of OC Reporter to send notifications and reports automatically, you need to add in app.email a “from” email address for OC Reporter.
-
If a virtual host is configured on the IIS and DNS is configured in the network, in app.baseUrl, enter the DNS hostname/virtual host of the OC Reporter IIS website. That entry is primarily used for the URLs shared in the emails sent by the OC Reporter application.
-
Enter your database connection details under the section db:
- In dns section ****enter for host= the IP address of the database server. ****Usually it is the localhost IP address 127.0.0.1.
- In dns section enter for dbname= the value oc_reporter.
- Enter in username the value root, or the username you created for the database.
- Enter in password the password of the user to access the database.
- The database name and credentials need to be the same as the ones you will use for the database server.
-
If an email server is available and you want to use the email functionality, in the mailer section, enter the following values:
-
Enter in the transport section to host the SMTP/email relay IP address/FQDN.
-
Enter the username and password, if needed for the authentication. If not, remove the username and password rows entirely.
-
If you are using a special port, enter it in the port section. If you are using standard SMTP enter 25 for the port, or another port number if custom ports are configured.
-
If encryption is used, enter that value in the encryption section. Usually, it is the value ssl or tls. If no encryption is used, remove that row entirely.
-
Please ensure that the last item in the transport section does end with a comma.
NOT
-
-
Save the octopus.json file and close it.
-
- The next step is to create an appropriate database and the required tables.
- Open the command prompt window (cmd.exe) and run the following command:
- mysql -u root -p
- Enter the root database password, you created in the installation process of the database server. You are logged in now in the database server.
- To create the OC Reporter database, run the following query:
- CREATE DATABASE oc_reporter CHARACTER SET utf8 COLLATE utf8_general_ci;
- After the database is created, run the following query to open the database:
- use oc_reporter;
- Open now a second command prompt (cmd.exe) window.
- Enter the following command to change the working folder:
- cd C:\inetpub\oc_reporter\app
- To create all the needed tables in the database for the OC Reporter application, run the following command:
- yii migrate
- Switch back to the first command prompt, where the database server is still open.
- Run the following SQL INSERT command to create the first user in the database to login into OC Reporter. Replace the placeholders with their actual correct values. Replace the placeholders with their actual correct values.
- INSERT INTO user (tenant_id, role_id, first_name, last_name, pref_lang, access_email, access_password_hash, auth_key, status) VALUES ('<OCID>', 'admin', '<Firstname>', '<Lastname>', 'en', '<Email>', '<PasswordHash>', '<AuthKey>', 'active');
- To make sure the users have been created, run the following query:
- SELECT * FROM user;
- To update the OC Reporter software catalog tables, open a web browser and enter:
- http:// <fqdn-or-ip-of-the-oc-reporter-server> /cronjob/update-software-tables?key=octo99
- The exact value of this URL depends on how the OC Reporter IIS website was configured.
- Go back to the database console and run the following query to check if the software catalog gets filled into the table.
- SELECT * FROM software;
- Next, you need to make a few PHP configuration changes.
- Locate the php.ini file of your installed PHP version.
- For x86 PHP installation: C:\Program Files (x86)\php[php-version]\php.ini
- For x64 PHP installation: C:\Program Files\php[php-version]\php.ini
- Open the php.ini file in Notepad or another similar text editor. You need to run the text editor as an administrator.
- Change the memory_limit parameter to 2048M.
- Change the max_execution_time parameter to 6000.
- Save and close the php.ini file.
- You need to create now a regular Windows scheduled task for OC Reporter to execute some processes automatically, such as importing the scanned inventory files of OC Scanners or sending notifications by email.
- On the machine where you are installing the on-premise OC Reporter, open the Task Scheduler console.
- In the Task Scheduler console, right-click the blank field and select New task.
- In the Name field, enter OC Reporter.
- Select Run whether user is logged on or not and Run with highest privileges.
- Select the Triggers tab.
- In the Settings section, select Daily.
- In Start, select a start date and time. The minutes and seconds values need to be all zeros.
- In Recur every, enter 1.
- In the Advanced settings section:
- Select Repeat task every and from the list, select 5 minutes.
- In for a duration of, from the list, select Indefinitely.
- Select Stop task if it runs longer than and from the list, select 12 hours.
- Select Enabled.
- Click the OK button.
- Select the Actions tab.
- From Action, select Start a program.
- In Program/script, enter C:\inetpub\oc_reporter\app\yii.bat.
- In Add arguments (optional), enter cronjob.
- Click the OK button and then again the main OK button.
- The Task Scheduler console asks you to enter the appropriate domain admin or local admin username and password. Enter the values and click the OK button. You can run the scheduled task also with SYSTEM (LOCALSYSTEM).
- Installation of OC Reporter is completed.
- To access the on-premises OC Reporter, you need to open a web browser window and enter the URL of the on-premises OC View. This URL is the IIS Website address you have configured, for example, http://oc-reporter-address:8080. The address can also be an FDQN or IP address of the OC Reporter server with a different port number, depending on how the OC Reporter IIS website is configured.