Make ssh-key optional
Bareon is capable to fetch ssh-key from ironic conductor, after start. So we can avoid preinstalled ssh-key in bareon image. But ssh-key is extremelly helpfull for debugging. This change switch ssk-key from mandatory to optional. It also add "hook" for injecting root passwords inside bareon-image. It can/should be used for debugging too. (In case if you will have access to node's console). Change-Id: Icb27d40c9872703d9b01a8c7705ad7b185277e6b
This commit is contained in:
parent
4ee9bbe3e5
commit
4b734a3673
|
@ -35,8 +35,8 @@ git clone -b $DIB_BRANCH $DIB_SRC
|
|||
git clone -b $DIB_UTILS_BRANCH $DIB_UTILS_SRC
|
||||
git clone -b $DIB_ELEMENTS_BRANCH $DIB_ELEMENTS_SRC
|
||||
|
||||
# Prepare SSH key
|
||||
ssh-keygen -N '' -f bareon_key
|
||||
cp -f bareon_key.pub "$BUILD_DIR/bareon-image-elements/centos-bareon/install.d/files.ironic/root/.ssh/authorized_keys"
|
||||
|
||||
# Apply changes from https://review.openstack.org/319909
|
||||
# The problem is still actual for CentOS (https://bugs.launchpad.net/diskimage-builder/+bug/1650582)
|
||||
|
@ -52,6 +52,8 @@ export ELEMENTS_PATH="$BUILD_DIR/bareon-image-elements"
|
|||
export DIB_OFFLINE=1
|
||||
export DIB_DEBUG_TRACE=1
|
||||
export DIB_DATA_ROOT="$BUILD_DIR"
|
||||
#export DIB_BAREON_ROOT_PASSWORD=""
|
||||
[ -f bareon_key ] && export DIB_BAREON_INJECT_SSH_KEY="$PWD/bareon_key.pub"
|
||||
|
||||
disk-image-create -n -t raw -o cent-min centos-minimal centos-bareon
|
||||
|
||||
|
|
Loading…
Reference in New Issue