Browse Source

Bug 18342: Enable memcached by default for new installs

Note that there is no way to create an install without memcached.
As it is now considered as stable, there is no point to not use it.

Test plan:
Create a new Koha install and make sure memcached is enabled by default

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
18.05.x
Jonathan Druart 4 years ago
parent
commit
64be74b338
  1. 2
      Makefile.PL
  2. 15
      debian/docs/koha-create.xml
  3. 27
      debian/scripts/koha-create
  4. 4
      debian/templates/koha-sites.conf
  5. 2
      rewrite-config.PL

2
Makefile.PL

@ -483,7 +483,7 @@ my %config_defaults = (
'PAZPAR2_PORT' => '11002',
'RUN_DATABASE_TESTS' => 'no',
'PATH_TO_ZEBRA' => '',
'USE_MEMCACHED' => 'no',
'USE_MEMCACHED' => 'yes',
'MEMCACHED_SERVERS' => '127.0.0.1:11211',
'MEMCACHED_NAMESPACE' => 'KOHA',
'TEMPLATE_CACHE_DIR' => '/tmp/koha',

15
debian/docs/koha-create.xml

@ -29,7 +29,6 @@
<arg><option>--zebralang</option> en|es|fr|gr|nb|ru|uk</arg>
<arg><option>--auth-idx</option> dom|grs1</arg>
<arg><option>--biblio-idx</option> dom|grs1</arg>
<arg><option>--use-memcached</option></arg>
<arg><option>--memcached-servers</option> server:port</arg>
<arg><option>--memcached-prefix</option> namespace_prefix</arg>
<arg><option>--defaultsql</option> /path/to/some.sql</arg>
@ -150,13 +149,6 @@
</listitem>
</varlistentry>
<varlistentry>
<term><option>--use-memcached</option></term>
<listitem>
<para>Make the Koha instance use memcached. <option>Disabled by default</option>.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--memcached-servers</option></term>
<listitem>
@ -286,13 +278,6 @@
</listitem>
</varlistentry>
<varlistentry>
<term><option>USE_MEMCACHED</option></term>
<listitem>
<para>Valid values are <option>yes</option> and <option>no</option>. If not present koha-create will default to <option>no</option>. Also, this will be overriden by the <option>--use-memcached</option> switch.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>MEMCACHED_SERVERS</option></term>
<listitem>

27
debian/scripts/koha-create

@ -57,7 +57,6 @@ Options:
values are dom (default) and grs1.
--biblio-idx idx_mode Set the indexing mode for bibliographic records.
Valid values are dom (default) and grs1.
--use-memcached Set the instance to make use of memcache.
--memcached-servers str Set a comma-separated list of host:port memcached servers.
--memcached-prefix str Set the desired prefix for the instance memcached namespace.
--enable-sru Enable the Z39.50/SRU server (default: disabled).
@ -404,7 +403,7 @@ ADMINUSER="1"
PASSWDFILE="/etc/koha/passwd"
# memcached variables
USE_MEMCACHED="no"
USE_MEMCACHED="yes"
MEMCACHED_SERVERS=""
MEMCACHED_PREFIX=""
# hardcoded memcached defaults
@ -444,7 +443,7 @@ fi
[ $# -ge 1 ] && [ $# -le 16 ] || ( usage ; die "Error: wrong parameters" )
TEMP=`getopt -o chrpm:l:d:f:b:a: -l create-db,request-db,populate-db,use-db,use-memcached,enable-sru,sru-port:,help,marcflavor:,auth-idx:,biblio-idx:,zebralang:,defaultsql:,configfile:,passwdfile:,dbhost:,database:,adminuser:,memcached-servers:,memcached-prefix:,template-cache-dir:,upload-path:,letsencrypt, \
TEMP=`getopt -o chrpm:l:d:f:b:a: -l create-db,request-db,populate-db,use-db,enable-sru,sru-port:,help,marcflavor:,auth-idx:,biblio-idx:,zebralang:,defaultsql:,configfile:,passwdfile:,dbhost:,database:,adminuser:,memcached-servers:,memcached-prefix:,template-cache-dir:,upload-path:,letsencrypt, \
-n "$0" -- "$@"`
# Note the quotes around `$TEMP': they are essential!
@ -473,8 +472,6 @@ while true ; do
op=populate ; shift ;;
-u|--use-db)
op=use ; shift ;;
--use-memcached)
USE_MEMCACHED="yes" ; shift ;;
--memcached-servers)
CLO_MEMCACHED_SERVERS="$2" ; shift 2 ;;
--memcached-prefix)
@ -586,25 +583,7 @@ NO_DB
die;
fi
if [ "$USE_MEMCACHED" = "yes" ]; then
set_memcached $name
elif [ "$CLO_MEMCACHED_SERVERS" != "" ] || \
[ "$CLO_MEMCACHED_PREFIX" != "" ]; then
MSG=`cat <<EOF
Error: you provided memcached configuration switches but memcached is not enabled.
Please set USE_MEMCACHED="yes" on /etc/koha/koha-sites.conf or use the
--use-memcached option switch to enable it.
EOF`
usage ; die $MSG
else
# Unset memcached-related variables
MEMCACHED_SERVERS=""
MEMCACHED_PREFIX=""
fi
set_memcached $name
# Set template cache dir
if [ "$CLO_TEMPLATE_CACHE_DIR" != "" ]; then

4
debian/templates/koha-sites.conf

@ -46,8 +46,8 @@ AUTHORITIES_INDEXING_MODE="dom"
#
# USE_MEMCACHED: 'yes' | 'no'
# Make the created instance use memcached. Can be altered later.
# default: 'no'
USE_MEMCACHED="no"
# default: 'yes'
USE_MEMCACHED="yes"
# MEMCACHED_SERVERS: comma separated list of memcached servers (ip:port)
# Specify a list of memcached servers for the Koha instance

2
rewrite-config.PL

@ -149,7 +149,7 @@ $prefix = $ENV{'INSTALL_BASE'} || "/usr";
"__BIB_INDEX_MODE__" => 'grs1',
"__RUN_DATABASE_TESTS__" => 'no',
"__PATH_TO_ZEBRA__" => "",
"__USE_MEMCACHED__" => 'no',
"__USE_MEMCACHED__" => 'yes',
"__MEMCACHED_SERVERS__" => "",
"__MEMCACHED_NAMESPACE__" => "",
"__FONT_DIR__" => "/usr/share/fonts/truetype/ttf-dejavu",

Loading…
Cancel
Save