Skip to content
Snippets Groups Projects
Commit 71ae2dce authored by Nikolaus Krismer's avatar Nikolaus Krismer
Browse files

added localTestDeployMode in vagrant provisioner (so testing environment

is not deployed on local test machine -> since the eclipse IDE deploys
the code in this case)
parent 284c3ed9
No related branches found
No related tags found
No related merge requests found
......@@ -27,7 +27,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.synced_folder "etc/vagrant/img", "/setup/img"
# Setup environment on startup (done using a shell script)
config.vm.provision "shell", path: "etc/vagrant/bootstrap.sh", args: ["niko", "secretPhdPassword#2014!"]
config.vm.provision "shell", path: "etc/vagrant/bootstrap.sh", args: ["niko", "secretPhdPassword#2014!", "true"]
# Network configuration
config.vm.network :forwarded_port, guest: 8080, host: 8080, auto_correct: true, id: "tomcat"
......
......@@ -44,6 +44,17 @@ if [ ${PG_DB_PASSWORD:0:1} == "@" ]; then
PG_DB_PASSWORD=$2
fi
IS_LOCAL_TEST_DEPLOY=false
if [ -n "$3" ]; then
if [ "$3" = "true" ]; then
IS_LOCAL_TEST_DEPLOY=true
fi
if $IS_LOCAL_TEST_DEPLOY; then
INSTALL_PROJECT_ISOCHRONE=false
fi
fi
###########################
# General configuration
###########################
......@@ -258,6 +269,7 @@ echo ""
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo " Bootstrapping the VM:"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
if $IS_LOCAL_TEST_DEPLOY; then echo "Starting in local test deploy mode"; fi
if $IMPORT_SCHEDULES && ! $IMPORT_OSMDATA && ! $IMPORT_OSMDATA_CACHED; then
echo "Warning: Schedules will not be imported, since no data from OSM is imported!"
IMPORT_SCHEDULES=false
......@@ -662,10 +674,12 @@ if $IMPORT_OSMDATA || $IMPORT_OSMDATA_CACHED; then
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
fn_import_data "Bolzen" "$OSM_FILE_ITALY" "$OSM_FILE_BZ_FILTERED" "$OSM_BBOX_BZ" "bz_export.sql.gz" $TABLE_PREFIX_BZ
fn_import_data "Italien" "$OSM_FILE_ITALY" "$OSM_FILE_IT_FILTERED" "$OSM_BBOX_IT" "it_export.sql.gz" $TABLE_PREFIX_IT
fn_import_data "SanFrancisco" "$OSM_FILE_CALIFORNIA" "$OSM_FILE_SF_FILTERED" "$OSM_BBOX_SF" "sf_export.sql.gz" $TABLE_PREFIX_SF
# fn_import_data "SuedTirol" "$OSM_FILE_ITALY" "$OSM_FILE_ST_FILTERED" "$OSM_BBOX_ST" "st_export.sql.gz" $TABLE_PREFIX_ST
fn_import_data "Innsbruck" "$OSM_FILE_AUSTRIA" "$OSM_FILE_IBK_FILTERED" "$OSM_BBOX_IBK" "" $TABLE_PREFIX_IBK
if ! $IS_LOCAL_TEST_DEPLOY; then
fn_import_data "Italien" "$OSM_FILE_ITALY" "$OSM_FILE_IT_FILTERED" "$OSM_BBOX_IT" "it_export.sql.gz" $TABLE_PREFIX_IT
fn_import_data "SanFrancisco" "$OSM_FILE_CALIFORNIA" "$OSM_FILE_SF_FILTERED" "$OSM_BBOX_SF" "sf_export.sql.gz" $TABLE_PREFIX_SF
# fn_import_data "SuedTirol" "$OSM_FILE_ITALY" "$OSM_FILE_ST_FILTERED" "$OSM_BBOX_ST" "st_export.sql.gz" $TABLE_PREFIX_ST
fi
if $INSTALL_GEOSERVER; then
if $INSTALL_NEO4J_SPATIAL; then
......@@ -682,10 +696,12 @@ if $IMPORT_OSMDATA || $IMPORT_OSMDATA_CACHED; then
sh $DEPLOY_DIR/gs-shell/bin/gs-shell --cmdfile $SHARED_CONF_DIR/geoserver_setup_neo4j_ds.gs > setup_geoserver_neo4j.log 2>&1
sh $DEPLOY_DIR/gs-shell/bin/gs-shell --cmdfile $SHARED_CONF_DIR/geoserver_setup_neo4j_ft_bz.gs >> setup_geoserver_neo4j.log 2>&1
sh $DEPLOY_DIR/gs-shell/bin/gs-shell --cmdfile $SHARED_CONF_DIR/geoserver_setup_neo4j_ft_ibk.gs >> setup_geoserver_neo4j.log 2>&1
sh $DEPLOY_DIR/gs-shell/bin/gs-shell --cmdfile $SHARED_CONF_DIR/geoserver_setup_neo4j_ft_it.gs >> setup_geoserver_neo4j.log 2>&1
sh $DEPLOY_DIR/gs-shell/bin/gs-shell --cmdfile $SHARED_CONF_DIR/geoserver_setup_neo4j_ft_sf.gs >> setup_geoserver_neo4j.log 2>&1
# sh $DEPLOY_DIR/gs-shell/bin/gs-shell --cmdfile $SHARED_CONF_DIR/geoserver_setup_neo4j_ft_st.gs >> setup_geoserver_neo4j.log 2>&1
sh $DEPLOY_DIR/gs-shell/bin/gs-shell --cmdfile $SHARED_CONF_DIR/geoserver_setup_neo4j_ft.gs >> setup_geoserver_neo4j.log 2>&1
if ! $IS_LOCAL_TEST_DEPLOY; then
sh $DEPLOY_DIR/gs-shell/bin/gs-shell --cmdfile $SHARED_CONF_DIR/geoserver_setup_neo4j_ft_it.gs >> setup_geoserver_neo4j.log 2>&1
sh $DEPLOY_DIR/gs-shell/bin/gs-shell --cmdfile $SHARED_CONF_DIR/geoserver_setup_neo4j_ft_sf.gs >> setup_geoserver_neo4j.log 2>&1
# sh $DEPLOY_DIR/gs-shell/bin/gs-shell --cmdfile $SHARED_CONF_DIR/geoserver_setup_neo4j_ft_st.gs >> setup_geoserver_neo4j.log 2>&1
sh $DEPLOY_DIR/gs-shell/bin/gs-shell --cmdfile $SHARED_CONF_DIR/geoserver_setup_neo4j_ft.gs >> setup_geoserver_neo4j.log 2>&1
fi
fi
if $INSTALL_POSTGIS; then
# copy geoserver_setup_postgis_ds and replace username/password
......@@ -696,10 +712,12 @@ if $IMPORT_OSMDATA || $IMPORT_OSMDATA_CACHED; then
sh $DEPLOY_DIR/gs-shell/bin/gs-shell --cmdfile $WORKING_DIR/geoserver_setup_postgis_ds.gs > setup_geoserver_postgis.log 2>&1
sh $DEPLOY_DIR/gs-shell/bin/gs-shell --cmdfile $SHARED_CONF_DIR/geoserver_setup_postgis_ft_bz.gs >> setup_geoserver_postgis.log 2>&1
sh $DEPLOY_DIR/gs-shell/bin/gs-shell --cmdfile $SHARED_CONF_DIR/geoserver_setup_postgis_ft_ibk.gs >> setup_geoserver_postgis.log 2>&1
sh $DEPLOY_DIR/gs-shell/bin/gs-shell --cmdfile $SHARED_CONF_DIR/geoserver_setup_postgis_ft_it.gs >> setup_geoserver_postgis.log 2>&1
sh $DEPLOY_DIR/gs-shell/bin/gs-shell --cmdfile $SHARED_CONF_DIR/geoserver_setup_postgis_ft_sf.gs >> setup_geoserver_postgis.log 2>&1
# sh $DEPLOY_DIR/gs-shell/bin/gs-shell --cmdfile $SHARED_CONF_DIR/geoserver_setup_postgis_ft_st.gs >> setup_geoserver_postgis.log 2>&1
sh $DEPLOY_DIR/gs-shell/bin/gs-shell --cmdfile $SHARED_CONF_DIR/geoserver_setup_postgis_ft.gs >> setup_geoserver_postgis.log 2>&1
if ! $IS_LOCAL_TEST_DEPLOY; then
sh $DEPLOY_DIR/gs-shell/bin/gs-shell --cmdfile $SHARED_CONF_DIR/geoserver_setup_postgis_ft_it.gs >> setup_geoserver_postgis.log 2>&1
sh $DEPLOY_DIR/gs-shell/bin/gs-shell --cmdfile $SHARED_CONF_DIR/geoserver_setup_postgis_ft_sf.gs >> setup_geoserver_postgis.log 2>&1
# sh $DEPLOY_DIR/gs-shell/bin/gs-shell --cmdfile $SHARED_CONF_DIR/geoserver_setup_postgis_ft_st.gs >> setup_geoserver_postgis.log 2>&1
sh $DEPLOY_DIR/gs-shell/bin/gs-shell --cmdfile $SHARED_CONF_DIR/geoserver_setup_postgis_ft.gs >> setup_geoserver_postgis.log 2>&1
fi
fi
fi
fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment