oddhill / oddenvironment

Dev env that is easy to manage

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Odd Environment

Easy to manage dev env for OS X

macOS Sierra

Odd Environment should work on Sierra if you're installing it from a fresh state. However, you will need to take manual actions if you've upgraded from an earlier OS. Please read the issue at #19 for further details and discussion.

Prerequisites

  1. You need CLT installed. Run the following to install it:
$ xcode-select --install
  1. Make sure that Odd Boxen is completely removed if you've been using that previously. Please read Migrating from Odd Boxen for further details.

Installing

  1. Clone the repository
$ git clone https://github.com/oddhill/oddenvironment.git ${HOME}/oddenv
  1. Copy auth.pp.default to auth.pp and enter auth credentials for Sendgrid.
$ cp ${HOME}/oddenv/manifests/auth.pp.default ${HOME}/oddenv/manifests/auth.pp
  1. Run setup.sh
$ ${HOME}/oddenv/scripts/setup.sh
  1. Add the following lines to your shell config file. (.profile or .bash_profile in your home folder)
export ODDENV_DIR="$HOME/oddenv"
source $ODDENV_DIR/scripts/env.sh
  1. Restart your shell and run oddenv in order to install everything
$ oddenv --force

Keep up-to-date

Run the following:

$ oddenv

To pull the latest changes and apply them to your system.

Services

$ oddenv services list
$ oddenv services mysql restart
$ oddenv services apache stop

oddenv services is just a wrapper around other commands. So brew services might be worth checking out. :)

$ brew services list
$ brew services restart mysql56

Logging

Logs for every service is available at /usr/local/var/log. Simply browse that directory in order to find what you need.

Migrating from Odd Boxen

Backup everything that you might need

  • MySQL databases. Run this command to dump every database and the contents to the desktop:
$ mysqldump -u root -h 127.0.0.1 --all-databases > ~/Desktop/databases.sql
  • Homebrew packages. You probably know if you've installed some additional package manually, but you can run the following command to get a list of what you've installed. Write them down and install them manually again after you've installed Odd Environment.
$ brew list
  • Node packages. Same goes here, you'll need to install your manually installed packages afterwards. Use this command to see a list of the global packages currently installed:
$ npm -g list

Delete every trace of Odd Boxen

  1. Run the following commands, one at a time:
$ cd /opt/boxen/repo
$ script/nuke --all --force
$ cd
$ rm -r ~/src/
$ for i in `gem list --no-versions`; do sudo gem uninstall -aIx $i; done
  1. Edit ~/.profile and remove the line that says source /opt/boxen/env.sh.
  2. Remove any applications from ~/Applications that has been installed by Homebrew Cask. You want to delete the ones that are symlinks, and keep the rest.
  3. Reboot (just for the sake of it)
  4. Done!

Make sure that Homebrew has been removed

Some users have experienced problems after Odd Boxen was removed which all has been releated to traces of Homebrew that wasn't removed properly.

Make sure that homebrew doesn't existing by running brew. If the command still works, you will need to uninstall it manually by running ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)".

After installation of Odd Environment

  1. Import your databases again:
$ mysql < ~/Desktop/databases.sql
  1. Install any additional Homebrew package that you might still need, but isn't included in Odd Environment...
  2. ... and do the same for Node packages.

License

MIT

About

Dev env that is easy to manage


Languages

Language:HTML 96.3%Language:Puppet 1.3%Language:Shell 1.1%Language:JavaScript 0.7%Language:Ruby 0.6%