Merge pull request #60 from pierotofy/install_enhancements

Install enhancements
pull/76/head
Piero Toffanin 2016-12-01 13:40:48 -05:00 zatwierdzone przez GitHub
commit 149fe2ecee
4 zmienionych plików z 55 dodań i 11 usunięć

Wyświetl plik

@ -12,17 +12,20 @@ If you know Python, web technologies (JS, HTML, CSS, etc.) or both, make a fork,
## Getting Started
The quickest way to get started is by using Docker.
* Install the following applications (if they are not installed already):
- [Docker](https://www.docker.com/)
- [Python](https://www.python.org/downloads/)
- [Git](https://git-scm.com/downloads)
* From the Docker Quickstart Terminal (Windows / OSX) or from the command line (Linux) type:
* From the Docker Quickstart Terminal (Windows) or from the command line (OSX / Linux) type:
```
git clone https://github.com/OpenDroneMap/WebODM
cd WebODM
pip install docker-compose
docker-compose up
docker-compose -f docker-compose.yml -f docker-compose.nodeodm.yml up
```
* If you're on Windows/OSX, find the IP of your Docker machine by running this command from your Docker Quickstart Terminal:
* If you're on Windows / OSX, find the IP of your Docker machine by running this command from your Docker Quickstart Terminal:
```
docker-machine ip
@ -33,14 +36,11 @@ Linux users can connect to 127.0.0.1.
* Open a Web Browser to `http://<yourDockerMachineIp>:8000`
* Log in with the default credentials: "admin:admin"
### Need a processing node for testing?
We recommend that you read the [Docker Documentation](https://docs.docker.com/) to familiarize with the application lifecycle, setup and teardown.
At startup, WebODM needs to be linked to one or more processing nodes running [node-OpenDroneMap](https://github.com/pierotofy/node-OpenDroneMap). It's recommended that you setup your own processing nodes, but if you just want to do some quick tests, use the following:
### Add More Processing Nodes
```
Hostname: nodeodm.masseranolabs.com
Port: 80
```
WebODM can be linked to one or more processing nodes running [node-OpenDroneMap](https://github.com/pierotofy/node-OpenDroneMap). The default configuration already includes a "node-odm-1" processing node which runs on the same machine as WebODM, just to help you get started. As you become more familiar with WebODM, you might want to install processing nodes on separate machines.
## Run it natively
@ -55,7 +55,11 @@ On Linux, make sure you have:
apt-get install binutils libproj-dev gdal-bin
```
On Windows use the [OSGeo4W](https://trac.osgeo.org/osgeo4w/) installer to install GDAL.
On Windows use the [OSGeo4W](https://trac.osgeo.org/osgeo4w/) installer to install GDAL. MacOS users can use:
```
brew install postgres postgis
```
Then these steps should be sufficient to get you up and running:

Wyświetl plik

@ -0,0 +1,13 @@
# Chaining this file to the main docker-compose file adds
# a default processing node instance. This is best for users
# who are just getting started with WebODM.
version: '2'
services:
webapp:
entrypoint: /bin/bash -c "chmod +x /webodm/*.sh && /webodm/wait-for-it.sh db:5432 -- /webodm/start.sh --create-default-pnode"
node-odm-1:
image: pierotofy/nodeodm
container_name: node-odm-1
ports:
- "3000"

Wyświetl plik

@ -1,3 +1,5 @@
# This configuration does not include a processing node
# Which makes for faster setup times
version: '2'
services:
db:

Wyświetl plik

@ -1,4 +1,25 @@
#!/bin/bash
echo -e "\e[92m"
echo " _ __ __ ____ ____ __ ___"
echo "| | / /__ / /_ / __ \/ __ \/ |/ /"
echo "| | /| / / _ \/ __ \/ / / / / / / /|_/ / "
echo "| |/ |/ / __/ /_/ / /_/ / /_/ / / / / "
echo "|__/|__/\___/_.___/\____/_____/_/ /_/ "
echo
echo -e "\e[39m"
python -c "import sys;ret = 1 if sys.version_info <= (3, 0) else 0;print('Checking python version... ' + ('3.x, good!' if ret == 0 else '2.x'));sys.exit(ret);"
if [ $? -eq 1 ]; then
echo
echo "===================="
echo "You're almost there!"
echo "===================="
echo -e "\e[33mYour system is currently using Python 2.x. You need to install or configure your system to use Python 3.x. Check out http://docs.python-guide.org/en/latest/dev/virtualenvs/ for information on how to setup Python 3.x alongside your Python 2.x install.\e[39m"
echo
exit
fi
echo Building asssets...
webpack
@ -6,4 +27,8 @@ echo Running migrations
python manage.py makemigrations
python manage.py migrate
if [ $1 = "--create-default-pnode" ]; then
echo "from nodeodm.models import ProcessingNode; ProcessingNode.objects.update_or_create(hostname='node-odm-1', defaults={'hostname': 'node-odm-1', 'port': 3000})" | python manage.py shell
fi
python manage.py runserver 0.0.0.0:8000