Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

playbook(memcache): support instances and ${instances_sequence} #376

Closed
wants to merge 2 commits into from

Conversation

EricWai
Copy link

@EricWai EricWai commented Dec 4, 2023

fix #240

  1. hosts.yaml support the instances.
  2. add the hosts_instances.yaml as a template.
  3. Fixed spelling errors in variable names: "expoter" -> "exporter".
  4. add "if [ "${EXPORTER_PORT}" ];then".

Now, when deploying the memcached cluster, hosts.yaml can be written as follows:

global:
  user: curve
  ssh_port: 22
  private_key_file: /home/curve/.ssh/id_rsa
  
hosts:
  - host: server-host1
    hostname: 10.0.1.1
    labels:
      - memcached
    envs:
      - SUDO_ALIAS=sudo
      - ENGINE=docker
      - IMAGE=memcached:1.6.17
      - EXPORTER_IMAGE=quay.io/prometheus/memcached-exporter:v0.13.0
      - LISTEN=10.0.1.1
      - PORT=112${instances_sequence}
      - EXPORTER_PORT=91${instances_sequence}
      - USER=root
      - MEMORY_LIMIT=32768 # item memory in megabytes
      - MAX_ITEM_SIZE=8m # adjusts max item size (default: 1m, min: 1k, max: 1024m)
      - EXT_PATH=/mnt/memcachefile/cachefile:10${instances_sequence}G
      - EXT_WBUF_SIZE=8 # size in megabytes of page write buffers.
      - EXT_ITEM_AGE=1 # store items idle at least this long (seconds, default: no age limit)
      - VERBOSE="v"
    instances: 3

  - host: server-host2
    hostname: 10.0.1.2
    labels:
      - memcached
    envs:
      - SUDO_ALIAS=sudo
      - ENGINE=docker
      - IMAGE=memcached:1.6.17
      - EXPORTER_IMAGE=quay.io/prometheus/memcached-exporter:v0.13.0
      - LISTEN=10.0.1.2
      - PORT=11211
      - EXPORTER_PORT=9151
      - USER=root
      - MEMORY_LIMIT=32768 # item memory in megabytes
      - MAX_ITEM_SIZE=8m # adjusts max item size (default: 1m, min: 1k, max: 1024m)
      - EXT_PATH=/mnt/memcachefile/cachefile:1024G
      - EXT_WBUF_SIZE=8 # size in megabytes of page write buffers.
      - EXT_ITEM_AGE=1 # store items idle at least this long (seconds, default: no age limit)
      - VERBOSE="v"

@caoxianfei1
Copy link
Contributor

@EricWai Compile failed and check it.

@EricWai EricWai force-pushed the newdevelop branch 3 times, most recently from f42d250 to 70a76b7 Compare December 5, 2023 08:16
@EricWai EricWai changed the title playbook memcached add instances and ${instances_sequence} playbook(memcache): support instances and ${instances_sequence} Dec 5, 2023
@EricWai EricWai force-pushed the newdevelop branch 3 times, most recently from 2f870cd to d4d789a Compare December 18, 2023 09:33
Signed-off-by: Ericwai <921223516@qq.com>

docs: Quickly start developing curves based on cobra

Signed-off-by: Liao PengFei <136953902+hdbdn77@users.noreply.github.com>

Feature(cluster add): add deploy type parameter

Signed-off-by: WhereAreBugs <2572414306@qq.com>

Fix(typo): fix an spelling mistake in code.

Signed-off-by: WhereAreBugs <2572414306@qq.com>

Fix(deploy): sync version 2 tool config successed.

Signed-off-by: caoxianfei1 <caoxianfei@corp.netease.com>

change host to name in hosts moudle

Signed-off-by: noobcoder <zhaoyi_114@outlook.com>

Impove(enter): enter leader mds directly without id option

Signed-off-by: lyp <1647564982@qq.com>
Signed-off-by: EricWai <51902911+EricWai@users.noreply.github.com>
@EricWai EricWai closed this Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

curveadm playbook deploy memcached
2 participants