Collaboration Server


<< Prev   Next >>

Collaboration Server

Chapter 1. General information

This document is a quick start guide on how to install and set up the collaboration server. Once the server is installed and set up, you can use it with the collaboration system in 1C:Enterprise. For more information about the collaboration system, see 1C:Enterprise Developer Guide.

Chapter 2. System and hardware requirements

The distribution package of the collaboration system server includes the following components:

  • Dedicated collaboration server for 1C:Enterprise.
  • Hazelcast server.
  • Elasticsearch server.
  • Ring utility.
  • External data processor CollaborationSystemRegister.epf used to register an infobase on the collaboration server.

ATTENTION! We recommend that you use Hazelcast and Elasticsearch servers supplied in the collaboration server distribution package.

Computer requirements:

  • Operating system: 64-bit versions of CentOS 7.2 or later, Windows 7 or later.
  • Processor: Intel/AMD 1800 MHz or faster.
  • RAM: 4 GB or more.
  • 30 GB of free disk drive space (without space for a database).

1C:Enterprise version 8.3.10 or 8.3.11 can connect to the installed collaboration server. In version 8.3.10, video calls are not available.

The collaboration system requires the following software:

  • Oracle Java 8 x64 version 1.8.

Download Java: https://www.java.com/en/download/.

  • PostgreSQL version 9.5 or later.

Download server: https://www.postgresql.org/download/.

Documentation: https://www.postgresql.org/docs/.

  • Ring utility x64 version 0.8 or later.

Utility version 0.8 comes with:

  • 1C:Enterprise version 8.3.11 or later.
  • Collaboration server.

For more information about the ring utility, see 1C:Enterprise Administrator Guide.

 

Chapter 3. Installing the collaboration server

3.1. General information

This chapter describes how to deploy and set up collaboration server components. The significant assumption is that all the components are installed on a single computer. This chapter does not provide guidance on how to deploy and configure a cluster collaboration server.

The component package file has a name like 1ce-cs2-<package name>-a.b.c-d.x64, where:

  • <package name>is the component name:
  • serveris a package of the dedicated collaboration server.
  • elasticsearchis the Elasticsearch server package.
  • hazelcastis the Hazelcast server package.
  • a.b.c-dis a full version number of the component located in the package that matches a number of the a.b.c.d kind.

For Windows, the package has the .msi extension. For Linux, it has the .rpm/.deb extension, depending on the OS used.

For Windows, the 1ce-cs2-all-in-one-setup-2.0.14-1.x64.exe package is supplied. It is setup that includes all the required components.

3.2. Installation

3.2.1. Ring utility

If a computer where you want to deploy the collaboration server has the ring utility installed, check the installed utility version using ring --version.

If the utility version is earlier than the required one (0.8), delete the installed utility version and install it from the distribution package of 1C:Enterprise version 8.3.11 or later, or from the collaboration server distribution package.

For more information about the ring utility installation, see 1C:Enterprise Administrator Guide.

3.2.2. Collaboration server

Package installation for Windows

If the collaboration server is deployed on Windows, you can install it automatically using the installation wizard.

To do this, start 1ce-cs2-all-in-one-setup-2.0.14-1.x64.exe and follow the wizard's instructions. During installation, you will be asked for a name and password of the user on whose behalf the collaboration server will be connected to PostgreSQL. The wizard will do the rest automatically.

Installation will be performed with the following parameters:

  • Collaboration service instance name: cs.
  • Hazelcast instance name: hazelcast.
  • Elasticsearch instance name: elasticsearch.
  • For PostgreSQL:
  • Created the csuser with the cs-passpassword.
  • Created the 1ce-csdatabase owned by the csuser.
  • Attached the uuid-osspextension to the 1ce-csdatabase.
  • Configured WebSocket.
  • Initialized the service database.
  • Connected to ICE server dialog-turn1-gpt-msk.1c.ru:3478.

Data of created instances will reside in the %ProgramData%\1C\1CE\instances\<instance name> directory.

After installation, all the required services will be started.

Once you finish installing the collaboration server using the wizard, there is no need to apply the settings described in the following sections.

Manual installation

To install the collaboration system server, install all the packages included in the distribution package one by one.

Installation of each component is performed by manually starting installation of the required package. The syntax of the installation run command depends on the operating system used and the package manager (if any).

Before you start installing packages on Windows, specify in the .msi file properties that the file must be run in previous Windows version compatibility mode.

Once all the packages included in the distribution package are installed, go to setup described in the following sections.

Chapter 4. Setup

4.1. General information

All setup commands must be run on behalf of a user with administrative rights. For Windows, this means that the console where the setup commands are running must be started on behalf of the administrator. For Linux, setup commands must be run on behalf of the root user (or a similar user).

4.2. Setting up packages

4.2.1. On Windows

4.2.1.1. Collaboration server

