This will allow Mac OS X to automatically import the data already present on the Apple server during installation/upgrade. There procedure is optional and the step involving the creation of the iCloud account can be skipped during the installation of Yosemite.
You will also need a 8GB USB key.
STEP 1 - Download Yosemite
Launch the App Store and sign in with your iCloud credentials.
Click on OS X Yosemite.
Click on the Download button (5.2 GB).
The installation window automatically launches.
Do not click on "Continue".
Close the installation.
Go to the Applications folder and locate the installation package: "Install OS X Yosemite"
At this point you can the application to an external storage medium. The goal is to keep intact for possible future needs.
Leave the original app in the Applications folder.
STEP 2 - Prepare the USB key
Connect your USB key (not to the keyboard, but to the Mac itself) - run the Disk Utility located in Applications/Utilities ...
In the left pane of the Disk Utility, select your USB key.
On the right side of the window, click on the "Partition" button.
In the "Partition Scheme" section, click on the "Current" button.
Select "1 Partition".
Click on the "Options" button.
Select GUID and click on the "OK" button.
Check that the chosen format is "Mac OS Extended (Journaled)"
Name the key as yosem.
At this point the key is ready.
STEP 3 - creating the installation USB
Open the Terminal application located in Applications / Utilities ...