Skip to content
This repository has been archived by the owner on Jul 28, 2020. It is now read-only.

Synchronize st2.conf with upstream #33

Merged
merged 10 commits into from
Nov 15, 2016
Merged

Synchronize st2.conf with upstream #33

merged 10 commits into from
Nov 15, 2016

Conversation

arm4b
Copy link
Member

@arm4b arm4b commented Nov 15, 2016

@arm4b arm4b changed the title Syncronize st2.conf with upstream Synchronize st2.conf with upstream Nov 15, 2016
armab added 3 commits November 15, 2016 17:06
You can't overwrite conf_root from `/etc/st2` to anything else, since it's globally hardcoded setting
Convention we started to follow quite a while for all config settings where possible, see:
https://github.com/StackStorm/st2/blob/master/conf/st2.package.conf
@@ -25,5 +25,4 @@
hostname 'localhost'
comment 'Appended by st2 cookbook'
action :append
Copy link
Member Author

@arm4b arm4b Nov 15, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about that entry if we need it at all. At least after using 127.0.0.1 instead of localhost this rule is out of scope of this cookbook.

From one point of view cleanup might be good, from another side: 127.0.0.1 localhost in hosts won't hurt.

Ideas?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree

api_url: 'http://localhost:9101',
conf_root: '/etc',
mask_secrets: true,
allow_origin: '*',
Copy link
Member Author

@arm4b arm4b Nov 15, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thinking about renaming these config settings:
allow_origin => api_allow_origin
mask_secrets => api_mask_secrets

How it should be, according to: https://github.com/StackStorm/st2/blob/master/conf/st2.package.conf#L10

Let me know your opinions.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

api_ prepending makes more sense

@arm4b
Copy link
Member Author

arm4b commented Nov 15, 2016

BTW, related to this is to support all st2 config settings: #35 what might be a good idea for real prod deployments

But it's not a thing for the nearest future.

@arm4b arm4b added RFR and removed WIP labels Nov 15, 2016
@arm4b
Copy link
Member Author

arm4b commented Nov 15, 2016

@jvrplmlmn @sysbot @shortdudey123 Please take a look and let's unblock this Cookbook.

Also, we got some more resources and would like to improve this repo.
This week plan: https://github.com/StackStorm/chef-stackstorm/milestone/1

I documented More Features recently. If there is something you would like to see here in future - create an Issue/Document it.

And thank you for your involvement!

@@ -120,31 +134,34 @@
mode: 0644,
source: 'st2.conf.erb',
variables: {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should alphabetize this

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm using it in a way as it appears in st2.conf for the reasons to verify synchronization easier in the future:
https://github.com/StackStorm/st2/blob/master/conf/st2.dev.conf

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If so, you should add a comment about that since whoever modifies this list next will just add it to the end since its not alphabetized

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Good call!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

much better :)

[sensorcontainer]
logging = <%= @conf_root %>/st2reactor/console.conf
logging = /etc/st2/logging.sensorcontainer.conf
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why remove config option?

Copy link
Member Author

@arm4b arm4b Nov 15, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, included explanation in Commit message:

You can't overwrite conf_root from /etc/st2 to anything else, since it's globally hardcoded setting.

So /etc/st2 is hardcoded in packages, you can't change it and it's used in so many places.
Allowing users to edit conf_root brings confusion and broken installation.

Copy link
Member Author

@arm4b arm4b Nov 15, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's outdated bit that is still here from the legacy installer, before introducing actual .deb/.rpm packages.

I'm going to touch more abandoned things like that in upcoming Cookbook Cleanup.

logging = <%= @conf_root %>/st2api/console.conf
host = <%= @api_host %>
port = <%= @api_port %>
logging = /etc/st2/logging.api.conf
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why remove config option here as well?

@shortdudey123
Copy link
Contributor

LGTM for merging assuming tests pass

@arm4b arm4b merged commit e5db04c into master Nov 15, 2016
@arm4b arm4b deleted the fix/st2-conf-sync branch November 15, 2016 20:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants