Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read and write configs to a file in json_arch. Remove omitempty from… #72

Merged
merged 1 commit into from
May 25, 2016

Conversation

jwatson0
Copy link

Read and write configs to a file in json_arch. Remove omitempty from Configuration so that all options are written to the conf file.

This allows RegionNames, ZoneNames, and IPRanges to be overridden at run-time.

Config file name is json_arch/_conf.json, using the arch name from -a

Usage:
$ ./spigo -saveconfig
2016/05/24 17:13:36 Saving config to json_arch/netflixoss_conf.json
2016/05/24 17:13:36 Loading architecture from json_arch/netflixoss_arch.json
...
2016/05/24 17:13:46 netflixoss.us-east-1.zoneB..eureka01...eureka.eureka: closing
2016/05/24 17:13:46 spigo: complete

$ ls -log json_arch/netflixoss_*
-rw-r--r-- 1 1254 May 20 12:19 json_arch/netflixoss_arch.json
-rw-r--r-- 1 1108 May 24 17:13 json_arch/netflixoss_conf.json

$ cat json_arch/netflixoss_conf.json
{
"arch": "netflixoss",
"graphmlfile": "",
"graphjsonfile": "",
"neo4jurl": "",
"runduration": 10000000000,
"dunbar": 0,
"population": 100,
"msglog": false,
"regions": 1,
"regionnames": [
"us-east-1",
"us-west-2",
"eu-west-1",
"eu-central-1",
"ap-southeast-1",
"ap-southeast-2"
],
"ipranges": [
[
"54.198.",
"54.221.",
"50.19."
],
[
"54.245.",
"54.244.",
"54.214."
],
[
"54.247.",
"54.246.",
"54.288."
],
[
"54.93.",
"54.28.",
"54.78."
],
[
"54.251.",
"54.254.",
"54.255."
],
[
"54.252.",
"54.253.",
"54.206."
]
],
"zonenames": [
"zoneA",
"zoneB",
"zoneC"
],
"collect": false,
"stopstep": 0,
"eurekapoll": "1s",
"filter": false,
"keyvals": ""
}

…Configuration so that all options are written to the conf file.
@adrianco adrianco merged commit cac9d6f into adrianco:master May 25, 2016
@adrianco
Copy link
Owner

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants