aboutsummaryrefslogtreecommitdiffstats
path: root/deployed-server/deployed-server-bootstrap-centos.sh
blob: 6f2bb124b100edb8bf8a80fc779590c9c5c2cb9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash

set -eux

yum install -y \
    jq \
    python-ipaddr \
    openstack-puppet-modules \
    os-net-config \
    openvswitch \
    python-heat-agent* \
    openstack-selinux

ln -s -f /usr/share/openstack-puppet/modules/* /etc/puppet/modules

setenforce 0
sed -i 's/^SELINUX=.*/SELINUX=permissive/' /etc/selinux/config

echo '# empty ruleset created by deployed-server bootstrap' > /etc/sysconfig/iptables
echo '# empty ruleset created by deployed-server bootstrap' > /etc/sysconfig/ip6tables
"$file" ) > "$temp" echo "INFO: Updating hosts file $file, check below for changes" diff "$file" "$temp" || true cat "$temp" > "$file" else echo -ne "\n# HEAT_HOSTS_START - Do not edit manually within this section!\n" >> "$file" echo "$entries" >> "$file" echo -ne "# HEAT_HOSTS_END\n\n" >> "$file" fi } if [ ! -z "$hosts" ]; then for tmpl in /etc/cloud/templates/hosts.*.tmpl ; do write_entries "$tmpl" "$hosts" done write_entries "/etc/hosts" "$hosts" else echo "No hosts in Heat, nothing written." fi