Skip to content

playbook(memcache): support instances and instances_sequence#384

Open
EricWai wants to merge 1 commit into
opencurve:developfrom
EricWai:mydevelop
Open

playbook(memcache): support instances and instances_sequence#384
EricWai wants to merge 1 commit into
opencurve:developfrom
EricWai:mydevelop

Conversation

@EricWai

@EricWai EricWai commented Dec 18, 2023

Copy link
Copy Markdown

fix #240

  1. hosts.yaml support the instances and {instances_sequence}.
  2. add the hosts_instances.yaml as a template.
  3. playbook memcached add exporter (from tombstone branch)

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:
  - name: 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

  - name: 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"

Comment thread internal/configure/hosts/hc_item.go Outdated
Comment thread internal/configure/hosts/hc_item.go Outdated
Comment thread internal/configure/hosts/hc_item.go Outdated
Comment thread internal/configure/hosts/hosts.go Outdated
Comment thread internal/configure/hosts/hc_item.go Outdated
Comment thread internal/configure/hosts/hosts.go
@EricWai EricWai force-pushed the mydevelop branch 2 times, most recently from 51c7f6f to 83ac19c Compare December 20, 2023 09:26

@montaguelhz montaguelhz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good job

Comment thread internal/configure/hosts/hosts.go Outdated
Comment thread internal/configure/hosts/hosts.go Outdated
Comment thread internal/configure/hosts/hosts.go Outdated
Comment thread internal/configure/hosts/hosts.go Outdated
Comment thread internal/configure/hosts/hosts.go
Comment thread internal/configure/hosts/hosts.go
Comment thread internal/configure/hosts/hosts.go Outdated
Comment thread internal/configure/hosts/hosts.go
Signed-off-by: Ericwai <921223516@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

curveadm playbook deploy memcached

3 participants