Installing Thumbor
Thumbor
Thumbor features:
- Support for all popular image formats.
- Smart cropping and resizing.
- Speeding up image processing by caching.
- Supporting various storage types (local disk, Yandex Object Storage, and others).
- Face and object recognition (glasses, facial features) based on computer vision technology
. - Integrating 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 <Thumbor_service_account_name> \ --format json > sa-key.json
-
Set the bucket object read access rights for the service account.
-
Make sure that the security groups for the Managed Service for Kubernetes cluster and its node groups are configured correctly. If any rule is missing, add it.
Warning
The configuration of security groups determines the performance and availability of the cluster and the services and applications running in it.
Installation using Yandex Cloud Marketplace
-
Go to the folder page
and select Managed Service for Kubernetes. -
Click the Kubernetes cluster name and select the
Marketplace tab. -
Under Application available for installation, select Thumbor and click Go to install.
-
Configure the application:
- Namespace: Select or create a namespace for Thumbor.
- Application name: Enter a name for the application.
- Bucket name: Specify the name of the bucket you created earlier.
- Object Storage static access key: Paste the contents of the
sa-key.json
file. - (Optional) Security key: Specify the security key for URL signing.
- 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
/
symbol) where images are located.
-
Click Install.
For Thumbor to operate, a Kubernetes service of the
LoadBalancer
type and the corresponding 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.7.0 or higher. -
Install kubectl
and configure it to work with the created cluster. -
To install a Helm chart
with Thumbor, run the following command:Unsigned URLs are allowedUnsigned URLs are not allowedexport HELM_EXPERIMENTAL_OCI=1 && \ helm pull oci://cr.yandex/yc-marketplace/yandex-cloud/thumbor/thumbor/chart/thumbor \ --version 0.1.1-4 \ --untar && \ helm install \ --namespace <Thumbor_namespace> \ --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 ./thumbor
export HELM_EXPERIMENTAL_OCI=1 && \ helm pull oci://cr.yandex/yc-marketplace/yandex-cloud/thumbor/thumbor/chart/thumbor \ --version 0.1.1-4 \ --untar && \ helm install \ --namespace <Thumbor_namespace> \ --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/
For Thumbor to operate, a Kubernetes service of the
LoadBalancer
type and the corresponding Yandex Network Load Balancer load balancer will be created automatically.
Accessing the application
- Go to the folder page
and select Network Load Balancer. - Find out the load balancer's IP address with the following description:
cluster <your_cluster_name>, service <namespace>/thumbor
. - Open
http://<load_balancer_IP>/unsafe/<bucket_image_name>
in the browser address bar.
-
Run the command below to get the load balancer's IP address:
kubectl get svc \ --namespace <namespace> \ --output jsonpath='{.status.loadBalancer.ingress[0].ip}' thumbor
-
Open
http://<load_balancer_IP>/unsafe/<bucket_image_name>
in the browser address bar.
Note
Learn more about working with images, in the Thumbor documentation
What's next
Learn how to use Thumbor for editing images on your website. The Thumbor use case described in the documentation involves configuring Yandex Cloud CDN. The service allows to achieve faster loading of website images.