Cleanup template formatting

This patch is meant to cleanup indentations in the templates, as
well some other house keeping fixes.

Closes-Bug: #1504685
Change-Id: I43f6cca8f449dea2db4de6a5308bfa5e4551838e
This commit is contained in:
Zachary Sais 2015-10-17 16:52:19 -05:00
parent 8f84055caf
commit 485d9a9018
19 changed files with 61 additions and 65 deletions

View File

@ -7,8 +7,8 @@ if [ "$HTTP_PROXY" != "" ]; then
[Service]
Environment=HTTP_PROXY=$HTTP_PROXY
EOF
systemctl daemon-reload
systemctl --no-block restart docker.service
systemctl daemon-reload
systemctl --no-block restart docker.service
if [ -f "/etc/bashrc" ]; then
cat >> /etc/bashrc <<EOF
declare -x http_proxy=$HTTP_PROXY

View File

@ -1,6 +1,6 @@
#!/bin/sh
echo starting services
echo "starting services"
systemctl daemon-reload
for service in $NODE_SERVICES; do
echo "activating service $service"

View File

@ -1,4 +1,4 @@
#!/bin/sh
echo removing docker key
echo "removing docker key"
rm -f /etc/docker/key.json

View File

@ -23,4 +23,3 @@ vgcreate docker $DOCKER_DEV
cat > /etc/sysconfig/docker-storage-setup <<EOF
VG=docker
EOF

View File

