Skip to content

Markuspg1/my-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

my-project

Cloud Integrations Example

Automated Deployment to Azure with Terraform and Kubernetes

This project automates the deployment of a server and an application into Microsoft Azure using Terraform for infrastructure management and Kubernetes for container orchestration. The automation process is written in Python.

Table of Contents

Prerequisites

Before you begin, ensure you have met the following requirements:

Project Structure

Setup and Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/your-repo-name.git
    cd your-repo-name
  2. Install Python dependencies:

    pip install -r requirements.txt
  3. Initialize Terraform:

    cd terraform
    terraform init
  4. Configure Azure CLI:

    az login

Usage

  1. Terraform Deployment:

    • Change to the terraform directory:
      cd terraform
    • Create and apply the Terraform plan:
      terraform apply
    • This will provision the necessary Azure resources.
  2. Kubernetes Deployment:

    • Ensure your Kubernetes context is set to the new cluster:
      az aks get-credentials --resource-group <resource-group-name> --name <aks-cluster-name>
    • Deploy the application to Kubernetes:
      kubectl apply -f kubernetes/
  3. Python Script:

    • Run the main Python script for any additional automation or management tasks:
      python main.py

Configuration

Configuration settings for the deployment can be found in config/config.yaml. Modify this file to match your environment and requirements.

Example config.yaml:

azure:
  resource_group: "your-resource-group"
  location: "your-location"
  aks_cluster_name: "your-aks-cluster-name"

app:
  image: "your-docker-image"
  replicas: 3



Feel free to modify the content to better suit your project’s specifics.

About

Cloud Integrations Example

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages