Skip to content

gambit36/scylla-machine-image

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

201 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ScyllaDB 宁夏区安装指南

主要由以下步骤组成

  • 创建一个已经预装ScyllaDB的AMI
  • 允许在第一次启动实例时配置数据库
  • 轻松创建集群

OS Package

在镜像中预装RPM/DEB包。由于CentOS即将终止支持,建议使用Ubuntu安装DEB包。 在实例第一次启动期间配置 ScyllaDB。

Create an image

AWS

aws/ami/build_ami.sh

Scylla AMI user-data Format v2

我们会使用EC2的 user-data 功能向 ScyllaDB AMI 传递一些参数, 如下面文档描述:

EC2 User-Data

创建EC2时,以下参数将被传递

  • Object Properties
    • scylla_yaml (Scylla YAML) – 映射到 scylla.yaml 配置文件的所有字段
    • scylla_startup_args (list) – embedded information about the user that created the issue (NOT YET IMPLEMENTED) (default=’[]’)
    • developer_mode (boolean) – 是否启动开发者模式 (default=’false’)
    • post_configuration_script (string) – A script to run once AMI first configuration is finished, can be a string encoded in base64. (default=’’)
    • post_configuration_script_timeout (int) – Time in seconds to limit the post_configuration_script (default=’600’)
    • start_scylla_on_first_boot (boolean) – If true, scylla-server would boot at AMI boot (default=’true’)

Scylla YAML

All fields that would pass down to scylla.yaml configuration file

see https://docs.scylladb.com/operating-scylla/scylla-yaml/ for all the possible configuration availble listed here only the one get defaults scylla AMI

  • Object Properties
    • cluster_name (string) – Name of the cluster (default=generated name that would work for only one node cluster)
    • experimental (boolean) – To enable all experimental features add to the scylla.yaml (default=’false’)
    • auto_bootstrap (boolean) – Enable auto bootstrap (default=’true’)
    • listen_address (string) – Defaults to ec2 instance private ip
    • broadcast_rpc_address (string) – Defaults to ec2 instance private ip
    • endpoint_snitch (string) – Defaults to ‘org.apache.cassandra.locator.Ec2Snitch’
    • rpc_address (string) – Defaults to ‘0.0.0.0’
    • seed_provider (mapping) – Defaults to ec2 instance private ip

Example usage of user-data

Spinning a new node connecting to “10.0.219.209” as a seed, and installing cloud-init-cfn package at first boot.

{
     "scylla_yaml": {
         "cluster_name": "test-cluster",
         "experimental": true,
         "seed_provider": [{"class_name": "org.apache.cassandra.locator.SimpleSeedProvider",
                            "parameters": [{"seeds": "10.0.219.209"}]}],
     },
     "post_configuration_script": "#! /bin/bash\nyum install cloud-init-cfn",
     "start_scylla_on_first_boot": true
}

Creating a Scylla cluster using the Machine Image

AWS - CloudFormation

使用模版文件 aws/cloudformation/scylla.yaml. 当前模版支持创建最大10个节点的集群.

构建 scyllaDB 镜像

Ubuntu - DEB

dist/debian/build_deb.sh

Build using Docker

docker run -it -v $PWD:/scylla-machine-image -w /scylla-machine-image  --rm ubuntu:20.04 bash -c './dist/debian/build_deb.sh'

Building docs

python3 -m venv .venv
source .venv/bin/activate
pip install sphinx sphinx-jsondomain sphinx-markdown-builder
make html
make markdown

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Python 39.3%
  • Shell 38.1%
  • Jinja 20.6%
  • Dockerfile 1.1%
  • Makefile 0.9%