Changes between Version 11 and Version 12 of Csle2022/Agenda/Ansible


Ignore:
Timestamp:
Nov 17, 2022, 11:25:29 AM (2 years ago)
Author:
dushmantha
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Csle2022/Agenda/Ansible

    v11 v12  
    77Participants are requested to have a computer with Windows 8/10/11 (8GB RAM, 25GB free disk space) with Virtualbox (version 6 or higher) hypervisor and PuTTY installed.[[BR]]
    88 
    9 
    109In Virtualbox, 'Extension pack' should be installed.
    1110
    1211A wired internet connection is preferred.
    13 
    1412
    1513[[BR]]
     
    2624
    2725May have to create Virtualbox Host-Only Network Adapter[[BR]]
    28 
    2926
    3027{{{
     
    7572}}}
    7673
    77 ''In managed node''
    78 
    79 Copy the ssh keys generated on the master node and save it in the authorized_keys file on both worker nodes.
     74Copy the ssh keys (the output of the above command) generated on the master node, paste and save it in the authorized_keys file on both managed nodes.
    8075
    8176{{{
     
    8378}}}
    8479
    85 '''Create the Playbook - In control node'''
     80
     81'''Add the managed nodes to control node Ansible hosts file'''
     82
     83Login as root to the control node.
     84{{{
     85nano /etc/ansible/hosts
     86}}}
     87
     88Insert the following with the required changes according to your setting.
     89{{{
     90[Dbservers]
     91
     92db1 ansible_ssh_user=docker ansible_ssh_host=<first managed node IP address>
     93
     94db2 ansible_ssh_user=docker ansible_ssh_host=<second managed node IP address>
     95}}}
     96
     97
     98{{{
     99Verify connectivity
     100}}}
     101 
     102{{{
     103ansible -m ping Dbservers
     104}}}
     105
     106'''Create the Playbook - In control node - As root'''
    86107
    87108{{{
     
    132153}}}
    133154
    134 '''Run the Playbook - In control node'''
     155'''Run the Playbook - In control node - As root'''
    135156
    136157{{{
     
    138159}}}
    139160
     161'''Verify results - In managed nodes'''
     162
     163{{{
     164mysql -u root -p
     165show databases;
     166}}}