- Install Vmware workstation.
- Create a vm with nat network interfaces
- Install basic centos 7
- Set up the network
vi /etc/sysconfig/network-scripts/ifcfg-ens33 TYPE=Ethernet BOOTPROTO=none DEFROUTE=yes PEERDNS=yes PEERROUTES=yes IPADDR=<ip of ansible server> NETMASK=<your netmask> GATEWAY=<your gateway> NAME=ens33 UUID=cc1db5d0-d10e-463f-aac6-ea5a2140f3a1 DEVICE=ens33 ONBOOT=yes
- Set namserver on resolv.conf
vi /etc/resolv.conf nameserver <your router ip address>
- Update the packages, add extra repos and install some tools
yum update yum install epel-release.noarch yum install centos-release-openshift-origin37.noarch yum install mc htop bindutils psmisc bind-utils reboot
- Check for updates
yum update
- Shutdown the server
- Clone the servers to master, infra, and worker1
- Start the vms an set up the ip addresses of the vm’s.
I use the followings:- ansible: 192.168.217.3
- master: 192.168.217.10
- infra: 192.168.217.11
- worker1: 192.168.217.12
- Generate ssh keys for ansible
[root@localhost ~]# ssh-keygen Generating public/private rsa key pair. Enter file in which to save the key (/root/.ssh/id_rsa): Created directory '/root/.ssh'. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /root/.ssh/id_rsa. Your public key has been saved in /root/.ssh/id_rsa.pub. The key fingerprint is: SHA256:r74tpXOLmpvv5KUCjMH7pHwysTNSQukVdR5jwo7jlXw root@localhost.localdomain The key's randomart image is: +---[RSA 2048]----+ | oo = | | . .= o | | .. = .. | | oo+ = E | |o o=o . S | |..=.+ .. | | + * . .oo | |. O o .=+*. | | . * =BX=o. | +----[SHA256]-----+ [root@localhost ~]# ll .ssh/ total 8 -rw-------. 1 root root 1675 Jan 31 21:58 id_rsa -rw-r--r--. 1 root root 408 Jan 31 21:58 id_rsa.pub
I’ll continue the ansible configuration and basic server preparation with ansible.