#265: Added CONTRIBUTING and moved install guide
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
# Contributing to Shuffle
|
||||
|
||||
First off, thank you for contributing to [Shuffle](https://shuffler.io/)! Your talents and your contributions are greatly appreciated. With Shuffle, we aim to make cybersecurity more accessible, and keep that in mind with everything we make.
|
||||
|
||||
## Opening a new issue
|
||||
|
||||
If you find a bug or think of an improvement or fix, please open a [new issue](https://github.com/frikky/Shuffle/issues/new). Outline every step necessary to reproduce the bug. Include screenshots, logs and/or code examples where applicable. The more thorough you are, the better.
|
||||
|
||||
## What you can work on
|
||||
There are a lot of things to work on in our complex ecosystem. The most pressing issues are documentation, use-cases and content-creation, but any help is appreciated. We'll make sure you get the help you need to get started. Below is an incomplete list of items. If you see an issue, tell us or fix it! :)
|
||||
|
||||
#### App Creation (Python & GUI w/OpenAPI)
|
||||
As with everything else, app creation for Shuffle is made as accessibl as possible with the app editor. However, there are some instances where it can't do the job, and you'll have to write Python code. The App Editor generates OpenAPI specifications and can be widely shared, while Python apps only work for Shuffle and NSA's WALKOFF (which Shuffle is based on). You can find our [OpenAPI apps here](https://github.com/frikky/security-openapis) and our [Python apps here](https://github.com/frikky/shuffle-apps). Apps in these repositories are automatically available after installation. Shuffle apps are searchable on [https://shuffler.io](https://shuffler.io/search).
|
||||
|
||||
#### Workflow creation (GUI & Conceptualizing)
|
||||
Workflows are where the magic of Shuffle automation happens. Our current ones [are outlined here](https://github.com/frikky/security-openapis), and will be automatically imported into Shuffle instances in the future. They are split into Prepare and Response, but don't necessarily have to be. If you'd like to talk about workflow creation or use-cases in general, either Open a [new issue](https://github.com/frikky/shuffle-workflows/issues/new) or send us an email at [frikky@shuffler.io](mailto:frikky@shuffler.io)
|
||||
|
||||
#### Documentation (Markdown)
|
||||
Documentation is essential to any product, and Shuffle is no exception. Documentation in Shuffle uses markdown and is located in the [shuffle-docs](https://github.com/frikky/shuffle-docs/tree/master/docs) repository. These are then loaded into Shuffle when someone visits [https://shuffler/docs/about](https://shuffler/docs/about), then cached for later use. If you make an edit, expect it on our website in about an hour.
|
||||
|
||||
#### Frontend (ReactJS)
|
||||
The frontend of Shuffle is what everyone sees when they log in. Our goal here is to make it easy to get started and keep going with Shuffle - removing any blockers from the point of accessibility. If you'd like to get started, find [an issue](https://github.com/frikky/Shuffle/issues) and check the [installation guide](https://github.com/frikky/Shuffle/blob/master/install-guide.md#local-development-installation) for setting it up locally without Docker.
|
||||
|
||||
#### Backend (Golang)
|
||||
The backend of Shuffle is our REST API Server that runs in the background, handling all the API-calls in general, whether from users or apps. If you'd like to get started, find [an issue](https://github.com/frikky/Shuffle/issues) and check the [installation guide](https://github.com/frikky/Shuffle/blob/master/install-guide.md#local-development-installation) for setting it up locally without Docker.
|
||||
|
||||
## Working on an issue
|
||||
|
||||
**Shuffle** uses the [GitHub flow](https://guides.github.com/introduction/flow/index.html). All project changes are made through pull requests.
|
||||
If you see an issue that you would like to work on, leave a quick comment or just get cracking.
|
||||
|
||||
### License
|
||||
|
||||
All contributions are made under either the **GNU Affero General Public License v3.0** or **MIT** license. See below for further details.
|
||||
|
||||
* [Main project license - AGPLv3](https://github.com/frikky/Shuffle/blob/master/LICENSE)
|
||||
* [Apps - MIT](https://github.com/frikky/Shuffle-apps/blob/master/LICENSE)
|
||||
* [Workflows - MIT](https://github.com/frikky/Shuffle-workflows/blob/master/LICENSE)
|
||||
* [Documentation - MIT](https://github.com/frikky/Shuffle-docs/blob/master/LICENSE)
|
||||
@@ -0,0 +1,134 @@
|
||||
# Installation guide
|
||||
Installation of Shuffle is currently only available in docker. Looking for how to update Shuffle? Check the [updating guide](https://shuffler.io/docs/configuration#updating_shuffle)
|
||||
|
||||
## Docker
|
||||
The Docker setup is done with docker-compose and is a single command to get set up.
|
||||
|
||||
**PS: if you're setting up Shuffle on Windows, go to the next step (Windows Docker setup)**
|
||||
|
||||
1. Make sure you have Docker and [docker-compose](https://docs.docker.com/compose/install/) installed.
|
||||
2. Run docker-compose.
|
||||
```
|
||||
git clone https://github.com/frikky/Shuffle
|
||||
cd Shuffle
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
When you're done, skip to the "After installation" step below.
|
||||
|
||||
## Windows Docker setup
|
||||
This step is for setting up with Docker on windows from scratch.
|
||||
|
||||
1. Make sure you have [Docker](https://docs.docker.com/docker-for-windows/install/) and [docker-compose](https://docs.docker.com/compose/install/) installed. WSL2 may be required.
|
||||
2. Go to https://github.com/frikky/shuffle/releases and download the latest .zip release (or install git)
|
||||
3. Unzip the folder and enter it
|
||||
4. Open the .env file and change the line with "OUTER_HOSTNAME" to contain your IP:
|
||||
```
|
||||
OUTER_HOSTNAME=YOUR.IP.HERE
|
||||
```
|
||||
5. Run docker-compose
|
||||
```
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
### Configurations (proxies, default users etc.)
|
||||
https://shuffler.io/docs/configuration
|
||||
|
||||
### After installation
|
||||
1. After installation, go to http://localhost:3001/adminsetup (or your servername)
|
||||
|
||||
2. Now set up your admin account (username & password). Shuffle doesn't have a default username and password.
|
||||
3. Check out https://shuffler.io/docs/configuration as it has a lot of useful information to get started
|
||||
|
||||

|
||||
|
||||
### Useful info
|
||||
* Check out [getting started](https://shuffler.io/docs/getting_started)
|
||||
* The server is available on http://localhost:3001 (or your servername)
|
||||
* Further configurations can be done in docker-compose.yml and .env.
|
||||
* Default database location is /etc/shuffle
|
||||
|
||||
### Execution problems
|
||||
If you have problems with your first execution (hello world), you might need to set the correct Docker API version. Here's how:
|
||||
|
||||
1. Find your API version by running "docker version"
|
||||
```
|
||||
$ docker version
|
||||
|
||||
Client:
|
||||
Version: 17.09.1-ce
|
||||
API version: 1.32 # <-- this one
|
||||
Go version: go1.8.3
|
||||
Git commit: 19e2cf6
|
||||
Built: Thu Dec 7 22:24:16 2017
|
||||
OS/Arch: linux/amd64
|
||||
|
||||
Server:
|
||||
Version: 17.09.1-ce
|
||||
API version: 1.32 (minimum version 1.12)
|
||||
Go version: go1.8.3
|
||||
Git commit: 19e2cf6
|
||||
Built: Thu Dec 7 22:22:56 2017
|
||||
OS/Arch: linux/amd64
|
||||
Experimental: false
|
||||
```
|
||||
|
||||
2. Open docker-compose.yml and change the line with "DOCKER_API_VERSION" to your version.
|
||||
3. Restart docker-compose
|
||||
```
|
||||
docker-compose down
|
||||
docker-compose up
|
||||
```
|
||||
|
||||
Related issue: #47
|
||||
|
||||
# Local development installation
|
||||
Local development is pretty straight forward with **ReactJS** and **Golang**. This part is intended to help you run the code for development purposes.
|
||||
|
||||
**PS: You have to stop the Backend Docker container to get this one working**
|
||||
**PPS: Use the "Launch" branch when developing to get it set up easier**
|
||||
|
||||
## Frontend - ReactJS /w cytoscape
|
||||
http://localhost:3000 - Requires [npm](https://nodejs.org/en/download/)/[yarn](https://yarnpkg.com/lang/en/docs/install/#debian-stable)/your preferred manager. Runs independently from backend.
|
||||
```bash
|
||||
cd frontend
|
||||
npm i
|
||||
npm start
|
||||
```
|
||||
|
||||
## Backend - Golang
|
||||
http://localhost:5001 - REST API - requires [>=go1.13](https://golang.org/dl/)
|
||||
```bash
|
||||
export DATASTORE_EMULATOR_HOST=0.0.0.0:8000
|
||||
cd backend/go-app
|
||||
go run *.go
|
||||
```
|
||||
|
||||
**WINDOWS USERS:** You'll have to to add the "export" part as an environment variable.
|
||||
|
||||
## Database - Datastore
|
||||
Based on Google datastore
|
||||
```
|
||||
docker run -p 8000:8000 google/cloud-sdk gcloud beta emulators datastore start --project=shuffle --host-port 0.0.0.0:8000 --no-store-on-disk
|
||||
```
|
||||
|
||||
## Orborus
|
||||
Execution of Workflows:
|
||||
PS: This requires some specific environment variables
|
||||
```
|
||||
cd functions/onprem/orborus
|
||||
go run orborus.go
|
||||
```
|
||||
|
||||
|
||||
Environments (modify for Windows):
|
||||
```
|
||||
export ORG_ID=Shuffle
|
||||
export ENVIRONMENT_NAME=Shuffle
|
||||
export BASE_URL=http://YOUR-IP:5001
|
||||
export DOCKER_API_VERSION=1.40
|
||||
```
|
||||
|
||||
**WINDOWS USERS:** You'll have to to add the "export" part as an environment variable.
|
||||
|
||||
AND THAT's it - hopefully it worked. If it didn't please email [frikky@shuffler.io](mailto:frikky@shuffler.io)
|
||||
Reference in New Issue
Block a user