Removed non-pip dependencies

This commit is contained in:
glic3 2015-05-04 16:46:03 +02:00
parent 0aef0443d4
commit 17ae319615
7 changed files with 102 additions and 51 deletions

View File

@ -32,8 +32,6 @@ Django-orchestra can be installed on any Linux system, however it is **strongly
cd ~orchestra
orchestra-admin startproject <project_name> # e.g. panel
cd <project_name>
sudo touch /var/log/orchestra.log
sudo chown orchestra /var/log/orchestra.log
```
5. Create and configure a Postgres database

46
INSTALLDEV.md Normal file
View File

@ -0,0 +1,46 @@
Development and Testing Setup
-----------------------------
If you are planing to do some development you may want to consider doing it under the following setup
1. Create a basic [LXC](http://linuxcontainers.org/) container, start it and get inside.
```bash
wget -O /tmp/create.sh \
https://raw.github.com/glic3rinu/django-orchestra/master/scripts/container/create.sh
sudo bash /tmp/create.sh
sudo lxc-start -n orchestra
# root/root
```
2. Deploy Django-orchestra development environment **inside the container**
```bash
# Make sure your container is connected to the Internet
# Probably you will have to configure the NAT first:
# sudo iptables -t nat -A POSTROUTING -s `container_ip` -j MASQUERADE
wget -O /tmp/deploy.sh \
https://raw.github.com/glic3rinu/django-orchestra/master/scripts/container/deploy.sh
cd /tmp/ # Moving away from /root before running deploy.sh
bash /tmp/deploy.sh
```
Django-orchestra source code should be now under `~orchestra/django-orchestra` and an Orchestra instance called _panel_ under `~orchestra/panel`
3. Nginx should be serving on port 80, but Django's development server can be used as well:
```bash
su - orchestra
cd panel
python manage.py runserver 0.0.0.0:8888
```
4. A convenient practice can be mounting `~orchestra` on your host machine so you can code with your favourite IDE, sshfs can be used for that
```bash
# On your host
mkdir ~<user>/orchestra
sshfs orchestra@<container-ip>: ~<user>/orchestra
```
5. To upgrade to current master just re-run the deploy script
```bash
sudo ~orchestra/django-orchestra/scripts/container/deploy.sh
```

View File

@ -31,7 +31,8 @@ However, Orchestra also provides glue, tools and patterns that you may find very
Fast Deployment Setup
---------------------
To only run the web interface follow these steps:
This deployment is not suitable for production but more than enough for checking out this project.
Notice that it does not require external dependencies.
```bash
# Create and activate a Python virtualenv
@ -42,7 +43,8 @@ source env-django-orchestra/bin/activate
pip3 install django-orchestra==dev \
--allow-external django-orchestra \
--allow-unverified django-orchestra
sudo apt-get install python3.4-dev libxml2-dev libxslt1-dev libcrack2-dev
# The only non-pip required dependency is python3-dev:
# sudo apt-get install python3.4-dev
pip3 install -r \
https://raw.githubusercontent.com/glic3rinu/django-orchestra/master/requirements.txt
@ -51,55 +53,15 @@ orchestra-admin startproject panel
python3 panel/manage.py migrate accounts
python3 panel/manage.py migrate
python3 panel/manage.py runserver
# Enable periodic tasks with cron (optional)
python3 panel/manage.py setupcronbeat
```
None of the services will work but you can see the web interface on http://localhost:8000/admin
Now you can see the web interface on http://localhost:8000/admin
Development and Testing Setup
-----------------------------
If you are planing to do some development or perhaps just checking out this project, you may want to consider doing it under the following setup
1. Create a basic [LXC](http://linuxcontainers.org/) container, start it and get inside.
```bash
wget -O /tmp/create.sh \
https://raw.github.com/glic3rinu/django-orchestra/master/scripts/container/create.sh
sudo bash /tmp/create.sh
sudo lxc-start -n orchestra
# root/root
```
2. Deploy Django-orchestra development environment **inside the container**
```bash
# Make sure your container is connected to the Internet
# Probably you will have to configure the NAT first:
# sudo iptables -t nat -A POSTROUTING -s `container_ip` -j MASQUERADE
wget -O /tmp/deploy.sh \
https://raw.github.com/glic3rinu/django-orchestra/master/scripts/container/deploy.sh
cd /tmp/ # Moving away from /root before running deploy.sh
bash /tmp/deploy.sh
```
Django-orchestra source code should be now under `~orchestra/django-orchestra` and an Orchestra instance called _panel_ under `~orchestra/panel`
3. Nginx should be serving on port 80, but Django's development server can be used as well:
```bash
su - orchestra
cd panel
python manage.py runserver 0.0.0.0:8888
```
4. A convenient practice can be mounting `~orchestra` on your host machine so you can code with your favourite IDE, sshfs can be used for that
```bash
# On your host
mkdir ~<user>/orchestra
sshfs orchestra@<container-ip>: ~<user>/orchestra
```
5. To upgrade to current master just re-run the deploy script
```bash
sudo ~orchestra/django-orchestra/scripts/container/deploy.sh
```
Checkout the steps for other deployments: [development](INSTALLDEV.md), [production](INSTALL.md)
License

View File

@ -133,8 +133,8 @@ function install_requirements () {
ca-certificates \
gettext"
# cracklib and lxml are excluded on the requirements because they are hard to build
PIP="$(wget https://raw.githubusercontent.com/glic3rinu/django-orchestra/master/requirements.txt -q -O - | tr '\n' ' ') \
https://github.com/glic3rinu/passlib/archive/master.zip \
cracklib \
lxml==3.3.5"

View File

@ -179,6 +179,50 @@ AUTHENTICATION_BACKENDS = [
]
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'formatters': {
'simple': {
'format': '%(asctime)s %(name)s %(levelname)s %(message)s'
},
},
'filters': {
'require_debug_false': {
'()': 'django.utils.log.RequireDebugFalse',
},
'require_debug_true': {
'()': 'django.utils.log.RequireDebugTrue',
},
},
'handlers': {
'file': {
'level': 'DEBUG',
'class': 'logging.FileHandler',
'filename': os.path.join(BASE_DIR, 'orchestra.log'),
'formatter': 'simple'
},
'console': {
'level': 'INFO',
'filters': ['require_debug_true'],
'class': 'logging.StreamHandler',
},
},
'loggers': {
'orchestra': {
'handlers': ['file', 'console'],
'level': 'INFO',
'propagate': True,
},
'orm': {
'handlers': ['file',],
'level': 'INFO',
'propagate': True,
},
},
}
#################################
## 3RD PARTY APPS CONIGURATION ##
#################################

View File

@ -26,7 +26,7 @@ class PaymentMethod(plugins.Plugin):
try:
plugins.append(import_class(cls))
except ImportError as exc:
logger.error(str(exc))
logger.error('Error loading %s: %s' % (cls, str(exc)))
return plugins
def get_label(self):

View File

@ -17,6 +17,7 @@ Pygments==1.6
django-filter==0.7
jsonfield==0.9.22
python-dateutil==2.2
https://github.com/glic3rinu/passlib/archive/master.zip
django-iban==0.3.0
requests
phonenumbers