-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from cirlabs/create-virtual-machine
Create virtual machine
- Loading branch information
Showing
6 changed files
with
129 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
How-to | ||
------ | ||
This guide will show you how to create a virtualbox virtual machine from scratch, install Xubuntu on it and bootstrap it with all the latest and greatest software. | ||
|
||
## Setup | ||
- Download and install VirtualBox and the Extensions | ||
- https://www.virtualbox.org/wiki/Downloads | ||
|
||
- Download the Xubuntu 14.04 .iso | ||
- http://xubuntu.org/getxubuntu/ | ||
- Choose 32-bit as some folks may have old machines | ||
|
||
- Follow VirtualBox instructions for installing virtualbox on "Creating your first virtual machine" Section 1.7 | ||
- http://www.virtualbox.org/manual/ch01.html | ||
- When asked about which virtual image type to use, choose VMDK | ||
- http://www.virtualbox.org/manual/ch05.html#vdidetails | ||
- Set storage to whatever you'd like. I recommend 30.00 GB to 2.00 T DYNAMICALLY ALLOCATED !important | ||
|
||
- Set the RAM (We suggest 2048 MB or 2GB) | ||
|
||
|
||
- Start the virtual machine and navigate your file system to the path of the iso | ||
|
||
- Follow the Xubuntu prompts to install the operating system on the file system | ||
- set the username and password | ||
- For techraking: `nicar` with the password `nicar` | ||
|
||
- Setup Guest Additions | ||
- Guest Additions will give you full resolution and filesystem sharing, which are quite nice in VMs | ||
- Log into the Xubuntu VM, open up the terminal and run this command: | ||
- `sudo apt-get install virtualbox-guest-dkms virtualbox-guest-utils virtualbox-guest-x11` | ||
- Restart the VM to have a theorically native resolution supported virtual machine | ||
|
||
## Bootstrap the box | ||
- Fetch the bootstrap script by downloading it with `wget`. Open up terminal and type: | ||
- `$ wget https://raw.githubusercontent.com/cirlabs/vm/master/bootstrap.sh` | ||
- make the script executable | ||
- `$ chmod +x bootstrap.sh` | ||
- run the script WITHOUT a subprocess | ||
- `$ . ./bootstrap.sh` | ||
- See: http://stackoverflow.com/a/16011496/868724 | ||
- NOTE: This'll take some time. The first commands to run are `apt-get update` and `apt-get upgrade`. These two commands will make sure the the operating systems has the latest and greatest security patches and features. These are key before installing the rest of the software. | ||
|
||
## Extra changes | ||
Here are some last configuration changes to do after `bootstrap.sh` finishes executing. | ||
|
||
- Configure PostgreSQL | ||
|
||
```bash | ||
$ sudo su - postgres | ||
$ "CREATE USER nicar SUPERUSER;" | psql -d postgres | ||
$ exit | ||
``` | ||
|
||
## Export | ||
1. Open VirtualBox | ||
2. Navigate to *File > Export Appliance* | ||
3. Select the Xubuntu virtual machine | ||
4. Choose OVF 1.0 (2.0 is for cloud computing compatibility. While the latest standard, it's still buggy in other virtualization software like VMware. See: https://www.virtualbox.org/ticket/11160) | ||
5. Press *Export* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Manual installation instructions | ||
--------------------------------- | ||
A step-by-step walkthrough for manually installing the VirtualBox and CIR's data journalism VM. Only go about it this way if you're on Windows or if you don't trust the bash script in README. Note: Manual | ||
|
||
## Setup VirtualBox | ||
|
||
1. Download VirtualBox for your operating system: https://www.virtualbox.org/wiki/Downloads | ||
2. Double click on the file (.exe for windows, .dmg for Mac OS X) and use the setup wizard to install VirtualBox. | ||
3. Download the latest VirtualBox extension pack (same file for all operating systems) [http://download.virtualbox.org/virtualbox/4.3.20/Oracle_VM_VirtualBox_Extension_Pack-4.3.20-96996.vbox-extpack] | ||
4. Double click on the .vbox-extpack file to install the extensions | ||
|
||
If you get lost at all during this process, refer to the VirtualBox installation manual: https://www.virtualbox.org/manual/ch01.html#intro-installing | ||
|
||
## Download and install virtual machine | ||
|
||
1. Once VirtualBox is installed, download the virtual machine. It's a 3GB file so make sure you have space on your hard drive: https://s3-us-west-1.amazonaws.com/vms/nicar-pre-k-2015.ova | ||
2. Doubleclick file to install the virtual machine | *If you get stuck*: https://www.virtualbox.org/manual/ch01.html#ovf | ||
3. During installation, click the __Reinitialize MAC Address__ checkbox | ||
4. Start the virtual machine | *If you get stuck*: https://www.virtualbox.org/manual/ch01.html#idp51818064 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters