Skip to content

Commit

Permalink
Merge branch 'reallocate-disk-space-for-ocp' into 'master'
Browse files Browse the repository at this point in the history
Reallocate disk space for ocp

See merge request !58
  • Loading branch information
detiber committed Apr 28, 2017
2 parents 77d3559 + 1882601 commit 7e60cd2
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 14 deletions.
5 changes: 5 additions & 0 deletions setup-kvm-and-openstack/build-rhosp-vm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ do
done
echo ""

# Inject key for user
cmd virt-customize -a ${VM_IMAGE_PATH} \
--ssh-inject user1:file:${SSH_KEY_FILENAME}.pub \
--selinux-relabel

# Remove image if it exists
DATETIME=$(date +%Y%m%d%H%M%S)
if [ -f ${FILESHARE_DEST_BASE}/${OSP_VM_NAME}/${OSP_VM_IMAGE_NAME}.${DATETIME} ]
Expand Down
2 changes: 1 addition & 1 deletion setup-kvm-and-openstack/group_vars_all
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ OSP_VM_IMAGE_NAME=${OSP_VM_NAME}.qcow2
OSP_VM_IMAGE_PATH=${IMAGE_LOCAL_DIR}/${OSP_VM_IMAGE_NAME}
OSP_VM_HOSTNAME=${OSP_NAME}.${ADMIN_DOMAIN}
OSP_VM_TOTAL_DISK_SIZE=100G
OSP_VM_ROOT_DISK_SIZE=25G
OSP_VM_ROOT_DISK_SIZE=15G
OSP_BASE_IMAGE_NAME=rhel-guest-image-7.3-35.x86_64.qcow2
OSP_BASE_IMAGE_URL=http://${FILESHARE_HOST}/fileshare/images/${OSP_BASE_IMAGE_NAME}
OSP_BASE_IMAGE_PATH=${IMAGE_STAGING_DIR}/${OSP_BASE_IMAGE_NAME}
Expand Down
2 changes: 1 addition & 1 deletion setup-kvm-and-openstack/openstack-scripts/answers.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1144,7 +1144,7 @@ CONFIG_SWIFT_STORAGE_FSTYPE=ext4
CONFIG_SWIFT_HASH=53b7bcb5e03f4afd

# Size of the Object Storage loopback file storage device.
CONFIG_SWIFT_STORAGE_SIZE=20G
CONFIG_SWIFT_STORAGE_SIZE=2G

# Password used by Orchestration service user to authenticate against
# the database.
Expand Down
31 changes: 19 additions & 12 deletions setup-kvm-and-openstack/openstack-scripts/openstack-env-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,13 @@ post-install-config() {
openstack-config --set /etc/neutron/dhcp_agent.ini DEFAULT enable_isolated_metadata true
fi
cmd openstack-service restart
cmd useradd ${USERNAME}
cmd usermod ${USERNAME} -G wheel
echo "${PASSWORD}" | passwd ${USERNAME} --stdin
cmd sed -i 's/cloud-user/user1/g' /etc/sudoers
# Remove repos
cmd rhos-release -x
cmd yum -y remove rhos-release
}

post-install-admin-tasks() {
Expand Down Expand Up @@ -126,6 +133,9 @@ export OS_AUTH_URL=http://${CONTROLLER_HOST}:35357/v2.0/
export PS1='[\u@\h \W(keystone_${USERNAME})]\$ '
EOF
echo "source /root/keystonerc_${USERNAME}">> /root/.bashrc
echo "source /home/${USERNAME}/keystonerc_${USERNAME}">> /home/${USERNAME}/.bashrc
cp /root/keystonerc_${USERNAME} /home/${USERNAME}/.
chown ${USERNAME}:${USERNAME} /home/${USERNAME}/keystonerc_${USERNAME}
}

create-images() {
Expand Down Expand Up @@ -325,9 +335,6 @@ cleanup() {
fi
done
echo ""
# Remove repos
cmd rhos-release -x
cmd yum -y remove rhos-release
}

# Main
Expand All @@ -339,14 +346,14 @@ post-install-config 2>&1 | tee -a ${LOGFILE}
post-install-admin-tasks 2>&1 | tee -a ${LOGFILE}
create-images 2>&1 | tee -a ${LOGFILE}
post-install-user-tasks 2>&1 | tee -a ${LOGFILE}
build-instances 2>&1 | tee -a ${LOGFILE}
source /root/keystonerc_${USERNAME}
if nova list | grep ERROR
then
echo "ERROR: Something went wrong, check virt capabilities of this host ..."
exit 1
fi
verify-networking 2>&1 | tee -a ${LOGFILE}
cleanup 2>&1 | tee -a ${LOGFILE}
#build-instances 2>&1 | tee -a ${LOGFILE}
#source /root/keystonerc_${USERNAME}
#if nova list | grep ERROR
#then
# echo "ERROR: Something went wrong, check virt capabilities of this host ..."
# exit 1
#fi
#verify-networking 2>&1 | tee -a ${LOGFILE}
#cleanup 2>&1 | tee -a ${LOGFILE}

echo "INFO: All functions completed" 2>&1 | tee -a ${LOGFILE}

0 comments on commit 7e60cd2

Please sign in to comment.