Connect S3 to 1C server cluster
S3 is a service for storing and distributing unlimited data.You can connect S3 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 actions with files will be addressed to the storage buckets;
- increase the reliability of media file storage — data in S3 is replicated to three independent servers in different racks;
- edit and replace media files in the baket in the control panel or using the S3 tools.
Principle of operation
You connect S3 to the 1C server cluster in the control panel, then configure the media storage method in the 1C configuration menu.
New media files will then start to be sent to S3.Existing media files will not be automatically transferred to S3, you can transfer them after connection.
Once connected and configured, you will be able to work with media files through 1C and through S3 — for example, create, modify and delete them in S3, while 1C will display their current status.
S3 has a flat address structure — there are no folders and hierarchy in the storage, but you can create and view simulated folders (directories) for convenience. The folder name is a prefix in the object name.
You cannot connect parent and child directories in the same bucket at the same time. For example, if the directory example/images
is connected, you cannot connect its parent directory example
or child directory example/images/photos
, but you can connect the directory example/documents
.
Two ways to connect the S3 are available:
- automatically — you can connect an existing bucket or create a new one. The service user and access policies for working with the baquette will be created automatically;
- manually — you can connect an existing bucket. You must create the service user and access policies yourself.
Limitations and recommendations for baquettes
Only buckets can be connected to a cluster of 1C servers:
- with Virtual-Hosted addressing;
- standard storage class;
- in a project that hosts a cluster of 1C servers.
For optimum performance, we recommend choosing buckets:
- with a private type;
- in the region and pool where the 1C server cluster is located.
Cost
Storage of files in the baket is charged under the S3 payment model and pricing.
When deleting a cluster of 1C servers, files from connected buckets are not deleted and continue to be charged — to stop charging , delete the buckets.
Connect the bucket to the cluster automatically
The default buckets will be created and configured when connected:
GO1C_SERVICE_USER
service user;- access policy for service user
GO1C_POLICY
; - access policy for the current user
ALL_OTHER
.
The Account Owner or users with role combinations can automatically connect the bucket. member и iam_admin
.
Only a cluster of 1C servers in ACTIVE
status can be connected.
:::dangerWhen changing, deleting a service user or access policies, the connection to the 1C server cluster may be severed, but the connection status in the control panel will not change.::::
New buckets
Existing baquet
-
In the control panel, in the top menu, click Products and select 1C Ready Cloud.
-
Go to the 1C Server Clusters section.
-
Open the cluster page → Storage tab.
-
Click Connect.
-
Select the connection type — Automatic.
-
In the Region and Pool fields, select the region and pool in which the bucket will be created. We recommend to create a bucket in the same region and pool as the 1C server cluster.
-
Select New S3 buckets in the Buckets field. A private bucket with Virtual-Hosted addressing and standard storage class will be created.
-
In the Bucket name field, specify the name of the new bucket. For compatibility with the S3 API, the name of the bucket must be unique within S3 and comply with Amazon S3 bucket naming rules, see the Bucket naming rules in the Amazon documentation.
-
In the Prefix field, 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 baket root, leave the field blank.
-
Click Create Connection.
-
Make sure the bucket complies with bucket restrictions and recommendations.
-
In the control panel, in the top menu, click Products and select 1C Ready Cloud.
-
Go to the 1C Server Clusters section.
-
Open the cluster page → Storage tab.
-
Click Connect.
-
Select the connection type — Automatic.
-
In the Region and Pool fields, select the region and pool where the bucket is located.
-
In the Bucket field, select a bucket from the list.
-
In the Prefix field, 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 baket root, leave the field blank.
-
Click Create Connection.
Connect the buckets to the cluster manually
It is possible to connect the bucket only to a cluster of 1C servers in ACTIVE
status.
:::dangerWhen changing, deleting a service user or access policies, the connection to the 1C server cluster may be severed, but the connection status in the control panel will not change.::::
1. Prepare the tank for connection
Create a new bucket
Prepare the existing tank
-
Make sure you are in a project that hosts a cluster of 1C servers.
-
Create a service user with permission with settings:
- access area — Projects;
- added a project in which the baket will be created;
- role —
object_storage_user
.
-
Create a bucket in object storage. Observe restrictions and recommendations for baquettes.
-
Go to Object Storage → Buckets.
-
Open the page of the created bucket → Access Policy tab.
-
Click Create Access Policy.
-
Add a rule for the service account:
- in the Access field, select Allow;
- in the Users field, select Authorized and add the service user you created in step 2;
- in the Action Set field, select Editor.
-
Add a rule for users:
- in the Access field, select Allow;
- in the Users field select Authorized and add the user who will connect the storage to the 1C cluster;
- in the Action Set field, select All.
-
Click Save.
-
Issue S3 keys for the service user.
-
Make sure the bucket complies with bucket restrictions and recommendations.
-
Make sure you are in a project that hosts a cluster of 1C servers and an object storage bucket.
-
Create a service user with permission with settings:
- access area — Projects;
- added a project in which the baket will be created;
- role —
object_storage_user
.
-
Go to Object Storage → Buckets.
-
Open the page of the created bucket → Access Policy tab.
-
Click Create Access Policy.
-
Add a rule for the service account:
- in the Access field, select Allow;
- in the Users field, select Authorized and add the service user you created in step 3;
- in the Action Set field, select Editor.
-
Add a rule for the user:
- in the Access field, select Allow;
- in the Users field select Authorized and add the user who will connect the storage to the 1C cluster;
- in the Action Set field, select All.
-
Click Save.
-
Issue S3 keys for the service user.
2. Connect the tank
-
In the control panel, in the top menu, click Products and select 1C Ready Cloud.
-
Go to the 1C Server Clusters section.
-
Open the cluster page → Storage tab.
-
Click Connect.
-
Select the connection type — Manual.
-
In the Region and Pool fields, select the region and pool where the bucket is located.
-
In the Bucket field, select the bucket you prepared earlier.
-
In the Prefix field, 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 baket root, leave the field blank.
-
In the S3 keys block, specify the Access key and Secret key for the service user that you created when preparing the bucket.
-
Click Create Connection.
Shut down the baquette
You can disconnect a bucket only from a cluster of 1C servers in the ACTIVE
status.When disconnecting a bucket from the cluster, the service user's S3 key and the access policy rule for the service user that were created for this bucket will be deleted.
- In the control panel, in the top menu, click Products and select 1C Ready Cloud.
- Go to the 1C Server Clusters section.
- Open the cluster page → Storage tab.
- In the baquette line, click .
- Enter the name of the bacta to confirm the deletion.
- Click Disconnect. If the bucket is no longer needed, delete it.