These instructions outline the process of creating a development MIQ appliance that will run on a MAC under VMware Fusion.
Through the use of VMware Tools shared folders, the appliance runs MIQ code residing on the MAC. Code can then be maintained and manipulated on the MAC, and tested directly on the appliance.
- Download a MIQ OVA From manageiq.org to the MAC.
- On the MAC, in order to obtain the
miq-dev-appliance-setup
collection of scripts, clone manageiq guides from GitHub. A description of said scripts can be found here.
- Start VMware Fusion and create a new VM by importing the MIQ OVA:
- Select:
file->import...
thenChoose File...
- Select the OVA file you downloaded from RHN, and then
open
. - Select:
Continue
. - Select an appropriate name for the VM, and then
save
. - Wait for the import to complete. This can take some time.
- On the
Finish
screen, selectCustomize Settings
.- Add a CD/DVD device, so we can install VMware Tools:
- Select
Add Device...
thenCD/DVD Drive
- Set
Enable CD/DVD Drive
toOff
, thenAdd Device...
- Select
- Edit the VM's network settings, and set the connection to
NAT
.
- Add a CD/DVD device, so we can install VMware Tools:
- Select:
- Start the VM and login to the console.
- Take note of the VM's IP address.
- Hit
<return>
to get the console menu. - Select
Set Hostname
and set an appropriate hostname. - Select
Set DHCP Network Configuration
, andy
to confirm. - Select
Shut Down Appliance
, andy
to confirm. - You may want to snapshot the VM at this point.
-
Attach the VMware tools CD to the appliance VM:
Select:
Virtual Machine->Reinstall VMware Tools
NOTE: There's a bug in the Shared Folders feature of VMware Fusion 6.0.2. If running that version, you must attach a downgraded version of the tools by following the instructions here, instead of this step.
- Start the VM and login to the console.
- Hit
<return>
to get the console menu. - Select
Stop EVM Server Process
, andy
to confirm.
The following steps are performed in a terminal window on the MAC.
-
Change to the script parent directory in the guides repo cloned earlier.
cd <path to cloned guides repo>/miq-dev-appliance-setup/MAC
-
Copy the
on_appliance
directory to the appliance viascp
.scp -r on_appliance root@<appliance IP>:
-
Login to the appliance via
ssh
.ssh root@<appliance IP>:
-
Change to the
on_appliance
directory copied to the appliance earlier.cd /root/on_appliance
-
Run the
run-all.sh
script../run-all.sh <hgfs_path_to_miq_dir>
Where:
<hgfs_path_to_miq_dir>
is the path to the miq directory, relative to the MAC directory that will be shared with the appliance in the next step.For example: If the directory
/Users/my_home
is to be shared with the appliance,<hgfs_path_to_miq_dir>
would be something likemy_home/src/git/miq
. -
When prompted as follows:
Enable sharing in the VM and attach the appropriate host directory.
Type <return> to continue, or enter a new path (q to quit):
Before continuing, enable shared folders and attach the MAC directory to the VM:
- For the VMware Fusion appliance VM, select:
Virtual Machine->Settings...
- Select:
Sharing
. - Set
Shared Folders
toon
. - Select
+
to add a new shared folder from your MAC (a folder from which you can access the miq code./Users/my_home
for example)
Once the folder is attached,
Type <return> to continue
. - For the VMware Fusion appliance VM, select:
-
Once the script completes, shut down the appliance and create another snapshot if you like.
-
Boot the appliance and try to access the application from your web browser. If all is well, you're done.
Whenever code is updated on the MAC, the source-updated.sh
script should be run on the appliance.
In addition to recreating symbolic links, this script also performs a
bundle install
and a rake db:migrate
.