diff --git a/bind-install.sh b/bind-install.sh deleted file mode 100755 index 27b7c69..0000000 --- a/bind-install.sh +++ /dev/null @@ -1,87 +0,0 @@ -#!/bin/bash - -apt-get install --yes bind9 -mv /etc/bind/named.conf.options /etc/bind/named.conf.options.org.$$ -mv /etc/bind/named.conf.local /etc/bind/named.conf.local.$$ -BASTION_IP="10.5.17.29" -IP=$(ip -4 addr show eth0 | awk '/inet/ {print $2}' | sed -e 's!/.*!!') -REV=$(echo $IP | awk 'BEGIN{FS="."} {print $3 "." $2 "." $1}') -LAST_OCTET=$(echo $IP | awk 'BEGIN{FS="."} {print $4}') -UNAME=$(uname -n) -cat << EOF > /etc/bind/named.conf.options -options { - directory "/var/cache/bind"; - - // If there is a firewall between you and nameservers you want - // to talk to, you may need to fix the firewall to allow multiple - // ports to talk. See http://www.kb.cert.org/vuls/id/800113 - - // If your ISP provided one or more IP addresses for stable - // nameservers, you probably want to use them as forwarders. - // Uncomment the following block, and insert the addresses replacing - // the all-0's placeholder. - - forwarders { - $BASTION_IP; - }; - - //======================================================================== - // If BIND logs error messages about the root key being expired, - // you will need to update your keys. See https://www.isc.org/bind-keys - //======================================================================== - dnssec-validation auto; - - auth-nxdomain no; # conform to RFC1035 - listen-on-v6 { any; }; -}; -EOF - -cat << EOF > /etc/bind/named.conf.local -// forward zone -zone "openstacklocal." { - type master; - file "/etc/bind/db.openstacklocal.com"; -}; -// reverse zone -zone "${REV}.in-addr.arpa" { - type master; - notify no; - file "/etc/bind/db.10"; -}; -EOF -TTL='$TTL' - -cat << EOF > /etc/bind/db.openstacklocal.com -; -; BIND data forward DNS sample for deployment on top of serverstack -; -$TTL 604800 -@ IN SOA ${UNAME}.openstacklocal. root.${UNAME}.openstacklocal. ( - 201511161 ; Serial - 604800 ; Refresh - 86400 ; Retry - 2419200 ; Expire - 604800 ) ; Negative Cache TTL -; -@ IN NS ${UNAME}.openstacklocal. -${UNAME} IN A ${IP} -EOF -cat << EOF > /etc/bind/db.10 -; -; BIND reverse data file DNS sample for deployment on top of serverstack -; -$TTL 604800 -@ IN SOA ${UNAME}.openstacklocal. root.${UNAME}.openstacklocal. ( - 201511161 ; Serial - 604800 ; Refresh - 86400 ; Retry - 2419200 ; Expire - 604800 ) ; Negative Cache TTL -; -@ IN NS ${UNAME}. -${LAST_OCTET} IN PTR ${UNAME}.openstacklocal. -EOF - -echo "nameserver 127.0.0.1" > /etc/resolvconf/resolv.conf.d/head - -/etc/init.d/bind9 restart diff --git a/setup.sh b/setup.sh deleted file mode 100755 index b028672..0000000 --- a/setup.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash -export http_proxy=http://squid.internal:3128 -export https_proxy=http://squid.internal:3128 -export JUJU_REPOSITORY="$(pwd)/build" -export INTERFACE_PATH=interfaces -export LAYER_PATH=layers -rm -rf $JUJU_REPOSITORY -mkdir -p $JUJU_REPOSITORY -if [[ ! -d $INTERFACE_PATH ]]; then - mkdir $INTERFACE_PATH - ( cd $INTERFACE_PATH; - git clone git+ssh://git.launchpad.net/~gnuoy/charms/+source/interface-bind-rndc bind-rndc; ) -fi -if [[ ! -d $LAYER_PATH ]]; then - mkdir $LAYER_PATH - ( cd $LAYER_PATH; - git clone git+ssh://git.launchpad.net/~gnuoy/charms/+source/reactive-openstack-layer openstack; ) -fi -make clean -make generate -# ./kill_charms.sh designate -#juju-deployer -c barbican.yaml -echo $JUJU_REPOSITORY