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

script to add dashboards and other Kibana UI objects #518

Merged
merged 1 commit into from Jul 7, 2017

Conversation

richm
Copy link
Contributor

@richm richm commented Jul 6, 2017

The script es_load_kibana_ui_objects is used to load dashboards and
other Kibana UI objects for the given user. Usage:

oc exec $espod -- es_load_kibana_ui_objects user-name

That is, it exists inside the Elasticsearch and ES-OPS pod, and must
be run inside those pods. Additionally, it requires some indices and
other objects set up by the OpenShift Elasticsearch plugin, so the user
must login to Kibana (or Elasticsearch) before using this script.

This will also add an index pattern for project.* and load the
necessary index pattern file.

This relies on some additions to the viaq schema which is provided
by ViaQ/elasticsearch-templates#50
@jcantrill @portante PTAL
[test]

@jcantrill
Copy link
Contributor

Additionally, it requires some indices and
other objects set up by the OpenShift Elasticsearch plugin
What items are we talking about here? Anything the plugin creates, it flushes from its cache and the ACLs every 60 seconds

info Adding Kibana dashboards and other UI objects for user $1 index $kibindex

INDEX_PATTERN=${INDEX_PATTERN:-project.*}
INDEX_PATTERN_FILE=${INDEX_PATTERN_FILE:-/usr/share/elasticsearch/index_patterns/com.redhat.viaq-openshift.index-pattern.json}
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 consider refactoring '/usr/share/elasticsearch/' into a var like ES_HOME. If I ever get the reconciliation PR complete I think this will simply the impact and additional modifications we need to make.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok - but there are likely other places which will need to change

else
os::cmd::info Creating cluster-admin user $LOG_ADMIN_USER
current_project="$( oc project -q )"
os::cmd::debug "$( oc login --username=$LOG_ADMIN_USER --password=$LOG_ADMIN_PW )"
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't believe this is necessary since when adding roles to a user, a user doesn't need to exist. I'm pretty certain the association is by name and userpolicy is applied to users with that name. There is no 'user' store per se.

@richm
Copy link
Contributor Author

richm commented Jul 6, 2017

[test]

@richm
Copy link
Contributor Author

richm commented Jul 6, 2017

What items are we talking about here? Anything the plugin creates, it flushes from its cache and the ACLs every 60 seconds

@jcantrill It doesn't appear to require the acls, just the defaultIndex entry, and possibly some of the index patterns

https://bugzilla.redhat.com/show_bug.cgi?id=1467963

The script es_load_kibana_ui_objects is used to load dashboards and
other Kibana UI objects for the given user.  Usage:

oc exec $espod -- es_load_kibana_ui_objects user-name

That is, it exists inside the Elasticsearch and ES-OPS pod, and must
be run inside those pods.  Additionally, it requires some indices and
other objects set up by the OpenShift Elasticsearch plugin, so the user
must login to Kibana (or Elasticsearch) before using this script.

This will also add an index pattern for `project.*` and load the
necessary index pattern file.

This relies on some additions to the viaq schema which is provided
by ViaQ/elasticsearch-templates#50
@openshift-bot
Copy link

Evaluated for origin aggregated logging test up to b0044ec

@openshift-bot
Copy link

Origin Aggregated Logging Test Results: SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_request_origin_aggregated_logging/179/) (Base Commit: b613f65) (PR Branch Commit: b0044ec)

@richm
Copy link
Contributor Author

richm commented Jul 6, 2017

@richm
Copy link
Contributor Author

richm commented Jul 6, 2017

[merge][severity: blocker]

@richm
Copy link
Contributor Author

richm commented Jul 7, 2017

flake [merge][severity:blocker]

@openshift-bot
Copy link

Evaluated for origin aggregated logging merge up to b0044ec

@openshift-bot
Copy link

openshift-bot commented Jul 7, 2017

Origin Aggregated Logging Merge Results: SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_request_origin_aggregated_logging/68/) (Base Commit: b613f65) (PR Branch Commit: b0044ec) (Extended Tests: blocker)

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

Successfully merging this pull request may close these issues.

None yet

3 participants