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

A silly change for trying out cloud builds #120709

Closed
wants to merge 3 commits into from

Conversation

matschaffer
Copy link
Contributor

@matschaffer matschaffer commented Dec 8, 2021

Summary

Not for merge. Just wanted to take the ci:deploy-cloud label for a test drive.

Checklist

Delete any items that are not applicable to this PR.

Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release.

When forming the risk matrix, consider some of the following examples and how they may potentially impact the change:

Risk Probability Severity Mitigation/Notes
Multiple Spaces—unexpected behavior in non-default Kibana Space. Low High Integration tests will verify that all features are still supported in non-default Kibana Space and when user switches between spaces.
Multiple nodes—Elasticsearch polling might have race conditions when multiple Kibana nodes are polling for the same tasks. High Low Tasks are idempotent, so executing them multiple times will not result in logical error, but will degrade performance. To test for this case we add plenty of unit tests around this logic and document manual testing procedure.
Code should gracefully handle cases when feature X or plugin Y are disabled. Medium High Unit tests will verify that any feature flag or plugin combination still results in our service operational.
See more potential risk examples

For maintainers

@matschaffer matschaffer added Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services Feature:Stack Monitoring ci:deploy-cloud labels Dec 8, 2021
@matschaffer matschaffer self-assigned this Dec 8, 2021
@matschaffer
Copy link
Contributor Author

matschaffer commented Dec 9, 2021

Sweet! Looks like this works via terraform as well

terraform {
  required_providers {
    ec = {
      source = "elastic/ec"
      version = "0.3.0"
    }
  }
}

provider "ec" {
  apikey = "(redacted, also best read from $EC_API_KEY)"
}

resource "ec_deployment" "docker_override" {
  region                 = "gcp-us-west2"
  version                = "8.1.0-SNAPSHOT"
  deployment_template_id = "gcp-io-optimized-v2"

  elasticsearch {
    topology {
      id   = "hot_content"
      size = "8g"
    }
  }

  kibana {
    config {
      docker_image = "docker.elastic.co/kibana-ci/kibana-cloud:8.1.0-SNAPSHOT-cf3adadb14bd9caa8b9a1b71e11cd0993c45fb72"
    }
  }
}

@matschaffer
Copy link
Contributor Author

And cdktf too

import { Construct } from "constructs";
import { App, TerraformStack } from "cdktf";
import { EcProvider, Deployment } from "./.gen/providers/ec";

class MyStack extends TerraformStack {
  constructor(scope: Construct, name: string) {
    super(scope, name);

    new EcProvider(this, "ec", {
      apikey: "(redacted, also best read from $EC_API_KEY)",
    });

    new Deployment(this, "main", {
      region: "gcp-us-west2",
      version: "8.1.0-SNAPSHOT",
      deploymentTemplateId: "gcp-io-optimized-v2",

      elasticsearch: {
        topology: [
          {
            id: "hot_content",
            size: "8g",
          },
        ],
      },

      kibana: {
        config: {
          dockerImage:
            "docker.elastic.co/kibana-ci/kibana-cloud:8.1.0-SNAPSHOT-cf3adadb14bd9caa8b9a1b71e11cd0993c45fb72",
        },
      },
    });
  }
}

const app = new App();
new MyStack(app, "cdktftest");
app.synth();

@matschaffer
Copy link
Contributor Author

I was unable to book kibana due to a config handling problem introduced #120110, but the API requests for the above configurations were successful.

@matschaffer
Copy link
Contributor Author

@elasticmachine merge upstream

@matschaffer
Copy link
Contributor Author

@elasticmachine merge upstream

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
monitoring 445.5KB 445.6KB +39.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @matschaffer

@matschaffer
Copy link
Contributor Author

IT WORKSSSSSSS!!!

Screen_Shot_2021-12-14_at_11_30_07

@matschaffer
Copy link
Contributor Author

Closing this down since I've confirmed it works. Will follow up with possible guide updates for future work.

@tylersmalley tylersmalley added ci:cloud-deploy Create or update a Cloud deployment and removed ci:deploy-cloud labels Aug 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci:cloud-deploy Create or update a Cloud deployment Feature:Stack Monitoring Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants