Connect object storage to a cluster of 1C servers
Object Storage is a service for storing and distributing unlimited amount of data. You can connect object storage to your 1C server cluster to save media files such as images and documents there. This will allow you to:
- reduce the number of requests to the database cluster — requests for file actions will be addressed to the storage container;
- increase the reliability of media file storage — data in object storage is replicated to three independent servers in different racks;
- edit and replace media files in the container in the control panels or with the help of storage tools.
Principle of operation
You connect the storage to a cluster of 1C servers in the control panels then customize the method of storing media files in the 1C configuration menu.
New media files will then start to be sent to the storage. Existing media files will not be automatically moved to the storage, but you can move them after you connect.
After connection and configuration you will be able to work with media files both through 1C and storage — files will be created, changed and deleted in storage, their current state will be displayed in 1C.
Object storage has a flat address structure — there are no folders or hierarchy in the storage, but you can create and browse for convenience simulated folders (directories). The folder name is a prefix in the object name.
You cannot connect parent and child directories in the same container at the same time. For example, if a directory is connected example/images
you can't connect its parent directory. example
or subsidiary example/images/photos
but you can plug in the directory example/documents
.
Two ways to connect object storage are available:
- automatically — you can connect an existing container or create a new one. The service user and access policies for working with the container will be created automatically;
- manually — you can connect an existing container. You must create the service user and access policies yourself.
Restrictions and recommendations for containers
Only containers can be connected to the 1C server cluster:
- с Virtual-Hosted addressing;
- standard storage class;
- в project in which there is a cluster of 1C servers.
For optimal performance, we recommend choosing containers:
- with a private type;
- в the region and the bullet in which there is a cluster of 1C servers.
Cost
Storage of files in a container is charged at the following rates payment models and object storage prices.
When deleting a cluster of 1C servers, files from connected containers are not deleted and continue to be charged — to stop payment containerize.
Connect the container to the cluster automatically
When connected, the default container will be created and configured:
- service user
GO1C_SERVICE_USER
; - service user access policy
GO1C_POLICY
; - access policy for the current control panel user
ALL_OTHER
.
The container can be automatically connected by a user with role Account owner and users with role combinations:
- Account Administrator and User Administrator;
- Project Administrator and User Administrator.
You can only connect the container to a cluster of 1C servers in status ACTIVE
.
If you change, delete a service user or access policies, the connection to the 1C server cluster may be disconnected, but the connection status in the control panel will not change.
New container
Existing container
-
В control panels go to Ready cloud 1C → 1C server clusters.
-
Open the cluster page → tab Storage.
-
Click Connect.
-
Select the type of connection — Automatically.
-
In the fields Region и Poole select region and pool in which the container will be created. We recommend creating a container in the same region and pool as the 1C server cluster.
-
In the field Container select New object storage container. A private container with Virtual-Hosted addressing and a standard storage class will be created.
-
In the field Container name specify the name of the new container. For compatibility with S3 API, the container name must be unique within the object storage and comply with Amazon S3 bucket naming rules, see the instructions for details Bucket naming rules Amazon documentation.
-
In the field prefix Specify a prefix for the simulated folder (directory) where the media files will be stored.
To create a new folder, name the folder according to the Amazon S3 buckets naming rules. The folder will be created automatically.
If the media files will be stored in the root of the container, leave the field blank.
-
Click Create a connection.
-
Configure the container connection to the 1C server cluster according to the following instructions Connecting to storage from the 1C documentation.
-
Make sure the container matches restrictions and recommendations for containers.
-
В control panels go to Ready cloud 1C → 1C server clusters.
-
Open the cluster page → tab Storage.
-
Click Connect.
-
Select the type of connection — Automatically.
-
In the fields Region и Poole select region and pool where the container is located.
-
In the field Container select a container from the list.
-
In the field prefix Specify a prefix for the simulated folder (directory) where the media files will be stored.
To create a new folder, name the folder as follows the naming convention for baquettes Amazon S3. The folder will be created automatically.
If the media files will be stored in the root of the container, leave the field blank.
-
Click Create a connection.
-
Configure the container connection to the 1C server cluster according to the following instructions Connecting to storage from the 1C documentation.
Connect the container to the cluster manually
You can connect the container only to a cluster of 1C servers in status ACTIVE
.
If you change, delete a service user or access policies, the connection to the 1C server cluster may be disconnected, but the connection status in the control panel will not change.
Prepare the container for connection
Create a new container
Prepare the existing container
-
Make sure you're in project in which there is a cluster of 1C servers.
-
Create a service user with the Object Store User role and access to the project where the container will be created.
-
Create a container in object storage. Consider restrictions and recommendations for containers.
-
Go to section Object Storage → Containers.
-
Open the page of the created container → tab Access Policy.
-
Click Create an access policy.
-
Add a rule for the service account:
- in the field Access select Authorize;
- in the field Users select Authorized and add the service user you created in step 2;
- in the field Action set select Editor.
-
Add a rule for control panel users:
- in the field Access select Authorize;
- in the field Users select Authorized and add a control panel user that will connect the storage to the 1C cluster;
- in the field Action set select All of them.
-
Click Save.
-
Issue S3 keys for the service user.
-
Make sure the container matches restrictions and recommendations for containers.
-
Make sure you're in project which contains a cluster of 1C servers and an object storage container.
-
Create a service user with the Object Storage User role and access to the project where the container resides.
-
Go to section Object Storage → Containers.
-
Open the page of the created container → tab Access Policy.
-
Click Create an access policy.
-
Add a rule for the service account:
- in the field Access select Authorize;
- in the field Users select Authorized and add the service user you created in step 3;
- in the field Action set select Editor.
-
Add a rule for the control panel user:
- in the field Access select Authorize;
- in the field Users select Authorized and add a control panel user that will connect the storage to the 1C cluster;
- in the field Action set select All of them.
-
Click Save.
-
Issue S3 keys for the service user.
Connect the container
-
В control panels go to Ready cloud 1C → 1C server clusters.
-
Open the cluster page → tab Storage.
-
Click Connect.
-
Select the type of connection — Manually.
-
In the fields Region и Poole select the region and pool in which the container.
-
In the field Container select the container you prepared earlier.
-
In the field prefix Specify a prefix for the simulated folder (directory) where the media files will be stored.
To create a new folder, name the folder as follows the naming convention for baquettes Amazon S3. The folder will be created automatically.
If the media files will be stored in the root of the container, leave the field blank.
-
In the block S3 keys specify Access key и Secret key for the service user that you created when container preparation.
-
Click Create a connection.
-
Configure the container connection to the 1C server cluster according to the following instructions Connecting to storage from the 1C documentation.
Disconnect the container
You can disconnect the container only from the cluster of 1C servers in the status ACTIVE
.
Disconnecting a container from the cluster will delete the service user S3 key and the service user access policy rule that were created for that container.
- В control panels go to Ready cloud 1C → 1C server clusters.
- Open the cluster page → tab Storage.
- In the container row, click .
- Enter the name of the container to confirm the deletion.
- Click Disconnect. If the container is no longer needed, delete it.