Skip to content
Terskikh Maria edited this page Dec 5, 2017 · 24 revisions

The chkit run command creates a Deployment and automatically generates a JSON file which contains Deployment parameters. The run.json file is saved in the directory $HOME/.containerum/src/json_templates.

Command syntax

To execute chkit run command, you need to specify:

Flag Parameter Description
NAME Object name. Note: object name can only contain lower-case letters
--image или -i IMAGE image name

or

Flag Parameter Description
--configure option to use step-by-step input of parameters in dialogue mode

Optional parameters:

Flag Parameter Description
--help or -h print usage info
--env or -e ENV environment variables for a container in the Pod
--volume or -v add Volume
--ports or -p PORTS ports to be opened
--replicas or -r REPLICAS_COUNT number of replicas for Pod
Note: the default value for REPLICAS_COUNT = 1
--memory or -m MEMORY amount of RAM per Pod Note: the default value for MEMORY = 128Mi
--cpu or -c CPU allocated part of CPU resources available to Pod. Note: the default value for CPU = 100m Pod
--commands or -cmd COMMANDS commands to be executed upon launching a container in Pod
--labels or -ls LABELS tags for Deployment. All Pods in Deployment have the same tags
--namespace or -n NAMESPACE Namespace name. Note: the default value for NAMESPACE = default
--debug or -d print system info on command execution
$ chkit [--debug -d ] run NAME
--configure | --image -i IMAGE
[--env -e «KEY=VALUE»]
[--volume -v «volumeLabel1=mountPath1»] 
[--port -p PORT]
[--replicas -r REPLICAS_COUNT]
[--memory -m MEMORY]
[--cpu -c CPU]
[--command -cmd COMMAND]
[--labels -ls «KEY=VALUE»]
[--namespace -n NAMESPACE]
[--help | -h]

An alternative way to execute chkit run, using --configure flag:

$ chkit run NAME --configure

Then it is necessary to enter the only mandatory parameter – application image name. All other optional parameters, described above, will be requested to input in the dialogue mode, but may be skipped.

CPU and RAM units

CPU units are measured in cpus units. You can use both integral and fractional values. Use the suffix m (milli). E.g., CPU = 300m = 300mcpu = 0.3cpu.

RAM resources are measured in bytes. You can use both integral and fractional values. Use the suffixes Mi(Mega) and Gi(Giga). E.g., RAM = 1,00e+8byte = 100Mi = 100MB = 0,100Gi = 0,100GB.

For example you have 1 CPU and 1GB RAM. If your launched deploy requires 0.3 CPU and 100MB RAM, then your Namespace's resources will look like this:

Example

$ chkit run myapp --configure 
 
Enter image:
nginx 
Enter ports (8080 ... 4556):
80 
Enter labels (key=value ... key3=value3):app=nginx type=local 
Enter commands (command1 ... command3): 
Enter environ variables (key=value ... key3=value3):
Enter volumes (volumeLabel1="mountPath1" ...
volumeLabelN="mountPathN"): default-volume="/data"
Enter  CPU cores count(*m):
100m 
Enter memory size(*Mi | *Gi):
200Mi
Enter  replicas count:2 
 
run... OK