@ -18,7 +18,7 @@ cat > $FLANNEL_JSON <<EOF
EOF
if [ "$use_vxlan" = 1 ]; then
cat >> $FLANNEL_JSON <<EOF
cat >> $FLANNEL_JSON <<EOF
,
"Backend": {
"Type": "vxlan"
@ -41,4 +41,3 @@ echo "creating flanneld config in etcd"
curl -sf -L $FLANNEL_ETCD/v2/keys/coreos.com/network/config \
-X PUT \
--data-urlencode value@/etc/sysconfig/flannel-network.json

View File

@ -15,26 +15,26 @@ fi
KUBE_MASTER_URI="$KUBE_PROTOCOL://$KUBE_MASTER_IP:$KUBE_API_PORT"
sed -i '
/^KUBE_ALLOW_PRIV=/ s/=.*/="--allow_privileged='"$KUBE_ALLOW_PRIV"'"/
/^KUBE_ETCD_SERVERS=/ s|=.*|="--etcd_servers=http://'"$ETCD_SERVER_IP"':2379"|
/^KUBE_MASTER=/ s|=.*|="--master='"$KUBE_MASTER_URI"'"|
/^KUBE_ALLOW_PRIV=/ s/=.*/="--allow_privileged='"$KUBE_ALLOW_PRIV"'"/
/^KUBE_ETCD_SERVERS=/ s|=.*|="--etcd_servers=http://'"$ETCD_SERVER_IP"':2379"|
/^KUBE_MASTER=/ s|=.*|="--master='"$KUBE_MASTER_URI"'"|
' /etc/kubernetes/config
sed -i '
/^KUBELET_ADDRESS=/ s/=.*/="--address=0.0.0.0"/
/^KUBELET_HOSTNAME=/ s/=.*/=""/
/^KUBELET_API_SERVER=/ s|=.*|="--api_servers='"$KUBE_MASTER_URI"'"|
/^KUBELET_ARGS=/ s|=.*|='"$KUBE_CONFIG"'|
/^KUBELET_ADDRESS=/ s/=.*/="--address=0.0.0.0"/
/^KUBELET_HOSTNAME=/ s/=.*/=""/
/^KUBELET_API_SERVER=/ s|=.*|="--api_servers='"$KUBE_MASTER_URI"'"|
/^KUBELET_ARGS=/ s|=.*|='"$KUBE_CONFIG"'|
' /etc/kubernetes/kubelet
sed -i '
/^KUBE_PROXY_ARGS=/ s|=.*|='"$KUBE_CONFIG"'|
/^KUBE_PROXY_ARGS=/ s|=.*|='"$KUBE_CONFIG"'|
' /etc/kubernetes/proxy
if [ "$NETWORK_DRIVER" == "flannel" ]; then
sed -i '
/^FLANNEL_ETCD=/ s|=.*|="http://'"$ETCD_SERVER_IP"':2379"|
' /etc/sysconfig/flanneld
sed -i '
/^FLANNEL_ETCD=/ s|=.*|="http://'"$ETCD_SERVER_IP"':2379"|
' /etc/sysconfig/flanneld
fi
cat >> /etc/environment <<EOF

View File

@ -6,7 +6,7 @@ if [ "$REGISTRY_ENABLED" = "False" ]; then
exit 0
fi
echo starting docker registry ...
echo "starting docker registry ..."
systemctl daemon-reload
systemctl enable registry
systemctl --no-block start registry

View File

@ -1,6 +1,5 @@
#!/bin/sh
echo starting etcd
echo "starting etcd"
systemctl enable etcd
systemctl --no-block start etcd

View File

@ -3,11 +3,9 @@
# make sure we pick up any modified unit files
systemctl daemon-reload
echo starting services
echo "starting services"
for service in etcd kube-apiserver kube-scheduler kube-controller-manager; do
echo "activating service $service"
systemctl enable $service
systemctl --no-block start $service
done

View File

@ -15,4 +15,3 @@ for service in docker kubelet kube-proxy; do
systemctl enable $service
systemctl --no-block start $service
done

View File

@ -7,4 +7,3 @@ system_info:
groups: [wheel, adm, systemd-journal]
sudo: ["ALL=(ALL) NOPASSWD:ALL"]
shell: /bin/bash

View File

@ -76,7 +76,7 @@ curl -X POST \
$MAGNUM_URL/certificates | python -c 'import sys, json; print json.load(sys.stdin)["pem"]' > ${CLIENT_CERT}
sed -i '
s|CA_CERT|'"$CA_CERT"'|
s|CLIENT_CERT|'"$CLIENT_CERT"'|
s|CLIENT_KEY|'"$CLIENT_KEY"'|
s|CA_CERT|'"$CA_CERT"'|
s|CLIENT_CERT|'"$CLIENT_CERT"'|
s|CLIENT_KEY|'"$CLIENT_KEY"'|
' /srv/kubernetes/kubeconfig.yaml

View File

@ -2,7 +2,9 @@
. /etc/sysconfig/heat-params
if [ "$NETWORK_DRIVER" == "flannel" ]; then
if [ "$NETWORK_DRIVER" != "flannel" ]; then
exit 0
fi
. /etc/sysconfig/flanneld
@ -54,4 +56,3 @@ chmod 0644 $FLANNEL_CONFIG_SERVICE
systemctl enable flannel-config
systemctl start --no-block flannel-config
fi # end if [ "$NETWORK_DRIVER" == "flannel" ]

View File

@ -2,7 +2,9 @@
. /etc/sysconfig/heat-params
if [ "$NETWORK_DRIVER" == "flannel" ]; then
if [ "$NETWORK_DRIVER" != "flannel" ]; then
exit 0
fi
FLANNEL_DOCKER_BRIDGE_BIN=/usr/local/bin/flannel-docker-bridge
FLANNEL_DOCKER_BRIDGE_SERVICE=/etc/systemd/system/flannel-docker-bridge.service
@ -73,5 +75,3 @@ chmod 0644 $FLANNEL_DOCKER_BRIDGE_CONF
echo "activating service flanneld"
systemctl enable flanneld
systemctl --no-block start flanneld
fi

View File

@ -19,4 +19,3 @@ monitor-delay=1m
monitor-timeout=30s
monitor-max-retries=3
EOF

View File

@ -2,7 +2,10 @@
. /etc/sysconfig/heat-params
if [ "$NETWORK_DRIVER" == "flannel" ]; then
if [ "$NETWORK_DRIVER" != "flannel" ]; then
exit 0
fi
. /etc/sysconfig/flanneld
FLANNEL_JSON=/etc/sysconfig/flannel-network.json
@ -12,7 +15,7 @@ FLANNEL_NETWORK_SUBNETLEN="$FLANNEL_NETWORK_SUBNETLEN"
FLANNEL_USE_VXLAN="$FLANNEL_USE_VXLAN"
sed -i '
/^FLANNEL_ETCD=/ s/=.*/="http:\/\/127.0.0.1:2379"/
/^FLANNEL_ETCD=/ s/=.*/="http:\/\/127.0.0.1:2379"/
' /etc/sysconfig/flanneld
if [ "$FLANNEL_USE_VXLAN" == "true" ]; then
@ -28,7 +31,7 @@ cat > $FLANNEL_JSON <<EOF
EOF
if [ "$use_vxlan" = 1 ]; then
cat >> $FLANNEL_JSON <<EOF
cat >> $FLANNEL_JSON <<EOF
,
"Backend": {
"Type": "vxlan"
@ -39,5 +42,3 @@ fi
cat >> $FLANNEL_JSON <<EOF
}
EOF
fi

View File

@ -20,4 +20,6 @@ echo "$myip" > /etc/mesos-slave/ip
echo "docker,mesos" > /etc/mesos-slave/containerizers
# Amount of time to wait for an executor to register
echo "$EXECUTOR_REGISTRATION_TIMEOUT" > /etc/mesos-slave/executor_registration_timeout
cat > /etc/mesos-slave/executor_registration_timeout <<EOF
$EXECUTOR_REGISTRATION_TIMEOUT
EOF