brianshumate.nomad

Ansible-Nomad


この役割は以前ブライアン・シュメイトによって維持されており、現在は @ansible-community/hashicorp-tools によって管理されています。


このAnsibleロールは、基本的な Nomad のインストールを行います。ファイルシステム構造やサンプル設定も含まれます。

また、3つのサーバーノードからなる最小限のクラスタをブートストラップし、VagrantとVirtualBoxに基づく開発環境でこれを行うこともできます。Vagrantのセットアップの詳細は README_VAGRANT.md を参照してください。

必要条件

このロールはArch Linux、Debian、RHEL、またはUbuntuのディストリビューションを必要とし、以下の特定のソフトウェアバージョンでテストされています。

  • Ansible: 2.7.10
  • nomad: 0.12.1
  • Arch Linux
  • CentOS: 7
  • Debian: 8
  • RHEL: 7
  • Ubuntu: >= 20.04
  • unzip(unarchiveモジュール用)

ロール変数

このロールはほとんどの変数を defaults/main.yml に定義しています。

nomad_debug

  • Nomadのデバッグモード
  • デフォルト値: no

nomad_skip_ensure_all_hosts

  • すべてのインスタンスが接続されていなくてもロールを実行することを許可
  • デフォルト値: no

nomad_allow_purge_config

  • 古い設定ファイルの削除を許可します。たとえば、インスタンスがもはやサーバーでない場合、サーバー設定を削除します。
  • デフォルト値: no

nomad_version

  • インストールするNomadのバージョン
  • デフォルト値: 1.1.1

(以下の変数は同様にデフォルト値を持っていますが、省略します)

nomad_architecture_map

nomad_architecture

nomad_pkg

nomad_zip_url

nomad_checksum_file_url

nomad_bin_dir

nomad_config_dir

nomad_data_dir

nomad_lockfile

nomad_run_dir

nomad_manage_user

nomad_user

nomad_manage_group

nomad_group

nomad_region

nomad_datacenter

nomad_log_level

nomad_syslog_enable

nomad_iface

nomad_node_name

nomad_node_role

nomad_leave_on_terminate

nomad_leave_on_interrupt

nomad_disable_update_check

nomad_retry_max

nomad_retry_join

nomad_retry_interval

nomad_rejoin_after_leave

nomad_enabled_schedulers

nomad_num_schedulers

nomad_node_gc_threshold

nomad_job_gc_threshold

nomad_eval_gc_threshold

nomad_deployment_gc_threshold

nomad_encrypt_enable

nomad_encrypt

nomad_raft_multiplier

nomad_raft_protocol

nomad_authoritative_region

nomad_node_class

nomad_node_pool

nomad_no_host_uuid

nomad_max_kill_timeout

nomad_network_interface

nomad_network_speed

nomad_cpu_total_compute

nomad_gc_interval

nomad_gc_max_allocs

nomad_gc_disk_usage_threshold

nomad_gc_inode_usage_threshold

nomad_gc_parallel_destroys

nomad_reserved

nomad_reserved_cpu

nomad_reserved_memory

nomad_reserved_disk

nomad_reserved_ports

nomad_host_volumes

nomad_host_networks

nomad_options

nomad_chroot_env

nomad_meta

nomad_bind_address

nomad_advertise_address

nomad_ports

nomad_ports_http

nomad_ports_rpc

nomad_ports_serf

nomad_podman_enable

nomad_cni_enable

nomad_docker_enable

nomad_template_config

nomad_plugins

nomad_group_name

nomad_servers

nomad_gather_server_facts

nomad_use_consul

nomad_consul_address

nomad_consul_ssl

nomad_consul_ca_file

nomad_consul_grpc_ca_file

nomad_consul_cert_file

nomad_consul_key_file

nomad_consul_servers_service_name

nomad_consul_clients_service_name

nomad_consul_token

nomad_bootstrap_expect

nomad_acl_enabled

nomad_acl_token_ttl

nomad_acl_policy_ttl

nomad_acl_replication_token

nomad_vault_enabled

nomad_vault_address

nomad_vault_allow_unauthenticated

nomad_vault_create_from_role

nomad_vault_ca_file

nomad_vault_ca_path

nomad_vault_cert_file

nomad_vault_key_file

nomad_vault_tls_server_name

nomad_vault_tls_skip_verify

nomad_vault_token

nomad_vault_namespace

nomad_docker_enable

nomad_docker_dmsetup

nomad_tls_enable

nomad_tls_copy_keys

nomad_tls_files_remote_src

nomad_tls_dir

nomad_ca_file

nomad_cert_file

nomad_key_file

nomad_rpc_upgrade_mode

nomad_verify_server_hostname

nomad_verify_https_client

nomad_telemetry

nomad_telemetry_disable_hostname

nomad_telemetry_collection_interval

nomad_telemetry_use_node_name

nomad_telemetry_publish_allocation_metrics

nomad_telemetry_publish_node_metrics

nomad_telemetry_backwards_compatible_metrics

nomad_telemetry_disable_tagged_metrics

nomad_telemetry_filter_default

nomad_telemetry_prefix_filter

nomad_telemetry_disable_dispatched_job_summary_metrics

nomad_telemetry_statsite_address

nomad_telemetry_statsd_address

nomad_telemetry_datadog_address

nomad_telemetry_datadog_tags

nomad_telemetry_prometheus_metrics

nomad_telemetry_circonus_api_token

nomad_telemetry_circonus_api_app

nomad_telemetry_circonus_api_url

nomad_telemetry_circonus_submission_interval

nomad_telemetry_circonus_submission_url

nomad_telemetry_circonus_check_id

nomad_telemetry_circonus_check_force_metric_activation

nomad_telemetry_circonus_check_instance_id

nomad_telemetry_circonus_check_search_tag

nomad_telemetry_circonus_check_display_name

nomad_telemetry_circonus_check_tags

nomad_telemetry_circonus_broker_id

nomad_telemetry_circonus_broker_select_tag

nomad_autopilot

nomad_autopilot_cleanup_dead_servers

nomad_autopilot_last_contact_threshold

nomad_autopilot_max_trailing_logs

nomad_autopilot_server_stabilization_time

nomad_ui

nomad_ui_label_text

nomad_ui_label_background_color

nomad_ui_label_text_color

nomad_artifact

nomad_config_custom

依存関係

AnsibleはGNU tarを必要とし、このロールはいくつかのローカルでのunarchiveモジュールの使用を行うため、システムにgtar/unzipがインストールされていることを確認してください。Jinja2テンプレートはnetaddr Pythonライブラリが必要です。

例のプレイブック

基本的なNomadのインストールは、含まれているsite.ymlプレイブックを使用して可能です。

ansible-playbook -i <hosts> site.yml

変数を--extra-varsオプションを使って渡すこともできます。

ansible-playbook -i hosts site.yml --extra-vars "nomad_datacenter=maui"

VagrantとVirtualBox

テストのためのVagrantデプロイメントの詳細はexamples/README_VAGRANT.mdを参照してください。

ライセンス

BSD

著者情報

ブライアン・シュメイト

貢献者

プロジェクトへの貢献に感謝します。詳しくはCONTRIBUTORS.mdを参照してください。

貢献は歓迎しますが、CONTRIBUTING.mdに記載された条件に同意できることが前提です。

プロジェクトについて

Nomad cluster role

インストール
ansible-galaxy install brianshumate.nomad
ライセンス
bsd-2-clause
ダウンロード
18.3k
所有者
Art ⁂ Data ⁂ Boards ⁂ Water