Skip to content

Setting up a Development Environment on MacOS

Jonathan Cran edited this page Sep 21, 2022 · 1 revision

Set up your system

  1. Install git
  2. Install Ruby, etc (2.7.2 is our current)
  3. Follow instructions here and install using ruby with rbenv or asdf (preferred)
  4. Install asdf instructions - http://asdf-vm.com/guide/getting-started.html#_1-install-dependencies Note- make sure to install asdf using the zsh & Homebrew installation method

$ asdf plugin add ruby && asdf install ruby 2.7.2

  1. Optional but probably want to do - $ asdf global ruby 2.7.2
  2. To add support for reading rbenv config (.ruby-version) - http://asdf-vm.com/guide/getting-started.html#using-existing-tool-version-files
  3. Install required ruby version (2.7.2)
  4. Install bundler and foreman

$ gem install bundler && gem install foreman

  1. Install Brew https://brew.sh/
  2. Install Docker desktop https://docs.docker.com/desktop/mac/install/
  3. Install Postgres - https://www.postgresql.org/download/
  4. Install Redis https://redis.io/docs/getting-started/installation/install-redis-on-mac-os/

`$ brew install awscli $ aws configure

Set up the core app

(note that this assumes you have a base system with dev tools & postgres / redis installed)

If you don’t already have it pull down the core repo and ident repo

**intrigue core repo **

git clone https:/intrigueio/intrigue-core.git $BASEDIR/intrigue-core

ln -s $BASEDIR/intrigue-core ~/intrigue -core

**intrigue ident repo **

git clone https:/intrigueio/intrigue-ident.git $BASEDIR/intrigue-ident

ln -s $BASEDIR/intrigue-ident ~/ intrigue-ident

**ruclei repo **

git clone https:/intrigueio/ruclei.git $BASEDIR/ruclei

ln -s $BASEDIR/ruclei ~/ruclei

Install dependencies

Prior to running these commands make sure to cd into your ~/intrigue-core directory and open up the Gemfile with vim or nano. Comment out the lines that instantiate the ruclei gem and the intrigue-ident gem. Once that is done you can successfully run the following commands.

cd ~/intrigue-core && bundle install

If you encounter an error with the above command, please make a copy of the error message and open a new issue to let us know what happened. If everything went well, you'll now have a install with ruby and all the gem dependencies (managed by Bundler).

Create database

Create a user and the database on postgres

createuser intrigue && createdb intrigue_dev

Create Config Files & Migrate the DB

You'll need to run a couple tasks to copy the (.default) config files to the correct places and to migrate the database to the latest revision. Do that by running the below commands in the directory / root of the intrigue-core repository:

cd ~/intrigue-core && bundle exec rake setup && bundle exec rake db:migrate

Start the service

To start all services in a development mode - in the root directory, run: foreman start