{
    "help":[
        "if npminstall is true, it will do npm install cirruswave in the container",
        "most paths can be absolute or relative",
        "paths, if relative, are relative to the location where prep.js is present. This is node_modules/cirruswave/deploy/docker",
        "npminstall - should be true. This assumes that npm init is done in the appdir, note in the appcopy, you need to include package.json to be copied",
        "npminstallpc - should be true only if you didn't run npm init and create a package.json",
        "destdir - identifies the location for creating all the scripts to prep, deploy, and/or launch the services as defined by deployconfig. This is relative to where the prep.js resides or can be absolute",
        "tmpdir - identifies a location for creating temperary directory for genrating intermediate files for each of the containers (it can be any directory with read/write access",
        "appcopy - array of objects. Each object indicates the type which can be file or dir, srcdirectory, path to the directory or file to be copied, destination directory, and if directory indicate if it needs to be copied recursively.",
        "paths in appcopy can be absolut or relative. If relative, they are relative to appdir",
        "appdir - give the directory where the app resides in the source. This can be asbolute or relative to the location where prep.js is present (like other paths)",
        "appserviceconfig - Name of the serviceconfig and is relative to the appdir",
        "secret - secret required for keymanager service passed in initoptions when starting the service.",
        "appservices - list out by each service mentioned in the service config how it should be launched. If an entry is not present, default launch script will be generated for these",
        "each entry in this has three fields which are optional, workingdir where the actual code resides and the node command to launch the app",
        "the entry replicas is by default 1 but can be any number that will be used only in swarm mode or kubernetes mode",
        "sysservices - For each services in the system services, replicas field indicates how many replicas are needed.",
        "again this is only valid in swarm mode or kubernetes mode",
        "persistence - For each service there is an optional persistence field that can be specified. If nothing is specified, it's assumed to be file. Currently only other type supported is s3. For s3, the bucketname, keys, region need to be mentioned. Empty strings are not accepted.",
        "elb this whole section is for future use. Currently if elb has an object it will assume the swarm clusters are balanced through elb and not use the service mesh across machines",
        "managers - these are machines where the managers are deployed to.",
        "workers - these are machines where the workers in swarm cluster are deployed to. If elb is present, this is ignored"
    ],
    "targets":{
        "aws":{
            "homedir":"/home/ubuntu",
            "managers":[
                {
                    "pem":"../../cirrus-sup.pem",
                    "user":"ubuntu",
                    "machine":"ec2-18-222-125-68.us-east-2.compute.amazonaws.com",
                    "active":true
                },
                {
                    "pem":"../../cirrus-sup.pem",
                    "user":"ubuntu",
                    "machine":"ec2-18-218-20-203.us-east-2.compute.amazonaws.com",
                    "active":false
                }
            ]       
        },
        "docker":{
            "username":"phanipc",
            "elb":{
                "comment":"0 - amazon elb, 1 - future cirrus load balancer",
                "type":0,
                "dns":"mic-783741712.us-east-2.elb.amazonaws.com"
            },
            "managers":[
                {
                    "pem":"../../../cirrus-sup.pem",
                    "user":"ubuntu",
                    "machine":"ec2-18-221-216-37.us-east-2.compute.amazonaws.com",
                    "internalip":"172.31.31.118",
                    "active":true
                },
                {
                    "pem":"../../../cirrus-sup.pem",
                    "user":"ubuntu",
                    "machine":"ec2-18-218-20-203.us-east-2.compute.amazonaws.com",
                    "active":true
                }
            ],
            "workers":[
                {
                    "pem":"../../../cirrus-sup.pem",
                    "user":"ubuntu",
                    "machine":"ec2-18-188-205-183.us-east-2.compute.amazonaws.com",
                    "active":false
                },
                {
                    "pem":"../../../cirrus-sup.pem",
                    "user":"ubuntu",
                    "machine":"ec2-52-14-237-38.us-east-2.compute.amazonaws.com",
                    "active":false
                }
            ]        
        }
    },
    "npminstall":false,
    "npmdir":"../",
    "pccopy":true,
    "appdir":"../../examples",
    "destdir":"/tmp/dist",
    "tmpdir":"/tmp/tmpdir",
    "appserviceconfig":"appserviceconfig.json",
    "deploymentmode":"dev",
    "corsdomains":[
        "https://url.domain.com"
    ],
    "appcopy":[
        {"srcdir":".", "path":"./security", "destdir":".", "recursive":true, "type":"dir"}
    ],

    "systemservices":
    {
        "keymgr":{
            "secret":"helloworld",
            "overrides":{
                "certpath":"security/sampleservice"
            },
            "persistence":{
                "type":"file",
                "bucketname":"bucket",
                "acckey":"acckey",
                "secret":"secretkey",
                "region":"region"
            },
            "replicas":3
        },
        "nvstore":{
            "overrides":{
                "certpath":"security/sampleservice"
            },
            "persistence":{
                "type":"file",
                "bucketname":"bucketname",
                "acckey":"acckey",
                "secret":"secret",
                "region":"region"
            },
            "replicas":3
        },
        "relstore":{
            "overrides":{
                "certpath":"security/sampleservice"
            },
            "persistence":{
                "type":"mysql",
                "host":"ehost",
                "user":"user",
                "password":"password",
                "connectionlimit":20
            },
            "replicas":3
        },
        "connector":{
            "overrides":{
                "certpath":"security/sampleservice"
            },
            "initoptions":{
                "workingappdir":"node_modules/cirruswave/examples",
                "appserviceconfigfilename":"appserviceconfig.json",
                "connections": {
                    "s3example":{
                        "service":"nvstore",
                        "enabled": true,
                        "initoptions": {
                            "persistence": {
                                "type":"s3",
                                "bucketname":"bucketname",
                                "acckey":"acckey",
                                "secret":"secret",
                                "region":"region"
                            }
                        }	  
                    },
                    "mysqlexample":{
                        "service":"relstore",
                        "enabled": true,
                        "initoptions": {
                            "persistence": {
                                "type":"mysql",
                                "host":"host",
                                "user":"mysqluser",
                                "password":"password",
                                "connectionlimit":10
                            }
                        }
                    },
                    "sfexample":{
                        "service":"snowflake",
                        "enabled": true,
                        "initoptions": {
                            "persistence": {
                                "type": "snowflake",
                                "account": "account.region",
                                "user": "sfusername",
                                "password": "sfpassword"
                            }
                        }
                    },
                    "sampleexample1":{
                        "service": "sampleservice",
                        "enabled": true
                    },
                    "sampleexample2":{
                        "service": "sampleservice",
                        "enabled": false
                    }
                }
            },
            "replicas":2
        },
        "workflow":{
            "replicas":3
        }
    },
    "appservices":{
        "sampleservice":{
            "replicas":3,
            "workingdir":"node_modules/cirruswave/examples",
            "exec":"node app_index.js -s sampleservice -c appserviceconfig.json"
        },
        "sampleserviceappkey":{
            "replicas":3,
            "workingdir":"node_modules/cirruswave/examples",
            "exec":"node app_index.js -s sampleserviceappkey -c appserviceconfig.json"
        },
        "sampleservicebasic":{
            "replicas":3,
            "workingdir":"node_modules/cirruswave/examples",
            "exec":"node app_index.js -s sampleservicebasic -c appserviceconfig.json"
        },
        "sampleserviceacckey":{
            "replicas":3,
            "workingdir":"node_modules/cirruswave/examples",
            "exec":"node app_index.js -s sampleserviceacckey -c appserviceconfig.json"
        },
        "taskserver":{
            "replicas":3,
            "workingdir":"node_modules/cirruswave/examples",
            "exec":"node app_index.js -s taskserver -c appserviceconfig.json"
        }
    },
    "enterpriseservices":{
        "test_eservice":{
            "replicas":3,
            "workingdir":"node_modules/cirruswave/examples",
            "exec":"bash testenterprise.sh",
            "ports":[
                {
                    "hostport":4100,
                    "containerport":4006
                }
            ]
        }
    }
}
