Open main menu

CDOT Wiki β

Changes

OPS535-vl-lab-nfs

460 bytes added, 15:50, 21 July 2023
m
Protected "OPS535-vl-lab-nfs": OER transfer ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))
'''DO NOT USE - Work in Progress'''
<font color='red'>DO NOT USE - Work in Progress</font>
[[Category: OPS535]][[Category: OPS535-Labs]][[Category: rchan]]
=OPS535 Lab 2 (using Virutal Lab)=
ssh-copy-id -i ~/.ssh/id_rsa.pub student@rns-ldap
</pre>
* verify and confirm that you can ssh to your VM2, VM3, and VM4 as 'student' with using without password.
=== Task 2: Configure ansible's inventory file ===
rns-ldap.<your dns domain> ansible_host=192.168.xx.4
</pre>
* The following is an example for student with domain name stud14.ops (please do not include '.ops' in the group name) and network number 14:
<pre>
[stud14.ops]
pri-dns.stud14.ops ansible_host=192.168.14.2
co-nfs.stud14.ops ansible_host=192.168.14.3
rns-ldap.stud14.ops ansible_host=192.168.14.4
</pre>
* create the directory ops535 and labs subdirectory under user student's home directory in VM1<pre>student└── ops535 ├── a1 ├── lab2 ├── lab3 └── lab4</pre>* change the working directory to ~student/ops535/lab2, and run the following commands to gather useful variables about remote hosts that can be used in ansible playbooks:
:* for remote host: vm2
<pre>
==Investigation 3: Scripts for remote administrations==
=== Task 1 ===
Based on [[OPS535-lab-nfs|Lab 2 - NFS lab]], write a bash script named "lab2-nfs-setup.bash" to perform the following tasks on VM3 (co-rns)* more move the network interface ens224 from firewalld's public zone to internal zone
* install the nfs-utils rpm package if it has not already been installed
* create an nfs share directory named '/nfs-pub' with mode '1777'
* update the /etc/exports as required in [[OPS535-lab-nfs|Lab 2 - NFS lab]]
* enable nfs-server service if has not already been enabled
* update firewalld's internal zone to allow nfs3 server service
* update firewalld's internal zone to allow rpc-bind service
* save the script to ~student/ops535/lab2/scripts/lab2-nfs-setup.bash
=== Task 2 ===
Create an ansible playbook named "config-nfs.yml" to perform the same tasks as mentioned in task 1.* save the ansible playbook to ~student/ops535/lab2/playbook/config-nfs.yml* Run the playbook and capture the output to a file named lab2_inv3_task2.txtin the directory ~student/ops535/lab2/log/
==Completing the Lab==
  Follow the instructions on blackboard to submit the labby the due date==Exploration Questions==