From 8171f20309b2ecc43541753b502fd178266a4a4e Mon Sep 17 00:00:00 2001 From: Disassembler Date: Tue, 24 Sep 2019 19:49:02 +0200 Subject: [PATCH] Hostnames shouldn't have underscores --- apk/vmmgr | 2 +- lxc-apps/ckan/install.sh | 28 ++++++++++++------------ lxc-apps/ckan/install/ckan_conf/ckan.ini | 10 ++++----- lxc-apps/ckan/meta | 8 +++---- 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/apk/vmmgr b/apk/vmmgr index 7591cf2..ae2a913 160000 --- a/apk/vmmgr +++ b/apk/vmmgr @@ -1 +1 @@ -Subproject commit 7591cf2d477c9d97c96e13ee276da0bc0cf2a47e +Subproject commit ae2a913d0ca05422a1f070c27c4057119177ab8d diff --git a/lxc-apps/ckan/install.sh b/lxc-apps/ckan/install.sh index 8c397c1..ccee7a9 100755 --- a/lxc-apps/ckan/install.sh +++ b/lxc-apps/ckan/install.sh @@ -7,7 +7,7 @@ cd $(realpath $(dirname "${0}"))/install mkdir -p /srv/ckan/postgres_data chown -R 105432:105432 /srv/ckan/postgres_data chmod 700 /srv/ckan/postgres_data -lxc-execute -n ckan_postgres -- initdb -D /var/lib/postgresql +lxc-execute -n ckan-postgres -- initdb -D /var/lib/postgresql # Configure Postgres cp postgres_data/postgresql.conf /srv/ckan/postgres_data/postgresql.conf @@ -16,28 +16,28 @@ cp postgres_data/pg_hba.conf /srv/ckan/postgres_data/pg_hba.conf # Create database export CKAN_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 #TODO: wait? -envsubst /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 -service ckan_solr start # TODO: add ready / wait +service ckan-solr start # TODO: add ready / wait # Configure CKAN Solr core -lxc-attach -u 8983 -g 8983 ckan_solr -- solr create -p 8983 -c ckan # TODO: wait to ensure creation? -service ckan_solr stop +lxc-attach -u 8983 -g 8983 ckan-solr -- solr create -p 8983 -c ckan # TODO: wait to ensure creation? +service ckan-solr stop 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 chown 108983:108983 /srv/ckan/solr_data/ckan/conf/schema.xml # TODO: je to potreba? -service ckan_solr start +service ckan-solr start # Configure CKAN DataPusher mkdir -p /srv/ckan/datapusher_conf /srv/ckan/datapusher_data @@ -56,7 +56,7 @@ chown -R 108080:108080 /srv/ckan/ckan_data # Populate database lxc-execute ckan -- paster --plugin=ckan db init -c /etc/ckan/ckan.ini lxc-execute ckan -- paster --plugin=ckanext-spatial spatial initdb -c /etc/ckan/ckan.ini -lxc-execute ckan -- paster --plugin=ckan datastore set-permissions -c /etc/ckan/ckan.ini | lxc-attach -u 5432 -g 5432 ckan_postgres -- psql +lxc-execute ckan -- paster --plugin=ckan datastore set-permissions -c /etc/ckan/ckan.ini | lxc-attach -u 5432 -g 5432 ckan-postgres -- psql # Create admin account export CKAN_ADMIN_USER="admin" @@ -65,15 +65,15 @@ export CKAN_ADMIN_APIKEY=$(cat /proc/sys/kernel/random/uuid) export CKAN_ADMIN_PWD=$(head -c 12 /dev/urandom | base64 | tr -d '+/=') export CKAN_ADMIN_HASH=$(lxc-execute ckan -- python -c "from passlib.hash import pbkdf2_sha512;print pbkdf2_sha512.encrypt('${CKAN_ADMIN_PWD}')") export CKAN_ADMIN_EMAIL="admin@example.com" -envsubst