Skip to content
This repository has been archived by the owner on Sep 24, 2021. It is now read-only.

Latest commit

 

History

History
99 lines (70 loc) · 4.22 KB

setup.md

File metadata and controls

99 lines (70 loc) · 4.22 KB

MAC Based MIQ Dev/Test Appliance Setup

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.

Acquire the needed files

  1. 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.

Create and configure base MIQ VM

  1. Start VMware Fusion and create a new VM by importing the MIQ OVA:
    • Select: file->import... then Choose 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, select Customize Settings.
      • Add a CD/DVD device, so we can install VMware Tools:
        • Select Add Device... then CD/DVD Drive
        • Set Enable CD/DVD Drive to Off, then Add Device...
      • Edit the VM's network settings, and set the connection to NAT.
  • 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, and y to confirm.
  • Select Shut Down Appliance, and y to confirm.
  • You may want to snapshot the VM at this point.

Configure VM for development

  1. 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, and y to confirm.

The following steps are performed in a terminal window on the MAC.

  1. 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 via scp.

    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 like my_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 to on.
    • 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.

  • 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.

Ongoing

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.