Skip to content

jenciso/dbserver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 

Repository files navigation

Centos Networking

Editar /etc/sysconfig/network-scripts/ifcfg-enp0s3

ONBOOT=yes
IPADDR=10.0.5.11
PREFIX=24
GATEWAY=10.0.5.1
DNS1=10.0.5.1

Criando usuario ansible

useradd ansible
passwd ansible

Criar o seguinte arquivo

cd /etc/sudoers.d
echo 'ansible ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/ansible

Criar uma chave ssh

su - ansible
ssh-keygen

image

Acessar via Putty ou ssh usando a TCP port 2211

ssh -p 2211 root@localhost

image2

Provision master and nodes

  • To provision the kube-master

From the ansible machine

ansible -m shell -a "echo kube-master.10.0.5.31.xip.io > /etc/hostname" -i inventory centos
ansible -m shell -a "sed -i 's/^IPADDR=10.0.5.11$/IPADDR=10.0.5.31/' /etc/sysconfig/network-scripts/ifcfg-enp0s3" -i inventory centos
ansible -m shell -a "reboot" -i inventory centos
  • To provision the kube-node01

From the ansible machine

ssh-copy-id [email protected]

From the ansible machine

ansible -m shell -a "echo kube-node01.10.0.5.32.xip.io > /etc/hostname" -i inventory centos
ansible -m shell -a "sed -i 's/^IPADDR=10.0.5.11$/IPADDR=10.0.5.32/' /etc/sysconfig/network-scripts/ifcfg-enp0s3" -i inventory centos
ansible -m shell -a "reboot" -i inventory centos

As ansible user, clone the repo

mkdir playbooks
git clone https://github.com/jenciso/ansible-kubeadm-dbserver

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published