This is the entry point to the codebase. Inside this repo are a set of scripts that should get you set up and ready to contribute.
Motivation: GPG (GNU Privacy Guard) is an implementation of public-private key encryption. This project currently uses GPG to sign commits to verify the identity of contributors and is exploring using it for credentials management.
- Check if GPG is installed
$ which gpg
- Install GPG (if needed)
- MAC USERS
$ brew install gpg - LINUX USERS use your favorite package manager on Linux to install gpg
- You might also enjoy the silky smooth UX of GPG Tools
-
Check if you have a PGP Key
$ gpg -KIf you see an entry with your email address: YAY! You have a PGP key. You can skip the following step.
-
Generate a GPG key (for more information, see https://www.madboa.com/geek/gpg-quickstart/)
$ gpg --gen-key- when asked which type of key you want, choose option
(1) [RSA/DSA] - when asked how many bits you would like, we recommend 4096
- Remember your passphrase! (NO REALLY! If you forget this, it's REALLY SAD!)
-
Open the file located at
~/.bashrcand insert the following lines:export WHEREAT_KEY=<YOUR_PGP_KEY_ID> export WHEREAT_ROOT=<PATH_TO_YOUR_WHERAT_REPOS>Replace the text in angle brackets as follows:
-
To find
<YOUR_PGP_KEY_ID>:$ gpg -K- You should see a line that looks like:
sec 2048R/1E4DFE5A 2015-10-06 [expires: 2017-07-19]1E4DFE5Ais your PGP key -
To find
<PATH_TO_YOUR_WHERAT_REPOS>:cdinto the directory in which you are keeping where@ repos$ pwd- this should print out the full path to the directory, for example:
/home/awesomecontributor/code/whereat/
-
Given the above examples, we would add the following lines to
~/.bashrc:export WHEREAT_KEY=1E4DFE5A export WHEREAT_ROOT=/home/awesomecontributor/code/whereat/
-
-
Source the file where you put your environment variables
$ source ~/.bashrc
-
Clone the scripts repo into
$WHEREAT_ROOT$ cd $WHEREAT_ROOT $ git clone git@github.com:whereat/whereat-bash.git -
Add a
WHEREAT_SCRIPTSenvironment variable to your .bashrc and source again$ cd whereat-bash $ echo "export WHEREAT_SCRIPTS=`pwd`" >> ~/.bashrc $ source ~/.bashrc -
Fork all needed repos to your personal Github account
-
Clone all forked repos to
$WHEREAT_ROOT -
Run add-gpg-to-all.sh to set up all repos to sign commits with gpg key.
$ ./src/git-config/add-gpg-to-all.sh
- Get the rest of the environment variables from a project admin (email whereat-contrib@lists.riseup.net)
- Add the environment variables to a .env file in
$WHEREAT_ROOT/whereat-location-server - Set up the Docker environment
-
Linux: start the Docker daemon
$ sudo service docker restartIf this doesn't work, try installing docker-toolbox at https://docs.docker.com/engine/installation/linux/
-
Mac:
- If you don't already have Docker, download and install docker-toolbox from https://www.docker.com/products/docker-toolbox
- Create a default Docker machine if you don't have one already
$ docker-machine create --driver virtualbox <docker machine name>- Set which Docker machine (i.e. environment) all commands will be run in
$ eval "$(docker-machine env <docker machine name>)"
-
MAC USERS ONLY To configure port forwarding from the Docker machine to your mac machine
$ docker-machine stop <docker machine name> $ VBoxManage modifyvm "<docker machine name>" --natpf1 "whereat,tcp,,5000,,5000" $ docker-machine start <docker machine name> -
Build the docker container in the Docker machine for the location server:
$ ${WHEREAT_SCRIPTS}/src/docker/connect-to-location-server.sh -
This should open a docker container that you can use!!!
- You should start off in a prompt inside the container
- You can test whether the server works by running the following:
$ cd whereat-location-server $ sbt run- Now, Your local version of the application code is mounted into the container
- You can edit the code on your local machine and run it inside the container