Add Cloud9 quickstart script and docs

This commit is contained in:
Josh Mize 2014-07-24 13:22:16 +00:00
Родитель 9e632deed8
Коммит bc76bafe5a
9 изменённых файлов: 81 добавлений и 40 удалений

1
.gitignore поставляемый
Просмотреть файл

@ -3,6 +3,7 @@ settings/local.py
*/settings/local.py
*.py[co]
*.sw[po]
.c9
.coverage
.jshintrc
pip-log.txt

Просмотреть файл

@ -9,6 +9,8 @@ from .base import * # noqa
if os.getenv('JENKINS_HOME', False):
from .jenkins import * # noqa
else:
if os.getenv('C9_USER'):
from .c9 import * # noqa
try:
from .local import * # noqa
except ImportError as exc:

10
bedrock/settings/c9.py Normal file
Просмотреть файл

@ -0,0 +1,10 @@
import os
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'c9',
'USER': os.getenv('C9_USER'),
'HOST': os.getenv('IP'),
}
}

19
bin/install-c9 Executable file
Просмотреть файл

@ -0,0 +1,19 @@
#!/bin/bash
git submodule update --init --recursive
sudo apt-get update
sudo apt-get install -y libmysqlclient-dev libxml2-dev libxslt1-dev python-dev
sudo pip install -r requirements/dev.txt
sudo pip uninstall -y django # included as submodule, we do not want the one installed by django-nose requirements
sudo pip install ipython # highly recommended, but not required so not in requirements/dev.txt
# default npm install -g destination in c9 is in /home/ubuntu/.nvm/v0.10.28/
npm install -g less
npm install -g grunt-cli
npm install -g jshint
npm install
cp bedrock/settings/local.py-dist bedrock/settings/local.py
./manage.py update_product_details
./manage.py update_externalfiles
mysql-ctl start
./manage.py syncdb --migrate --noinput
./manage.py rnasync
svn checkout https://svn.mozilla.org/projects/mozilla.com/trunk/locales/ locale

4
bin/runserver-c9 Executable file
Просмотреть файл

@ -0,0 +1,4 @@
#!/bin/bash
cd /home/ubuntu/workspace
echo Public URL: http://$C9_HOSTNAME
./manage.py runserver $C9_IP:$C9_PORT

Просмотреть файл

@ -23,6 +23,7 @@ Contents
.. toctree::
:maxdepth: 2
quickstart
install
vagrant
php

43
docs/quickstart.rst Normal file
Просмотреть файл

@ -0,0 +1,43 @@
.. This Source Code Form is subject to the terms of the Mozilla Public
.. License, v. 2.0. If a copy of the MPL was not distributed with this
.. file, You can obtain one at http://mozilla.org/MPL/2.0/.
.. _install:
==================
Quickstart
==================
You can develop and test bedrock without installing anything locally by using
Cloud9_, which provides a complete development environment via your browser,
including unlimited free public workspaces [#]_, which is great for open source
projects. Each workspace includes root_ access to an Ubuntu_ Docker_ container,
which you can install bedrock and all its depdencies into with the following
steps:
1. Fork `bedrock <https://github.com/mozilla/bedrock/>`_ on github
2. Sign up or sign in to Cloud9_ with your github account [#]_
3. Create a new workspace from your fork using the "Clone from URL"
option with a URL in the format ``git@github.com:mozilla/bedrock.git`` but
with your username instead of ``mozilla``
4. Once your workspace is ready, click the "Start Editing" button
5. In the bash shell, run the command ``bin/install-c9``
Once the ``install-c9`` script completes, you can use the ``bin/runserver-c9``
script to launch the django development server, which will be accessible on a
public URL similar to ``http://bedrock-c9-username.c9.io``
.. _Cloud9: https://c9.io
.. _root: https://help.ubuntu.com/community/RootSudo
.. _Ubuntu: http://www.ubuntu.com/
.. _Docker: https://www.docker.com/
.. [#] Public means everything in the workspace is world readable; you can also
grant write access to specific cloud9 users and collaboratively edit code
in your workspace in real time.
.. [#] Github account integration is optional; if you do not wish to give cloud9
access to push to any repo your github account has access, you may wish
to use a `deploy key
<https://developer.github.com/guides/managing-deploy-keys/#deploy-keys>`_
or a `machine user account
<https://developer.github.com/guides/managing-deploy-keys/#machine-users>`_.

Просмотреть файл

@ -1,8 +1,4 @@
# This file pulls in everything a developer needs. If it's a basic package
# needed to run the site, it belongs in requirements/prod.txt. If it's a
# package for developers (testing, docs, etc.), it goes in this file.
-r prod.txt
-r compiled.txt
# Documentation
Sphinx==1.0.7

Просмотреть файл

@ -1,35 +0,0 @@
# Django 1.4.8 is also in vendor, but needs to be kept here so packages that
# depend on Django do not install a newer version
Django==1.4.8
# Templates
-e git://github.com/jbalogh/jingo.git#egg=jingo
-e git://github.com/jsocol/jingo-minify.git#egg=jingo-minify
GitPython==0.1.7
# Various tidbits
-e git://github.com/jsocol/commonware.git#egg=commonware
-e git://github.com/mozilla/nuggets.git#egg=nuggets
-e git://github.com/kurtmckee/feedparser#egg=feedparser
-e git://github.com/waylan/Python-Markdown.git#egg=Python-Markdown
-e git://github.com/aleray/mdx_outline.git#egg=mdx_outline
beautifulsoup4
# Security
-e git://github.com/fwenzel/django-sha2.git#egg=django-sha2
# Celery: Message queue
celery
django-celery
# L10n
Babel>=0.9.4
-e git://github.com/clouserw/tower.git#egg=tower
-e git://github.com/fwenzel/django-mozilla-product-details#egg=django-mozilla-product-details
python-memcached==1.53
django-statsd-mozilla==0.3.5
# Publishing system
git+git://github.com/mozilla/rna.git@39e9260428560a677f59db8d12dde8073f7fe7a9