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

BuildKite CI: Deploying buildkite agents to a cluster v0 #4802

Closed
bkase opened this issue Apr 28, 2020 · 7 comments
Closed

BuildKite CI: Deploying buildkite agents to a cluster v0 #4802

bkase opened this issue Apr 28, 2020 · 7 comments

Comments

@bkase
Copy link
Member

bkase commented Apr 28, 2020

We need to build terraform + helm infrastructure to deploy BuildKite agents to GKE.

Getting just this part to work unlocks more parallelizable work.

Epic: #4762

@O1ahmad
Copy link
Contributor

O1ahmad commented May 11, 2020

Seems as though we should be able to leverage the official Buildkite Helm chart and Docker image for now and avoid having to develop our own.

With this in mind, the additional infrastructure code structure should resemble the following:

Code Structure

coda-automation
├── helm
├── scripts
├── services
└── terraform
        ├── infrastructure
        ├── modules
                └── kubernetes
                        └── buildkite-agent
        └── buildkite-clusters
                 └── buildkite-product(product CI/CD)
                 └── (e.g. buildkite-infra, buildkite-data, ...) 

@O1ahmad
Copy link
Contributor

O1ahmad commented May 11, 2020

Test Infrastructure

@yourbuddyconner @nholland94 - Considering the technical stack for the proposed Buildkite agent cluster infra consists of:

  • Docker (container-engine)
  • Kubernetes (provisioner/orchestrator) + Helm (Kubernetes package manager)
  • Terraform (IaC)

We should be able to enable a CI/CD pipeline for this repository based on:

  • minikube + helm
  • kubectl's config use-context functionality
  • kgoss - a wrapper for goss that aims to bring the simplicity of testing with goss to containers running in pods in Kubernetes
  • Terraform (note: based on setting kube context above and perhaps conditional provisioning based on environment and resource type, may be able to imitate exact workflow across environments -- e.g. terraform plan && terraform apply (+ test validation or monitoring/alerting)
  • organization-wide or dedicated infrastructure Buildkite cluster

@yourbuddyconner
Copy link
Contributor

yourbuddyconner commented May 11, 2020

I love the use of goss here, and kgoss is especially neat. Overall the plan LGTM

@O1ahmad
Copy link
Contributor

O1ahmad commented May 18, 2020

@yourbuddyconner fyi: testing of infrastructure bits/components using kgoss and by extension minikube is currently blocked by minikube-issue #7420.

tl;dr: within minikube, user override of docker-daemon related environment variables such as DOCKER_HOST=, which is used in the podsidecar DinD setup, is ignored as the variables are reset to defaults meant to target only the host docker daemon (unix:///var/run/docker.sock).

Discussion is ongoing re: resolving this by hopefully not resetting overrides and trusting the developer/operator/user to do the right thing, especially in a test or minikube context.

@O1ahmad
Copy link
Contributor

O1ahmad commented May 20, 2020

(re: above minikube and DOCKER_HOST issue) Tracking issue: kubernetes/minikube#8219

@O1ahmad
Copy link
Contributor

O1ahmad commented May 27, 2020

FYI: CircleCI resource classes/sizing (re: Buildkite agent cluster construction)

Screenshot from 2020-05-27 10-01-40

@O1ahmad
Copy link
Contributor

O1ahmad commented Jun 8, 2020

v0 of cluster has been provisioned and is operational.

Note: test infrastructure design and implementation will be moved to the v1 cluster iteration.

@O1ahmad O1ahmad closed this as completed Jun 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants