.. _doc_pages_deployments_w4cloud: W4Cloud ======== Let’s begin by exploring how W4Cloud operates. This service offers two primary methods for working with it. .. raw:: html More details on W4 Cloud documentation | * Web builds: These builds are exports of a Godot project for web platform, designed to run within a web browser. They are intended to function as clients, not servers **This should be stored in a bucket called web-builds** * Game servers: These builds are an instance of your Godot game, exported for Linux, and configured to act as a dedicated server for a single "match" or "session" of your game **This should be stored in a bucket called gameservers** .. warning:: W4Build is responsible only for deploying the files to W4Cloud. You will need to handle the configuration within W4Cloud yourself. Specifically, W4Build will upload your files to a designated storage bucket, after which you’ll need to configure your fleet cluster and region Setting up W4Build -------------------- #. Login to W4Cloud account, and visit file storage page .. image:: ../img/w4cloud/sthome.png :alt: w4cloud storage home #. Ensure that the web-builds/gameservers bucket exists, if not create the required one .. image:: ../img/w4cloud/create_bucket.png :alt: Add new bucket to storage Setting up W4Build -------------------- #. Open w4build Targets page .. image:: ../img/common/target_home.png :alt: Add new bucket to storage #. Click add target, and select w4cloud .. image:: ../img/w4cloud/target_form.png :alt: Add new bucket to storage #. Click configure, and fill out the form with the requested values. .. image:: ../img/w4cloud/config_form.png :alt: Add new bucket to storage Each field is: **Anon Key** W4Cloud anon key, this key simply identifies who is making the request. **Service Key** A api key that allows w4cloud to autenticate and upload files **W4online Base URL** The url of your w4cloud instance, no path, just base url. **Storage Bucket Name** which bucket is going to be deployed. If you are dpekoying a web application, use web-builds if you are deploying a game server use gameservers You can use variables to make you deployment much more dynamic. For exmaple: .. code-block:: helm web-builds/${ref}/${preset_name} Once the deployment gets executed will result in .. code-block:: helm web-builds/main/Web .. warning:: Anon and Secret keys can be obtained from the API keys on w4cloud dashboard .. image:: ../img/w4cloud/keys.png :alt: Add new bucket to storage Rules ----- To configure when a deployment should be triggered, you can define specific rules. These rules ensure that the deployment is triggered only if the build that created the artifact satisfies all of the defined conditions For this case we are going to se up 2 rules, #. Match the matrix This means that only files who were created by builds from the given matrix #. Match the preset name We only want that game export for the preset WEb to be published. .. image:: ../img/w4cloud/rules.png :alt: Add new bucket to storage .. important:: After each build completes, the deployment process checks if it meets the required rules. If all rules are satisfied, the deployment is initiated. You can also configure deployments to wait for specific events, ensuring that the deployment only begins once all related builds in an event are finished. Enable ------ After the configuration has been set, you can finally enable the deployment .. image:: ../img/w4cloud/enable.png :alt: enable deployment