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
. - 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 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 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: Select or create a namespace for Thumbor.
- Application name: Specify the app name.
- Bucket name: Specify the name of the bucket you created previously.
- 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 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 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 allowedhelm pull oci://cr.yandex/yc-marketplace/yandex-cloud/thumbor/thumbor/chart/thumbor \ --version 0.1.1-4 \ --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 ./thumbor
Note
If you are using a Helm version below 3.8.0, append the
export HELM_EXPERIMENTAL_OCI=1 && \
string to 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.1-4 \ --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_signing_URL>' \ --set root_path='<bucket_subfolder_name>' \ --set-file saAccessKeyFile='sa-key.json' \ thumbor ./thumbor/
Note
If you are using a Helm version below 3.8.0, append the
export HELM_EXPERIMENTAL_OCI=1 && \
string to the command to enable Open Container Initiative (OCI) support in the Helm client.For Thumbor to operate, a Kubernetes service of the
LoadBalancer
type and the appropriate Yandex Network Load Balancer load balancer will be created automatically.
Accessing the application
- Go to the folder page
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 this link:
http://<load_balancer_IP_address>/unsafe/<image_name_in_bucket>
.
-
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
-
In the browser address bar, open this link:
http://<load_balancer_IP_address>/unsafe/<image_name_in_bucket>
.
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.