Skip to content

matteyu/k8s-cosmos-gaia

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

K8s Cosmos Gaia

Prerequisites

Ensure you have the following tools installed:

  • kubectl
  • Helm
  • Docker
  • Terraform
  • Python3

Project Structure

The project is structured as follows:

project-root/
│
├── docker/             # Dockerfile for building Docker image
│   └── Dockerfile
│
├── k8s/                # Kubernetes manifest files
│   ├── gaia-service.yml
│   ├── gaia-servicemonitor.yml
│   └── gaia-statefulset.yml
│
└── terraform/           # Terraform files for managing AWS resources
│    ├── main.tf
│    ├── variables.tf
│    ├── outputs.tf
└── scripts/           # python cli for automating deployment actions
    ├── cli.py
    ├── utils.py

Instructions

Building and Running the Dockerfile Locally

  1. Build Docker Image:

    cd docker/
    docker build -t gaia .

    Replace gaia with your preferred image name.

  2. Run Docker Container:

    docker run gaia
    
    # to run remote, simply do "docker run ajail/gaia:17.2.0"

Applying Kubernetes Manifest Files

  1. Apply Kubernetes Manifests:

    cd k8s/
    kubectl apply -f gaia-statefulset.yml
    kubectl apply -f gaia-service.yml
    kubectl apply -f gaia-servicemonitor.yml
  2. Check Deployment Status:

    kubectl get pods
    kubectl get services

    Ensure all pods are running and services are available.

Deploying Resources with Terraform

  1. Initialize Terraform:

    cd terraform/
    terraform init
  2. Plan and Apply Terraform Changes:

    terraform plan
    terraform apply

    Follow the prompts to apply changes.

  3. Verify Resources:

    terraform show

    Verify the resources created by Terraform.

Automation Script

python3 scripts/cli.py

* follow the prompts

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published