[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: How to run nodes on separate physical machine from master



I should also mention.  I am running on RHEL hosts.  When I run hostnamectl status on the node host, the hostname is rhel.node.2

On Thu, Jul 9, 2015 at 3:31 PM, Dean Peterson <peterson dean gmail com> wrote:
Thanks for the help.  I think I am almost there.  However, when I run the final command in step 3 (./openshift start node --config=/home/dpeterson/openshift/openshift.local.config/node-rhel.node.2), on the node machine I get the following errors:

E0709 16:26:30.420684    6754 kubelet.go:1524] error getting node: node rhel.node.2 not found
E0709 16:26:31.167404    6754 reflector.go:133] Failed to list *api.Pod: Get https://localhost:8443/api/v1/pods?fieldSelector=spec.host%3Drhel.node.2: dial tcp 127.0.0.1:8443: connection refused
E0709 16:26:31.167482    6754 reflector.go:133] Failed to list *api.Service: Get https://localhost:8443/api/v1/services: dial tcp 127.0.0.1:8443: connection refused
E0709 16:26:31.167463    6754 reflector.go:133] Failed to list *api.Node: Get https://localhost:8443/api/v1/nodes?fieldSelector=metadata.name%3Drhel.node.2: dial tcp 127.0.0.1:8443: connection refused


My node-config.yaml contains the following:

allowDisabledDocker: false
apiVersion: v1
dnsDomain: cluster.local
dnsIP: ""
dockerConfig:
  execHandlerName: native
imageConfig:
  format: openshift/origin-${component}:${version}
  latest: false
kind: NodeConfig
masterKubeConfig: node.kubeconfig
networkPluginName: ""
nodeName: rhel.node.2
podManifestConfig: null
servingInfo:
  bindAddress: 0.0.0.0:10250
  certFile: server.crt
  clientCA: node-client-ca.crt
  keyFile: server.key
volumeDirectory: /home/dpeterson/openshift/openshift.local.volumes

It seems I must be missing one simple thing at this point.  Any ideas?


On Thu, Jul 9, 2015 at 2:17 PM, Jordan Liggitt <jliggitt redhat com> wrote:
You're probably running `openshift start`, which runs a combined master and node, which explains why the node ports are already taken.

You probably want to do the following:

1.Start a master:
$ openshift start master [...any desired options...]

2. On the same machine as the master (in order to use the master's generated CA), generate a configuration for your node (replace with your node's hostname, and add any IP addresses or FQDN's you want the node's serving cert to be valid for):
$ oadm create-node-config --node-dir=mynodeconfig --node=$NODE_HOST --hostnames=$NODE_HOST[,$NODE_FQDN_HOST,$NODE_IP,...] --master=https://$MASTERHOST:8443 --dns-ip=$MASTERIP

3. Take the generated directory to your node, and start your node:
$ openshift start node --config=/path/to/mynodeconfig/node-config.yaml

When you start your node, it should contact the master and register itself




On Thu, Jul 9, 2015 at 1:32 PM, Dean Peterson <peterson dean gmail com> wrote:
My head is starting to hurt.  I have tried running Openshift 3 as a container AND as a binary with the simple goal of getting a master running on one machine and a node running on a SEPARATE physical machine.  The closest I have come is by using the binary.  However, it is not clear to me what the correct steps are.  In the documentation, under Master and Node Configuration, it shows I can create a node configuration file for my new node; then run "openshift start node --config..." to start the node.  When I run that command on the same machine as the running openshift master I get errors about ports already being bound.  So, I try running the command on the other machine.  However, it seems I need to at least have started openshift once on the node machine to get the correct ca certificate files in place. But that seems to require running "openshift start" that starts a master and node on the machine I only want to run nodes on.  Then, once everything is sufficiently messed up on both machines I realize I can't just stop openshift when I run as a binary because I have to somehow find the openshift process and SIGINT it (I am still looking).  When I run openshift as a docker container, openshift is on the docker network and cannot see the other machine by its host name.  So, I guess my question is.  What are the steps to running a master on one physical machine and a node on a different physical machine?  Every example assumes the user wants to use Vagrant or some virtual way to simulate a real cluster.  I want the real thing.  I would think that would be #1 on most people's list that aren't just wanting to play with new stuff.  I see there is an Ansible alternative, but I would like to understand the correct steps to take myself.  The documentation seems good at first but becomes very unclear in practice.  Do I run the command to start a node on a separate physical machine on the master host (if so, why do i get port already bound errors) or do I run the command on the other node machine (if so, what actually needs to be in place to make the command work)?  I was really really hoping the web interface had a simple way to add a node on a separate physical machine.  One box and one button.  All I should have to do is enter the ip address or host name of the other machine and click a button to add the node.  

_______________________________________________
users mailing list
users lists openshift redhat com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]