Bitrix
Bitrix is an app that prepares and deploys the environment for standard installation of 1C Bitrix products with an admin panel in a Managed Service for Kubernetes cluster.
This environment is intended for:
- Deploying Bitrix products from scratch or from backups.
- Making changes to Bitrix components through the admin panel.
- Development and testing.
The app supports:
- Git client.
- Running agents in cron jobs.
- Queue server.
- Sphinx morphological search.
- Tools for collecting PHP and Nginx metrics.
-
Create a new namespace in your cluster:
bitrix-space. -
If you want to use your own certificate for the Bitrix website, create a
Secretresource in both environments’ namespaces with the following properties:apiVersion: v1 kind: Secret metadata: name: bitrix-tls-secret namespace: bitrix-space type: kubernetes.io/tls data: tls.crt: <Base64_encoded_certificate> tls.key: <Base64_encoded_certificate_private_key> -
Create an Object Storage bucket that will house the project directories:
uploadandbackup. -
Create a service account with the
storage.editorrole for the folder where your bucket is located -
Create a static access key for the service account and save its ID and secret key.
-
Create a Managed MySQL cluster with the following settings:
- Network: Select the network where your Managed Kubernetes cluster is located.
- Under Hosts, check that Public access is disabled for all hosts.
- DBMS settings:
- Innodb Flush Log At Trx Commit:
2. - Innodb Strict Mode:
Disabled. - Sync Binlog:
1000. - Transaction Isolation:
read committed.
- Innodb Flush Log At Trx Commit:
-
If you need to use the queue server (enabled by Bitrix Push and Pull), create a secret key for it:
docker container run --rm \ --name push_server_key_generate alpine:3.21 \ sh -c "(cat /dev/urandom | tr -dc A-Za-z0-9 | head -c 128) && echo ''"Save the result of this command.
-
Configure Bitrix settings:
-
Namespace: Select the namespace you previously created.
-
Application name: Specify the application name.
-
Volume size: Specify the size of the volume used for storing Bitrix files. Make sure to provide this size in
Gi. -
Storage class: Select the storage class for your volume.
-
Project domain name: Specify the full project domain name.
-
Balancer IP address: Specify the balancer IP address if you already reserved one.
-
Traffic routing policy: Select a policy for routing external traffic.
-
Use certmanager: Enable to automatically get a Let’s Encrypt certificate.
To successfully get a certificate, register a public domain zone and delegate your domain. A certificate will be issued for a domain in this zone after you pass the DNS-01 challenge.
-
Email address to receive notifications from Let’s Encrypt: If you enabled Use certmanager, specify the email address for Let’s Encrypt® notifications.
-
Publisher name: If you enabled Use certmanager, specify the name of the resource (
ClusterIssuerorIssuer) you will use to automatically get SSL or TLS certificates. -
Secret containing tls.crt and tls.key: If you do not use certmanager, specify the name of the secret you previously created.
-
Configure git: Enable it if you need to work with a Git repo.
If this is the case, specify the Git repo properties in the relevant fields:
- Git repository address: Repo address in the SSH format.
- Branch: Current branch of your Git repo.
- User: Git repo user name.
- Email: Git repo user email.
- Access key: Specify Base64-encoded contents of the public key to access the repo.
-
Use cron to run agents: Enable it to run Bitrix agents on the schedule specified in
ConfigMap<app_name>-bitrix-space-cron. By default,ConfigMapenables running agent jobs every minute, and backup jobs, every 24 hours. You can configure your own schedule, if required. -
Use queue server: Enable if you want to work with a queue server (powered by Bitrix Push and Pull). The server will be deployed in
Deployment, which is a separate resource. -
Secret key: If you enabled Use queue server, provide the secret key you previously created.
-
Use Sphinx: Enable if you need to use Sphinx full-text search. Sphinx will be deployed in
Deployment, which is a separate resource. -
Store cache in Redis: Enable it to store Bitrix cache in Redis. In this case, the cluster will have a separate
StatefulSet,<app_name>-redis-*in the app’s namespace. You may only want to enable it for testing purposes. -
Export PHP metrics: Enable it to turn PHP metrics on.
-
Export NGINX metrics: Enable it to turn NGINX metrics on.
-
Storage class for S3: By default,
csi-s3. -
S3 key ID, S3 secret key: Specify the ID and secret key of the static key you got before.
-
S3 bucket: Specify the name of the Object Storage bucket you previously created.
-
Upload directory size: Specify the size for the upload directory in the bucket. Make sure to provide this size in
Gi. -
Backup directory size: Specify the size for the backup directory in the bucket. Make sure to provide this size in
Gi. -
SMTP server, SMTP port, Mailbox user, Mailbox password: Specify the properties for connection to the mail server.
-
MySQL host, Database user, Database user password, Database: Specify the properties to connect to the database in the Managed MySQL cluster you previously created.
-
NGINX version: Select the NGINX version for Bitrix.
-
PHP version: Select the PHP version for Bitrix.
-
Use bitrixsetup.php: Enable if you need to install Bitrix from scratch.
-
Use restore.php: Enable if you need to restore Bitrix from a backup.
-
-
Click Install.
-
Wait for the application to change its status to
Deployed. -
Open your project in the browser through the domain name provided in the settings and install Bitrix using the installation wizard.
To work with a Git repo:
-
Connect to the pod container:
kubectl -n bitrix-admin exec \ <pod_name_bitrix_main> \ -c git -it -- \ sh /home/bitrix/www $ -
The container supports
gitcommands, as well as a utility script,/scripts/commit-all.sh, that loads all changes from thebitrixdirectory to the repo you previously set up. To run it, use this command:/scripts/commit-all.sh <commit description>
Yandex Cloud technical support responds to requests 24 hours a day, 7 days a week. The types of requests available and the time it takes to process them depend on the billing plan. You can enable paid support in the management console. For more information about technical support.
| Helm chart | Version | Pull-command | Documentation |
|---|---|---|---|
| yandex-cloud/bitrix-env/chart/bitrix-env | 1.0.5 | Open |
| Docker image | Version | Pull-command |
|---|---|---|
| yandex-cloud/bitrix-env/bitnami/redis1764089856329713384751806090650435327427957097722 | 8.2.2 | |
| yandex-cloud/bitrix-env/bitnami/redis-sentinel1764089856329713384751806090650435327427957097722 | 8.2.2 | |
| yandex-cloud/bitrix-env/bitnami/redis-exporter1764089856329713384751806090650435327427957097722 | 1.78.0 | |
| yandex-cloud/bitrix-env/bitnami/os-shell1764089856329713384751806090650435327427957097722 | 5 | |
| yandex-cloud/bitrix-env/bitnami/kubectl1764089856329713384751806090650435327427957097722 | 1.34.1 | |
| yandex-cloud/bitrix-env/bitrix/bitrix-push-server1764089856329713384751806090650435327427957097722 | 0.4.0 | |
| yandex-cloud/bitrix-env/bitrix/bitrix-sphinx1764089856329713384751806090650435327427957097722 | 2.2.11 | |
| yandex-cloud/bitrix-env/hipages/php-fpm_exporter1764089856329713384751806090650435327427957097722 | 2.2.0 | |
| yandex-cloud/bitrix-env/nginx/nginx-prometheus-exporter1764089856329713384751806090650435327427957097722 | 1.5.1 | |
| yandex-cloud/bitrix-env/bitnami/kubectl1764089856329713384751806090650435327427957097722 | 1.34.1 | |
| yandex-cloud/bitrix-env/alpine/fix1764089856329713384751806090650435327427957097722 | 1.0 | |
| yandex-cloud/bitrix-env/alpine/git1764089856329713384751806090650435327427957097722 | 1.0 | |
| yandex-cloud/bitrix-env/bitrix/bitrix-admin-nginx1764089856329713384751806090650435327427957097722 | 1.28 | |
| yandex-cloud/bitrix-env/bitrix/bitrix-admin-php1764089856329713384751806090650435327427957097722 | 8.2.29 |