Get rid of usage of stackuser element on the undercloud and overcloud. Use

local-config for the undercloud image in a virt setup instead. That will allow
ssh'ing as root to the instack vm, and then su'ing to the stack user.
This commit is contained in:
James Slagle 2015-01-08 12:54:29 -05:00
parent 1adcb0931f
commit 212f8a6144
4 changed files with 14 additions and 6 deletions

View File

@ -1,2 +1,2 @@
stackuser
vm
local-config

View File

@ -5,6 +5,15 @@ set -o pipefail
install-packages net-tools yum-utils git
useradd -m stack
cat > /etc/sudoers.d/stack <<eof
stack ALL=(ALL) NOPASSWD:ALL
eof
chmod 0440 /etc/sudoers.d/stack
visudo -c
mkdir -p /home/stack/.ssh
cp /tmp/in_target.d/id_rsa_virt_power /home/stack/.ssh/id_rsa_virt_power
cp /tmp/in_target.d/id_rsa_virt_power.pub /home/stack/.ssh/id_rsa_virt_power.pub
@ -13,4 +22,3 @@ cp /tmp/in_target.d/instack.answers.sample /home/stack/instack.answers
cp /tmp/in_target.d/$TE_DATAFILE /home/stack/instackenv.json
chown -R stack:stack /home/stack

View File

@ -82,7 +82,6 @@ pip-cache \
rabbitmq-server \
snmpd \
stable-interface-names \
stackuser \
swift-proxy \
swift-storage \
use-ephemeral \
@ -105,7 +104,6 @@ pip-cache \
pypi-openstack \
snmpd \
stable-interface-names \
stackuser \
use-ephemeral \
sysctl \
"}
@ -124,7 +122,6 @@ pip-cache \
pypi-openstack \
snmpd \
stable-interface-names \
stackuser \
use-ephemeral \
sysctl \
"}
@ -141,7 +138,6 @@ dhcp-all-interfaces \
hosts \
ntp \
snmpd \
stackuser \
stable-interface-names \
use-ephemeral \
os-refresh-config-reboot \

View File

@ -103,6 +103,10 @@ while true; do
IP=$(cat /var/lib/libvirt/dnsmasq/default.leases | grep $(tripleo get-vm-mac $UNDERCLOUD_VM_NAME) | awk '{print $3;}')
if [ -n "$IP" ]; then
echo "$UNDERCLOUD_VM_NAME vm IP address is $IP"
echo "You can connect by running:"
echo "ssh root@$IP"
echo "And then su to the stack user:"
echo "su - stack"
break
fi
sleep 3