-
Notifications
You must be signed in to change notification settings - Fork 268
Setting up a Development Environment (on Ubuntu, Kali, Debian)
You are installing on an Ubuntu 20.04 base system. While you can also use Kali or Debian, you may have to tweak these instructions or the bootstrap script to accommodate those OS's.
You have created a GitHub account and associated an ssh key with it. You have familiarity with Git and Github.
- Get access to the system's CLI
- Make sure you have enough memory (16GB+ is recommended)
To check your system, run the following command : top -l 1 -s 0 | grep PhysMem
In order to get started, you'll want to create your own fork.
Pull down the repository to your local machine with:
mkdir ~/core
git clone [email protected]:YOUR-FORK/intrigue-core.git ~/core
Execute the script to install all dependencies (both system level and ruby dependencies will be installed). Note that this script is actively tested on ubuntu 18.04 and all other versions / variants may need slight adjustments.
cd core
./util/bootstrap.sh development
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).
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:
bundle exec rake setup # Copies config files to the right places
bundle exec rake db:migrate # migrates the DB to the latest
To start all services in a development mode, run:
foreman start
In order to work on the latest bits, you'll want to base on the upstream develop branch. 'Develop' is our unstable branch and is where most of the new functionality is developed and tested ahead of a release. To configure your local setup, do the following:
git checkout develop # create and checkout a local develop branch - develop is our 'unstable'
git push -u # set git to track your develop
You'll want to work on all changes in a separate branch, so go ahead and make a new branch with the following command:
git branch YOUR-BRANCH-NAME
git checkout YOUR-BRANCH-NAME
Clone the 'example' task and make your changes and commit them. Commit messages should follow 50/72 guidelines. If any api keys are used, make sure they're added to to the config/config.json.default file.
git status (To see what you're doing)
git commit -m "Use a descriptive message here, following the 50/72 guidelines (https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html)
Okay, so now you're ready to push your changes upstream! In order to do so, you'll be creating a pull request. For background on pull requests: https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests - Creating one is pretty simple:
First, commit your branch, then browse to view the commit in github: https://github.com/YOUR-FORK/intrigue-core/branches
Then create a pull request using the "New Pull Request" button:
Please submit pull requests against our unstable 'develop' branch. This ensures new functionality is well tested ahead of release.
Email [email protected] and ask to join the slack channel if you have any trouble at all!