Installing Thumbor
Thumbor
Thumbor features:
- Support for all popular image formats.
- Smart cropping and resizing.
- Accelerated image processing using caching.
- Supporting various storage types (local disks, Yandex Object Storage, and others).
- Face and object recognition (glasses, facial features) based on computer vision technology
. - Integration with various programming languages.
Getting started
-
Create a bucket with restricted access in Object Storage.
-
Create a service account for Thumbor to run.
-
Create a static key and save it to a file named
sa-key.json:yc iam access-key create \ --service-account-name <service_account_name_for_Thumbor> \ --format json > sa-key.json -
Set the bucket object read access permissions for the service account.
-
Make sure the security groups for the Managed Service for Kubernetes cluster and its node groups are configured correctly. If a rule is missing, add it.
Warning
The configuration of security groups determines performance and availability of the cluster and the services and applications running in it.
Installation from Yandex Cloud Marketplace
-
Navigate to the folder dashboard
and select Managed Service for Kubernetes. -
Click the name of the Kubernetes cluster you need and select the
Marketplace tab. -
Under Application available for installation, select Thumbor and click Go to install.
-
Configure the application:
- Namespace: Create a new namespace, e.g.,
thumbor-space. If you leave the default namespace, Thumbor may work incorrectly. - Application name: Specify the application name.
- Bucket name: Specify the name of the bucket you created previously.
- Object Storage static access key: Paste the contents of the
sa-key.jsonfile. - Security key: Specify the security key for URL signing. This is an optional setting.
- Allow unsigned URLs (unsafe): Select this option if you did not specify a security key at the previous step.
- Subfolder in the bucket: Specify the name of the bucket folder (without the ending
/character) where images are located.
- Namespace: Create a new namespace, e.g.,
-
Click Install.
For Thumbor to run, a Kubernetes service of the
LoadBalancertype and the appropriate Yandex Network Load Balancer load balancer will be created automatically. -
Wait for the application to change its status to
Deployed.
Installation using a Helm chart
-
Install Helm
v3.8.0 or higher. -
Install kubect
and configure it to work with the new cluster. -
To install a Helm chart
with Thumbor, run the following command, specifying the parameters of the resources you created earlier:Unsigned URLs are allowedUnsigned URLs are not allowedhelm pull oci://cr.yandex/yc-marketplace/yandex-cloud/thumbor/thumbor/chart/thumbor \ --version 0.1.2-10 \ --untar && \ helm install \ --namespace <namespace_for_Thumbor> \ --create-namespace \ --set bucket_name='<bucket_name>' \ --set allow_unsafe_url='true' \ --set root_path='<bucket_subfolder_name>' \ --set-file saAccessKeyFile='sa-key.json' \ thumbor ./thumborIf you set
namespaceto the default namespace, Thumbor may work incorrectly. We recommend specifying a value different from all the existing namespaces, e.g.,thumbor-space.Note
If you are using a Helm version below 3.8.0, add the
export HELM_EXPERIMENTAL_OCI=1 && \string at the beginning of the command to enable Open Container Initiative (OCI) support in the Helm client.helm pull oci://cr.yandex/yc-marketplace/yandex-cloud/thumbor/thumbor/chart/thumbor \ --version 0.1.2-10 \ --untar && \ helm install \ --namespace <namespace_for_Thumbor> \ --create-namespace \ --set bucket_name='<bucket_name>' \ --set allow_unsafe_url='false' \ --set security_key='<security_key_for_URL_signing>' \ --set root_path='<bucket_subfolder_name>' \ --set-file saAccessKeyFile='sa-key.json' \ thumbor ./thumbor/If you set
namespaceto the default namespace, Thumbor may work incorrectly. We recommend specifying a value different from all the existing namespaces, e.g.,thumbor-space.Note
If you are using a Helm version below 3.8.0, add the
export HELM_EXPERIMENTAL_OCI=1 && \string at the beginning of the command to enable Open Container Initiative (OCI) support in the Helm client.For Thumbor to run, a Kubernetes service of the
LoadBalancertype and the appropriate Yandex Network Load Balancer load balancer will be created automatically.
Accessing the application
- Navigate to the folder dashboard
and select Network Load Balancer. - Get the IP address of the load balancer with the following description:
cluster <your_cluster_name>, service <namespace>/thumbor. - In the browser address bar, open
http://<load_balancer_IP_address>/unsafe/<image_name_in_bucket>.
-
Run the command below to get the load balancer IP address:
kubectl get svc \ --namespace <namespace> \ --output jsonpath='{.status.loadBalancer.ingress[0].ip}' thumbor -
In the browser address bar, open
http://<load_balancer_IP_address>/unsafe/<image_name_in_bucket>.
Note
Learn more about working with images in this Thumbor guide
What's next
Learn how to use Thumbor for editing images on your website. The Thumbor use case described in our guide involves configuring Yandex Cloud CDN. The service helps with faster loading of website images.