Archive for the ‘Chamilo’ Category

Chamilo, une solution libre de gestion complète de cours à distance

November 26, 2014 Comments off


Date et heure : Mercredi 10 décembre 2014 de 19h à 22h

Lieu : École supérieure d’informatique (ESI) , 67 rue Royale à 1000 Bruxelles

Organisateurs : ESI et BxLuG et

L’orateur, Yannick Warnier, développeur principal de Chamilo, développera la création d’un cours et le suivi des progrès de l’étudiant, mais aussi comment développer des activités commerciales avec Chamilo comme la vente de cours, et il précisera comment il peut vivre de la vente de service autour du développement de logiciel libre.

Entrée Libre et sans inscription (50 places)

Categories: Chamilo, Events, French, Language Tags: ,

Tricks to debug Captivate SCORM 1.2 content

November 26, 2014 Leave a comment

If you have to make Captivate-generated SCORM 1.2 content in your (web) platform and you want *more* information about what’s going on, this guide might help.

One of the trickiest things about Captivate and SCORM is that Captivate doesn’t handle the credit/no-credit ( very well. This parameter, in combination with cmi.core.lesson_mode should let you retake exercises that you have already completed and passed.

In Chamilo, if you want to debug the SCORM interactions on the Chamilo side, use Firefox, login as admin, go to the learning paths list and click the ladybug icon in the action icons next to the learning path you want to debug. This will only affect you, so no worries about doing that in production.

ladybug debug iconThen enter the learning path itselt (simply click its name). Once you’re seeing the content, launch the Firefox debugger with SHIFT+F2 and go to the “Console” tab. Click on any item in the table of contents, and you should see the SCORM and LMS interactions pooring in. Something like the screenshot below.

Chamilo SCORM general debug screen

Chamilo SCORM general debug screen

This is already very nice to understand the interaction going on, and when Chamilo will save the information in its database, but it still lacks the possibility to understand what’s going on, on the Captivate side of things.

Captivate itself has debug features though, but they’re not prepared for just any tool. Luckily, we can tap into them with a moderate level of complexity.

First, you need to know where the Captivate content is on disk in your LMS. In Chamilo, this is typically in the {root-folder}/courses/{course-code}/scorm/{scorm-name}/{scorm-name}. For Captivate content, Chamilo usually generates its own folder, then Captivate, which means you have it duplicated.

You’ll have to get into that folder and, for each SCO (item in the table of content in the screen above), locate the scormdriver.js file.

Around line 1032 of scormdriver.js, you’ll find something like this:

function WriteToDebug(strInfo){if(blnDebug){var dtm=new Date();var strLine;strLine=aryDebug.length+”:”+dtm.toString()+” – “+strInfo;aryDebug[aryDebug.length]=strLine;if(winDebug&&!winDebug.closed){winDebug.document.write(strLine+”<br>\n”);}}

We’ll hack into that and just replace it straight away (keep a backup copy if you’re afraid) by the following line:

function WriteToDebug(strInfo){var dtm=new Date();var strLine;strLine=aryDebug.length+”:”+dtm.toString()+” – “+strInfo;aryDebug[aryDebug.length]=strLine; console.log(strLine); return;}

This will simply:

  • force the debug to be active (we don’t check blnDebug anymore, we assume it’s on!)
  • redirect the debug messages from this weird winDebug.document to the officially-supported-in-all-reasonnable-browsers “console.log”, which prints the log in the browser console, as illustrated above

Now, to get this to work, you need to clean the cache in your browser. My favorite way of doing this in Chamilo is to press CTRL+F5, then go *back* to the learning paths list, enter *another* learning path, then enter the hacked learning path again. Captivate debug information should start showing in your browser’s console:

Captivate logs in browser console

Captivate logs in browser console

Now you can analyze all the information flow.

That’s all, folks!

On the Criticality of Learning Management System

October 29, 2014 Leave a comment

I’m often surprised at the little importance large education institutions put on their Learning Management Systems (LMS). Many times, after years of starting a modest pilot and slowly convincing all the people involved, institutions find themselves in a situation in which students (and sometimes teachers, but rarely the institution itself) drive the development of the LMS by demanding for changes.

Students, of course, see it as a way to get better, more ubiquitous access to their course material, to practice more without the need of the teacher, to get feedback faster, etc. Sometimes students feel more confident facing a computer than they would do in class.
Anyway, expectations increase and the institution has to follow or, sometimes, lead this evolution.

However, where the “mild” integration might have been slow in classical educational institutions, there is one crucial step where institutions *have* to make sure everything goes right: the move to a critical LMS integration as fast as their end-users require it.

A critical LMS is a service (not only the software, but also the team around it) on which you can rely to launch and follow training/teaching activities that are critical to your organization.

Obviously, teaching is critical for an educational institution, but it is not critical in the LMS sense if the LMS acts as an *extension* of the classroom courses.

It becomes critical when:

  • students can access to the course *only* through the LMS
  • the LMS serves to generate the students’ grades
  • the LMS is used to generate reports on the activity of teachers or students
  • it is expected to be online permanently, without interruptions of more than half an hour every week or so

If you compare it to other systems deemed “critical” by the IT department in an education institution, you should get this kind of table:

System Must be up all time? Critical information? Must sustain high load?
ERP Not really Yes No
Website Yes No Not really
Library system Not really Not really Not really
LMS Yes Yes Yes

I’m sure some of these criteria can be discussed in specific situations, but when the LMS is used for the cases above (which is usually the case for any serious implementation), it *does* match all these criteria at the same time.

In each and everyone of these cases, it is necessary to be able to rely on a skilled team of specialists, that will be able to assess, intervene and report on any case that might cause some level of inconvenience to the students.

What this means is that a multi-dsiciplinary team of specialists will have to get involved in your project, and give you the power to do what you want and need. Building the team takes time, building and maintaining a high level of skills takes time, getting involved in a project takes time, and providing you with the best possible solution takes time, dedication and vision.

Many times, as the company behind the development of Chamilo LMS as a free software (we have high goals in terms of social responsability), we face this misunderstanding in the first step of our interaction with new customers.

The LMS is not *valued* by the IT department as it really should, and even less when it is based on free software. But software is just software, and although Chamilo LMS is in the top 3 best open source e-learning paltforms around, you can’t hope for a lot if your team doesn’t know how to manage it. And it’s not just a technical issue: dealing with online courses involve a combination of skills that you will need to have if you don’t have the right team to help you out:

  • planning the tools you will use for interaction (videoconference, chat, forum, etc)
  • knowing the limits of your students’ available technology (screen resolution, plugins, apps, etc)
  • being able to design lightweight courses (bandwidth)
  • knowing your students’ behaviour
  • being able to plan (and take action) for a load increase on a server, ahead of a high-attendance online event
  • being able to pinpoint reporting data to improve education methods
  • and much more…

Understanding all this, if the budget for your institutions’ online education project is a 10th of its ERP’s system, it’s probably not going in the right direction, for its first step.

Only once the institution has understood the criticality of their LMS and how it will affect their institution’s image and efficiency, the project can start in the right environment.

Learning Management Systems are critical, not only for educational institutions. They represent a very unique tool that is both desired and required to improve the efficiency of teaching, learning and managing skills. Don’t let it fail. Make sure everybody understands what a LMS is and how useful it will be, and your organization will thrive into the 21st century!

Chamilo LMS

Chamilo LMS is a web-based learning management system focused on usability. It is developed and published under the GNU/GPLv3 license, which allows anyone to use, analyse, modify and distribute copies and modified copies of the software. In its first 4 years of existence, Chamilo LMS has been granted several software prizes and has grown from a community of 10 developers to a community of 9 million users worldwide.

Chamilo allows you to create courses, manage administrators, teachers, students and other typical roles for organizations or departments focused on training. It is suitable for academical, corporate, associative and personal environments.

The BeezNest group

BeezNest is the company behind most of the developments in Chamilo LMS. It specializes in analysis, development and support of e-learning projects in about 40 countries, with offices and collaborators in Belgium, France, Spain, Germany, the UK, Peru and Mexico. Projects managed by BeezNest deal with portals from 100 to 680,000 students, worldwide. It deals with every aspect of e-learning projects, from analysis, to hosting, platform developments, training, online courses building, to data analysis. All you need but marketing (which it prefers leaving to its customers).

Contact BeezNest at

La seguridad de los LMS

September 28, 2014 1 comment

La seguridad de los sistemas de gestión del aprendizaje (LMS) o de cursos virtuales, especialmente en el ámbito corporativo, es un tema crítico. De la misma manera que los documentos relativos a proyectos internos que representan una ventaja competitiva frente a sus competidores, el contenido de los cursos de capacitación de las empresas no pueden caer “en manos del enemigo”, y esto requiere de una protección adecuada de su plataforma e-learning.

Aspectos de la seguridad informática

Para entender los riesgos, es importante estructurarlos. La seguridad informática se puede dividir en 6 aspectos, que ilustramos y explicamos a continuación, en el contexto de una plataforma corporativa de aprendizaje.

Integridad / Validez

Imagínese que un curso esencial para todos los nuevos empleados esté sutilmente modificado. Por ejemplo que, en un curso de inducción que enseña los teléfonos de contacto de la mesa de ayuda técnica, estos números estén cambiados por números externos a la empresa. Imaginen el resultado al primer problema de credenciales para ingresar al sistema. Los nuevos empleados, en toda confianza, llamarán a los números indicados, posiblemente divulgando sus códigos de acceso a personas ajenas a la empresa.

La información contenida en sus cursos debe ser cuidada de tal manera que solo las personas autorizadas puedan modificar el contenido principal, de tal manera que la información no pueda ser alterada a fines destructivos.

Integridad / Persistencia

Que pasará si el servidor se quema, o si un pirata llega a borrar información de los cursos o de los alumnos?

La información tiene que resistir un posible ataque con objetivos de destrucción. Por eso, es imprescindible contar con una buena estrategia de backup, que permita recuperar información completa o parcial de días anteriores.

Visibilidad / Autorización

Que pasará si una persona inscrita en un curso de marketing se ve inscrita por error en un curso de seguridad informática, en el cual tendrá acceso a información de caracter confidencial, o a un curso de gestión en el cual tendrá acceso a información reservada a la gerencia? Que pasará si la difunde a los empleados de otros rubros de la empresa?

La información de los cursos tiene que ser visible solo para las personas que tengan una razón profesional por acceder a ella. El control de dichos permisos es esencial para evitar la difusión de secretos comerciales u otros problemas relacionados con estrategias confidenciales.

Accesos / Autenticación

Que pasará si una persona ajena a la empresa tiene acceso a la plataforma a través de la cuenta de un empleado, y navega entre los proyectos de investigación, y se hace pasar por un miembro del grupo?

Es imprescindible que uno pueda asegurar que las personas que acceden a la plataforma son quienes pretenden ser.

Disponibilidad / Resistencia

Que pasará si todo el sistema se cae como consecuencia de un ataque de piratas? Y si por alguna razón las protecciones simples se ven deshabilitadas por un momento?

Uno de los aspectos de seguridad poco considerados es la disponibilidad, o la resistencia a ataques del sistema LMS. Si bien es cierto que la indisponibilidad del sistema LMS raramente provoca problemas de seguridad en sí, es importante entender que, durante un ataque de fuerza bruta (cientos de computadoras generando consultas indebidas al sistema LMS), un sistema indisponible es más vulnerable a ataques de otros tipos (robo o destrucción de información). Es por ello que es importante asegurar que su sistema esté preparado, con las adecuadas medidas de prevención a nivel de red, de configuración del servidor y del aplicativo mismo, para que los posibles ataques sean prevenidos o mitigados.


Que pasará si una nueva falla se descubre en el sistema usado, y no existe el equipo especializado dentro de la organización para cubrir la brecha?

Cualquier sistema informático requiere de actualizaciones ocasionales para cubrir nuevas técnicas de hackeo. Si el personal interno de la empresa no tiene las competencias requeridas, será imprescindible contar con un servicio externo confiable para mantener el sistema en su mejor estado en términos de seguridad.


Chamilo LMS cuenta con mecanismos avanzados para mejorar la seguridad de su plataforma.

Información a los usuarios (autenticación)

Para una seguridad de alto nivel, es importante que todos los involucrados estén al tanto de los aspectos de la seguridad en los cuales tienen un rol activo. Las distintas herramientas de comunicación hacia los usuarios (anuncios globales y a nivel de curso, términos y condiciones a nivel global y de curso así como otros mecanismos) permiten una comunicación fluida que aumenta la participación de los usuarios en el asunto de la seguridad y transforma agentes peligrosos en agentes de seguridad que aumentarán el nivel general de confianza de la solución.

Isolación de permisos (validez)

En Chamilo, los usuarios tienen acceso a contenidos dentro de cursos, según su rol en el curso. Tutores de cursos pueden visualizar y modificar la visibilidad de los contenidos, pero no pueden editarlos. Finalmente, los alumnos pueden visualizar pero no editar el material. Una división clara por roles (sin posibilidad de definición granular) reduce los errores de configuración y de privilegios.

Nivel de complejidad de contraseñas (accesos)

En Chamilo LMS 1.9.8, encontrará un mecanismo para dar una evaluación al usuario del nivel de complejidad de su contraseña, de tal manera que piensa 2 veces antes de usar una de las 20 contraseñas más frecuentes en internet (empezando por 1234567).

CAPTCHA (accesos)

En Chamilo LMS 1.9.8, puede activar la opción de CAPTCHA, que evitará que piratas lleguen a usurpar la identidad de otros usuarios por ataques de tipo diccionario.

Actualizaciones de seguridad (mantenimiento)

Chamilo cuenta con un record de correcciones rápidas y eficientes. En varios años de historia del proyecto, no ha pasado más de 72h entre el descubrimiento de un error de seguridad y su corrección.

Mecanismos de autenticación (accesos)

Chamilo cuenta con mecanismos de autenticación seguros como OpenID, Facebook login y mecanismos extensibles (y otros no tan seguros) como LDAP, Shibboleth y CAS. Además, contando con un certificado SSL, se puede vincular de manera segura con Drupal y PrestaShop.

Cifrado de contraseñas (autenticación)

Chamilo LMS ofrece 3 tipos de cifrado de contraseñas, de los cuales SHA1 es el valor por defecto. De esta manera, un pirata robando la base de datos de usuarios no podrá (de una manera fácil) decifrar las contraseñas para usurpar la identidad de los usuarios.

Borrado de datos (persistencia)

Chamilo LMS no borra de inmediato los archivos eliminados. En su vez, los guarda (opción activada por defecto) con un nombre distinto en el disco, hasta que un proceso automatizado los borre unos días más tarde.

Acceso por curso (autorización)

El sistema ofrece funcionalidades de asignación de alumnos por cursos y de definición de clases (grupos de alumnos), de tal manera que los errores a nivel de administración se reduzcan notablemente. La limitación del acceso por periodos gracias a la noción de “sesiones” (ciclos) permite limitar los accesos en el tiempo, evitando que ex-empleados sigan teniendo acceso a contenidos confidenciales.

Alta disponibilidad (disponibilidad)

Aunque el sistema Chamilo mismo no cubra este requerimiento, los proveedores oficiales de Chamilo (como BeezNest) brindan servicios profesionales de configuración en clusters de alta disponibilidad y redimensionables, protegidos por firewalls y mecanismos de protección anti-DOS y DDOS.

Comunicación protegida (autenticación)

BeezNest ofrece, como parte de su servicio, la compra y configuración de certificados SSL para una comunicación segura (cifrada) entre los usuarios y el servidor. Así, no será posible para un posible espía capturar comunicaciones (y por ende nombres de usuarios, contraseñas, y otras informaciones confidenciales).

Además, mecanismos avanzados permiten el envío de mensajes como los credenciales de acceso por SMS o por correo cifrado por GPG o PGP.

Actualizaciones de seguridad (mantenimiento)

BeezNest se encarga de clientes en todo el mundo, y mantiene sus portales actualizados de tal manera que no tengan que lidiar con problemas de seguridad después de que ocurran (lo cual resultaría mucho más costoso). Además, BeezNest se asegura que los parches de seguridad sean publicados en las 72h luego de su registro oficial para así mantener la web siempre segura.


Esperamos este artículo le haya ayudado en entender los aspectos que merecen un cuidado especial en términos de seguridad para su plataforma e-learning.

BeezNest también cubre requerimientos especiales (conexión a nuevos sistemas, auditorías de seguridad de sistemas existentes, reconfiguración de servidores, etc).

En resumen, BeezNest se hace cargo de todas estas preguntas de seguridad para sus clientes, para que puedan tener tranquilidad y preocuparse exclusivamente de los aspectos de gestión del aprendizaje.

Si desea mayor información sobre los servicios de BeezNest, vea nuestra información de contacto en

Si desea probar Chamilo, inicie una prueba de 15 días gratis de su propio portal Chamilo.


Este artículo se inspiró inicialmente de un artículo en inglés sobre la seguridad de LMSes, pero lo extiende mucho y aplica estos conceptos a Chamilo LMS (desarrollado mayormente por BeezNest), la solución de e-learning de software libre más segura en existencia en este momento.

Crowdin terms review for Chamilo LMS translations

As we migrate to gettext for Chamilo LMS v10, we are also looking for a platform to host our translation system (considering our current translation system does not support gettext).

We will migrate most existing translations, but we were looking for the right platform to manage the translations as a community. One tool that attracted our attention was Pootle, a Python-based open source translation system that seems to be lead by the right, passionate people.

In this first phase though, we really need to avoid being distracted by other things than the development of the core code of Chamilo LMS v10. This is why we looked for a hosted solution, with an existing community, preferrably with special plans for open source projects (like Github has).

So we found, with apparently all the features we will need at first. We also looked at terms and conditions and privacy terms. Terms and conditions indicate that all content translated remain the property of the user, which is good, but we will have to manage some kind of agreement with all translators that their translation work will be considered Creative Commons BY-SA. Finally, privacy terms are pretty reasonnable and respectful of our privacy, but they *do* indicate that can send promotional e-mails about its services to all members, which means that translators will get a (hopefully reasonnable) amount of spam (I call it spam anyway), but that’s limited to services only. This being said, we will try it as a reduced core of developers for a while and see if the mails flow is reasonnable before we generalize its use.

So if you want to try it, you should be able to take a look within a few days from now on

Howto connect OpenMeetings 2 or 3 with Chamilo LMS 1.9.8

July 1, 2014 1 comment

Chamilo LMS 1.9.8 comes with an OpenMeetings plugin. This means that you can organize OpenMeetings videoconference rooms directly from your Chamilo courses.

Now this setup requires a few essential things. The 2 most important are: a working installation of Chamilo (referenced as [C] below) and a working installation of OpenMeetings (referenced as [OM] below), then you need to have:

  • [CH] php5-curl extension installed and running
  • [OM] a user with web services privileges
  • [CH] to configure host, user and password (or salt) inside the “plugins” section, button “Configure” of the OpenMeetings plugin

This is pretty much it, but if you are missing one of these, that won’t work!

Using Chamilo juju charm to setup a dev environment on Digital Ocean

June 23, 2014 8 comments

If you’re in a hurry/on speed, know this:

  • this procedure is slightly more difficult (so longer) than installing the charm on Amazon
  • you can skip directly to “Installing Juju”
  • if you already have juju installed, you can skip to the last 2 lines of the “Installing juju” section
  • if you already have juju-docean installed and configured, you can skip directly to “Provisioning VMs”
  • otherwise, just continue reading, it’s worth a few minutes…

This tutorial regroups a lot of advanced notions, so if you want to know more about one of the following elements, please follow these links:

Before anything else, please note that the following is highly experimental. There are still a series of issues that should be worked out in order to make this process failproof.

Basic setup

Before we start using commands and stuff, you’ll have to note the following:

  • We are using a Chamilo Charm developed by José Antonio Rey (kudos to him) as a voluntary contribution to the project
  • Charms are configurations to install applications (and stuff) inside the Juju framework
  • The Juju framework is developed by the Ubuntu team, so we’re using an Ubuntu (14.04) desktop (or in this case laptop) to launch all the following
  • Digital Ocean is one cloud hosting provider, which is particularly cheap and good for development purposes. The “default” environment for Juju is Amazon, so we’ll have a few additional steps because of this choice. The Digital Ocean plugin to Juju is developed by geekmush on Github, and as far as I know he is not related to either Ubuntu nor Digital Ocean, so he is also worth praising for his contribution
  • Chamilo requires a web server and a database server. In this Charm, it is assumed that we want both of these on separate virtual machines, so you will need two of them (unless you change the parameters a little)
  • Juju is written in Go but relies on several Python libraries. As such, you’ll have to have python installed on your system and maybe Juju will shout because it is missing a few dependencies. Notably, I installed python3-yaml to avoid a few warnings (it is required for the following, although the installer for Juju says it’s optional)

Installing Juju

On a default Ubuntu desktop installation, you’ll have to install Juju first. Because we are going to use Juju connected to Digital Ocean, we need a recent version of Juju, so let’s add it the unconventional way (with the ppa), launching the following on the command line:

sudo add-apt-repository ppa:juju/devel
sudo apt-get update && apt-get install juju
juju version

For some reason, in my case, this created my home directory’s .juju/ folder with root permissions, which then prevented me to reconfigure my environment (requirement for the Digital Ocean Juju plugin), so I changed permissions (my user is “ywarnier”, so change that to your user):

sudo chown -R ywarnier:ywarnier .juju

Then we need to install the juju-docean plugin:

sudo apt-get install python3-yaml
sudo pip install -U juju-docean

Setting up Digital Ocean access

Now we need to configure our Digital Ocean (D.O.) API so the system will be able to call D.O. in our place and create instances (and stuff).

You first need to grab your API key, client ID and SSH key ID from the Digital Ocean interface. You can do that from the Digital Ocean API page. Obviously, you need a Digital Ocean account to do this and a few bucks of credit (although you can get $10 free credit from several places). If your API key says “Hidden”, that’s because you must have it stored somewhere already (for other services?). If you don’t, you’ll have to re-generate one. Your SSH key ID is the name you gave to the SSH key you use from your computer to connect to your new instances. If you don’t have it, that’s probably because you haven’t configured any. Please do in the “SSH Keys” menu item on the left side of your D.O. panel.

 export DO_CLIENT_ID=aseriesof21alphanumericalcharacters
 export DO_SSH_KEY="user@computer"
 export DO_API_KEY=aseriesof32characters

Setting up the Digital Ocean Juju environment

Now we need a bit of manual config to be able to use Digital Ocean (last bit, promised). Edit the ~/.juju/environments.yaml file and paste the following:

 type: manual
 bootstrap-host: null
 bootstrap-user: root

Just a note: the “type: manual” line implies it is a bit more complicated than on amazon later on, and we will have to launch a few more commands to provision new machines *before* we deploy Chamilo.

Generating the Juju environment

Now we’re going to create our Juju controller. The Juju controller can be an independent Virtual Machine (VM), or it can be the same as the one on which you will deploy Chamilo. It all depends on your budget and your requirements.

juju docean bootstrap --constraints="mem=1g, region=nyc1"
  2014/06/22 11:50.24:INFO Launching bootstrap host
  2014/06/22 11:51.29:INFO Bootstrapping environmen

Note that we took a decision to use a 1GB (RAM) VM here (mem=1g), in a datacenter in New York (region=nyc1). For the record, I tried creating them in nyc2, which is also a valid D.O. datacenter, but it failed miserably (sometimes not creating the VM, sometimes creating it without IP, sometimes creating it fully, but in the end never returning with a proper success response for my environment to be created), so sticking to nyc1 is probably a reasonable time-saver.

Provisioning VMs

To be able to deploy Chamilo, we’ll use two VMs: one for the web server and one for the database

juju docean add-machine -n 2 --constraints="mem=1g, region=nyc1"
2014/06/22 12:44.59:INFO Launching 2 instances
2014/06/22 12:46.42:INFO Registered id:1908893 name:digitalocean-8d14c9bc671555ff872d8d6731f84d68 ip: as juju machine
2014/06/22 12:49.08:INFO Registered id:1908894 name:digitalocean-a9ba29cfe55549f58e5f7e365199c5ed ip: as juju machine

Now, the “-n 2″ above allows you to create these 2 instances, but you could also launch 2 different instances of different properties, doing it one by one. In our case, I suggest you use version Trusty of Ubuntu for the MySQL machine, to avoid a little bug in the Precise version of the charm:

juju docean add-machine --constraints="mem=2g, region=nyc1"
juju docean add-machine --series=trusty --constraints="mem=1g, region=nyc1"

The important thing here being that you can later identify the machine itself by a simple ID, using juju status:

juju status
environment: digitalocean
  agent-state: started
  agent-version: 1.19.3
  instance-id: 'manual:'
  series: precise
  hardware: arch=amd64 cpu-cores=1 mem=994M
  state-server-member-status: has-vote
  agent-state: started
  agent-version: 1.19.3
  instance-id: manual:
  series: precise
  hardware: arch=amd64 cpu-cores=1 mem=994M
  agent-state: started
  agent-version: 1.19.3
  instance-id: manual:
  series: trusty
  hardware: arch=amd64 cpu-cores=1 mem=994M

If you made a mistake at some point or just wanna try things out, you can destroy these instances with

juju docean terminate-machine 1

where “1” is the ID of the machine, as shown above before each of them.

Deploying Chamilo

Now we’ve got our machines, we just need to deploy the Chamilo Charm and the MySQL Charm (you need MySQL to run Chamilo):

juju deploy cs:~jose/chamilo --to 1
juju deploy mysql --to 2

Please note that the “–to n” option is to specify on which machine you want to deploy the selected service.

Now, we need to configure Chamilo a little. We’re going to give it a domain name (you’ll have to redirect this domain name to the IP of the first machine – the one with the Chamilo service – in order to use it when ready) and a password for the “admin” user (the user created by default):

juju set chamilo pass=blabla

Now we still need to tell Juju to link the Chamilo service with the MySQL service:

juju add-relation chamilo mysql

And finally, apply all the above and expose the chamilo service to the public:

juju expose chamilo

If something goes wrong with a service, you can always remove it with:

juju destroy-service chamilo

You can replace “chamilo” by the service with which you are having the issue, of course. If that doesn’t work out, you can always remove (terminate) the machine itself (see above).

Useful tricks

You can connect at any time to any of your virtual machines through the command

juju ssh chamilo/0

where “chamilo/0″ is the name appearing below “units” in your services.

You can check the status of all your instances with

juju status

Note that, sometimes, you might end up with dozens or hundreds of instances. In this case, it won’t be as practical to show the status of all instances (I have no solution for that now, but I’m sure there is a way to filter the results of a juju status).

You can launch a command on the virtual machines’ command line like this:

juju run --service chamilo "tail /var/log/juju/unit-chamilo-0.log"

This way, you are actually executing the command remotely and getting the results locally.

You can also see the error log locally, connecting in SSH (first) and then launching:

 tail /var/log/juju/unit-chamilo-0.log

Obviously, that gives you a little more flexibility.

Notes about unexpected errors

One of the “silent” things is that Juju considers the default machine to be Ubuntu Precise. In the case of MySQL, the default Charm is configured for Trusty. This means that if you want to install this package, you need to install a virtual machine in Trusty. Otherwise, you might get some other issues. In my case, the Precise Charm didn’t really work (missing yaml), so I decided to go for Trusty.

You can choose the distribution of your machine with –series=trusty, for example:

juju docean add-machine --series=trusty --constraints="mem=2g, region=nyc1"

We tested the chamilo charm relatively extensively.

Unmounting the whole thing

If this was just a test, and you’re happy, maybe you want to remove everything. If so, the quickest way to do that is to launch a destroy-environment command, but you will first need to destroy each machine and, before that, each services that :

juju destroy service chamilo mysql
juju destroy machine 1 2
juju destroy-environment digitalocean

This should reasonnably quickly remove the whole setup.

You should still check your Digital Ocean’s dashboard, though, as apparently it doesn’t always delete the nodes you created with Juju…

Quick commands list for the impatient

Assuming you’re running Ubuntu 14.04 and that you know which values to change in the commands below:

sudo add-apt-repository ppa:juju/devel
sudo apt-get update && apt-get install juju
sudo chmod -R 0700 .juju
sudo apt-get install python3-yaml
sudo pip install -U juju-docean
export DO_CLIENT_ID=aseriesof21alphanumericalcharacters 
export DO_SSH_KEY="user@computer" 
export DO_API_KEY=aseriesof32characters
juju docean bootstrap --constraints="mem=1g, region=nyc1"
juju docean add-machine --constraints="mem=2g, region=nyc1"
juju docean add-machine --series=trusty --constraints="mem=1g, region=nyc1"
juju deploy cs:~jose/chamilo --to 1
juju deploy mysql --to 2
juju set chamilo pass=blabla
juju add-relation chamilo mysql
juju expose chamilo

And connect your browser to (that you must have redirected to the corresponding IP first) and login with admin/blabla.


Get every new post delivered to your Inbox.

Join 74 other followers

%d bloggers like this: