Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

example of 3 node cluster with server and client on same host. #67

Open
rismoney opened this issue Aug 5, 2022 · 1 comment
Open

example of 3 node cluster with server and client on same host. #67

rismoney opened this issue Aug 5, 2022 · 1 comment

Comments

@rismoney
Copy link

rismoney commented Aug 5, 2022

I think some of the cserver/client settings in the docs are not exactly right.
I got it working with this, figured I'd share since the docs didn't talk about server cluster.

class { 'nomad':
  arch        => 'amd64',
  version     => '1.3.2',
  install_method      => 'url',
  manage_service_file => true,
  config_hash => {
    'region'     => 'ny',
    'datacenter' => 'group1',
    'log_level'  => 'INFO',
    'bind_addr'  => '0.0.0.0',
      'data_dir'   => '/opt/nomad',
    'server'     => {
      'enabled'          => true,
      'bootstrap_expect' => 3,
      'server_join' => {
        'retry_join' => ['nomad01.your-org.pvt:4648','nomad02.your-org.pvt:4648','nomad03.your-org.pvt:4648']
       }
    },
    'client'     => {
      'enabled'          => true,
      'server_join' => {
        'retry_join' => ['nomad01.your-org.pvt:4647','nomad02.your-org.pvt:4647','nomad03.your-org.pvt:4647']
       }
    }
  }
}
@maxadamo
Copy link
Contributor

maxadamo commented Apr 24, 2023

@rismoney with your code sample, you are enabling server and client within the same node. It's a legit option (which I wouldn't use in production), but I don't see the error in the docs.

  1. for the config_hash, I would not rely on the tiny documentation included on the top part of the manifest. You should use Hashicorp documentation for that, because we can't keep track of all the changes that are being introduced with the every new version.
  2. can't you create a PR yourself?
  3. if you don't want to create a PR, could you please point me to the line where you see the error, and tell what should be added or removed in your opinion?
  4. to be honest, even your sample code would not be ideal. An even number of nodes is unusual, hence I'd expect that you have nomad01, nomad02 and nomad03. In this case, you don't need to tell a cluster node to join itself. So, you have to say: I have nomad01, nomad02, and nomad03, and on nomad01, you'll have the followings (you try to join the other two nodes):
'retry_join' => ['nomad02.your-org.pvt:4648', 'nomad03.your-org.pvt:4648']

but this is a topic for the hashicorp documentation in my opinion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants