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 the cluster, for example,
bitrix-admin. -
To use your own certificate for the Bitrix website, create a
Secretresource in thebitrix-adminnamespace:apiVersion: v1 kind: Secret metadata: name: bitrix-tls-secret namespace: bitrix-admin type: kubernetes.io/tls data: tls.crt: <Base64_encoded_certificate> tls.key: <Base64_encoded_certificate_private_key> -
Create an Object Storage bucket to store the shared project folders
uploadandbackup. -
Create a service account with the
storage.editorrole for the folder containing the bucket. -
Create a static access key for the service account and save its key ID and secret key.
-
Create a Managed MySQL cluster with the following settings:
- Network — select the network containing the Managed Kubernetes cluster.
- Under Hosts, make sure 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 —
Save the host address, database name, database username, and password. You will need them in the Bitrix installation wizard. You can also use another MySQL installation.
-
To use the queue server (the Bitrix Push and Pull module), generate a secret key:
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 command output.
-
Configure the Bitrix application:
-
Namespace — select the namespace created earlier.
-
Application name — enter the application name.
-
Volume size — specify the volume size for storing Bitrix files, in
Gi. -
Storage class — select the storage class for the volume.
-
Project domain name — enter the project’s fully qualified domain name.
-
Load balancer IP address — enter the load balancer IP address if you have already reserved one.
-
Traffic management policy — select the external traffic routing policy.
-
Use certmanager — select this option to obtain a certificate from Let’s Encrypt automatically.
To obtain the certificate, create a public DNS zone and delegate the domain. A certificate will be issued for the domain in this zone using DNS-01 validation.
-
Email for Let’s Encrypt notifications — if Use certmanager is enabled, enter an email address for notifications from Let’s Encrypt.
-
Issuer name — if Use certmanager is enabled, enter the name of the
ClusterIssuerresource used to obtain SSL/TLS certificates automatically. -
Secret containing tls.crt and tls.key — if certmanager is not used, enter the name of the secret created earlier.
-
Configure git — select this option to work with a Git repository.
Then provide the Git repository settings:
- Git repository address — the repository’s SSH address.
- Branch — the working branch of the Git repository.
- User — the Git repository username.
- Email — the Git user’s email address.
- Access key — the Base64-encoded contents of the private SSH key used to access the repository.
-
Use cron to run agents — select this option to run Bitrix agents according to the schedule in the
<application_name>-bitrix-admin-cronConfigMap. By default, agents run every minute and project backups run once a day. You can also add custom schedules. -
Use queue server — select this option to enable the queue server (the Bitrix Push and Pull module). The server runs in a separate
Deployment. -
Secret key — if Use queue server is enabled, enter the secret key generated earlier.
-
Use Sphinx — select this option to enable Sphinx full-text search. Sphinx runs in a separate
Deployment. -
Store the cache in Redis — select this option to store the Bitrix cache in Redis. Enabling this option is not recommended for a single replica.
-
S3 storage class — defaults to
csi-s3. -
S3 key ID, S3 secret key — enter the key ID and secret key of the static access key created earlier.
-
S3 bucket — enter the name of the Object Storage bucket created earlier.
-
SMTP host, SMTP port, Mailbox user, Mailbox password — enter the mail server connection settings.
-
PHP version — specify a PHP version:
8.2.33,8.3.33,8.4.25, or8.5.10. The previously selected PHP version is preserved during upgrades. -
Export PHP metrics — select this option to enable PHP metrics.
-
Export NGINX metrics — select this option to enable NGINX metrics.
-
Use built-in Redis — leave this option enabled to deploy Redis with the application. The External Redis host and Redis password fields must remain empty.
To connect to a separately deployed Redis server, disable this option and provide the following settings:
- External Redis host — the required address of a server accessible from the application.
- External Redis port — the connection port, which defaults to
6379. - Redis password — the connection password. Leave this field empty if the server does not require a password.
Redis stores sessions regardless of the Store the cache in Redis option. If built-in Redis is disabled, an external Redis connection is required.
-
Use bitrixsetup.php — select this option to install Bitrix from scratch.
-
Use restore.php — select this option to restore Bitrix from a backup.
-
-
Click Install.
-
Wait until the application status changes to
Deployed. -
Open the project in a browser using the domain name specified in the settings and start the Bitrix installation wizard. At the database configuration step, enter the host address of the Managed MySQL cluster, database name, database username, and password. Complete the installation.
To work with the Git repository in the application:
-
Connect to the pod’s container:
kubectl -n bitrix-admin exec \ <bitrix_main_pod_name> \ -c git -it -- sh -
The container provides the
gitcommand and the/scripts/commit-all.shhelper script for pushing changes from thebitrixfolder to the configured repository. Run:/scripts/commit-all.sh <commit_message>
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.7 | Open |
| Docker image | Version | Pull-command |
|---|---|---|
| yandex-cloud/bitrix-env/bitnami/redis1789566872190363361228058870643905000661686010862 | 8.6.2 | |
| yandex-cloud/bitrix-env/bitnami/redis-sentinel1789566872190363361228058870643905000661686010862 | 8.6.2 | |
| yandex-cloud/bitrix-env/bitnami/redis-exporter1789566872190363361228058870643905000661686010862 | 1.82.0 | |
| yandex-cloud/bitrix-env/bitnami/os-shell1789566872190363361228058870643905000661686010862 | 5 | |
| yandex-cloud/bitrix-env/bitnami/kubectl1789566872190363361228058870643905000661686010862 | 1.35.3 | |
| yandex-cloud/bitrix-env/bitrix/bitrix-push-server1789566872190363361228058870643905000661686010862 | 3.3 | |
| yandex-cloud/bitrix-env/bitrix/bitrix-sphinx1789566872190363361228058870643905000661686010862 | 2.2.11-v2 | |
| yandex-cloud/bitrix-env/hipages/php-fpm_exporter1789566872190363361228058870643905000661686010862 | 2.2.0 | |
| yandex-cloud/bitrix-env/nginx/nginx-prometheus-exporter1789566872190363361228058870643905000661686010862 | 1.5.3 | |
| yandex-cloud/bitrix-env/bitnami/kubectl1789566872190363361228058870643905000661686010862 | 1.35.3 | |
| yandex-cloud/bitrix-env/alpine/fix1789566872190363361228058870643905000661686010862 | 1.1 | |
| yandex-cloud/bitrix-env/alpine/git1789566872190363361228058870643905000661686010862 | 1.1 | |
| yandex-cloud/bitrix-env/bitrix/bitrix-admin-nginx1789566872190363361228058870643905000661686010862 | 1.30.4-v1 | |
| yandex-cloud/bitrix-env/bitrix/bitrix-admin-php1789566872190363361228058870643905000661686010862 | 8.2.33 | |
| yandex-cloud/bitrix-env/bitrix/bitrix-admin-php1789566872190363361228058870643905000661686010862 | 8.3.33 | |
| yandex-cloud/bitrix-env/bitrix/bitrix-admin-php1789566872190363361228058870643905000661686010862 | 8.4.25 | |
| yandex-cloud/bitrix-env/bitrix/bitrix-admin-php1789566872190363361228058870643905000661686010862 | 8.5.10 |