Files
training-labs/labs/osbash/scripts/ubuntu/install_memcached.sh
Roger Luethi 4c8598389e Replace apt-get with apt
The install-guide has replaced apt-get with apt. Follow this move.

Change-Id: Icea4bff568d6e40a949f69d3f1b0659327352ccd
2017-02-05 14:16:25 +01:00

31 lines
813 B
Bash
Executable File

#!/usr/bin/env bash
set -o errexit -o nounset
TOP_DIR=$(cd "$(dirname "$0")/.." && pwd)
source "$TOP_DIR/config/paths"
source "$CONFIG_DIR/credentials"
source "$LIB_DIR/functions.guest.sh"
exec_logfile
indicate_current_auto
#------------------------------------------------------------------------------
# Memcached
# http://docs.openstack.org/newton/install-guide-ubuntu/environment-memcached.html
#------------------------------------------------------------------------------
echo "Installing memcache packages."
sudo apt install -y memcached python-memcache
MGMT_IP=$(get_node_ip_in_network "$(hostname)" "mgmt")
echo "Binding memcached server to $MGMT_IP."
conf=/etc/memcached.conf
sudo sed -i "s/^-l 127.0.0.1/-l $MGMT_IP/" $conf
echo "Restarting memcache service."
sudo service memcached restart