Click Connect. A new tab will be opened in your browser with a command line interface (CLI) to the EC2 Initiator Instance.
Use a text editor to uncomment and amend the following lines in /etc/iscsi/iscsid.conf
sudo nano /etc/iscsi/iscsid.conf
Use the arrow keys to scroll down to the CHAP Settings as shown below:
Delete the # from the values below and update.
node.session.auth.authmethod = CHAP node.session.auth.username = [initiatorname] node.session.auth.password = awsreinvent2020 node.session.auth.username_in =[Target Name] node.session.auth.password_in = awsreinforce2020
You should then have something that looks like this, with your values entered:
Save and exit the nano editor.
Run the following command on the EC2 Initiator Instance to discover iSCSI volumes on the Volume Gateway replacing [GATEWAY_IP] with the Host IP we recorded previously:
sudo /sbin/iscsiadm --mode discovery --type sendtargets --portal [GATEWAY_IP]:3260
Run the following command on the EC2 Initiator Instance to connect iSCSI volumes on the Volume Gateway replacing [GATEWAY_IP] with the Host IP and [Target] with Target Name recorded previously:
sudo /sbin/iscsiadm --mode node --targetname [Target] --portal [GATEWAY_IP]:3260,1 --login
ls -l /dev/disk/by-path
It should show an output similar to this where the iSCSI disk has been mounted to sda. Note this down as we will use it in the next module.
In this module you have created a Volume Gateway hosted in EC2 with a cached volume. Then you connected this volume to your EC2 Initiator Instance via iSCSI, using CHAP authentication, making it ready for performance testing.
In the next module you will run performance tests using FIO against this cached volume.
Continue to Module 3