README.md in mkit-0.2.0 vs README.md in mkit-0.3.0

- old
+ new

@@ -14,13 +14,20 @@ * Ruby * HAProxy * Docker * Linux (iproute2 package) +## Install + +This is a simple ruby gem, so to install run +``` +# gem install mkit +``` + ## Running -The `daemon` requires `root` user, you can run it directly on the repository root... +The `daemon` requires `root` user (due to `ip` and `haproxy`), you can run it directly on the repository root... ``` # ./mkitd --help Usage: mkitd [options] -c config-dir set the config dir (default is /etc/mkit) @@ -45,26 +52,27 @@ There's also samples on the samples dir, for daemontools and systemd. ### Accessing the API * Create new service - * `mkitc POST services -F "file=@samples/apps/rabbitmq.yml"` + * `mkitc create samples/apps/rabbitmq.yml` * Update service - * `mkitc PUT services/{id|service_name} -F "file=@samples/apps/rabbitmq.yml"` -* Get services - * `mkitc GET services/{id|service_name}[?verbose=true]` + * `mkitc update samples/apps/rabbitmq.yml` +* Get service + * `mkitc ps {id|service_name}` * Delete service - * `mkitc DELETE services/{id|service_name}` + * `mkitc rm {id|service_name}` * List services - * `mkitc GET services?verbose=true` + * `mkitc ps [-v (verbose)]` * Control service - * `mkitc PUT services/{id|service_name}/start` - * `mkitc PUT services/{id|service_name}/stop` + * `mkitc start {id|service_name}` + * `mkitc stop {id|service_name}` Example: ``` +$ mkitc ps postgres id name addr ports status 4 postgres 10.210.198.10 tcp/5432 RUNNING pods id pod_id pod_name pod_ip status 19 4ce31a007211 5d148a16f3aa 172.17.0.2 RUNNING @@ -96,18 +104,18 @@ ``` service: name: rabbitmq # unique image: rabbitmq:3-management-alpine # image - network: bridge # docker network + network: bridge # docker network - it will be created if it does not exists ports: # haproxy port mapping: <external_port>|<internal_port>|<tcp|http>|round_robin - 5672:5672:tcp:round_robin - 80:15672:http:round_robin resources: max_replicas: 1 min_replicas: 1 volumes: - - docker://mkit_rabbitmq_data:/var/lib/rabbitmq # a docker volume + - docker://mkit_rabbitmq_data:/var/lib/rabbitmq # a docker volume - it will be created if it does not exists - /var/log/rabbitmq/logs:/var/log/rabbitmq # a local volume environment: RABBITMQ_DEFAULT_USER: admin RABBITMQ_DEFAULT_PASS: admin RABBITMQ_DEFAULT_VHOST: mkit