mirror of
https://github.com/YunoHost-Apps/nomad_ynh.git
synced 2024-09-03 19:55:53 +02:00
bootstrap_expect
This commit is contained in:
parent
4ca49c1226
commit
7b74a3b4ef
5 changed files with 18 additions and 1 deletions
|
@ -3,6 +3,7 @@
|
|||
domain="domain.tld"
|
||||
is_public=1
|
||||
node_type="client"
|
||||
bootstrap_expect="1"
|
||||
server_ip="192.168.1.100"
|
||||
; Checks
|
||||
pkg_linter=1
|
||||
|
@ -22,6 +23,7 @@
|
|||
domain="domain.tld"
|
||||
is_public=1
|
||||
node_type="server"
|
||||
bootstrap_expect="1"
|
||||
server_ip="none..."
|
||||
; Checks
|
||||
pkg_linter=1
|
||||
|
|
|
@ -8,7 +8,7 @@ server {
|
|||
# This is an integer representing the number of server nodes to wait for before bootstrapping. It is most
|
||||
# common to use the odd-numbered integers 3 or 5 for this value, depending on the cluster size. A value of
|
||||
# 1 does not provide any fault tolerance and is not recommended for production use cases.
|
||||
bootstrap_expect = 1
|
||||
bootstrap_expect = __BOOTSTRAP_EXPECT__
|
||||
|
||||
# This is the data directory used for server-specific data, including the replicated log. By default, this
|
||||
# directory lives inside of the data_dir in the "server" sub-path.
|
||||
|
|
|
@ -45,6 +45,18 @@
|
|||
"choices": ["server", "client"],
|
||||
"default": "server"
|
||||
},
|
||||
{
|
||||
"name": "bootstrap_expect",
|
||||
"type": "string",
|
||||
"ask": {
|
||||
"en": "[Server only] How many server nodes to wait for before bootstrapping ?"
|
||||
},
|
||||
"choices": ["1", "3", "5", "7", "9"],
|
||||
"default": "1",
|
||||
"help": {
|
||||
"en": "For production, it's recommanded to have 3 to 5 server nodes."
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "server_ip",
|
||||
"type": "string",
|
||||
|
|
|
@ -28,6 +28,7 @@ domain=$YNH_APP_ARG_DOMAIN
|
|||
path_url="/"
|
||||
is_public=$YNH_APP_ARG_IS_PUBLIC
|
||||
node_type=$YNH_APP_ARG_NODE_TYPE
|
||||
bootstrap_expect=$YNH_APP_ARG_BOOTSTRAP_EXPECT
|
||||
server_ip=$YNH_APP_ARG_SERVER_IP
|
||||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
@ -52,6 +53,7 @@ ynh_script_progression --message="Storing installation settings..."
|
|||
ynh_app_setting_set --app=$app --key=domain --value=$domain
|
||||
ynh_app_setting_set --app=$app --key=path --value=$path_url
|
||||
ynh_app_setting_set --app=$app --key=node_type --value=$node_type
|
||||
ynh_app_setting_set --app=$app --key=bootstrap_expect --value=$bootstrap_expect
|
||||
ynh_app_setting_set --app=$app --key=server_ip --value=$server_ip
|
||||
ynh_app_setting_set --app=$app --key=lxc_bridge --value=$lxc_bridge
|
||||
ynh_app_setting_set --app=$app --key=plage_ip --value=$plage_ip
|
||||
|
|
|
@ -23,6 +23,7 @@ config_path=$(ynh_app_setting_get --app=$app --key=config_path)
|
|||
datadir=$(ynh_app_setting_get --app=$app --key=datadir)
|
||||
node_type=$(ynh_app_setting_get --app=$app --key=node_type)
|
||||
server_ip=$(ynh_app_setting_get --app=$app --key=server_ip)
|
||||
bootstrap_expect=$(ynh_app_setting_get --app=$app --key=bootstrap_expect)
|
||||
http_port=$(ynh_app_setting_get --app=$app --key=http_port)
|
||||
rpc_port=$(ynh_app_setting_get --app=$app --key=rpc_port)
|
||||
serf_port=$(ynh_app_setting_get --app=$app --key=serf_port)
|
||||
|
|
Loading…
Reference in a new issue