The 300$ free trial budget is offered which equals roughly 10-20 simulations with 180 nodes at hourly basis.
The following steps are required:
-`Google Cloud Platform registration <https://console.cloud.google.com>`_, to receive 300$ free budget.
-`Creating an Virtual Machine (VM) instance <https://www.ibm.com/products/ilog-cplex-optimization-studio>`_, which is practically a virtual computer with Linux as OS.
-`Installation of Cloud SDK <https://cloud.google.com/sdk/>`_, to create a communication channel between your computer and the cloud virtual machine (VM).
-`Installation of WinSCP (Windows) <https://winscp.net/eng/download.php>`_ (or alternative), to handle or transfer files between the VM and you local computer.
Ann active bank account is required, which will not be charged unless you exceed the trial budget.
Step 2 - Create your Virtual Machine instance
---------------------------------------------
With the following steps we create a Virtual Machine (VM) on Google Cloud.
- Click on the `GCP Dashboard <https://console.cloud.google.com/home/dashboard>`_.
- Click on the "COMPUTE" header, on the "Compute Engine" and then on the "VM instance".
- Click on create.
- Click on new VM instance.
Now a window with the machine details will open. You have to configure the following things:
- Name: Set a name for your VM. Cannot be changed after creation.
- Region: You can keep the default us-central1 (Iowa), since it is a cheap computational region. Sometimes your machine is limited in a specific region. Just pick another region in that case.
- Machine configuration: The machine configuration sets how powerful your VM is.
You can start with a 1 vCPU and 3.75 GB memory, N1 series machine as every operating second cost money.
You can edit your machine configuration later. So use a cheap machine type configuration to transfer data and
only when everything is ready and tested, your expensive machine type, for instance a custom 8 vCPU with 160 GB memory.
Solvers do not parallelise well, so we recommend not to choose more than 8 vCPU.
The memory requirements will vary depending on the spatial and temporal resoulution of your optimisation.
Example: for an hourly, 181 node full European network, set 8 vCPU and 150 GB memory since the dry-run calculated a 135 GB memory requirement.)
- Boot disk: As default, your VM is created with 10 GB. Depending on how much you want to handle on one VM you should increase the disk size.
We recommend a disk size of 100 GB for a safe start (cost roughly 8$ per month), the disk can be resized at any later stage with an additional disk.
- Click on create and celebrate your first VM on GCP.
Step 3 - Installation of Cloud SDK
----------------------------------
- Download Google Cloud SDK `SDK <https://cloud.google.com/sdk>`_. Check that you are logged in in your Google account. The link should lead you to the Windows installation of Google Cloud SDK.
- Follow the "Quickstart for Windows - Before you begin" steps.
- After the successfull installation and initialization, close the Google Cloud SDK reopen it again. Type the following command into the "Google Cloud SDK Shell":
- Close and reopen the PuTTy file (-> open Google Cloud SDK -> initialize again with the command above to open the PuTTY command window). Now ``conda`` can be listed with ``conda list``.
Noq you can follow the standard installation instructions to finalize your machine (don't forget the solvers - for bigger simulations use commercial solvers such as Gurobi).
- Click on the advanced setting. SSH -> Authentication.
- Option 1. Click on the Tools button and "Install Public Key into Server..". Somewhere in your folder structure must be a public key. I found it with the following folder syntax on my local windows computer -> :\Users\...\.ssh (there should be a PKK file).
- Option 2. Click on the Tools button and "Generate new key pair...". Save the private key at a folder you remember and add it to the "private key file" field in WinSCP. Upload the public key to the metadeta of your instance.
- Click ok and save. Then click Login. If successfull WinSCP will open on the left side your local computer folder structure and on the right side the folder strucutre of your VM. (If you followed Option 2 and its not initially working. Stop your instance, refresh the website, reopen the WinSCP field. Afterwards your your Login should be successfull)
Especially if you think about operating several instance for quicker simulations, you can create a so called `"image" <https://console.cloud.google.com/compute/images?authuser=1&project=exalted-country-284917>`_ of the virtual machine.
The "image" includes all the data and software set-ups from your VM. Afterwards you can create a VM from an image and avoid all the installation steps above.
If you use the GCP with the default PyPSA-Eur settings, your budget will be used up very quickly. The following tips should help you to make the most of your budget:
- Always test using low resolution networks; i.e. a single country at 5 nodes and 24h resolution for 2 month of weather data.
- Adjust your solver in the ``config.yaml`` file. Set ``solving: skip_iterations: true``.