Skip to content

Instantly share code, notes, and snippets.

antoviaque@antoviaque-laptop:~/prog/opencraft$ vagrant destroy
default: Are you sure you want to destroy the 'default' VM? [y/N] y
==> default: Destroying VM and associated drives...
antoviaque@antoviaque-laptop:~/prog/opencraft$ vagrant box remove opencraft/xenial64
Removing box 'opencraft/xenial64' (v0) with provider 'virtualbox'...
antoviaque@antoviaque-laptop:~/prog/opencraft$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'opencraft/xenial64' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
antoviaque@antoviaque-laptop:~/prog/edx/devops/deployment-secrets-databases$ ./venv/bin/ansible-playbook deploy/deploy-all.yml --vault-password-file .vault-pass -u ubuntu --extra-vars @private-extra-vars.yml
PLAY [Set up Mysql server] *****************************************************
TASK [setup] *******************************************************************
ok: [167.114.238.51]
TASK [configure-apt : apt-get update && dist-upgrade] **************************
ok: [167.114.238.51]
antoviaque@antoviaque-laptop:~/prog/edx/devops/deployment-secrets-services$ ./venv/bin/pip install -r requirements.txt
Collecting ansible==2.0.1 (from -r requirements.txt (line 1))
Collecting cryptography==1.3.1 (from -r requirements.txt (line 2))
Using cached cryptography-1.3.1.tar.gz
Collecting paramiko (from ansible==2.0.1->-r requirements.txt (line 1))
Using cached paramiko-1.16.0-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): setuptools in ./venv/lib/python2.7/site-packages (from ansible==2.0.1->-r requirements.txt (line 1))
Collecting PyYAML (from ansible==2.0.1->-r requirements.txt (line 1))
Collecting pycrypto>=2.6 (from ansible==2.0.1->-r requirements.txt (line 1))
Using cached pycrypto-2.6.1.tar.gz
18:45:46 worker.7 | 09/Oct/2015 18:45:46 | INFO | process=12256 | huey.consumer.ConsumerThr | Executing <instance.tasks.queuecmd_provision_instance object at 0x2ae660c5fa90>
18:45:46 worker.7 | 09/Oct/2015 18:45:46 | ERROR | process=12256 | huey.consumer.ConsumerThr | Unhandled exception in worker thread
18:45:46 worker.7 | Traceback (most recent call last):
18:45:46 worker.7 | File "/home/opencraft/.virtualenvs/opencraft/lib/python3.4/site-packages/django/db/backends/utils.py", line 64, in execute
18:45:46 worker.7 | return self.cursor.execute(sql, params)
18:45:46 worker.7 | psycopg2.OperationalError: SSL connection has been closed unexpectedly
18:45:46 worker.7 |
18:45:46 worker.7 |
18:45:46 worker.7 | The above exception was the direct cause of the following exception:
18:45:46 worker.7 |
05/Oct/2015 06:42:47 | ERROR | process=20029 | django.request | Internal Server Error: /
Traceback (most recent call last):
File "/home/opencraft/.virtualenvs/opencraft/lib/python3.4/site-packages/django/contrib/sessions/backends/base.py", line 176, in _get_session
return self._session_cache
AttributeError: 'SessionStore' object has no attribute '_session_cache'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/opencraft/.virtualenvs/opencraft/lib/python3.4/site-packages/django/db/backends/base/base.py", line 130, in ensure_connection

HOWTO Setup a sandbox

Provisioning a sandbox

A sandbox will be automatically created when you open a pull request on edx/edx-platform, if you belong to the Owners team on github. You can monitor the progress of the sandbox creation on the OpenCraft instance manager.

Connecting

SSH to the instance, using your github username and the public SSH key from your github account. The keys are automatically refreshed from GitHub on every provisioning run - so if you need to use a different SSH key, update it on your GitHub account and restart the provisioning of your sandbox.

@antoviaque
antoviaque / gist:eb747b8ee63f89b19365
Created September 22, 2015 09:40
Get activation key from a given student
User.objects.get(email='e@mail.com').registration_set.get().activation_key
2015-07-14 09:05:15,166 WARNING 4555 [xblock.plugin] plugin.py:138 - Unable to load XBlock 'group-project-v2-navigator'
Traceback (most recent call last):
File "/edx/app/edxapp/venvs/edxapp/src/xblock/xblock/plugin.py", line 136, in load_classes
yield (class_.name, cls._load_class_entry_point(class_))
File "/edx/app/edxapp/venvs/edxapp/src/xblock/xblock/plugin.py", line 73, in _load_class_entry_point
class_ = entry_point.load()
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/pkg_resources.py", line 2087, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/group_project_v2/__init__.py", line 1, in <module>
from .group_project import GroupProjectXBlock, GroupActivityXBlock
edxapp@edx-master:~/edx-platform/dev/problem-builder$ SERVICE_VARIANT=cms DJANGO_SETTINGS_MODULE="cms.envs.devstack" python -m problem_builder.v1.upgrade "course-v1:HarvardX+HGSE1x+now"
┏━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Mentoring Upgrade Script ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━┛
2015-07-10 10:58:56,085 WARNING 4359 [xblock.plugin] plugin.py:147 - Unable to load XBlock 'openassessment'
Traceback (most recent call last):
File "/edx/app/edxapp/venvs/edxapp/src/xblock/xblock/plugin.py", line 144, in load_classes
yield (class_.name, cls._load_class_entry_point(class_))
File "/edx/app/edxapp/venvs/edxapp/src/xblock/xblock/plugin.py", line 73, in _load_class_entry_point
class_ = entry_point.load()
edxapp@precise64:~/edx-platform$ paver devstack lms
---> pavelib.servers.devstack
---> pavelib.prereqs.install_prereqs
---> pavelib.prereqs.install_ruby_prereqs
Ruby prereqs unchanged, skipping...
---> pavelib.prereqs.install_node_prereqs
test `npm config get registry` = "http://registry.npmjs.org/" || (echo setting registry; npm config set registry http://registry.npmjs.org/)
npm install
npm WARN package.json edx@0.1.0 No repository field.
npm WARN package.json coffee-script@1.6.1 bugs['name'] should probably be bugs['url'].