jwayong2 / kapal

Linux container data orchestration for humans
Mozilla Public License 2.0
2 stars 0 forks source link

Concept of Storage Descriptor #7

Open jteso opened 9 years ago

jteso commented 9 years ago

Concept: Storage Descriptor as INI

+-------------------+
|  KAPALFILE        |
+-------------------+

# >>> Devices <<<
[device:dev_1]
type=sata
location=10.5.4.20:/dev/sdb

[device:dev_2]
type=sata
location=10.5.4.3:/dev/sdb

[device:amazon_s3]
type=s3
location=https://s3.amazon.com/<bucket>/....
access_key=secr3t
secret_key=dunno
....
# >>> Pools <<<
[pool:db_pool]
devices=dev_1, dev_2
replication=mirror

# >>> Volumes <<<
[volume:db_vol]
from=db_pool
type=btrfs
mountpoint=/var/lib/mysql

[volume:db_databak]
device=amazon_s3
type=s3fs
mountpoint=/data/mysql_backup

# >>> Docker <<<
[docker:data_container]
from=centos
volumes = db_pool:/hoddiez, db_databak:/hoddiez_bak

# >>> Backup <<<
[backup]
strategy=snapshot
cron=0 0 * * *
source=db_pool
target=db_databak

[provision]
exec=./provision.sh

Commands:

$ kapal init (creates a template of Kapalfile)
$ kapal install (persist your settings on /etc/fstab)
$ kapal up (mount devices, set up volumes and schedule snapshots/backups)
$ kapal destroy (unmount, tear down volumes and stop backups)
jwayong2 commented 9 years ago

any recommendation on the ini parser? thx..

jteso commented 9 years ago

Gcfg is the one i used in envoy before i migrated to yaml

jwayong2 commented 9 years ago

Check out Pull Request #9 .. I have merged into master as well..