Get Started

Requirements

Windows

You need MinGW (don't use CgyWin, because rsync over ssh is buggy in CgyWin). Also:

  1. Make sure you click on "rsync" and "openssh" in the installation dialogue: http://i.imgur.com/ePnGJlS.png
  2. Please make sure that rsync is in your path. The path on my system is: C:\MinGW\msys\1.0\bin.
  3. WARNING: Having multiple unix "suites" (Git, MinGW, CgyWin) in your path may cause rsync not to work because there are multiple OpenSSH installations. An error resulting from this looks like: rsync error: error in rsync protocol data stream (code 12) at .... To resolve this, remove all other environments (Git, CgyWin) from your path or propose a different solution.
  4. If vagrant takes a long time at "rsync", use "vagrant rsync --debug" or "vagrant up --debug" to see what fails.
  5. See also: https://docs.vagrantup.com/v2/synced-folders/rsync.html

Installation

  1. git clone git@github.com:serlo-org/athene2.git --recursive - clones the git repository
  2. cd athene2 - the athene2 root directory
  3. Setup your local settings
    • cp src/config/autoload/local.php.dist src/config/autoload/local.php (Linux)
    • copy src\config\autoload\local.php.dist src\config\autoload\local.php (Windows)
    • cp src/config/autoload/develop.local.php.dist src/config/autoload/develop.local.php (Linux)
    • copy src\config\autoload\develop.local.php.dist src\config\autoload\develop.local.php (Windows)
    • cp src/public/htaccess.dist src/public/.htaccess (Linux)
    • copy src\public\htaccess.dist src\public\.htaccess (Windows)
  4. vagrant plugin install vagrant-triggers
  5. vagrant up
  6. Click the link: athene2

To accelerate the application

For instance by using build class and template maps, the application will run faster.
Run:

  • vagrant ssh
  • cd bin
  • sudo sh build.sh

When developing in build mode, there can be various things that impact the application's performance.
The following will clean up the clean up the build,
Run:

  • vagrant ssh
  • cd bin
  • sudo sh clean-build.sh

To update the user interface

For issues with Exceptions caused by Assetic or to update the frontend dependencies,
Run:

  • vagrant ssh
  • cd bin
  • sudo sh clean-ui.sh

To update or reset the database

When the database out of date, or to reset the database,
Run:

  • vagrant ssh
  • cd bin
  • sudo sh update-mysql.sh

Or use the following:

phpMyAdmin.

To update composer dependencies

  • vagrant ssh
  • cd /var/www/
  • php composer.phar update

To reset the virtual machine

  • vagrant destroy
  • vagrant up

It works!

Vagrant enables per default:

  • Apache2 + PHP-5.5
  • MySQL-5.5 (with a recent db-dump)
  • node, npm, pm2, bower, grunt, composer, sass, compass
  • Grunt build (builds your .css, .js assets)
  • Composer install (installs php dependencies)
  • Sphinx Search (used for fulltext search - updates every minute)
  • phpMyAdmin
  • athene2

Slow startup

  • After booting, the VM script initialization process takes too long. The initialization process may take up to 10 minutes during which time the environment will not be working. (needs some further explanation, why does it take ten minutes)

Not vagrant-related

Permissions

Permissions with global access should ** never ** be assigned to lower level roles. Doing so would imply a severe
security breach independent of any intended action. It also may violate the role assignment for non-sysadmins.

Permissions with global access should ** only ** be provided to sysadmin or similar superusers.