Skip to content

Commit

Permalink
update the idle seconds (#11)
Browse files Browse the repository at this point in the history
support all in one
  • Loading branch information
HarrisChu authored Jan 17, 2022
1 parent ca20eba commit 63dfe77
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 32 deletions.
34 changes: 20 additions & 14 deletions group_vars/all.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,30 @@
nebula_packages:
name:
"{%- if install_source_type == 'GA' -%}
name: "{%- if install_source_type == 'GA' -%}
nebula-graph-{{ nebula_version }}.{{ os_version }}.{{ arc }}.{{ pkg }}
{%- else -%}
{%- else -%}
nebula-graph-{{ now()|yesterday_format }}-nightly.{{ os_version }}.{{ arc }}.{{ pkg }}
{%- endif -%}"

version:
"{%- if install_source_type.lower() == 'ga' -%}

version: "{%- if install_source_type.lower() == 'ga' -%}
{{ nebula_version }}
{%- else -%}
{%- else -%}
{{ nebula_version }}-{{ now()|yesterday_format }}-nightly
{%- endif -%}"

url:
"{%- if install_source_type.lower() == 'ga' -%}
https://oss-cdn.nebula-graph.io/package/{{ nebula_version }}/nebula-graph-{{ nebula_version }}.{{ os_version }}.{{ arc }}.{{ pkg }}
{%- else -%}
https://oss-cdn.nebula-graph.io/package/nightly/{{ now()|yesterday_format }}/nebula-graph-{{ now()|yesterday_format }}-nightly.{{ os_version }}.{{ arc }}.{{ pkg }}
url: "{%- if install_source_type.lower() == 'ga' -%}
https://oss-cdn.nebula-graph.com.cn/package/{{ nebula_version }}/nebula-graph-{{ nebula_version }}.{{ os_version }}.{{ arc }}.{{ pkg }}
{%- else -%}
https://oss-cdn.nebula-graph.com.cn/package/nightly/{{ now()|yesterday_format }}/nebula-graph-{{ now()|yesterday_format }}-nightly.{{ os_version }}.{{ arc }}.{{ pkg }}
{%- endif -%}"



metad_port: 9559
graphd_port: 9669
storaged_port: 9779
meta_server_addrs: [
"{%- for metad in groups['metad'] -%}
{%- if loop.index != 1 -%}
,
{%- endif -%}
{{ hostvars[metad].ansible_default_ipv4.address }}:{{ hostvars[metad].metad_port }}
{%- endfor -%}",
]
32 changes: 32 additions & 0 deletions inventory.allinone.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[all:vars]
# GA or nightly
install_source_type = nightly
#install_source_type = GA
nebula_version = 2.6.1
os_version = el7
arc = x86_64
pkg = rpm

packages_dir = {{ playbook_dir }}/packages
deploy_dir = /home/vesoft/nebula
data_dir = {{ deploy_dir }}/data

# ssh user
ansible_ssh_user = vesoft

force_download = False

[metad]
metad1 ansible_ssh_host=192.168.15.13 deploy_dir=/home/vesoft/nebula/nebula1 metad_port=1559
metad2 ansible_ssh_host=192.168.15.13 deploy_dir=/home/vesoft/nebula/nebula2 metad_port=2559
metad3 ansible_ssh_host=192.168.15.13 deploy_dir=/home/vesoft/nebula/nebula3 metad_port=3559

[graphd]
graphd1 ansible_ssh_host=192.168.15.13 deploy_dir=/home/vesoft/nebula/nebula1 graphd_port=1669
graphd2 ansible_ssh_host=192.168.15.13 deploy_dir=/home/vesoft/nebula/nebula2 graphd_port=2669
graphd3 ansible_ssh_host=192.168.15.13 deploy_dir=/home/vesoft/nebula/nebula3 graphd_port=3669

[storaged]
storaged1 ansible_ssh_host=192.168.15.13 deploy_dir=/home/vesoft/nebula/nebula1 storaged_port=1779
storaged2 ansible_ssh_host=192.168.15.13 deploy_dir=/home/vesoft/nebula/nebula2 storaged_port=2779
storaged3 ansible_ssh_host=192.168.15.13 deploy_dir=/home/vesoft/nebula/nebula3 storaged_port=3779
18 changes: 9 additions & 9 deletions templates/nebula-graphd.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,23 @@

########## networking ##########
# Comma separated Meta Server Addresses
--meta_server_addrs={{ groups['metad']|map('map_format', '%s:9559')|join(',') }}
--meta_server_addrs={{ meta_server_addrs|join(',') }}
# Local IP used to identify the nebula-graphd process.
# Change it to an address other than loopback if the service is distributed or
# will be accessed remotely.
--local_ip={{ hostvars[inventory_hostname].ansible_default_ipv4.address }}
# Network device to listen on
--listen_netdev=any
# Port to listen on
--port=9669
--port={{ hostvars[inventory_hostname].graphd_port }}
# To turn on SO_REUSEPORT or not
--reuse_port=false
# Backlog of the listen socket, adjust this together with net.core.somaxconn
--listen_backlog=1024
# Seconds before the idle connections are closed, 0 for never closed
--client_idle_timeout_secs=0
# Seconds before the idle sessions are expired, 0 for no expiration
--session_idle_timeout_secs=0
# Seconds before the idle connections are closed.
--client_idle_timeout_secs=28800
# Seconds before the idle sessions are expired.
--session_idle_timeout_secs=28800
# The number of threads to accept incoming connections
--num_accept_threads=1
# The number of networking IO threads, 0 for # of CPU cores
Expand All @@ -56,11 +56,11 @@
# HTTP service ip
--ws_ip=0.0.0.0
# HTTP service port
--ws_http_port=19669
--ws_http_port=1{{ hostvars[inventory_hostname].graphd_port }}
# HTTP2 service port
--ws_h2_port=19670
--ws_h2_port=2{{ hostvars[inventory_hostname].graphd_port }}
# The Meta HTTP service port
--ws_meta_http_port=19559
--ws_meta_http_port=1{{ hostvars[inventory_hostname].metad_port }}
# The default charset when a space is created
--default_charset=utf8
# The defaule collate when a space is created
Expand Down
10 changes: 5 additions & 5 deletions templates/nebula-metad.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,21 @@

########## networking ##########
# Comma separated Meta Server addresses
--meta_server_addrs={{ groups['metad']|map('map_format', '%s:9559')|join(',') }}
--meta_server_addrs={{ meta_server_addrs|join(',') }}
# Local IP used to identify the nebula-metad process.
# Change it to an address other than loopback if the service is distributed or
# will be accessed remotely.
--local_ip={{ hostvars[inventory_hostname].ansible_default_ipv4.address }}
# Meta daemon listening port
--port=9559
--port={{ hostvars[inventory_hostname].metad_port }}
# HTTP service ip
--ws_ip=0.0.0.0
# HTTP service port
--ws_http_port=19559
--ws_http_port=1{{ hostvars[inventory_hostname].metad_port }}
# HTTP2 service port
--ws_h2_port=19560
--ws_h2_port=2{{ hostvars[inventory_hostname].metad_port }}
# The Storage HTTP service port
--ws_storage_http_port=19779
--ws_storage_http_port=1{{ hostvars[inventory_hostname].storaged_port }}
########## storage ##########
# Root data path, here should be only single path for metad
--data_path=data/meta
Expand Down
8 changes: 4 additions & 4 deletions templates/nebula-storaged.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@

########## networking ##########
# Comma separated Meta server addresses
--meta_server_addrs={{ groups['metad']|map('map_format', '%s:9559')|join(',') }}
--meta_server_addrs={{ meta_server_addrs|join(',') }}
# Local IP used to identify the nebula-storaged process.
# Change it to an address other than loopback if the service is distributed or
# will be accessed remotely.
--local_ip={{ hostvars[inventory_hostname].ansible_default_ipv4.address }}
# Storage daemon listening port
--port=9779
--port={{ hostvars[inventory_hostname].storaged_port }}
# HTTP service ip
--ws_ip=0.0.0.0
# HTTP service port
--ws_http_port=19779
--ws_http_port=1{{ hostvars[inventory_hostname].storaged_port }}
# HTTP2 service port
--ws_h2_port=19780
--ws_h2_port=2{{ hostvars[inventory_hostname].storaged_port }}
# heartbeat with meta service
--heartbeat_interval_secs=10

Expand Down

0 comments on commit 63dfe77

Please sign in to comment.