Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
oceanbase
obdeploy
提交
ee5a76bb
O
obdeploy
项目概览
oceanbase
/
obdeploy
1 年多 前同步成功
通知
7
Star
73
Fork
132
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
obdeploy
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
未验证
提交
ee5a76bb
编写于
3月 30, 2022
作者:
R
Rongfeng Fu
提交者:
GitHub
3月 30, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Support obproxy ce (#94)
* support obproxy-ce
上级
10ac254f
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
22 addition
and
15 deletion
+22
-15
core.py
core.py
+5
-5
plugins/oceanbase/3.1.0/bootstrap.py
plugins/oceanbase/3.1.0/bootstrap.py
+6
-1
plugins/oceanbase/3.1.0/generate_config.py
plugins/oceanbase/3.1.0/generate_config.py
+11
-9
未找到文件。
core.py
浏览文件 @
ee5a76bb
...
@@ -2189,7 +2189,7 @@ class ObdHome(object):
...
@@ -2189,7 +2189,7 @@ class ObdHome(object):
deploy_config
=
deploy
.
deploy_config
deploy_config
=
deploy
.
deploy_config
if
opts
.
component
is
None
:
if
opts
.
component
is
None
:
for
component_name
in
[
'obproxy'
,
'oceanbase'
,
'oceanbase-ce'
]:
for
component_name
in
[
'obproxy'
,
'o
bproxy-ce'
,
'o
ceanbase'
,
'oceanbase-ce'
]:
if
component_name
in
deploy_config
.
components
:
if
component_name
in
deploy_config
.
components
:
opts
.
component
=
component_name
opts
.
component
=
component_name
break
break
...
@@ -2357,7 +2357,7 @@ class ObdHome(object):
...
@@ -2357,7 +2357,7 @@ class ObdHome(object):
self
.
_call_stdio
(
'verbose'
,
'Get deploy configuration'
)
self
.
_call_stdio
(
'verbose'
,
'Get deploy configuration'
)
deploy_config
=
deploy
.
deploy_config
deploy_config
=
deploy
.
deploy_config
allow_components
=
[
'obproxy'
,
'oceanbase'
,
'oceanbase-ce'
]
allow_components
=
[
'obproxy'
,
'o
bproxy-ce'
,
'o
ceanbase'
,
'oceanbase-ce'
]
if
opts
.
component
is
None
:
if
opts
.
component
is
None
:
for
component_name
in
allow_components
:
for
component_name
in
allow_components
:
if
component_name
in
deploy_config
.
components
:
if
component_name
in
deploy_config
.
components
:
...
@@ -2423,7 +2423,7 @@ class ObdHome(object):
...
@@ -2423,7 +2423,7 @@ class ObdHome(object):
connect_plugin
=
self
.
search_py_script_plugin
(
repositories
,
'connect'
)[
repository
]
connect_plugin
=
self
.
search_py_script_plugin
(
repositories
,
'connect'
)[
repository
]
if
repository
.
name
==
'obproxy'
:
if
repository
.
name
in
[
'obproxy'
,
'obproxy-ce'
]
:
ob_optimization
=
False
ob_optimization
=
False
allow_components
=
[
'oceanbase'
,
'oceanbase-ce'
]
allow_components
=
[
'oceanbase'
,
'oceanbase-ce'
]
for
component_name
in
deploy_config
.
components
:
for
component_name
in
deploy_config
.
components
:
...
@@ -2583,7 +2583,7 @@ class ObdHome(object):
...
@@ -2583,7 +2583,7 @@ class ObdHome(object):
self
.
_call_stdio
(
'verbose'
,
'Get deploy configuration'
)
self
.
_call_stdio
(
'verbose'
,
'Get deploy configuration'
)
deploy_config
=
deploy
.
deploy_config
deploy_config
=
deploy
.
deploy_config
allow_components
=
[
'obproxy'
,
'oceanbase'
,
'oceanbase-ce'
]
allow_components
=
[
'obproxy'
,
'o
bproxy-ce'
,
'o
ceanbase'
,
'oceanbase-ce'
]
if
opts
.
component
is
None
:
if
opts
.
component
is
None
:
for
component_name
in
allow_components
:
for
component_name
in
allow_components
:
if
component_name
in
deploy_config
.
components
:
if
component_name
in
deploy_config
.
components
:
...
@@ -2649,7 +2649,7 @@ class ObdHome(object):
...
@@ -2649,7 +2649,7 @@ class ObdHome(object):
connect_plugin
=
self
.
search_py_script_plugin
(
repositories
,
'connect'
)[
repository
]
connect_plugin
=
self
.
search_py_script_plugin
(
repositories
,
'connect'
)[
repository
]
if
repository
.
name
==
'obproxy'
:
if
repository
.
name
in
[
'obproxy'
,
'obproxy-ce'
]
:
ob_optimization
=
False
ob_optimization
=
False
allow_components
=
[
'oceanbase'
,
'oceanbase-ce'
]
allow_components
=
[
'oceanbase'
,
'oceanbase-ce'
]
for
component
in
deploy_info
.
components
:
for
component
in
deploy_info
.
components
:
...
...
plugins/oceanbase/3.1.0/bootstrap.py
浏览文件 @
ee5a76bb
...
@@ -33,6 +33,11 @@ def bootstrap(plugin_context, cursor, *args, **kwargs):
...
@@ -33,6 +33,11 @@ def bootstrap(plugin_context, cursor, *args, **kwargs):
inner_config
=
{
inner_config
=
{
InnerConfigItem
(
'$_zone_idc'
):
'idc'
InnerConfigItem
(
'$_zone_idc'
):
'idc'
}
}
has_obproxy
=
False
for
componet_name
in
[
'obproxy'
,
'obproxy-ce'
]:
if
componet_name
in
plugin_context
.
components
:
has_obproxy
=
True
break
inner_keys
=
inner_config
.
keys
()
inner_keys
=
inner_config
.
keys
()
for
server
in
cluster_config
.
servers
:
for
server
in
cluster_config
.
servers
:
server_config
=
cluster_config
.
get_server_conf
(
server
)
server_config
=
cluster_config
.
get_server_conf
(
server
)
...
@@ -67,7 +72,7 @@ def bootstrap(plugin_context, cursor, *args, **kwargs):
...
@@ -67,7 +72,7 @@ def bootstrap(plugin_context, cursor, *args, **kwargs):
stdio
.
verbose
(
'execute sql: %s'
%
sql
)
stdio
.
verbose
(
'execute sql: %s'
%
sql
)
cursor
.
execute
(
sql
)
cursor
.
execute
(
sql
)
global_conf
=
cluster_config
.
get_global_conf
()
global_conf
=
cluster_config
.
get_global_conf
()
if
'proxyro_password'
in
global_conf
or
'obproxy'
in
plugin_context
.
components
:
if
has_obproxy
or
'proxyro_password'
in
global_conf
:
value
=
global_conf
[
'proxyro_password'
]
if
global_conf
.
get
(
'proxyro_password'
)
is
not
None
else
''
value
=
global_conf
[
'proxyro_password'
]
if
global_conf
.
get
(
'proxyro_password'
)
is
not
None
else
''
sql
=
'create user "proxyro" IDENTIFIED BY %s'
sql
=
'create user "proxyro" IDENTIFIED BY %s'
stdio
.
verbose
(
sql
)
stdio
.
verbose
(
sql
)
...
...
plugins/oceanbase/3.1.0/generate_config.py
浏览文件 @
ee5a76bb
...
@@ -75,8 +75,9 @@ def generate_config(plugin_context, deploy_config, *args, **kwargs):
...
@@ -75,8 +75,9 @@ def generate_config(plugin_context, deploy_config, *args, **kwargs):
if
not
cluster_config
.
get_global_conf
().
get
(
'appname'
):
if
not
cluster_config
.
get_global_conf
().
get
(
'appname'
):
default_appname
=
'obcluster'
default_appname
=
'obcluster'
if
'obproxy'
in
deploy_config
.
components
:
for
componet_name
in
[
'obproxy'
,
'obproxy-ce'
]:
obproxy_cluster_config
=
deploy_config
.
components
[
'obproxy'
]
if
componet_name
in
deploy_config
.
components
:
obproxy_cluster_config
=
deploy_config
.
components
[
componet_name
]
cluster_name
=
obproxy_cluster_config
.
get_global_conf
().
get
(
'cluster_name'
)
cluster_name
=
obproxy_cluster_config
.
get_global_conf
().
get
(
'cluster_name'
)
if
not
cluster_name
:
if
not
cluster_name
:
for
server
in
obproxy_cluster_config
.
servers
:
for
server
in
obproxy_cluster_config
.
servers
:
...
@@ -84,6 +85,7 @@ def generate_config(plugin_context, deploy_config, *args, **kwargs):
...
@@ -84,6 +85,7 @@ def generate_config(plugin_context, deploy_config, *args, **kwargs):
if
server_config
.
get
(
'cluster_name'
):
if
server_config
.
get
(
'cluster_name'
):
default_appname
=
server_config
[
'cluster_name'
]
default_appname
=
server_config
[
'cluster_name'
]
break
break
break
cluster_config
.
update_global_conf
(
'appname'
,
default_appname
,
False
)
cluster_config
.
update_global_conf
(
'appname'
,
default_appname
,
False
)
MIN_MEMORY
=
8
<<
30
MIN_MEMORY
=
8
<<
30
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录