Introduce lxc- prefix for services

This commit is contained in:
Disassembler 2019-11-30 22:11:38 +01:00
parent 22d10b5a69
commit a7a4004f53
Signed by: Disassembler
GPG Key ID: 524BD33A0EE29499
19 changed files with 51 additions and 51 deletions

@ -1 +1 @@
Subproject commit 2d3890fd51bdaedb09c3d3742e7a58545f370244 Subproject commit 539a61662de6278f7841c7e9b86d9d17d5e5b492

View File

@ -14,7 +14,7 @@ cp postgres_data/pg_hba.conf /srv/ckan/postgres_data/pg_hba.conf
# Create database # Create database
export CKAN_PWD=$(head -c 18 /dev/urandom | base64 | tr -d '+/=') export CKAN_PWD=$(head -c 18 /dev/urandom | base64 | tr -d '+/=')
export CKAN_DS_PWD=$(head -c 18 /dev/urandom | base64 | tr -d '+/=') export CKAN_DS_PWD=$(head -c 18 /dev/urandom | base64 | tr -d '+/=')
service ckan-postgres start service lxc-ckan-postgres start
envsubst <createdb.sql | lxc-attach -u 5432 -g 5432 ckan-postgres -- psql envsubst <createdb.sql | lxc-attach -u 5432 -g 5432 ckan-postgres -- psql
# Configure Redis # Configure Redis
@ -22,21 +22,21 @@ mkdir -p /srv/ckan/redis_conf /srv/ckan/redis_data
cp redis_conf/redis.conf /srv/ckan/redis_conf/redis.conf cp redis_conf/redis.conf /srv/ckan/redis_conf/redis.conf
chown -R 100000:100000 /srv/ckan/redis_conf chown -R 100000:100000 /srv/ckan/redis_conf
chown -R 106379:106379 /srv/ckan/redis_data chown -R 106379:106379 /srv/ckan/redis_data
service ckan-redis start service lxc-ckan-redis start
# Configure Solr # Configure Solr
mkdir -p /srv/ckan/solr_data mkdir -p /srv/ckan/solr_data
lxc-execute ckan-solr -- cat /opt/solr/server/solr/solr.xml >/srv/ckan/solr_data/solr.xml lxc-execute ckan-solr -- cat /opt/solr/server/solr/solr.xml >/srv/ckan/solr_data/solr.xml
chown -R 108983:108983 /srv/ckan/solr_data chown -R 108983:108983 /srv/ckan/solr_data
service ckan-solr start service lxc-ckan-solr start
# Configure CKAN Solr core # Configure CKAN Solr core
lxc-attach -u 8983 -g 8983 ckan-solr -- solr create -p 8983 -c ckan lxc-attach -u 8983 -g 8983 ckan-solr -- solr create -p 8983 -c ckan
service ckan-solr stop service lxc-ckan-solr stop
cp solr_data/ckan/conf/schema.xml /srv/ckan/solr_data/ckan/conf/schema.xml cp solr_data/ckan/conf/schema.xml /srv/ckan/solr_data/ckan/conf/schema.xml
cp solr_data/ckan/conf/solrconfig.xml /srv/ckan/solr_data/ckan/conf/solrconfig.xml cp solr_data/ckan/conf/solrconfig.xml /srv/ckan/solr_data/ckan/conf/solrconfig.xml
chown -R 108983:108983 /srv/ckan/solr_data chown -R 108983:108983 /srv/ckan/solr_data
service ckan-solr start service lxc-ckan-solr start
# Configure CKAN DataPusher # Configure CKAN DataPusher
mkdir -p /srv/ckan/datapusher_conf /srv/ckan/datapusher_data mkdir -p /srv/ckan/datapusher_conf /srv/ckan/datapusher_data
@ -72,9 +72,9 @@ envsubst <adminpwd.sql | lxc-attach -u 5432 -g 5432 ckan-postgres -- psql ckan
cp update-conf.sh /srv/ckan/update-conf.sh cp update-conf.sh /srv/ckan/update-conf.sh
# Stop services required for setup # Stop services required for setup
service ckan-solr stop service lxc-ckan-solr stop
service ckan-postgres stop service lxc-ckan-postgres stop
service ckan-redis stop service lxc-ckan-redis stop
# Register application # Register application
vmmgr register-app ckan ckan "${CKAN_ADMIN_USER}" "${CKAN_ADMIN_PWD}" vmmgr register-app ckan ckan "${CKAN_ADMIN_USER}" "${CKAN_ADMIN_PWD}"

View File

@ -13,7 +13,7 @@ cp postgres_data/pg_hba.conf /srv/crisiscleanup/postgres_data/pg_hba.conf
# Create database # Create database
export CRISISCLEANUP_PWD=$(head -c 18 /dev/urandom | base64 | tr -d '+/=') export CRISISCLEANUP_PWD=$(head -c 18 /dev/urandom | base64 | tr -d '+/=')
service crisiscleanup-postgres start service lxc-crisiscleanup-postgres start
envsubst <createdb.sql | lxc-attach -u 5432 -g 5432 crisiscleanup-postgres -- psql envsubst <createdb.sql | lxc-attach -u 5432 -g 5432 crisiscleanup-postgres -- psql
# Copy existing config files into persistent storage # Copy existing config files into persistent storage
@ -39,7 +39,7 @@ lxc-execute crisiscleanup -- rake db:seed
cp update-conf.sh /srv/crisiscleanup/update-conf.sh cp update-conf.sh /srv/crisiscleanup/update-conf.sh
# Stop services required for setup # Stop services required for setup
service crisiscleanup-postgres stop service lxc-crisiscleanup-postgres stop
# Register application # Register application
vmmgr register-app crisiscleanup cc "${CRISISCLEANUP_ADMIN_EMAIL}" "${CRISISCLEANUP_ADMIN_PWD}" vmmgr register-app crisiscleanup cc "${CRISISCLEANUP_ADMIN_EMAIL}" "${CRISISCLEANUP_ADMIN_PWD}"

View File

@ -13,7 +13,7 @@ cp postgres_data/pg_hba.conf /srv/cts/postgres_data/pg_hba.conf
# Create database # Create database
export CTS_PWD=$(head -c 18 /dev/urandom | base64 | tr -d '+/=') export CTS_PWD=$(head -c 18 /dev/urandom | base64 | tr -d '+/=')
service cts-postgres start service lxc-cts-postgres start
envsubst <createdb.sql | lxc-attach -u 5432 -g 5432 cts-postgres -- psql envsubst <createdb.sql | lxc-attach -u 5432 -g 5432 cts-postgres -- psql
# Copy existing config files into persistent storage # Copy existing config files into persistent storage
@ -40,7 +40,7 @@ envsubst <adminpwd.sql | lxc-attach -u 5432 -g 5432 cts-postgres -- psql cts
cp update-conf.sh /srv/cts/update-conf.sh cp update-conf.sh /srv/cts/update-conf.sh
# Stop services required for setup # Stop services required for setup
service cts-postgres stop service lxc-cts-postgres stop
# Register application # Register application
vmmgr register-app cts cts "${CTS_ADMIN_EMAIL}" "${CTS_ADMIN_PWD}" vmmgr register-app cts cts "${CTS_ADMIN_EMAIL}" "${CTS_ADMIN_PWD}"

View File

@ -13,7 +13,7 @@ cp postgres_data/pg_hba.conf /srv/decidim/postgres_data/pg_hba.conf
# Create database # Create database
export DECIDIM_PWD=$(head -c 18 /dev/urandom | base64 | tr -d '+/=') export DECIDIM_PWD=$(head -c 18 /dev/urandom | base64 | tr -d '+/=')
service decidim-postgres start service lxc-decidim-postgres start
envsubst <createdb.sql | lxc-attach -u 5432 -g 5432 decidim-postgres -- psql envsubst <createdb.sql | lxc-attach -u 5432 -g 5432 decidim-postgres -- psql
# Copy existing config files into persistent storage # Copy existing config files into persistent storage
@ -41,7 +41,7 @@ envsubst <adminpwd.rb | lxc-execute decidim -- sh -c 'cd /srv/decidim-app; bin/r
cp update-conf.sh /srv/decidim/update-conf.sh cp update-conf.sh /srv/decidim/update-conf.sh
# Stop services required for setup # Stop services required for setup
service decidim-postgres stop service lxc-decidim-postgres stop
# Register application # Register application
vmmgr register-app decidim decidim "${DECIDIM_ADMIN_EMAIL}" "${DECIDIM_ADMIN_PWD}" vmmgr register-app decidim decidim "${DECIDIM_ADMIN_EMAIL}" "${DECIDIM_ADMIN_PWD}"

View File

@ -13,7 +13,7 @@ cp postgres_data/pg_hba.conf /srv/ecogis/postgres_data/pg_hba.conf
# Populate database # Populate database
export ECOGIS_PWD=$(head -c 18 /dev/urandom | base64 | tr -d '+/=') export ECOGIS_PWD=$(head -c 18 /dev/urandom | base64 | tr -d '+/=')
service ecogis-postgres start service lxc-ecogis-postgres start
envsubst <createdb.sql | lxc-attach -u 5432 -g 5432 ecogis-postgres -- psql envsubst <createdb.sql | lxc-attach -u 5432 -g 5432 ecogis-postgres -- psql
# Configure EcoGIS # Configure EcoGIS
@ -22,7 +22,7 @@ envsubst <ecogis_conf/config.php >/srv/ecogis/conf/config.php
chown -R 108080:108080 /srv/ecogis/ecogis_conf /srv/ecogis/ecogis_data chown -R 108080:108080 /srv/ecogis/ecogis_conf /srv/ecogis/ecogis_data
# Stop services required for setup # Stop services required for setup
service ecogis-postgres stop service lxc-ecogis-postgres stop
# Register application # Register application
vmmgr register-app ecogis ecogis vmmgr register-app ecogis ecogis

View File

@ -13,7 +13,7 @@ cp postgres_data/pg_hba.conf /srv/gnuhealth/postgres_data/pg_hba.conf
# Create databases # Create databases
export GNUHEALTH_PWD=$(head -c 18 /dev/urandom | base64 | tr -d '+/=') export GNUHEALTH_PWD=$(head -c 18 /dev/urandom | base64 | tr -d '+/=')
service gnuhealth-postgres start service lxc-gnuhealth-postgres start
envsubst <createdb.sql | lxc-attach -u 5432 -g 5432 gnuhealth-postgres -- psql envsubst <createdb.sql | lxc-attach -u 5432 -g 5432 gnuhealth-postgres -- psql
# Configure GNU Health # Configure GNU Health
@ -32,7 +32,7 @@ lxc-execute gnuhealth -- zcat /srv/gnuhealth/gnuhealth_demo.sql.gz | lxc-attach
cp update-conf.sh /srv/gnuhealth/update-conf.sh cp update-conf.sh /srv/gnuhealth/update-conf.sh
# Stop services required for setup # Stop services required for setup
service gnuhealth-postgres stop service lxc-gnuhealth-postgres stop
# Register application # Register application
vmmgr register-app gnuhealth gh "${GNUHEALTH_ADMIN_USER}" "${GNUHEALTH_ADMIN_PWD}" vmmgr register-app gnuhealth gh "${GNUHEALTH_ADMIN_USER}" "${GNUHEALTH_ADMIN_PWD}"

View File

@ -13,7 +13,7 @@ cp postgres_data/pg_hba.conf /srv/kanboard/postgres_data/pg_hba.conf
# Populate database # Populate database
export KANBOARD_PWD=$(head -c 18 /dev/urandom | base64 | tr -d '+/=') export KANBOARD_PWD=$(head -c 18 /dev/urandom | base64 | tr -d '+/=')
service kanboard-postgres start service lxc-kanboard-postgres start
envsubst <createdb.sql | lxc-attach -u 5432 -g 5432 kanboard-postgres -- psql envsubst <createdb.sql | lxc-attach -u 5432 -g 5432 kanboard-postgres -- psql
lxc-execute kanboard -- cat /srv/kanboard/app/Schema/Sql/postgres.sql | lxc-attach -u 5432 -g 5432 kanboard-postgres -- sh -c "PGPASSWORD=${KANBOARD_PWD} psql kanboard kanboard" lxc-execute kanboard -- cat /srv/kanboard/app/Schema/Sql/postgres.sql | lxc-attach -u 5432 -g 5432 kanboard-postgres -- sh -c "PGPASSWORD=${KANBOARD_PWD} psql kanboard kanboard"
@ -30,7 +30,7 @@ envsubst <adminpwd.sql | lxc-attach -u 5432 -g 5432 kanboard-postgres -- psql ka
cp update-conf.sh /srv/kanboard/update-conf.sh cp update-conf.sh /srv/kanboard/update-conf.sh
# Stop services required for setup # Stop services required for setup
service kanboard-postgres stop service lxc-kanboard-postgres stop
# Register application # Register application
vmmgr register-app kanboard kb "${KANBOARD_ADMIN_USER}" "${KANBOARD_ADMIN_PWD}" vmmgr register-app kanboard kb "${KANBOARD_ADMIN_USER}" "${KANBOARD_ADMIN_PWD}"

View File

@ -10,7 +10,7 @@ lxc-execute mifosx-mariadb -- mysql_install_db --user=mysql --datadir=/var/lib/m
# Create databases # Create databases
export MIFOSX_PWD=$(head -c 18 /dev/urandom | base64 | tr -d '+/=') export MIFOSX_PWD=$(head -c 18 /dev/urandom | base64 | tr -d '+/=')
service mifosx-mariadb start service lxc-mifosx-mariadb start
envsubst <createdb.sql | lxc-attach mifosx-mariadb -- mysql envsubst <createdb.sql | lxc-attach mifosx-mariadb -- mysql
# Populate database # Populate database
@ -43,7 +43,7 @@ envsubst <adminpwd.sql | lxc-attach mifosx-mariadb -- mysql mifostenant-default
cp update-conf.sh /srv/mifosx/update-conf.sh cp update-conf.sh /srv/mifosx/update-conf.sh
# Stop services required for setup # Stop services required for setup
service mifosx-mariadb stop service lxc-mifosx-mariadb stop
# Register application # Register application
vmmgr register-app mifosx mifosx "${MIFOSX_ADMIN_USER}" "${MIFOSX_ADMIN_PWD}" vmmgr register-app mifosx mifosx "${MIFOSX_ADMIN_USER}" "${MIFOSX_ADMIN_PWD}"

View File

@ -17,7 +17,7 @@ chown -R 161616:161616 /srv/motech/activemq_data
# Create database # Create database
export MOTECH_PWD=$(head -c 18 /dev/urandom | base64 | tr -d '+/=') export MOTECH_PWD=$(head -c 18 /dev/urandom | base64 | tr -d '+/=')
service motech-postgres start service lxc-motech-postgres start
envsubst <createdb.sql | lxc-attach -u 5432 -g 5432 motech-postgres -- psql envsubst <createdb.sql | lxc-attach -u 5432 -g 5432 motech-postgres -- psql
# Configure Motech # Configure Motech
@ -29,8 +29,8 @@ cp motech_conf/config/org.motechproject.motech-platform-email/motech-email.prope
chown -R 108080:108080 /srv/motech/motech_conf chown -R 108080:108080 /srv/motech/motech_conf
# Populate database and create admin account # Populate database and create admin account
service motech-activemq start service lxc-motech-activemq start
service motech start service lxc-motech start
until curl -s "http://motech:8080/module/server/startup/" | grep -q adminLogin; do until curl -s "http://motech:8080/module/server/startup/" | grep -q adminLogin; do
sleep 1 sleep 1
done done
@ -38,14 +38,14 @@ export MOTECH_ADMIN_USER="admin"
export MOTECH_ADMIN_EMAIL="admin@example.com" export MOTECH_ADMIN_EMAIL="admin@example.com"
export MOTECH_ADMIN_PWD=$(head -c 12 /dev/urandom | base64 | tr -d '+/=') export MOTECH_ADMIN_PWD=$(head -c 12 /dev/urandom | base64 | tr -d '+/=')
curl -H "Content-Type: application/json" -X POST -d "{\"adminLogin\":\"${MOTECH_ADMIN_USER}\",\"adminEmail\":\"${MOTECH_ADMIN_EMAIL}\",\"adminPassword\":\"${MOTECH_ADMIN_PWD}\",\"adminConfirmPassword\":\"${MOTECH_ADMIN_PWD}\",\"language\":\"cs\",\"providerName\":\"\",\"providerUrl\":\"\",\"schedulerUrl\":\"\"}" http://motech:8080/module/server/startup/ curl -H "Content-Type: application/json" -X POST -d "{\"adminLogin\":\"${MOTECH_ADMIN_USER}\",\"adminEmail\":\"${MOTECH_ADMIN_EMAIL}\",\"adminPassword\":\"${MOTECH_ADMIN_PWD}\",\"adminConfirmPassword\":\"${MOTECH_ADMIN_PWD}\",\"language\":\"cs\",\"providerName\":\"\",\"providerUrl\":\"\",\"schedulerUrl\":\"\"}" http://motech:8080/module/server/startup/
service motech stop service lxc-motech stop
# Install config update script # Install config update script
cp update-conf.sh /srv/motech/update-conf.sh cp update-conf.sh /srv/motech/update-conf.sh
# Stop services required for setup # Stop services required for setup
service motech-activemq stop service lxc-motech-activemq stop
service motech-postgres stop service lxc-motech-postgres stop
# Register application # Register application
vmmgr register-app motech motech "${MOTECH_ADMIN_USER}" "${MOTECH_ADMIN_PWD}" vmmgr register-app motech motech "${MOTECH_ADMIN_USER}" "${MOTECH_ADMIN_PWD}"

View File

@ -13,7 +13,7 @@ cp postgres_data/pg_hba.conf /srv/odoo/postgres_data/pg_hba.conf
# Create databases # Create databases
export ODOO_PWD=$(head -c 18 /dev/urandom | base64 | tr -d '+/=') export ODOO_PWD=$(head -c 18 /dev/urandom | base64 | tr -d '+/=')
service odoo-postgres start service lxc-odoo-postgres start
envsubst <createdb.sql | lxc-attach -u 5432 -g 5432 odoo-postgres -- psql envsubst <createdb.sql | lxc-attach -u 5432 -g 5432 odoo-postgres -- psql
# Configure Odoo # Configure Odoo
@ -39,7 +39,7 @@ envsubst <adminpwd.sql | lxc-attach -u 5432 -g 5432 odoo-postgres -- psql odoo
cp update-conf.sh /srv/odoo/update-conf.sh cp update-conf.sh /srv/odoo/update-conf.sh
# Stop services required for setup # Stop services required for setup
service odoo-postgres stop service lxc-odoo-postgres stop
# Register application # Register application
vmmgr register-app odoo odoo "${ODOO_ADMIN_USER}" "${ODOO_ADMIN_PWD}" vmmgr register-app odoo odoo "${ODOO_ADMIN_USER}" "${ODOO_ADMIN_PWD}"

View File

@ -14,7 +14,7 @@ cp postgres_data/pg_hba.conf /srv/opendatakit/postgres_data/pg_hba.conf
# Create databases # Create databases
export OPENDATAKIT_PWD=$(head -c 18 /dev/urandom | base64 | tr -d '+/=') export OPENDATAKIT_PWD=$(head -c 18 /dev/urandom | base64 | tr -d '+/=')
export OPENDATAKITBUILD_PWD=$(head -c 18 /dev/urandom | base64 | tr -d '+/=') export OPENDATAKITBUILD_PWD=$(head -c 18 /dev/urandom | base64 | tr -d '+/=')
service opendatakit-postgres start service lxc-opendatakit-postgres start
envsubst <createdb.sql | lxc-attach -u 5432 -g 5432 opendatakit-postgres -- psql envsubst <createdb.sql | lxc-attach -u 5432 -g 5432 opendatakit-postgres -- psql
# Configure OpenDataKit # Configure OpenDataKit
@ -34,11 +34,11 @@ lxc-execute opendatakit-build -- sh -c 'cd /srv/opendatakit-build; rake db:migra
chown -R 100000:100000 /srv/opendatakit/odkbuild_conf chown -R 100000:100000 /srv/opendatakit/odkbuild_conf
# Populate database # Populate database
service opendatakit start service lxc-opendatakit start
until grep -q 'org.apache.catalina.startup.Catalina.start Server startup' /var/log/lxc/opendatakit.log; do until grep -q 'org.apache.catalina.startup.Catalina.start Server startup' /var/log/lxc/opendatakit.log; do
sleep 1 sleep 1
done done
service opendatakit stop service lxc-opendatakit stop
# Update admin account # Update admin account
export OPENDATAKIT_ADMIN_PWD=$(head -c 12 /dev/urandom | base64 | tr -d '+/=') export OPENDATAKIT_ADMIN_PWD=$(head -c 12 /dev/urandom | base64 | tr -d '+/=')
@ -51,7 +51,7 @@ envsubst <adminpwd.sql | lxc-attach -u 5432 -g 5432 opendatakit-postgres -- psql
cp update-conf.sh /srv/opendatakit/update-conf.sh cp update-conf.sh /srv/opendatakit/update-conf.sh
# Stop services required for setup # Stop services required for setup
service opendatakit-postgres stop service lxc-opendatakit-postgres stop
# Register application # Register application
vmmgr register-app opendatakit odk "${OPENDATAKIT_ADMIN_USER}" "${OPENDATAKIT_ADMIN_PWD}" vmmgr register-app opendatakit odk "${OPENDATAKIT_ADMIN_USER}" "${OPENDATAKIT_ADMIN_PWD}"

View File

@ -13,7 +13,7 @@ cp postgres_data/pg_hba.conf /srv/pandora/postgres_data/pg_hba.conf
# Create PostgreSQL user and database # Create PostgreSQL user and database
export PANDORA_PWD=$(head -c 18 /dev/urandom | base64 | tr -d '+/=') export PANDORA_PWD=$(head -c 18 /dev/urandom | base64 | tr -d '+/=')
service pandora-postgres start service lxc-pandora-postgres start
envsubst <createdb.sql | lxc-attach -u 5432 -g 5432 pandora-postgres -- psql envsubst <createdb.sql | lxc-attach -u 5432 -g 5432 pandora-postgres -- psql
# Create RabbitMQ directory structure # Create RabbitMQ directory structure
@ -22,7 +22,7 @@ chown 105672:105672 /srv/pandora/rabbitmq_data
# Configure RabbitMQ # Configure RabbitMQ
export PANDORA_RABBIT_PWD=$(head -c 18 /dev/urandom | base64 | tr -d '+/=') export PANDORA_RABBIT_PWD=$(head -c 18 /dev/urandom | base64 | tr -d '+/=')
service pandora-rabbitmq start service lxc-pandora-rabbitmq start
lxc-attach pandora-rabbitmq -- rabbitmqctl add_user pandora ${PANDORA_RABBIT_PWD} lxc-attach pandora-rabbitmq -- rabbitmqctl add_user pandora ${PANDORA_RABBIT_PWD}
lxc-attach pandora-rabbitmq -- rabbitmqctl add_vhost /pandora lxc-attach pandora-rabbitmq -- rabbitmqctl add_vhost /pandora
lxc-attach pandora-rabbitmq -- rabbitmqctl set_permissions -p /pandora pandora ".*" ".*" ".*" lxc-attach pandora-rabbitmq -- rabbitmqctl set_permissions -p /pandora pandora ".*" ".*" ".*"
@ -57,8 +57,8 @@ envsubst <adminpwd.sql | lxc-attach -u 5432 -g 5432 pandora-postgres -- psql pan
cp update-conf.sh /srv/pandora/update-conf.sh cp update-conf.sh /srv/pandora/update-conf.sh
# Stop services required for setup # Stop services required for setup
service pandora-postgres stop service lxc-pandora-postgres stop
service pandora-rabbitmq stop service lxc-pandora-rabbitmq stop
# Register application # Register application
vmmgr register-app pandora pandora "${PANDORA_ADMIN_USER}" "${PANDORA_ADMIN_PWD}" vmmgr register-app pandora pandora "${PANDORA_ADMIN_USER}" "${PANDORA_ADMIN_PWD}"

View File

@ -13,7 +13,7 @@ cp postgres_data/pg_hba.conf /srv/sahana-demo/postgres_data/pg_hba.conf
# Create PostgreSQL user and database # Create PostgreSQL user and database
export SAHANADEMO_PWD=$(head -c 18 /dev/urandom | base64 | tr -d '+/=') export SAHANADEMO_PWD=$(head -c 18 /dev/urandom | base64 | tr -d '+/=')
service sahana-demo-postgres start service lxc-sahana-demo-postgres start
envsubst <createdb.sql | lxc-attach -u 5432 -g 5432 sahana-demo-postgres -- psql envsubst <createdb.sql | lxc-attach -u 5432 -g 5432 sahana-demo-postgres -- psql
# Prepare persistent directory structure # Prepare persistent directory structure
@ -37,7 +37,7 @@ lxc-execute -u 8080 -g 8080 sahana-demo -- sh -c 'cd /srv/web2py; ./web2py.py -S
cp update-conf.sh /srv/sahana-demo/update-conf.sh cp update-conf.sh /srv/sahana-demo/update-conf.sh
# Stop services required for setup # Stop services required for setup
service sahana-demo-postgres stop service lxc-sahana-demo-postgres stop
# Register application # Register application
vmmgr register-app sahana-demo sahana-demo "${SAHANADEMO_ADMIN_USER}" "${SAHANADEMO_ADMIN_PWD}" vmmgr register-app sahana-demo sahana-demo "${SAHANADEMO_ADMIN_USER}" "${SAHANADEMO_ADMIN_PWD}"

View File

@ -13,7 +13,7 @@ cp postgres_data/pg_hba.conf /srv/sahana/postgres_data/pg_hba.conf
# Create PostgreSQL user and database # Create PostgreSQL user and database
export SAHANA_PWD=$(head -c 18 /dev/urandom | base64 | tr -d '+/=') export SAHANA_PWD=$(head -c 18 /dev/urandom | base64 | tr -d '+/=')
service sahana-postgres start service lxc-sahana-postgres start
envsubst <createdb.sql | lxc-attach -u 5432 -g 5432 sahana-postgres -- psql envsubst <createdb.sql | lxc-attach -u 5432 -g 5432 sahana-postgres -- psql
# Prepare persistent directory structure # Prepare persistent directory structure
@ -48,7 +48,7 @@ fi
cp update-conf.sh /srv/sahana/update-conf.sh cp update-conf.sh /srv/sahana/update-conf.sh
# Stop services required for setup # Stop services required for setup
service sahana-postgres stop service lxc-sahana-postgres stop
# Register application # Register application
vmmgr register-app sahana sahana "${SAHANA_ADMIN_USER}" "${SAHANA_ADMIN_PWD}" vmmgr register-app sahana sahana "${SAHANA_ADMIN_USER}" "${SAHANA_ADMIN_PWD}"

View File

@ -13,7 +13,7 @@ cp postgres_data/pg_hba.conf /srv/sambro/postgres_data/pg_hba.conf
# Create PostgreSQL user and database # Create PostgreSQL user and database
export SAMBRO_PWD=$(head -c 18 /dev/urandom | base64 | tr -d '+/=') export SAMBRO_PWD=$(head -c 18 /dev/urandom | base64 | tr -d '+/=')
service sambro-postgres start service lxc-sambro-postgres start
envsubst <createdb.sql | lxc-attach -u 5432 -g 5432 sambro-postgres -- psql envsubst <createdb.sql | lxc-attach -u 5432 -g 5432 sambro-postgres -- psql
# Prepare persistent directory structure # Prepare persistent directory structure
@ -49,7 +49,7 @@ fi
cp update-conf.sh /srv/sambro/update-conf.sh cp update-conf.sh /srv/sambro/update-conf.sh
# Stop services required for setup # Stop services required for setup
service sambro-postgres stop service lxc-sambro-postgres stop
# Register application # Register application
vmmgr register-app sambro sambro "${SAMBRO_ADMIN_USER}" "${SAMBRO_ADMIN_PWD}" vmmgr register-app sambro sambro "${SAMBRO_ADMIN_USER}" "${SAMBRO_ADMIN_PWD}"

View File

@ -13,7 +13,7 @@ cp postgres_data/pg_hba.conf /srv/seeddms/postgres_data/pg_hba.conf
# Populate database # Populate database
export SEEDDMS_PWD=$(head -c 18 /dev/urandom | base64 | tr -d '+/=') export SEEDDMS_PWD=$(head -c 18 /dev/urandom | base64 | tr -d '+/=')
service seeddms-postgres start service lxc-seeddms-postgres start
envsubst <createdb.sql | lxc-attach -u 5432 -g 5432 seeddms-postgres -- psql envsubst <createdb.sql | lxc-attach -u 5432 -g 5432 seeddms-postgres -- psql
lxc-execute seeddms -- cat /srv/seeddms/create_tables-postgres.sql | lxc-attach seeddms-postgres -- sh -c "PGPASSWORD=${SEEDDMS_PWD} psql seeddms seeddms" lxc-execute seeddms -- cat /srv/seeddms/create_tables-postgres.sql | lxc-attach seeddms-postgres -- sh -c "PGPASSWORD=${SEEDDMS_PWD} psql seeddms seeddms"
cat custom.sql | lxc-attach -u 5432 -g 5432 seeddms-postgres -- psql seeddms cat custom.sql | lxc-attach -u 5432 -g 5432 seeddms-postgres -- psql seeddms
@ -37,7 +37,7 @@ chown -R 108080:108080 /srv/seeddms/seeddms_conf
cp update-conf.sh /srv/seeddms/update-conf.sh cp update-conf.sh /srv/seeddms/update-conf.sh
# Stop services required for setup # Stop services required for setup
service seeddms-postgres stop service lxc-seeddms-postgres stop
# Register application # Register application
vmmgr register-app seeddms dms "${SEEDDMS_ADMIN_USER}" "${SEEDDMS_ADMIN_PWD}" vmmgr register-app seeddms dms "${SEEDDMS_ADMIN_USER}" "${SEEDDMS_ADMIN_PWD}"

View File

@ -13,7 +13,7 @@ cp postgres_data/pg_hba.conf /srv/sigmah/postgres_data/pg_hba.conf
# Create database # Create database
export SIGMAH_PWD=$(head -c 18 /dev/urandom | base64 | tr -d '+/=') export SIGMAH_PWD=$(head -c 18 /dev/urandom | base64 | tr -d '+/=')
service sigmah-postgres start service lxc-sigmah-postgres start
envsubst <createdb.sql | lxc-attach -u 5432 -g 5432 sigmah-postgres -- psql envsubst <createdb.sql | lxc-attach -u 5432 -g 5432 sigmah-postgres -- psql
# Configure Sigmah # Configure Sigmah
@ -47,7 +47,7 @@ rm -f /tmp/sigmah-MinimumDataKit.sql /tmp/sigmah-newOrganizationLaunchScript.sql
cp update-conf.sh /srv/sigmah/update-conf.sh cp update-conf.sh /srv/sigmah/update-conf.sh
# Stop services required for setup # Stop services required for setup
service sigmah-postgres stop service lxc-sigmah-postgres stop
# Register application # Register application
vmmgr register-app sigmah sigmah "${SIGMAH_ADMIN_EMAIL}" "${SIGMAH_ADMIN_PWD}" vmmgr register-app sigmah sigmah "${SIGMAH_ADMIN_EMAIL}" "${SIGMAH_ADMIN_PWD}"

View File

@ -10,7 +10,7 @@ lxc-execute ushahidi-mariadb -- mysql_install_db --user=mysql --datadir=/var/lib
# Create database # Create database
export USHAHIDI_PWD=$(head -c 18 /dev/urandom | base64 | tr -d '+/=') export USHAHIDI_PWD=$(head -c 18 /dev/urandom | base64 | tr -d '+/=')
service ushahidi-mariadb start service lxc-ushahidi-mariadb start
envsubst <createdb.sql | lxc-attach ushahidi-mariadb -- mysql envsubst <createdb.sql | lxc-attach ushahidi-mariadb -- mysql
# Configure Ushahidi # Configure Ushahidi
@ -33,7 +33,7 @@ envsubst <adminpwd.sql | lxc-attach ushahidi-mariadb -- mysql ushahidi
cp update-conf.sh /srv/ushahidi/update-conf.sh cp update-conf.sh /srv/ushahidi/update-conf.sh
# Stop services required for setup # Stop services required for setup
service ushahidi-mariadb stop service lxc-ushahidi-mariadb stop
# Register application # Register application
vmmgr register-app ushahidi ush "${USHAHIDI_ADMIN_USER}" "${USHAHIDI_ADMIN_PWD}" vmmgr register-app ushahidi ush "${USHAHIDI_ADMIN_USER}" "${USHAHIDI_ADMIN_PWD}"