Service and material distribution channel
EduCloud Bazaar is built on top of Oscar framework We actually use Oscar v0.7.3. Sources of its apps can be found in https://github.com/django-oscar/django-oscar/tree/releases/0.7/oscar/apps
The different servers where this system can be found installed are:
- Test (for development and testing, access for the core team) https://bazaardev.educloudalliance.org
- Demo/Production (production version in the Pilot phase) https://bazaar.educloudalliance.org
Bazaar development can be started using Vagrant. Vagrant sets up a whole VM over VirtualBox with all the dependencies that that the system requires already installed.
To setup vagrant and the DE perform the following steps:
-
Clone this repository with
git clone [email protected]:educloudalliance/educloud-bazaar.git && cd educloud-bazaar
-
Install Vagrant from their page. DO NOT USE
sudo apt-get install vagrant
, it installs an older version and it won't work. Download Vagrant -
Install VirtualBox. You can either download it from here, or you can use
sudo apt-get install virtualbox virtualbox-dkms
in linux. -
Uncomment the desired provisioning method from the
Vagrantfile
file:
- Provisioning from ansible: It will install everything from the cookbook located in
provision/ansible
. Make sure ansible is installed (it only works in MacOS and Linux) - -->DEFAULT<-- Provisioning from educloud-bazaar.box: This will download our custom vagrant box from our server. This box has all the needed requirements preinstalled, so it's just run and code! It's really useful for CI and testing. It will be updated from time to time to meet the same requirements of the development and production server.
- Provisioning from bash script: This will download an empty virtual machine of Ubuntu 14.04 Precise Pangolin x64 and install all the requirements for you. It takes some time as it has to install everything.
-
Open a terminal in the root folder of the project and execute
vagrant up
. The first time you run this command will install a new VM in your computer with all the source code inside. If you chose the ansible or shwll script methods this will take some time, as it has to install the whole environment. It will also migrate and create the DB for you. -
Now you can log in into your VM using
vagrant ssh
. All the source code is synced between the host and guest machine, so you can work from your own machine if desired. In order to start the educloud-bazaar service in the server executepython /home/vagrant/educloud-bazaar/bazaar/manage.py runserver 0.0.0.0:8000
. You can access to the webpage through your browser at http://localhost:8001. -
To stop the vagrant machine just use
vagrant halt
in the root folder. You an also destroy the whole machine withvagrant destroy
. Next time it starts the machine it will provision again.
- Generate and migrate the DB -->
python manage.py syncdb
andpython manage.py migrate
- Start Unit tests -->
python manage.py test
- Add CMS into the database (needs input) -->
python manage.py addcms [name]
- Add LMS into the database (needs input) -->
python manage.py addlms [name]
You can also see more commands of python using python manage.py
Location educloud-bazaar/robot
Required items:
- robotframework
pip install robotframework
- selenium2library
pip install robotframework-selenium2library
- browser (firefox, chrome, ie, etc)
Example run, using smoke.robot:
pybot --variable ENVIRONMENT:local_server --variable LANG:fi smoke.robot
Currently if you run with ENVIRONMENT:local_server the test relys on your local server that is running on port 8000 and language depends on the browser default language.