From ac8bcb99bf54c5074f46dda235dfff70b64f8b5c Mon Sep 17 00:00:00 2001 From: Marc Aymerich Date: Sat, 3 Oct 2015 12:02:53 +0000 Subject: [PATCH] Fixes on deployment --- INSTALL.md | 1 - INSTALLDEV.md | 47 ++++++++++++++++++++--------------------------- 2 files changed, 20 insertions(+), 28 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index e96d5131..ee4654d6 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -44,7 +44,6 @@ Django-orchestra can be installed on any Linux system, however it is **strongly ``` - 6. Configure periodic execution of tasks (choose one) 1. Use cron ```bash diff --git a/INSTALLDEV.md b/INSTALLDEV.md index 1ce82565..a68ad06e 100644 --- a/INSTALLDEV.md +++ b/INSTALLDEV.md @@ -3,44 +3,37 @@ 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 +1. Install Docker + ```sh + curl https://get.docker.com/ | sh ``` -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` +2. Build a new image, create and start a container + ```bash + curl http://git.io/orchestra-Dockerfile > /tmp/Dockerfile + docker build -t orchestra /tmp/ + docker create --name orchestra -i -t orchestra bash + docker start orchestra + docker attach orchestra + ``` + + +3. Deploy django-orchestra development environment + ```bash + su - orchestra + bash <( curl -L https://git.io/deploy-orchestra ) --dev + ``` 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 + python3 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 ~/orchestra - sshfs orchestra@: ~/orchestra - ``` 5. To upgrade to current master just re-run the deploy script ```bash - sudo ~orchestra/django-orchestra/scripts/container/deploy.sh + bash <( curl -L https://git.io/deploy-orchestra ) --dev ```