You can skip any section if you have already installed the dependencies.
-
Install XCode
-
Search and install Xcode from the App Store.
Need different Xcode version? See list of xip archive links
-
-
Install Apple Command Line Tools
- Open XCode (this just needs to run once to initialize it) and close it.
- Install XCode command line tools by running
xcode-select --install
in the terminal.
-
Install Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- Run
brew update
to make sure all your formulas are current
-
Install git
-
On Mavericks (10.9) or above you can do this simply by trying to run git from the Terminal the very first time:
git --version
If you don’t have it installed already, it will prompt you to install it.
-
Installing via Homebrew:
brew install git
-
-
Update software packages definitions
apt-get update
-
Install git
apt-get install git
-
ssh-keygen -t ed25519-sk -C "[email protected]"
-
Add generated SSH key to Github
-
Set up git config
git config --global core.editor "vim"
git config --global user.email “[email protected]”
git config --global user.name “FirstName LastName”
git config --global push.default simple
-
Clone repo
git clone [email protected]:dnanexus/precision-fda.git
-
Create database config file
cp config/database.sample.yml config/database.yml
-
Create environment config file
cp .env.example .env
-
Ask Dev team for additional parameters to add into
.env
file
To develop on pFDA locally you need to manually add a new user and organization. Because when you first get started in a new system, there is no existing user. So you can't log in to provision new accounts. This requires manually "bootstrapping" the situation in steps described below.
brew install mkcert
- Install MKCert on your computer: https://github.com/FiloSottile/mkcertmkcert -install
- From project root run:
mkcert -key-file key.pem -cert-file cert.pem localhost 0.0.0.0 pfda.dev
- This will create two files
key.pem
andcert.pem
. They need to be generated on your machine to get rid of the annoying unprotected site warning in the browser.
Register for a new user account at https://staging.dnanexus.com/register.
Note: the first time you visit this, you will be prompted to enter the credentials
(ask around for what it is).
You must choose an unused email address, but you can use the google "+" trick
to signup with a variable email address, e.g. [email protected]
.
Activate your account with the link sent to your email.
- Download & install the DX Toolkit https://documentation.dnanexus.com/downloads#dnanexus-platform-sdk.
- Choose an unused handle, e.g.
{{yourname}}org
. Prependpfda..
(two dots), so that the final handle will be e.g.pfda..farnsworthorg
. - Type
dx login --staging
and log in with your new account. - Type
dx new org --handle pfda..{{yourname}}org "{{Yourname}}'s org"
- Log into the web UI https://staging.dnanexus.com with your account, access your profile on the upper right.
- Click Billing Accounts
- Click Add Billing Info in the pfda..floranteorg entry.
- Note: You may need to contact Laura (sales) for the billing info.
- Enter info (it doesn't have to be real, you can type "." in most entries). Enter your real DNAnexus email, however.
- Click Update Billing Information
- Check your email for a new email message asking you to confirm by clicking the link
- Click the link to confirm.
Docker-based setup (preferred) will require to install docker into your system. Dependencies MySQL and required gems will be installed into docker containers to minimize conflicts in the host system with other projects.
OS-based setup will require to install some additional software like MySQL, RVM and required gems directly into your OS.