Giter Site home page Giter Site logo

ironsketch / edurange-server Goto Github PK

View Code? Open in Web Editor NEW

This project forked from edurange/edurange-server

0.0 2.0 0.0 22.83 MB

cloud-based interactive security exercises

Home Page: https://www.edurange.org

License: MIT License

Ruby 60.40% CoffeeScript 0.40% JavaScript 0.38% HTML 37.67% CSS 0.70% Shell 0.44%

edurange-server's Introduction

EDURange Documentation

What is it?

EDURange is an NSF-funded project with the aim of building a platform for cloud-based interactive computer security exercises.

Developer Installation

To setup the developer server to run on your machine, there are five main steps.

  1. Clone the repository from github
  2. Install the rails and ruby packages necessary to run and manage EDURange
  • RVM (Ruby Version Manager)
  • rails
  • rubygems
  • bundler
  1. Create local settings for aws options.
  • In the config directory, copy settings.yml to settings.local.yml
  • Fill in blank fields in settings.local.yml with settings obtained from a developer
  1. Add aws credentials to your machine's ENV variables.
  2. Run the server, and create a new user

Please follow each step carefully. A small error will likely result in a rails environment that simply won't work. Contact a EDURange developer if you run into problems that you can't solve after google and a few tries.

I. Clone the git repository:

git clone https://github.com/edurange/edurange-server.git

II. Install RVM (Ruby Version Manager), rails, rubygems, and bundler

Note: If you have Ruby installed through your package manager, it will conflict with this installation. If necessary perge it first.

sudo apt-get remove --purge ruby

Follow this guide to install RVM: (https://rvm.io/rvm/install#installation). Single-user instructions recommended. This project uses Ruby 2.2.3 so use RVM to install and select the correct version of Ruby:

rvm install [ruby version number eg 2.2.3]  - rvm install 2.2.3
rvm use [ruby version number eg 2.2.3]      - rvm use 2.2.3

You may have to do something like: bin/bash --login in order to set the RVM ruby version (which doens't refer to the system ruby version).

Also, install bundler (to take care of gem dependencies) and the rails framework:

Debian/Ubuntu Linux:

gem install bundler

Fedora/Red Hat Linux

gem install bundler

In the edurange-server directory, yank and update all the gem dependencies:

bundle update
bundle install

III. Contact the project aws administrator to get the credentials to place in your ENV variables.

Get your AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_REGION from your projects AWS administrator. Add the fields to your environment variables. A common way to do this is add the line below in ~/.bashrc and then reload the environment variables by running: source ~/.bashrc or by opening up a new terminal.

export AWS_ACCESS_KEY_ID='your-access-key-id'
export AWS_SECRET_ACCESS_KEY='you-secret-access-key'
export AWS_REGION='your-aws-region'

Now you should be all ready to start your server and create some users.

IV. Database and User setup

Edit the file "config/secrets.yml". Under 'development:' fill in "admin_name", "admin_email" and "admin_password". Avoid using any spaces in those fields.

Now run rake db:setup. This will create the database and admin account.

V. Run the server

You'll need to run the delayed jobs start script:

./delayed_job_start

Now bootup the developement server:

rails server

If you get a ruby version error, you might need to type 'rvm 2.2.1 [or current ruby version in Gemfile]'. Point your web browser to localhost:3000 and you should see something like this: alt tag

Booting a Scenario

Now that you have an admin user you can boot a scenario after some minor configurations.

After doing that, go ahead and navigate to the "Scenarios" tab and load a new scenario. Choose from the default scenarios available. Once the scenario is loaded you should be brought to a detail view where you can boot the scenario.

Keeping things working

From time to time, you might find parts of your scenario stuck on "queued_boot". To fix this, run the delayed jobs restart script.

./delayed_job_restart

After you pull changes from the github repository, if the database was changed you'll need to rake the database:

rake db:migrate

edurange-server's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.