Skip to content

Quick deploy of Blender renderer compute instance to Yandex.Cloud with Terraform

Notifications You must be signed in to change notification settings

matancev/yc-blender-render

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

What's that?

Very simple terraform project (created just for personal use), that creates compute instance with Blender software installed. Yandex Cloud is used as a service provider. Primary use case - fast deployment and destruction of temporary instances used for scene/animation server-side render in Blender.

Guide

First of all go to terraform directory and initialize terraform:

cd ./terraform
terraform init

Next, apply terraform configuration using your YC_TOKEN:

YC_TOKEN=$(yc iam create-token) terrafrom apply -var="folder_id=${FOLDER_ID}"

Caution! By default ~/.ssh/id_rsa is used to configure ssh access to the instance and run provision scripts. You can override paths with ssh_public_key_path and ssh_private_key_path variables.

After successful completion of the command, you will see running compute instance in your cloud folder. Public ipv4 is attached and available as terraform output. Now you can connect to the instance via ssh. Let's upload our Blender files now:

INSTANCE_IP=$(terraform output -raw blender_render_ip)
scp ~/masterpiece.blend ubuntu@${INSTANCE_IP}:~/

Do not forget to pack external resources into blend file. Those of resources that cannot be packed must be uploaded alongside your .blend file (use relative paths while saving to make your life easier).

Now we are ready to start render process. Connect to the instance via ssh and run blender command:

ssh ubuntu@${INSTANCE_IP}
blender -b ~/masterpiece.blend -a -t 12

Blender will use render settings saved in your blend file.

About

Quick deploy of Blender renderer compute instance to Yandex.Cloud with Terraform

Resources

Stars

Watchers

Forks

Packages

No packages published