Hi,

Following up - I switched tacks and tried to install my 2 node cluster
with openshift-ansible.

I set up passwordless sudo for an unprivileged user on 2 hosts, host1
and host2, and ensured that both root and the unprivileged user could
ssh into both hosts passwordless from anywhere (for Ansible connectivity).

I created a 2-node manifest file (attached, names changed to protect the
guilty). The hostnames are not managed by DNS, just in the /etc/hosts
(both hosts are picking up hostnames from DHCP, which is an issue later on).

I checked out the 3.9 release of
https://github.com/openshift/openshift-ansible.git installed the 2.4.3.0
release of Ansible for CentOS 7 (from releases.ansible.com), and ran the
following commands:

# ansible-playbook -i 2-node.yml playbooks/prerequisites.yml
# ansible-playbook -i 2-node.yml playbooks/deploy_cluster.yml
# ansible -i 2-node.yml masters -a 'oadm policy add-cluster-role-to-user
cluster-admin admin'

All the commands had a ton of messages, and the 2nd finished with an
error report - but I could see a login screen at host1.example.com:8443
- when I tried to log in with admin/OriginAdmin (the password I set in
the .yml file), I couldn't connect - the URL changes to the
DHCP-assigned hostname and screws things up.

The failure report from the 2nd command:

Failure summary:


  1. Hosts:    host2.example.com
     Play:     Additional node config
     Task:     Wait for Node Registration
     Message:  Failed without returning a message.

  2. Hosts:    host1.example.com
     Play:     Create Hosted Resources - registry
     Task:     Configure a passthrough route for docker-registry
     Message:  {u'cmd': u'/bin/oc replace -f /tmp/docker-registry-m68qM8
--force -n default', u'returncode': 1, u'results': {}, u'stderr':
u'error: timed out waiting for the condition\n', u'stdout': u'route
"docker-registry" deleted\n'}



In addition, when I run the last command, I get:
host1.example.com | FAILED | rc=1 >>
DEPRECATED: The 'oadm' command is deprecated, please use 'oc adm' instead.
Error from server (Forbidden):
clusterrolebindings.authorization.openshift.io is forbidden: User
"system:anonymous" cannot list
clusterrolebindings.authorization.openshift.io at the cluster scope:
User "system:anonymous" cannot list all
clusterrolebindings.authorization.openshift.io in the clusternon-zero
return code


So - I'm stuck. My questions:

* Do I need to ensure full reverse DNS look-up for both host1 and host2?
* What's up with the oc adm command failure?
* Is this close to working? How can I tell?

Thanks,
Dave.


On 04/18/2018 09:08 PM, Cesar Wong wrote:
> Hi Dave, 
> 
> 'oc cluster up' is not meant to be used to  run a multi-node cluster. 
> It will only stand up a single-node cluster. The main issue is
> networking. It won't setup an sdn for you.
> However, you can make it listen on an alternate address by specifying a
> numeric IP address with --public-hostname 
> 
> The oc cluster join command is an experimental command meant to add a
> node to an existing cluster that was setup via ansible. Despite the
> common command prefix, it has no relation to 'oc cluster up'.
> 
> To install openshift on 2 nodes, please use the openshift-ansible
> installer. You'd need to setup ansible in a client machine and create an
> inventory file that points to your 2 machines. You can find a sample
> inventory and instructions here:
> https://docs.openshift.org/3.9/install_config/install/advanced_install.html#single-master
> 
> 
> On Wed, Apr 18, 2018 at 6:20 PM, Dave Neary <[email protected]
> <mailto:[email protected]>> wrote:
> 
>     Hi all,
> 
>     I am trying to set up a small 2 node OpenShift cluster on two NUCs (each
>     with 16G of RAM and 120GB SSDs), and I've hit a snag.
> 
>     It looked like oc cluster up/oc cluster join would be the easiest way to
>     do it without setting up independent VMs and using minishift, so that is
>     what I'm trying.
> 
>     I'm following the instructions here:
>     https://wiki.centos.org/SpecialInterestGroup/PaaS/OpenShift-Quickstart
>     <https://wiki.centos.org/SpecialInterestGroup/PaaS/OpenShift-Quickstart>
> 
>     My issues:
> 
>     * On master: oc cluster up is listening on 127.0.0.1 rather than an
>     externally accessible IP address - oc cluster --help doesn't give any
>     clue as to how to set the IP address for the server to listen on
>     * On node: oc cluster join wants a secret from the master - an internet
>     search tells me that I can get that by copying and pasting the value of
>     admin/kubeconfig - but I have no idea where to find that.
> 
>     Anyone know how to change the IP the server listens on, and add one
>     other node to make a 2 node cluster? If this is ill advised for any
>     reason, how would you install OpenShift on 2 nodes like this?
> 
>     Thanks,
>     Dave.
> 
>     -- 
>     Dave Neary - Open Source and Standards team
>     Red Hat - http://community.redhat.com
>     Ph: +1-978-399-2182 / Cell: +1-978-799-3338
> 
>     _______________________________________________
>     users mailing list
>     [email protected]
>     <mailto:[email protected]>
>     http://lists.openshift.redhat.com/openshiftmm/listinfo/users
>     <http://lists.openshift.redhat.com/openshiftmm/listinfo/users>
> 
> 

-- 
Dave Neary - Open Source and Standards team
Red Hat - http://community.redhat.com
Ph: +1-978-399-2182 / Cell: +1-978-799-3338

Attachment: 2-node.yml
Description: application/yaml

_______________________________________________
users mailing list
[email protected]
http://lists.openshift.redhat.com/openshiftmm/listinfo/users

Reply via email to