-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OPENSHIFTP-201: Pull Request created for CICD-pipeline with sh file changes and yaml file changes. #70
Conversation
mount_etcd_to_ext_vol.sh Changes incorporated as per the review comments for etcd-mc.yaml and mount_etcd_to_ext_vol.sh. etcd-mc.yaml --> spec version updated to 3.2; Extra garbage lines removed hani mount_etct_to_ext_vol.sh --> 1. var_rg updated 2. ibmcloud replaced with ${IBMCLOUD}; corresponding code block added. 3. rdr-ca referred as var_vpc_prefix 4. While loop added to check for Volume status. While loop will run until Volume status is other than available(Pending). 5. If stmt added for CICD variable. We will mention "We do not backup etcd" for CICD. 6. Need help with the next step --> Execute the MachineConfig to migrate/attach. We need to do oc login before executing the command "oc create -f etcd-mc.yaml". Signed-off-by: mpkpersistent <130049908+mpkpersistent@users.noreply.github.com> etcd-mc.yaml --> spec version updated to 3.2; Extra garbage lines removed README.md --> Lines added for exit code 77 mount_etct_to_ext_vol.sh --> 1. var_rg updated 2. ibmcloud replaced with ${IBMCLOUD}; corresponding code block added. 3. rdr-ca referred as var_vpc_prefix 4. While loop added to check for Volume status. While loop will run until Volume status is other than available(Pending). 5. If stmt added for CICD variable. We will mention "We do not backup etcd" for CICD. 6. Need help with the next step --> Execute the MachineConfig to migrate/attach. We need to do oc login before executing the command "oc create -f etcd-mc.yaml". Commit with Amend option. Signed-off-by: mpkpersistent <130049908+mpkpersistent@users.noreply.github.com> Changes done for Issue#201(https://jsw.ibm.com/browse/OPENSHIFTP-201) Changes incorporated as per the review comments for etcd-mc.yaml and mount_etcd_to_ext_vol.sh. etcd-mc.yaml --> spec version updated to 3.2; Extra garbage lines removed README.md --> Lines added for exit code 77 mount_etct_to_ext_vol.sh --> 1. var_rg updated 2. ibmcloud replaced with ${IBMCLOUD}; corresponding code block added. 3. rdr-ca referred as var_vpc_prefix 4. While loop added to check for Volume status. While loop will run until Volume status is other than available(Pending). 5. If stmt added for CICD variable. We will mention "We do not backup etcd" for CICD. 6. Need help with the next step --> Execute the MachineConfig to migrate/attach. We need to do oc login before executing the command "oc create -f etcd-mc.yaml". Signed-off-by: mpkpersistent <130049908+mpkpersistent@users.noreply.github.com> etcd-mc.yaml --> spec version updated to 3.2; Extra garbage lines removed README.md --> Lines added for exit code 77 mount_etct_to_ext_vol.sh --> 1. var_rg updated 2. ibmcloud replaced with ${IBMCLOUD}; corresponding code block added. 3. rdr-ca referred as var_vpc_prefix 4. While loop added to check for Volume status. While loop will run until Volume status is other than available(Pending). 5. If stmt added for CICD variable. We will mention "We do not backup etcd" for CICD. 6. Need help with the next step --> Execute the MachineConfig to migrate/attach. We need to do oc login before executing the command "oc create -f etcd-mc.yaml". Commit with Amend option. Shell script added for Mounting external volume and copying etcd contents to external volume Signed-off-by: mpkpersistent <130049908+mpkpersistent@users.noreply.github.com> Changes done for the script file:/mount_etcd_ext_volume.sh ( Creating and attaching the volume; running the machineconfig yaml file and then also verifying if the mount point is correctly created) Signed-off-by: mpkpersistent <130049908+mpkpersistent@users.noreply.github.com>
0209ebe
to
e280bec
Compare
- path: /etc/find-secondary-device | ||
mode: 493 | ||
contents: | ||
source: data:text/plain;charset=utf-8;base64,IyEvYmluL2Jhc2gKc2V0IC11byBwaXBlZmFpbAoKZm9yIGRldmljZSBpbiAvZGV2L3ZkKjsgZG8KL3Vzci9zYmluL2Jsa2lkICRkZXZpY2UgJj4gL2Rldi9udWxsCmlmIFsgJD8gPT0gMiBdOyB0aGVuCiAgZWNobyAic2Vjb25kYXJ5IGRldmljZSBmb3VuZCAkZGV2aWNlIgogIGVjaG8gImNyZWF0aW5nIGZpbGVzeXN0ZW0gZm9yIGV0Y2QgbW91bnQiCiAgbWtmcy54ZnMgLUwgdmFyLWxpYi1ldGNkIC1mICRkZXZpY2UgJj4gL2Rldi9udWxsCiAgdWRldmFkbSBzZXR0bGUKICB0b3VjaCAvZXRjL3Zhci1saWItZXRjZC1tb3VudAogIGV4aXQKZmkKZG9uZQplY2hvICJDb3VsZG4ndCBmaW5kIHNlY29uZGFyeSBibG9jayBkZXZpY2UhIiA+JjIKZXhpdCA3Nwo= |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#!/bin/bash
set -uo pipefail
for device in /dev/vd*; do
/usr/sbin/blkid $device &> /dev/null
if [ $? == 2 ]; then
echo "secondary device found $device"
echo "creating filesystem for etcd mount"
mkfs.xfs -L var-lib-etcd -f $device &> /dev/null
udevadm settle
touch /etc/var-lib-etcd-mount
exit
fi
done
echo "Couldn't find secondary block device!" >&2
exit 77
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, no hidden chars
Signed-off-by: Paul Bastide <pbastide@us.ibm.com>
Signed-off-by: Paul Bastide <pbastide@us.ibm.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
This Pull request is having 4 files :
README.md ( Instructions to run the script)
ocp_login.sh ( OC Login creds to be populated)
98-master-lib-etcd-mc.yaml(MachineConfig YAML as discussed)
mount_etcd_ext_volume.sh( Shell script with file changes for Creating Volume, attaching volume, Creating MAchineConfig and Verfying the etcd mount point creation logic for the attached volume)