Skip to content

Conversation

@justinc1
Copy link
Collaborator

@justinc1 justinc1 commented Mar 1, 2023

The PR adds a role for initial cluster configuration. Role primary usage is to configure an empty cluster.

A dict to fully configure cluster looks like:

    scale_computing_hypercore_cluster_config:
      name: cluster-a
      registration:
        company_name: New company a
        contact: John Smith a
        phone: 056789000
        email: john_smith_a@gmail.com
      dns:
        server_ips:
          - 1.1.1.1
          - 1.0.0.1
        search_domains:
          - subdomain_1.example.com
          - subdomain_2.example.com
      oidc:
        client_id: 12345a
        shared_secret: secret_stuff_a
        config_url: https://login.microsoftonline.com/76d4c62a-a9ca-4dc2-9187-e2cc4d9abe7f/v2.0/.well-known/openid-configuration
        scopes: openid+profile
      time_server: 2.pool.ntp.org
      time_zone: Europe/Ljubljana
      smtp:
        server: mail_a.example.com
        port: 25
        from_address: "ci-test-a@example.com"
      email_alerts:
        - user_a1@test.com
      syslog_servers:
        - host: 10.10.10.10
          port: 42
          protocol: tcp

As secondary usage, a partial cluster configuration is possible. User just needs to invoke role with stripped version of scale_computing_hypercore_cluster_config variable.

Some modules are able to unconfigure a system, and some cannot. For example, syslog_server module is able to remove configured syslog server, but OIDC cannot be removed once setup. I'm not sure if this role should allow unconfiguration of a system. So I ask for advice here, what is best.

For first draft, role can remove syslog_servers, email alerts, dns server and search_domains. If user needs to remove other configuration, a corresponding module can be used.

On TODO list:

  • documentation - provided with argument spec, but we need to start using antsibull-docs for documentation rendering.
  • example
  • argument spec

@justinc1 justinc1 self-assigned this Mar 1, 2023
@justinc1 justinc1 force-pushed the cluster-config-role branch 6 times, most recently from fa12080 to 12af189 Compare March 3, 2023 12:49
justinc1 added 17 commits March 6, 2023 07:08
Signed-off-by: Justin Cinkelj <justin.cinkelj@xlab.si>
Signed-off-by: Justin Cinkelj <justin.cinkelj@xlab.si>
Signed-off-by: Justin Cinkelj <justin.cinkelj@xlab.si>
Signed-off-by: Justin Cinkelj <justin.cinkelj@xlab.si>
Signed-off-by: Justin Cinkelj <justin.cinkelj@xlab.si>
Signed-off-by: Justin Cinkelj <justin.cinkelj@xlab.si>
Signed-off-by: Justin Cinkelj <justin.cinkelj@xlab.si>
Signed-off-by: Justin Cinkelj <justin.cinkelj@xlab.si>
Signed-off-by: Justin Cinkelj <justin.cinkelj@xlab.si>
Signed-off-by: Justin Cinkelj <justin.cinkelj@xlab.si>
Signed-off-by: Justin Cinkelj <justin.cinkelj@xlab.si>
Signed-off-by: Justin Cinkelj <justin.cinkelj@xlab.si>
Signed-off-by: Justin Cinkelj <justin.cinkelj@xlab.si>
Signed-off-by: Justin Cinkelj <justin.cinkelj@xlab.si>
Signed-off-by: Justin Cinkelj <justin.cinkelj@xlab.si>
Signed-off-by: Justin Cinkelj <justin.cinkelj@xlab.si>
Signed-off-by: Justin Cinkelj <justin.cinkelj@xlab.si>
@justinc1 justinc1 force-pushed the cluster-config-role branch from 12af189 to a8bd3ab Compare March 6, 2023 06:09
@justinc1 justinc1 merged commit 844f7a0 into main Mar 6, 2023
@justinc1 justinc1 deleted the cluster-config-role branch March 7, 2023 07:41
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

Successfully merging this pull request may close these issues.

3 participants