Thursday, March 14, 2019

OKD 3.11 ALL IN ONE (un nodo )

1)

verificar que esté correcto el /etc/hostname

[root@qqmelo1c cloud_user]# vim /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
# Cloud Server Hostname mapping
172.31.115.132   qqmelo1c.mylabserver.com qqmelo1c master



2) generar las claves ssh key

[root@qqmelo1c cloud_user]# ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
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:MH3+KnjMDzjolWsaJ60wtHltYlMedGpMtBn7lkqIcz0 root@qqmelo1c.mylabserver.com
The key's randomart image is:
+---[RSA 2048]----+
|      o          |
|     . *         |
|      O o .      |
|   . * * +       |
|  + o E S .      |
| . = O B   .     |
|  = O %+.   .    |
|   * Xoo=. .     |
|    +o.. oo      |
+----[SHA256]-----+

ahora vamos a hacer el copy para que ansible pueda correr en el nodo

[root@qqmelo1c cloud_user]# ssh-copy-id master
/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/root/.ssh/id_rsa.pub"
/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
root@master's password:

Number of key(s) added: 1

Now try logging into the machine, with:   "ssh 'master'"
and check to make sure that only the key(s) you wanted were added.


una vez que está esto, tenemos que instalar los packages.

yum -y install centos-release-openshift-origin311 epel-release docker git pyOpenSS
systemctl start docker
systemctl enable docker
yum -y install openshift-ansible

Y lueego de esto, lo que falta, es tocar el archivo /etc/ansible/hosts

[OSEv3:children]
masters
nodes
etcd

[OSEv3:vars]
ansible_ssh_user=root
ansible_become=true
openshift_deployment_type=origin
openshift_master_identity_providers=[{'name': 'htpasswd_auth', 'login': 'true', 'challenge': 'true', 'kind': 'HTPasswdPasswordIdentityProvider'}]
openshift_master_htpasswd_users={'admin':'$apr1$qEufOSTX$R1ObTWs7YVwmKSjmaWzCa0', 'developer': '$apr1$ojtj8hHs$C9UZtdLoDs2Hcdw2msKOm0'}
os_sdn_network_plugin_name='redhat/openshift-ovs-multitenant'
openshift_master_default_subdomain=apps.mylabserver.com
openshift_docker_insecure_registries=172.30.0.0/16
openshift_disable_check=disk_availability,docker_storage,memory_availability,docker_image_availability

[masters]
qqmelo1c.mylabserver.com openshift_schedulable=true containerized=false

[etcd]
qqmelo1c.mylabserver.com

[nodes]
qqmelo1c.mylabserver.com openshift_node_group_name='node-config-all-in-one'


Luego, corremos el playbook de los prerequisitos.

ansible-playbook /usr/share/ansible/openshift-ansible/playbooks/prerequisites.yml

Y luego el playbook de la instalación

ansible-playbook /usr/share/ansible/openshift-ansible/playbooks/deploy_cluster.yml

No comments: