Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Add more etcd setup visibility #2214

Merged
merged 5 commits into from
Feb 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions parts/k8s/kubernetesmastercustomdata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -297,10 +297,10 @@ MASTER_ARTIFACTS_CONFIG_PLACEHOLDER
DOWNLOAD_URL={{WrapAsVariable "etcdDownloadURLBase"}}
retrycmd_if_failure 5 5 curl --retry 5 --retry-delay 10 --retry-max-time 30 -L ${DOWNLOAD_URL}/etcd-${ETCD_VER}-linux-amd64.tar.gz -o /tmp/etcd-${ETCD_VER}-linux-amd64.tar.gz
tar xzvf /tmp/etcd-${ETCD_VER}-linux-amd64.tar.gz -C /usr/bin/ --strip-components=1
useradd -U "etcd" > /dev/null 2>&1
usermod -p "$(head -c 32 /dev/urandom | base64)" "etcd" > /dev/null 2>&1
passwd -u "etcd" > /dev/null 2>&1
systemctl daemon-reload
useradd -U "etcd"
usermod -p "$(head -c 32 /dev/urandom | base64)" "etcd"
passwd -u "etcd"
systemctl daemon-reload
sudo sed -i "1iETCDCTL_ENDPOINTS=https://127.0.0.1:2379" /etc/environment
sudo sed -i "1iETCDCTL_CA_FILE={{WrapAsVariable "etcdCaFilepath"}}" /etc/environment
sudo sed -i "1iETCDCTL_KEY_FILE={{WrapAsVariable "etcdClientKeyFilepath"}}" /etc/environment
Expand Down
6 changes: 6 additions & 0 deletions parts/k8s/kubernetesmastercustomscript.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@ if [[ ! -z "${MASTER_NODE}" ]]; then
echo "executing master node provision operations"

useradd -U "etcd"
id "etcd"
if [[ $? -eq 1 ]]; then
echo "failed to add user etcd"
else
echo "etcd user exists"
fi

APISERVER_PRIVATE_KEY_PATH="/etc/kubernetes/certs/apiserver.key"
touch "${APISERVER_PRIVATE_KEY_PATH}"
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/runner/cli_provisioner.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ func (cli *CLIProvisioner) FetchProvisioningMetrics(path string, cfg *config.Con
"/opt/m", "/opt/azure/containers/kubelet.sh", "/opt/azure/containers/provision.sh",
"/opt/azure/provision-ps.log", "/var/log/azure/dnsdump.pcap"}
masterFiles := agentFiles
masterFiles = append(masterFiles, "/opt/azure/containers/mountetcd.sh", "/opt/azure/containers/setup-etcd.sh")
masterFiles = append(masterFiles, "/opt/azure/containers/mountetcd.sh", "/opt/azure/containers/setup-etcd.sh", "/opt/azure/containers/setup-etcd.log")
hostname := fmt.Sprintf("%s.%s.cloudapp.azure.com", cli.Config.Name, cli.Config.Location)
conn, err := remote.NewConnection(hostname, "22", cli.Engine.ClusterDefinition.Properties.LinuxProfile.AdminUsername, cli.Config.GetSSHKeyPath())
if err != nil {
Expand Down