Skip to content
This repository was archived by the owner on Mar 3, 2020. It is now read-only.

Merge #551, #555, #556, and #557 #559

Merged
merged 5 commits into from
Sep 1, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ Complete your CLA here: <https://code.facebook.com/cla>

## Submitting a PR

**All Pull Requests should be made against `dev` (even _bug fixes_).**

Before submitting a large PR for a new feature or improvement, please create an issue first. This will allow us to discuss the feature before much development effort is put into it. After we've agreed that the feature would fit in the scope of the project, or if the change is small enough to not require an issue, follow these steps to create a PR:

- Make a new branch

```
git checkout -b my-fix master
git checkout -b my-fix dev
```

- Make your changes, including test cases if applicable. Make sure to follow the coding guidelines described below.
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ For more information, see the [Admin Guide](https://github.com/facebook/fbctf/wi

# Installation

The FBCTF platform was designed with flexibility in mind, allowing for different types of installations depending on the needs of the end user. The FBCTF platform can be installed either in Development Mode, or Production Mode. Development is for development, and Production is intended for live events utilizing the FBCTF platform.
The FBCTF platform was designed with flexibility in mind, allowing for different types of installations depending on the needs of the end user. The FBCTF platform can be installed either in Development Mode, or Production Mode.

[Development Installation Guide](https://github.com/facebook/fbctf/wiki/Installation-Guide,-Development)
[Quick Setup Guide](https://github.com/facebook/fbctf/wiki/Quick-Setup-Guide) (_Recommended Installation_)

[Production Installation Guide](https://github.com/facebook/fbctf/wiki/Installation-Guide,-Production)
The [Quick Setup Guide](https://github.com/facebook/fbctf/wiki/Quick-Setup-Guide) details the quick setup mode which provides a streamlined and consistent build of the platform but offers less flexibility when compared to a custom installation. If you would prefer to perform a custom installation, please see the [Development Installation Guide](https://github.com/facebook/fbctf/wiki/Installation-Guide,-Development) or [Production Installation Guide](https://github.com/facebook/fbctf/wiki/Installation-Guide,-Production).

## Reporting an Issue

Expand Down
25 changes: 18 additions & 7 deletions extra/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ function ok_log() {
function dl() {
local __url=$1
local __dest=$2
sudo curl --retry 5 --retry-delay 15 -sSL "$__url" -o "$__dest"
}

if [ -n "$(which wget)" ]; then
sudo wget -q "$__url" -O "$__dest"
else
sudo curl -s "$__url" -o "$__dest"
fi
function dl_pipe() {
local __url=$1
curl --retry 5 --retry-delay 15 -sSL "$__url"
}

function package_repo_update() {
Expand All @@ -53,7 +53,7 @@ function package() {

function install_unison() {
cd /
curl -sL https://www.archlinux.org/packages/extra/x86_64/unison/download/ | sudo tar Jx
dl_pipe "https://www.archlinux.org/packages/extra/x86_64/unison/download/" | sudo tar Jx
}

function repo_osquery() {
Expand Down Expand Up @@ -280,12 +280,23 @@ function install_composer() {
local __path=$1

cd $__path
curl -sS https://getcomposer.org/installer | php
dl_pipe "https://getcomposer.org/installer" | php
hhvm composer.phar install
sudo mv composer.phar /usr/bin
sudo chmod +x /usr/bin/composer.phar
}

function install_nodejs() {
log "Removing node.js legacy version"
sudo DEBIAN_FRONTEND=noninteractive apt-get remove --purge nodejs -y

log "Downloading and setting node.js version 6.x repo information"
dl_pipe "https://deb.nodesource.com/setup_6.x" | sudo -E bash -

log "Installing node.js"
package nodejs
}

function import_empty_db() {
local __u="ctf"
local __p="ctf"
Expand Down
6 changes: 1 addition & 5 deletions extra/provision.sh
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,6 @@ package_repo_update

package git
package curl
package wget
package rsync

# Check for available memory, should be over 1GB
Expand Down Expand Up @@ -307,11 +306,8 @@ fi
fi

package ca-certificates
package npm
log "Updating npm"
sudo npm install -g npm@lts

package nodejs-legacy
install_nodejs

log "Installing all required npm node_modules"
sudo npm install --prefix "$CTF_PATH"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
"dependencies": {
"d3": "^3.5.16",
"dropkickjs": "^2.1.10",
"dropkickjs": "2.1.10",
"hoverintent-jqplugin": "^0.2.1",
"jquery": "^2.2.3",
"keycode": "^2.1.1",
Expand Down