ManageIQ Dev Environment Setup Script for Mac
This repo's setup
script will perform all the steps of the ManageIQ Developer Setup Guide which apply to macOS developers. This repo also provides helper scripts to run rails
, foreman
, evm
and webpack
, and to update
and update-ui
. These scripts will ensure the right current directory and ruby version are used.
- Install Homebrew, if you don't have it already: https://brew.sh/
-
Install
rvm
(https://rvm.io/) and then runrvm install 2.5.5
(Note: the helper scripts all requirervm
. If you want to userbenv
or something else, you'll just need to change the top of each script. The important thing is that you load ruby 2.5.5) -
Clone this repo in the directory where you want your manageiq repositories cloned:
git clone https://github.com/mturley/miq_mac_dev
*Note:
miq_mac_dev/setup
will move up to the directory abovemiq_mac_dev
and clone siblings next to it. Don't clone this repo in the same directory alongside existing manageiq and manageiq-ui-classic repos, use a fresh subdirectory if necessary:*mkdir miq; cd miq; git clone https://github.com/mturley/miq_mac_dev
-
Run
setup
. Be ready to provide a sudo password, you may be asked more than once:miq_mac_dev/setup
or:
miq_mac_dev/setup --with-v2v-plugin
setup
currently has one available option, therefore two possible modes to run this script in:
-
Use
setup
with no options to installmanageiq
andmanageiq-ui-classic
from master. -
Use
setup --with-v2v-plugin
to also install priley's v2v plugin, and use thev2v
branch ofmanageiq-ui-classic
instead of master.
To run manageiq in the foreground, you can either run the rails server directly with miq_mac_dev/rails
, or run it yourself:
cd manageiq
bundle exec rails s
or, you can run it with Foreman using miq_mac_dev/foreman
, or run Foreman yourself:
cd manageiq
foreman start -p 3000
To run manageiq in the background, you can instead use miq_mac_dev/evm
or run evm yourself:
cd manageiq
bundle exec rake evm:start
Tip: Running evm again if it is running already will tell you what pid it is running on.
At this point you should be able to view the rails application at http://localhost:3000/
You can use miq_mac_dev/webpack
, or run WDS yourself:
cd manageiq/plugins/manageiq-ui-classic
env NODE_ENV=development ./node_modules/.bin/webpack-dev-server --config config/webpack/development.js
Then you can view the hot-reloading webpack-dev-server at http://localhost:8080/