For initial initialization of the collaboration server, follow these steps:

Copy to clipboard

ring cs instance create --dir %ProgramData%\1C\1CE\instances\<cs_instance>ring cs --instance <cs_instance> service create --java-home "%JAVA_HOME%" --stopped

In this example:

  • <cs_instance>is a name of the collaboration server instance.

4.2.1.2. Hazelcast

For initial initialization of the Hazelcast server, follow these steps:

Copy to clipboard

ring hazelcast instance create --dir %ProgramData%\1C\1CE\instances\<hc_instance>ring hazelcast --instance <hc_instance> service create --java-home "%JAVA_HOME%" --stopped

In this example:

  • <hc_instance>is the Hazelcast instance name.

4.2.1.3. Elastisearch

For initial initialization of the Elasticsearch server, follow these steps:

Copy to clipboard

ring elasticsearch instance create --dir %ProgramData%\1C\1CE\instances\<elasticsearch instance>ring elasticsearch --instance <elasticsearch instance> service create --java-home "%JAVA_HOME%" --stopped

In this example:

  • Where <elasticsearch instance>is the Elasticsearch instance name.

4.2.2. On Linux

4.2.2.1. Collaboration server

For initial initialization of the collaboration server, follow these steps:

Copy to clipboard

sudo useradd <cs_user>sudo mkdir -p /var/cs/<cs_instance>sudo chown <cs_user>:<cs_user> /var/cs/<cs_instance> ring cs instance create --dir /var/cs/<cs_instance> --owner <cs_user>ring cs --instance <cs_instance> service create --username <cs_user> --java-home $JAVA_HOME --stopped

In this example:

  • <cs_instance>is a name of the collaboration server instance.
  • <cs_user>is a name of the user on whose behalf the collaboration server will function.

4.2.2.2. Hazelcast

For initial initialization of the Hazelcast server, follow these steps:

Copy to clipboard

sudo useradd <hc_user>sudo mkdir -p /var/cs/<hc_instance>sudo chown <hc_user>:<hc_user> /var/cs/<hc_instance>ring hazelcast instance create --dir /var/cs/<hc_instance> --owner <hc_user>ring hazelcast --instance <hc_instance> service create --username <hc_user> --java-home $JAVA_HOME --stopped

In this example:

  • <hc_instance>is the Hazelcast instance name.
  • <hc_user>is a name of the user on whose behalf the Hazelcast server will function.

4.2.2.3. Elastisearch

For initial initialization of the Elasticsearch server, follow these steps:

Copy to clipboard

sudo useradd <elastic_user>sudo mkdir -p /var/cs/<elastic_instance>sudo chown <elastic_user>:<elastic_user> /var/cs/<elastic_instance> ring elasticsearch instance create --dir /var/cs/<elastic_instance> --owner <elastic_user>ring elasticsearch --instance <elastic_instance> service create --username <elastic_user> --java-home $JAVA_HOME --stopped

In this example:

  • <elastic_instance>is the Elasticsearch instance name.
  • <elastic_user>is a name of the user on whose behalf the Elasticsearch server will function.

4.3. Setting up the database

Up to this moment, PostgreSQL must be installed on a computer where the collaboration server is being deployed and set up.

Before you start to set up a database for the collaboration server, do the following:

  • Create a user on whose behalf the collaboration server will interact with the DBMS. This user must have rights to create a database. Later, db_user will be used to define this user's name. This user's password will be specified as db_user_pwd.

Creating a user: https://www.postgresql.org/docs/current/static/sql-createuser.html.

  • Create a database to store collaboration server data. The db_useruser must be an owner of this database. Later, cs_db will be used to define a database.

Creating a database: https://www.postgresql.org/docs/current/static/manage-ag-createdb.html.

  • The server must support password authentication.

Authentication methods: https://www.postgresql.org/docs/current/static/auth-methods.html.

For the cs_db database, attach uuid-ossp extensions. For more information, see https://www.postgresql.org/docs/current/static/uuid-ossp.html. To do this, run the following database command:

Copy to clipboard

CREATE EXTENSION IF NOT EXISTS "uuid-ossp";

Set up parameters for PostgreSQL JDBC drivers:

Copy to clipboard

ring cs --instance <cs_instance> jdbc set-params --url jdbc:postgresql://localhost:5432/cs_db?currentSchema=publicring cs --instance <cs_instance> jdbc set-params --username db_userring cs --instance <cs_instance> jdbc set-params --password db_user_pwdring cs --instance <cs_instance> jdbc-privileged set-params --url jdbc:postgresql://localhost:5432/cs_db?currentSchema=publicring cs --instance <cs_instance> jdbc-privileged set-params --username db_userring cs --instance <cs_instance> jdbc-privileged set-params --password db_user_pwd

4.4. Setting up WebSocket

