awx/tools/docker-compose/start_development.sh
Chris Meyers 7ffe46fc74 add postgres Fact model, update views, tests
* awx.main.models Fact added
* view host fact and timeline updated to use new Postgres Fact model instead of Mongo
* Removed license set start Mongo logic
* added View tests
* added Model tests
* Removed mongo fact unit tests
* point at modified jsonbfield that supports sqlite storage driver
* postgresify fact cache receiver
* test OPTIONS endpoint
* Note: single fact view not implemented yet.
2016-02-24 14:38:54 -05:00

45 lines
1.5 KiB
Bash
Executable File

#!/bin/bash
set +x
# Wait for the databases to come up
ansible -i "127.0.0.1," -c local -v -m wait_for -a "host=postgres port=5432" all
ansible -i "127.0.0.1," -c local -v -m wait_for -a "host=redis port=6379" all
ansible -i "127.0.0.1," -c local -v -m wait_for -a "host=mongo port=27017" all
# In case Tower in the container wants to connect to itself, use "docker exec" to attach to the container otherwise
/etc/init.d/ssh start
ansible -i "127.0.0.1," -c local -v -m postgresql_user -U postgres -a "name=awx-dev password=AWXsome1 login_user=postgres login_host=postgres" all
ansible -i "127.0.0.1," -c local -v -m postgresql_db -U postgres -a "name=awx-dev owner=awx-dev login_user=postgres login_host=postgres" all
# Move to the source directory so we can bootstrap
if [ -f "/tower_devel/manage.py" ]; then
cd /tower_devel
elif [ -f "/tower_devel/ansible-tower/manage.py" ]; then
cd /tower_devel/ansible-tower
else
echo "Failed to find tower source tree, map your development tree volume"
fi
if [ -f "/.develop_run" ]; then
echo "Skipping 'make develop' step since it has already run - remove /.develop_run to force it"
else
make develop
touch /.develop_run
fi
# Check if we need to build dependencies
if [ -f "awx/lib/.deps_built" ]; then
echo "Skipping dependency build - remove awx/lib/.deps_built to force a rebuild"
else
make requirements_dev
touch awx/lib/.deps_built
fi
# Tower bootstrapping
make version_file
make migrate
make init
# Start the service
make honcho