Giter VIP home page Giter VIP logo

tf4k8s's Introduction

Terraform for Kubernetes

An exploration into the use of Terraform to provision Kubernetes clusters on popular IaaS.

Vision

Launch a relatively comprehensive end-to-end demo environment for discussion purposes and/or hands-on workshops in under an hour.

Getting Started

Choose your own adventure on one of the following cloud providers

Or provision new / attach existing Kubernetes clusters via

  • VMWare Tanzu Mission Control

Current experiments

Organization

Sub-directories of this repository contain

  • bom
    • Bill of materials; what do you need to get started?
  • experiments
    • Progressively build out a platform to deliver software delivery agility underpinned by Kubernetes
  • modules
    • Building blocks to be composed as you see fit
  • ytt-libs
    • YAML-based templates consumed by ytt then deployed with kapp

Roadmap

Above-mentioned experiments will evolve to include automating base configuration and installation of an additional complement of capabilities/components aimed at modeling a modern enterprise software factory / product delivery supply chain.

Cloud Foundry

Administration

  • Stratos

Open Service Broker-compatible API servers

Provision your own collection of services

Provision managed services in a public cloud and bind them to applications

Service catalog

Deploy and manage application and services with ease through an administrative interface

Distributed Version Control

  • Gitea
  • Gitlab

CI/CD

  • Argo CD
  • Jenkins
  • Gitlab
  • VMWare Tanzu Build Service
  • Concourse
  • Tekton

Reference Pipelines

Logging/Monitoring/Metrics

  • FluentBit
  • Elasticsearch, Kibana
  • Prometheus
  • Grafana
  • VMWare Tanzu Observability

Cluster/Policy Management

  • VMWare Tanzu Mission Control

Additional "building blocks" and maintenance

Services

Blob stores

  • Minio
  • Amazon S3
  • Google Cloud Storage Bucket
  • Azure Blob Storage

Stream Processing

Caching

Databases

Spring Cloud

tf4k8s's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

tf4k8s's Issues

Add Terraform modules for creating databases

Add support for launching vSphere6.7u3 or 7 environments and provisioning clusters with TKG cli

Add Pivotal Cloud Service Broker

So there's some solid work to make it easier to install the CSB, here: https://github.com/warroyo/csb-k8s.

Considering that CSB is going to be useful as the managed-services back-end for cf marketplace in cf4k8s or tas4k8s, we might opt for installing CSB with cf push using the manifest.yml in https://github.com/pivotal/cloud-service-broker.

Using a combo of Terraform and bash scripting we might:

  • download the prebuilt artifacts for the cloud-service-broker and *-brokerpak(s) from releases (as described for example, here)
  • opt for use of cloud native buildpacks, so use a modified form of the manifest.yml without the explicit reference to the legacy go-buildpack.
  • provide a template config.tpl that includes all variables place-holdered configuration - use Terraform to produce a rendered form in a file named config.yml
  • execute cf cups -p config.yml
  • cf push the app, bind the user-provided-service instance and register the broker (as described, here)

Fix issues with internal cert

On cf api, seeing

❯ cf api api.cf.lab.ironleg.me
Setting api endpoint to api.cf.lab.ironleg.me...
SSL Certificate Error x509: certificate is valid for *.cf-system.svc.cluster.local, not api.cf.lab.ironleg.me

then once authenticated and on cf push attempt seeing this in pod container logs for log-cache

[METRICS] 2020/05/20 20:37:01 Metrics endpoint is listening on [::]:6063
[GATEWAY] 2020/05/20 20:37:01 listening on [::]:8081...
2020/05/20 20:58:12.049713 http: TLS handshake error from 127.0.0.1:57338: remote error: tls: bad certificate
2020/05/20 20:58:12.339371 http: TLS handshake error from 127.0.0.1:57344: remote error: tls: bad certificate

More than likely need to adjust the tls_cert_request in modules/cf4k8s/tls.tf

@see https://www.terraform.io/docs/providers/tls/r/cert_request.html

Fix certmanager module for Azure

Currently unable to issue valid certificates for Harbor.

Harbor can be deployed successfully, but user will be challenged by the web browser.

Checking to see if certificate is ready, shows us that there's definitely something amiss.

❯ kubectl get certificates -A -o wide
NAMESPACE   NAME          READY   SECRET              ISSUER             STATUS                                                               AGE
harbor      harbor-cert   False   harbor-tls-secret   letsencrypt-prod   Waiting for CertificateRequest "harbor-cert-682570108" to complete   19m

Add support for Concourse

So there's this chart: https://github.com/concourse/concourse-chart. Handle secrets, ingress, persistence and credentials management.

Have a look at Vault, here: https://www.vaultproject.io/docs/platform/k8s/helm/run. Setup Vault in HA mode.
Auto-unsealing requires a dependency on a KMS.

Author sample CI/CD pipelines

We've a number of tools for the job.

  • JenkinsX
  • Concourse
  • ArgoCD
  • Tekton

Pick from above and author pipelines that work with a Git repository, build and unit test an artifact, assemble and publish a container image into an artifact repository, then deploy and/or promote the image as a container into one or more runtime environments.

Contemplate targeting runtime environments that:

a) are Kubernetes native
b) provide an abstraction with cf4k8s or tas4k8s

Could we tie in Tanzu Build Service with (a)?

What other value-adds come into play? Flagger?

Should allow for some basic templating and configuration.

Add Vault support

See https://learn.hashicorp.com/vault/kubernetes/sidecar. Overall this will result in a more secure footprint and allow for previously deployed applications to be patched.

There's some interesting work here because if we want to demonstrate an HA vault setup, we have some additional effort beyond a "dev mode" setup.

Take a look at these additional articles and videos for inspiration:

This work will support #10.

DNS TXT Entries Do Not Get Deleted During Destroy

Harbor and possibly other destroy scripts do not delete the TXT entries.

Expected Outcome:
TXT entry txtharbor.domain. and txtnotary.domain. entries do not exist after running destroy scripts.

Actual Outcome:
These entries persist after running destroy scripts.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.