Skip to content

Conversation

@sebelga
Copy link
Contributor

@sebelga sebelga commented Sep 24, 2019

This PR contains the WIP of the cloud migration plugin. It is a POC to work on the first part of the migration: initialize a Cloud cluster based on the local cluster stats.

Screen Shot 2019-09-24 at 13 45 55

@sebelga sebelga added non-issue Indicates to automation that a pull request should not appear in the release notes release_note:skip Skip the PR/issue when compiling release notes Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more t// labels Sep 24, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/es-ui

@elasticmachine
Copy link
Contributor

💔 Build Failed

Copy link
Contributor

@cjcenizal cjcenizal left a comment

Choose a reason for hiding this comment

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

Great work, Seb! I'm going to borrow a ton of the app boilerplate code when I set up a skeleton app for future work on a Tasks app. I glanced through the code and had a couple questions.

features.monitoring && features.monitoring.available && features.monitoring.enabled
),
},
geoLocalisation: {
Copy link
Contributor

Choose a reason for hiding this comment

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

Americans would tend to expect this to be spelled geoLocalization, though I'm not sure if we want to standardize on the American idiom.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let's wait and see what Andrew from cloud says about this. The contract hasn't been defined yet, this might end up being simply geo.


const {
data: { country, continent },
} = await axios.get(`http://www.iplocate.io/api/lookup/${ip}`, axiosOptions);
Copy link
Contributor

Choose a reason for hiding this comment

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

Will the /cluster/state route fail if the ipinfo or iplocate services are unavailable? Is that what we want?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a quick draft I made to get the server location. The /cluster/state route should, of course, be resilient to the geo info lookup failing.

I want to see first if this is something we want, and if we do, if using a public endpoint is OK with the security team. I had to use the http scheme as the https was blocked by Kibana as not being whitelisted.


export function mirrorPluginStatus(upstreamPlugin, downstreamPlugin, ...statesToMirror) {
upstreamPlugin.status.setMaxListeners(20); // We need more than the default, which is 10
upstreamPlugin.status.setMaxListeners(30); // We need more than the default, which is 10
Copy link
Contributor

Choose a reason for hiding this comment

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

I have no context here, so I'm curious what necessitated this change and whether it impacts other teams?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So it seems that we reached the 20 limits and my plugin was going to 21. I changed it to 30 and everything worked fine. You are right that we might want to ask what impact this could have on Kibana in general.

<Form form={form}>
<UseField
path="cloudClusterConfig"
config={fieldConfig}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a good example of when to use the config prop for <UseField />.
In this tiny form, using a form schema would be overkill. Now that I see it, I could have called it textAreaFieldConfig.

cc @cjcenizal @alisonelizabeth

@sebelga sebelga mentioned this pull request Sep 25, 2019
@elasticmachine
Copy link
Contributor

💔 Build Failed

};
const {
data: { ip },
} = await axios.get('http://ipinfo.io', axiosOptions);
Copy link
Contributor

@cjcenizal cjcenizal Oct 4, 2019

Choose a reason for hiding this comment

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

Might be worth considering moving to the core.http.fetch service. I believe it's available as part of HttpStart but if it isn't, you could use node-fetch to start with and then migrate to core.http.fetch when it's available.

fetch: HttpHandler;

@legrego legrego closed this Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

non-issue Indicates to automation that a pull request should not appear in the release notes release_note:skip Skip the PR/issue when compiling release notes Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more t//

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants