Most Powerful Open Source ERP

How To Install Appstore

This tutorial shows how to install an open source appstore for web based applications.
  • Last Update:2019-04-17
  • Version:003
  • Language:en

How To Install OfficeJS Appstore

This document explains how to install an appstore like officejs.com.

This appstore allows developers to upload web based applications with publication workflow control by administrators.

This process take around 6 hours to complete, with 5 hours waiting.

Request a webrunner

Request a web runner on slapos. Take care to set Partition Amount to 15 and Custom Frontend Backend Type to zope.

Fetch the appstore GIT repository

Go to Shell and type these commands to clone appstore repository on your runner:

cd project/
git clone https://lab.nexedi.com/nexedi/officejs-appstore/

Instanciate the appstore

Go to Services -> Parameter and add this:

Parameter name:

_

Parameter value:

{
  "site-id": "erp5",
  "bt5": "officejs_appstore_configurator",
  "zope-partition-dict": {
    "activity": {
      "family": "activity",
      "instance-count": 4,
      "thread-amount": 2,
      "port-base": 3100
    },
    "web": {
      "family": "static-web",
      "instance-count": 9,
      "thread-amount": 10,
      "port-base": 3200
    }
  }
}

bt5 corresponds to which business template will be installed automatically.

zope-partition-dict corresponds to different zope partitions needed to compartiment storage by family with number of instances, thread amount and port-base on which first zope partition is accessible 

Click on Updates Values button to save parameter.

Open officejs-appstore software release

Select the software release officejs-appstore -> slapos:

Click on Open Software button, then on Green Play button to build software and instanciate partitions. Wait few hours for the completion.

Go to Services -> Connection Information, if you do not have the same picture as bellow, click again on Green Button and wait few minutes.

Copy the family-static-web-v6 url, go back to slapos services you use and paste in Custom Frontend Backend URL, save and wait for frontend to be available.

Configure Erp5

Access to your frontend url, it should look like this:

Add /erp5 after the url, and login (use inituser-login and inituser-password two picture before).

Then add /portal_configurator after url to access this page:

Click on big orange Configure button, then click on the grey install button click on it. Wait around 15 minutes for completion.

Request Custom Wildcard Frontend

Create a SSL certificate for your appstore following the wildcard request tutorial

Request a frontend from slapos services:

Fill the form, feel free to chose a nice title and copy paste xml below. Do not forget to replace the certificates.

<?xml version="1.0" encoding="utf-8"?>
<instance>
    <parameter id="custom_domain">*.XXX.host.vifib.net</parameter>
    <parameter id="disable-no-cache-request">true</parameter>
    <parameter id="disable-via-header">true</parameter>
    <parameter id="enable_cache">true</parameter>
    <parameter id="https-only">true</parameter>
    <parameter id="path">/erp5/web_site_module/application-list/*/</parameter>
    <parameter id="prefer-gzip-encoding-to-backend">true</parameter>
    <parameter id="ssl_ca_crt">-----BEGIN CERTIFICATE-----
XXX
-----END CERTIFICATE-----</parameter>
    <parameter id="ssl_crt">-----BEGIN CERTIFICATE-----
XXX
-----END CERTIFICATE-----</parameter>
    <parameter id="ssl_key">-----BEGIN PRIVATE KEY-----
XXX
-----END PRIVATE KEY-----</parameter>
    <parameter id="type">zope</parameter>
    <parameter id="url">https://[2001:67c:1254:87::1bb5]:2166</parameter>
</instance>

To change wildcard preferences go to [your_erp5_url]/portal_preferences/officejs_system_preference/SystemPreference_viewAppstore.

Manage Application

To upload an application, you need to add two users on erp5 (like in the howto):

  • a developer, with an assignment's role value to Author
  • an reviewer, with an assignment's group value to OfficeJS

You need to activate officejs alarm, go to [Your_instance]/erp5/portal_alarms/manageAlarmNode, select some activity node, click on Change then click on Subscribe.

Logout from your zope account and login with the developer account created before.

To add an application go to https://publisher.[your_domain_name]

Prepare your application zip. It must contain a web progressive app manifest described here and an index.html file.

Appstore server will process the zip extraction, which should take few minutes

Have a look on your application with link provide, open a review for administrator.

Now administrator should check if your application is clean then publish it, go to [your_instance]/erp5/software_publication_module/.

Select software publication you want to accept in listbox, feel free to check information and application content with test url, then use action Accept or Reject.

Access to https://store.[your_domain]: you should have a store with your newly uploaded app.