support 2c8g docker (#787)
This commit is contained in:
parent
5247b5b1b7
commit
42d9540ff9
@ -1,5 +1,28 @@
|
||||
FROM oceanbase/centos7:latest
|
||||
RUN yum-config-manager --add-repo https://mirrors.aliyun.com/oceanbase/OceanBase.repo && yum install -y ob-deploy obclient ob-sysbench && mkdir /root/pkg && cd /root/pkg && rm -rf /usr/obd/mirror/remote/* && yumdownloader oceanbase-ce oceanbase-ce-libs && obd mirror clone *rpm && obd mirror list local && rm -rf * && yum clean all
|
||||
ARG GIT_SOURCE=github
|
||||
|
||||
RUN yum-config-manager --add-repo https://mirrors.aliyun.com/oceanbase/OceanBase.repo && yum install -y ob-deploy obclient ob-sysbench wget rpm* cpio make glibc-devel glibc-headers m4 git obclient && mkdir /root/pkg && cd /root/pkg && rm -rf /usr/obd/mirror/remote/* && yumdownloader oceanbase-ce oceanbase-ce-libs && obd mirror clone *rpm && obd mirror list local && rm -rf * && yum clean all
|
||||
|
||||
WORKDIR /root/.obd/plugins/oceanbase/3.1.0
|
||||
RUN sed -i 's/system_memory = max(4 << 30, system_memory)/system_memory = max(3 << 30, system_memory)/g' generate_config.py || echo 'system_memory changed'
|
||||
RUN sed -i 's/if memory_limit < MIN_MEMORY:/if False and (memory_limit < MIN_MEMORY):/g' generate_config.py || echo 'memory_limit changed'
|
||||
RUN sed -i '/_start_check(plugin_context, strict_check)/a\ success = True' start_check.py || echo 'check changed'
|
||||
|
||||
# clone code
|
||||
RUN mkdir -p /root/source \
|
||||
&& cd /root/source \
|
||||
&& git clone https://${GIT_SOURCE}.com/oceanbase/oceanbase
|
||||
|
||||
WORKDIR /root/source/oceanbase
|
||||
|
||||
RUN sed -i 's/const int64_t ObRunningModeConfig::MINI_MEM_LOWER = 8L << 30;/const int64_t ObRunningModeConfig::MINI_MEM_LOWER = 4L << 30;/g' deps/oblib/src/lib/ob_running_mode.cpp || echo "ob_running_mode.cpp no need patched"
|
||||
RUN sh build.sh debug --init \
|
||||
&& sh build.sh --make -j4 \
|
||||
&& cd build_debug \
|
||||
&& make DESTDIR=. install \
|
||||
&& obd mirror create -n oceanbase-ce -V 100.0.0 -p ./usr/local -t test -f
|
||||
|
||||
COPY boot /root/boot/
|
||||
ENV PATH /root/boot:$PATH
|
||||
WORKDIR /root
|
||||
CMD _boot
|
||||
|
@ -6,7 +6,7 @@ You can deploy OceanBase databases by using many methods. But Docker is the easi
|
||||
|
||||
Before you deploy obce-mini image, do a check of these:
|
||||
|
||||
- Make sure that your machine has at least 2 physical core and 10GB memory.
|
||||
- Make sure that your machine has at least 2 physical core and 8GB memory.
|
||||
- Your machine has installed these applications:
|
||||
|
||||
Application | Recommended version | Documentation
|
||||
|
@ -1,5 +1,6 @@
|
||||
#FROM https://gitee.com/oceanbase/obdeploy/blob/master/example/mini-local-example.yaml
|
||||
oceanbase-ce:
|
||||
tags: test
|
||||
servers:
|
||||
- 127.0.0.1
|
||||
global:
|
||||
@ -9,8 +10,8 @@ oceanbase-ce:
|
||||
rpc_port: @OB_RPC_PORT@ # default: 2882
|
||||
zone: zone1
|
||||
cluster_id: 1
|
||||
memory_limit: 8G
|
||||
system_memory: 4G
|
||||
memory_limit: 6G
|
||||
system_memory: 3G
|
||||
stack_size: 512K
|
||||
cpu_count: 16
|
||||
cache_wash_threshold: 1G
|
||||
@ -25,10 +26,12 @@ oceanbase-ce:
|
||||
enable_auto_leader_switch: FALSE
|
||||
enable_one_phase_commit: FALSE
|
||||
weak_read_version_refresh_interval: 5s
|
||||
balancer_idle_time: 10m
|
||||
trace_log_slow_query_watermark: 1s
|
||||
large_query_threshold: 1s
|
||||
clog_sync_time_warn_threshold: 1s
|
||||
syslog_io_bandwidth_limit: 10M
|
||||
_cache_wash_interval: 1m
|
||||
enable_sql_audit: FALSE
|
||||
enable_perf_event: FALSE
|
||||
clog_max_unconfirmed_log_count: 5000
|
||||
|
@ -1,4 +1,4 @@
|
||||
CREATE RESOURCE UNIT IF NOT EXISTS @OB_TENANT_NAME@ max_cpu = 9, max_memory = 2684354560, min_memory = 2684354560, max_iops = 10000, min_iops = 1280, max_session_num = 3000, max_disk_size = 5153960755;
|
||||
CREATE RESOURCE UNIT IF NOT EXISTS @OB_TENANT_NAME@ max_cpu = 9, max_memory = 2147483648, min_memory = 2147483648, max_iops = 10000, min_iops = 1280, max_session_num = 3000, max_disk_size = 5153960755;
|
||||
CREATE RESOURCE POOL IF NOT EXISTS @OB_TENANT_NAME@ UNIT = '@OB_TENANT_NAME@', UNIT_NUM = 1, ZONE_LIST = ('zone1');
|
||||
CREATE TENANT IF NOT EXISTS @OB_TENANT_NAME@ charset='utf8mb4', replica_num=1, zone_list=('zone1'), primary_zone='RANDOM', resource_pool_list=('@OB_TENANT_NAME@');
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user