Skip to content

Virtual machine for development of the online membership system of AEGEE.

Notifications You must be signed in to change notification settings

Salec/oms-development-vm

 
 

Repository files navigation

OMS Development VM

Build Status

What is this repository for?

Simple LDAP server with Vagrant and Puppet as proof-of-concept of these technologies.

How do I get set up?

  • Install VirtualBox and Vagrant.
  • Clone this repository recursively with git clone --recursive <URL>.
  • If you use Windows, fix your line endings now (see below).
  • Start the virtual machine with vagrant up from within the repository folder.
  • READ SECTION BELOW
  • Visit phpLDAPadmin at http://localhost:8888/phpldapadmin in a browser.
  • If you want to use ApacheDirectoryStudio, use server at localhost:4444.

Important: service upstart broken

For some reason the service decided to not start automatically in the last update. This means that to have the programs running, one must ssh into the machine, change directory, and manually invoke node:

  • vagrant ssh
  • cd /srv/oms-core/lib
  • node server.js &
  • cd /srv/oms-profiles-module/lib
  • node server.js &

they will start normally, but when invoked with the upstart script nope.. (maybe the fault is of "forever")

Remarks for Windows hosts

If you use Windows as host (i.e., as development platform), you have to be cautious about a few things:

  • Be careful about too long filenames. Either clone at a high point of your folder structure (for example at C:\aegee), or use git config --system core.longpaths true(with Git 1.9.0 and above). See here for details.
  • You MUST use LF line endings in git. This is true for all submodules as well! See this article for details. These commands should do the trick:
    git config core.autocrlf false
    git config core.eol lf
    git submodule foreach --recursive "git config core.autocrlf false"
    git submodule foreach --recursive "git config core.eol lf"
    rm -rf *     # Careful: you know what this does!
    git checkout -- .
    git submodule update --recursive
  • You also have to fix symlinks after cloning! See this article for more info.

Setup of ports

I tried to make the Vagrantfile as readable as possible but it's worth repeating it here in case you are not familiar with Vagrant.

Host (your computer) Service Used by Guest (the VM)
8888 HTTP apache2 80
4444 LDAP slapd 389
2222 SSH sshd 22
--- --- --- ---
8800 API oms-core 8080
8801 consumer oms-profiles-module 8081

Sharing the content of the VM directly so we can work from the host

|Your local folder|synced seamless in your VM at| |---|---|---|---| |ignore/oms-core|/srv/oms-core| |ignore/oms-profiles-module|/srv/oms-profiles-module|

Structure of files and where to touch to modify as you please

  • Ports: Vagrantfile
  • Synced folders: Vagrantfile
  • Installation and provisioning of the VM: puppet/manifests/site.pp --> in this file, there are two "classes" used that are defined as per below:
    1. Stuff about installation of LDAP: puppet/modules/aegee_ldap/manifests/init.pp
    2. Stuff about installation of OMS: puppet/modules/aegee_oms_modules/manifests/init.pp

Versions of Node.js and npm

As defined in the manifest, the versions are:

  • node 4.1.2
  • npm 2.14.4

(that version of npm is not defined, it is the one shipped with node 4.1.2)

Puppet version on the guest

As defined in scripts/upgrade_puppet.sh, the release is puppetlabs-release-trusty.deb which is fixed at

  • 3.8.6

phppgadmin and phpldapadmin

The alias for phpldapadmin is not working because of conflicting
virtualhosts. Use apachedirectorystudio if ever needing ldap (doubt so). If you want, you can change configuration in puppet/modules/{aegee_ldap or aegee_postgre}

About

Virtual machine for development of the online membership system of AEGEE.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Puppet 78.0%
  • Shell 15.7%
  • Ruby 6.3%