This document is compiled to give a walkthrough of getting a VM with the required tools and packages for the climate data analytics.
Step 1: Download and install VirtualBox
Go to the Virtualbox download page and download the appropriate binary. Open the binary and follow the installations instructions.
Step 2: Download and install Vagrant
Similarly to Step 1, go the Vagrant download page and download the appropriate binary. Open the binary and follow the installations instructions.
Installing Vagrant is extremely easy. Head over to the Vagrant downloads page and get the appropriate installer or package for your platform. Install the package using standard procedures for your operating system.
The installer will automatically add vagrant to your system path so that it is available in terminals. If it is not found, please try logging out and logging back in to your system (this is particularly necessary sometimes for Windows).
Step 3: Download and start the Data Science Toolbox
Open a terminal (known as the command prompt in Microsoft Windows). Create a directory, for example "MyDataScienceToolbox", and navigate to it:
$ mkdir MyDataScienceToolbox
$ cd MyDataScienceToolbox
In order to download and start the Data Science Toolbox, run the following commands:
$ cd MyDataScienceToolbox
In order to download and start the Data Science Toolbox, run the following commands:
$ vagrant init data-science-toolbox/dst
$ vagrant up
Step 4: Log in (on Mac OS X and Linux)
$ vagrant up
Step 4: Log in (on Mac OS X and Linux)
If you are running Mac OS X or some other UNIX-like operating system, you can log in to the Data Science Toolbox by simply running the following command in a terminal:
$ vagrant ssh
If prompted for authentication, use vagrant for both username and password
Step 4: Log in (on Microsoft Windows)
If you are running Microsoft Windows, you need to use a third-party application in order to log in to the Data Science Toolbox. We recommend Putty for this. Go to its download page and download putty.exe. Run putty.exe and enter the following values:
Host Name (or IP address): 127.0.0.1
Port: 2222
Connection type: SSH
(If you want, you can save these values as a session by clicking the "Save" button, so that you do not need to enter these values again.) Click the "Open" button and enter "vagrant" for both the username and the password.
Step 5: Set up IPython Notebook
If you like to be able to run IPython Notebook on your Data Science Toolbox, invoke the following command to create a password-protected profile:
vagrant@data-science-toolbox:~$ dst setup base
(Note that vagrant@data-science-toolbox:~ indicates that this command should be run on the Data Science Toolbox.) Step 3 created a file named Vagrantfile, which is a configuration file used by Vagrant. Open the file in your favorite text editor and add the following text somewhere around line 22:
config.vm.network "forwarded_port", guest: 8888, host: 8888
This line instructs Vagrant to open up port 8888 so that the IPython Notebook server is accessible from your browser. Restart the Data Science Toolbox and log in again so that the changes take effect:
$ vagrant reload
$ vagrant ssh
$ vagrant ssh
To start the IPython Notebook server, run:
vagrant@data-science-toolbox:~$ sudo ipython notebook --profile=dst
You can now access the IPython Notebook server at https://localhost:8888. Because the SSL certificate is self-signed, you may get a warning message from your browser. The image below shows how Chrome complains about this. Because you know what's on the server-side, you can just click on the "Proceed anyway" button.
Enter the same password as you entered when you created the profile.
Once you're logged in, you're greeted with the wonderful IPython Notebook.
Step 6: Install additional software packages
- netcdf/4.3.0
sudo apt-get install netcdf-bin
- cdo/1.6.3
sudo apt-get install cdo
- nco/4.4.2
sudo apt-get install nco
- ncview/2.1.1
sudo apt-get install ncview
- Tangelo
Step 7: Exporting and Importing VMs from VirtualBox
Copy/pasting the VM files is not the way to go. You need to use the correct export/import feature of VirtualBox.
With the following instructions you will be able to transfer a VM accross several different phisical machines and it's also a good way to make backups.
Export
Open VirtualBox and enter into the File option to choice Export Appliance...
You will then get an assistance window to help you generating the image.
- Select the VM to export
- Enter the output file path and name
- You can choice a format, which I always leave the default OVF 1.
- Finally you can write metadata like Version and Description
Now you have an OVA file that you can carry to whatever machine to use it.
Import
Open VirtualBox and enter into the File option to choice Export Appliance...
You will then get an assistance window to help you loading the image.
- Enter the path to the file that you have previously exported
- Then you can modify the settings of the VM like RAM size, CPU, etc.
- My recommendation on this is to enable the Reinitialize the MAC address of all the network cards option
- Press Import and done!
References:
No comments:
Post a Comment