Skip to main content

Basic Terminology of Vagrant & OpenedX



Boxes-: Boxes are pre built virtual machine images or packages running on any operating system.

Vagrantfile - describe the type of machine required for a project, and how to configure and 
provision these machines.

NFS -: It is used for sharing folders between host and guest machines.default vagrant 
sharing mechanism are used .

vagrant init -: Initialize Vagrant with a Vagrantfile and ./.vagrantdirectory,
 using no specified base image. Before you can do vagrant up, you'll need to specify
 a base image in the Vagrantfile. I rarely initialize Vagrant this way.

vagrant init boxpath -: Initialize Vagrant with a specific box. To find a box, go shopping. 
When you find one you like, just replace it's name with boxpath. For example,
 vagrant init chef/centos-6.5. This is how I typically initialize Vagrant.
vagrant up -: Boot the VM's specified in your Vagrantfile. Equivalent to pressing the 
power buttons on your "servers."
vagrant ssh -: Open an ssh session to the default box specified in your working directory's
 Vagrantfile. If you only have one box in your Vagrantfile, that's the default one and this command
 will ssh into it.
vagrant ssh boxname -: If you give your box a name in your Vagrantfile, you can ssh into it with 
boxname. Works from any directory.
vagrant destroy -: Stop and delete the default VM. The next time you vagrant up, the VM will be 
created from scratch.
vagrant destroy -f -: Vagrant does this annoying thing where it prompts you before destroying a VM. 
-f is short for force, which will destroy the VM without confirming first.
vagrant box list -: See a list of all installed boxes on your computer.
vagrant box add -: Download a box image to your computer.
vagrant reload --provision -: Run provisioners without halting the VM and running vagrant up.
vagrant halt- : use to stop virtual machine in your system
vagrant suspend-: used to suspend(stop virtual machine at specific time) and during start it will 
get started from point where it was stopped.
vagrant destroy -: used to stop & delete virtual machine from system.
vagrant reload -: used if you made any changes to vagrant file , and refreshing/reloading the vagrant 
to reflect new changes.
vagrant ssh -: using this command you can login/enter into virtual machine.
Port Forwarding - : port forwarding is basically used mapping/executing/running the application on
 same port outside the virtual machine.
For Example- If you are running an application in vagrant(VM) and looking to run on localhost then you 
need to do port forwarding i.e. basically mapping the port for VM & localhost.

Steps to setup vagrant >>>>>>
Step1:
sudo apt-get update
sudo apt-get install vagrant
sudo apt-get install virtualbox
sudo apt-get install nfs-kernel-serve
sudo apt-get install nfs-common

Step2:
vagrant init
vagrant box add ‘box_name’ http://files.vagrantup.com/precise64.box
Note : If you have already downloaded precise64.box then can add box like:
vagrant box add ‘box_name’ precise64.box
Add config in Vagrant file:
config.vm.box = "box_name"
config.vm.box_url = " " specify if exist else blank.

Step3:
vagrant up

To enable NFS, add the following to your Vagrantfile:
# Required for NFS to work, pick any local IP
config.vm.network :private_network, ip: '192.168.50.50'
# Use NFS for shared folders for better performance
config.vm.synced_folder '.', '/vagrant', nfs: true

https://groups.google.com/forum/#!msg/openedx-ops/KWz4d6Mawz8/Fr8vwD_nHAAJ;
context-place=searchin/openedx-ops/dogwood$20box$20doenload%7Csort:relevance

OpenedX Documentation
Edx Task :
1. What’s openedx?
The OpenedX is a free and open source course management system (CMS) based edX. 
The OpenedX platform is used all over the world to host Massive Open Online Courses
 (MOOCs) as well as smaller classes and training modules
2. What’s edx.org?
Edx is basically a education tools given by MIT & Harvard university for providing free online
 courses and education from best colleges & university that contains LMS, Studio, discussion
 Forum etc.
3. What's main repositories for openedx ?
edx-platform is main repository for openedx.
4. Experience on those repositories , technologies, django app structures ?
Most of the server side code in Open Edx projects are written in python using their framework Django
. The structure of django project is as usual and it using the edx-platform(build in django) components
 as a module in django project.
5. What’s Xblock ?
It’s a combination of courses in multiple formats like Videos, Text, Images, Animated etc. There can 
be multiple XBlocks that can be used as a plugin in your application.
6. What’s architectural structure of openedx ?
The OpenEdx architecture is basically get configured while while running the vagrant up, it will install
 all the required packages specific to your application. So it ensure that VM/environment is ready to 
use. And by executing provision it will be ensuring that edx-platform(Mostly python application) is get 
configured. Edx-platform is acting as a central part of OpenEdx.

In Edx-Architecture , the number of tasks are Queued and performed by the help of Celery(To run jobs in background) & rabbitMQ.

***********************************************************************************************************

Popular posts from this blog

How to read or extract text data from passport using python utility.

Hi ,  Lets get start with some utility which can be really helpful in extracting the text data from passport documents which can be images, pdf.  So instead of jumping to code directly lets understand the MRZ, & how it works basically. MRZ Parser :                 A machine-readable passport (MRP) is a machine-readable travel document (MRTD) with the data on the identity page encoded in optical character recognition format Most travel passports worldwide are MRPs.  It can have 2 lines or 3 lines of machine-readable data. This method allows to process MRZ written in accordance with ICAO Document 9303 (endorsed by the International Organization for Standardization and the International Electrotechnical Commission as ISO/IEC 7501-1)). Some applications will need to be able to scan such data of someway, so one of the easiest methods is to recognize it from an image file. I 'll show you how to retrieve the MRZ information from a picture of a passport using the PassportE

How to generate class diagrams pictures in a Django/Open-edX project from console

A class diagram in the Unified Modeling Language ( UML ) is a type of static structure diagram that describes the structure of a system by showing the system’s classes, their attributes, operations (or methods), and the relationships among objects. https://github.com/django-extensions/django-extensions Step 1:   Install django extensions Command:  pip install django-extensions Step 2:  Add to installed apps INSTALLED_APPS = ( ... 'django_extensions' , ... ) Step 3:  Install diagrams generators You have to choose between two diagram generators: Graphviz or Dotplus before using the command or you will get: python manage.py graph_models -a -o myapp_models.png Note:  I prefer to use   pydotplus   as it easier to install than Graphviz and its dependencies so we use   pip install pydotplus . Command:  pip install pydotplus Step 4:  Generate diagrams Now we have everything installed and ready to generate diagrams using the comm

How to Remove course from Open-edX

Go to vagrant  => 1. In the edx-platform directory:  - cd /edx/app/edxapp/edx-platform 2. Run the following Django management command:   - sudo -u www-data /edx/bin/python.edxapp /edx/bin/manage.edxapp lms dump_course_ids --settings aws    - sudo -u www-data /edx/bin/python.edxapp /edx/bin/manage.edxapp lms dump_course_ids --settings=devstack 3. Find the course ID which you'd like to delete in the resulting list of course IDs. 4. Copy the course ID into the following command and run it:  - sudo -u www-data /edx/bin/python.edxapp /edx/bin/manage.edxapp cms delete_course <COURSE_ID> --settings aws  -   sudo -u www-data /edx/bin/python.edxapp /edx/bin/manage.edxapp cms delete_course <COURSE_ID> --settings=devstack  - You'll be asked to verify the deletion . To verify the deletion, run the command from step 2 above and ensure that the course ID is not in the list. Help reference : https://openedx.atlassian.net/wiki/spa