For the collaboration server to interact with the client application, the WebSocket protocol is used. To set up this protocol, follow these steps:

Copy to clipboard

ring cs --instance <cs_instance> websocket set-params --hostname <cs_host>ring cs --instance <cs_instance> websocket set-params --port <cs_port>

In this example:

  • <cs_host>is a name or an IP address of a computer where the collaboration server is installed and to which the client application of the collaboration system (1C:Enterprise) will be connected.
  • <cs_port>is an IP port to be used to connect to the collaboration server of the client application of the collaboration system (1C:Enterprise).

If the ws: protocol is used with the collaboration server, further actions can be skipped. Create a keystore only if the wss: protocol is expected to be used.

To set up a secure channel, create a keystore in JKS format. Creating a keystore: https://docs.oracle.com/cd/E19509-01/820-3503/ggfen/. Add both a certificate for <cs_host> signed by a trusted authority and this trusted authority's certificate to the created store.

Then do the following in the command line:

Copy to clipboard

ring cs --instance <cs_instance> websocket set-params --wss truering cs --instance <cs_instance> websocket set-params --keystore-path <cs_keystore_path>ring cs --instance <cs_instance> websocket set-params --keystore-password: <cs_keystore_pwd>

In this example:

  • <cs_keystore_path>is a full path to the certificate store file that can be accessed on behalf of the <cs_user> user.
  • <cs_keystore_pwd>is a password to the certificate store file.

Recommended:

  • Name the certificate store file websocket-keystore.jks.
  • Place this file to:
  • On Windows: %ProgramData%\1C\1CE\instances\<cs_instance>\data\security\websocket-keystore.jks.
  • On Linux: /var/cs/<cs_instance>/data/security/websocket-keystore.jks.

4.5. Starting required services

Once you finish setup, start the configured services:

Copy to clipboard

ring hazelcast --instance <hc_instance> service startring elasticsearch --instance <elastic_instance> service startring cs --instance <cs_instance> service start

Once started, the collaboration server takes some time to initialize the database and other settings.

4.6. Checking health

To check the collaboration server health, access http://localhost:8087/rs/health.

In case of successful initialization, the server will respond as follows:

Copy to clipboard

{"status":"UP","mainDbOk":true,"allShardsOk":true,"hazelcastOk":true,"elasticsearchOk":true,"mediaClusterOk":false,"mediaServers":{}}

4.7. Finishing setup

Once the collaboration server is installed and set up, you will need to do a few things to finish setup:

  1. Initialize the server database.
  2. Connect to ICE server. Do this only if you plan to make video calls to people who are behind different NATs or if you use firewalls that block incoming connections.

To finish setup, use the curl utility available at https://curl.haxx.se/download.html.

Initializing the server database

The initialization command is as follows:

Copy to clipboard

curl -Sf -X POST -H "Content-Type: application/json" -d "{ \"url\" : \"jdbc:postgresql://localhost:5432/<cs_db>\", \"username\" : \"<db_user>\", \"password\" : \"<db_user_pwd>\", \"enabled\" : true }" -u admin:admin http://localhost:8087/admin/bucket_server

In this example:

  • cs_dbis a name of the collaboration server database.
  • db_useris a name of the user on whose behalf the collaboration server will be connected to the DBMS.
  • db_user_pwdis this user's password.

Connecting to ICE server

The command to connect to ICE server is as follows:

Copy to clipboard

curl -Sf -X POST -H "Content-Type: application/json" -d "{ \"url\" : \"turn:dialog-turn1-gpt-msk.1c.ru:3478\", \"username\" : \"video_module\", \"password\" : \"FJkvT1JfZY5RyQFqhrjQ\", \"enabled\" : true }" -u admin:admin http://localhost:8087/admin/ice_server

This example shows how to connect to 1C Company's ICE server.

Chapter 5. Connecting to the installed server

If an application uses the self-deployed collaboration system server (not 1C:Dialog server), use external data processor CollaborationSystemRegister.epf supplied together with the server instead of standard function Collaboration system management to register an infobase in the service.

The Collaboration server address field value consists of three parts:

  • Protocol: ws:or wss:.
  • Server address.
  • Server port.

You can get all these component in the com._1c.ecs.websocket.yml configuration file of the collaboration server:

  • The protocol is based on the value of the wssfile parameter. If this parameter is set to true, the wss:protocol is used. Otherwise, the ws: protocol is used.
  • The server address is based on the hostnameparameter value.
  • The server port is based on the portparameter value.

The configuration file of the collaboration server is located in:

  • On Windows: %ProgramData%\1C\1CE\instances\<cs_instance>\config\.
  • On Linux: /var/cs/<cs_instance>/config/.

 

<< Prev   Next >>

Icon/Social/001 Icon/Social/006 Icon/Social/005 Icon/Social/004 Icon/Social/002