Skip to content

Commit

Permalink
Issue #3: Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
SonOfLope committed Feb 13, 2024
1 parent 7b14138 commit 40f0ab6
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 9 deletions.
21 changes: 19 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ In this repository, you can find the Kubernetes manifests that deploy each of
the applications on the three different cloud providers: Google Cloud Platform
(GCP), Amazon Web Services (AWS), and Azure.

## Dependencies

- [Terraform](https://www.terraform.io/downloads.html)
- [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/)
- [Azure CLI](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli)
- [kubelogin](https://github.com/Azure/kubelogin)

## Content

- The Terraform configuration for the GCP cluster.
Expand All @@ -30,9 +37,19 @@ and Cert Manager to meet our requirements.

[ai-cfia github container registry](https://github.com/orgs/ai-cfia/packages)

## Local Development
## Terraform Deployment

Current configuration is hosting a kubernetes cluster on Azure (AKS). We have an
Azure Devops pipeline `apply-terraform.yml` that applies terraform's resources
that are created on our Azure's subscription. The state is then saved to a blob
storage in Azure.

## Kubectl configuration

To locally fetch the kube config, here are the steps `
Assuming you have [Azure's
CLI](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli) and
[kubelogin](https://github.com/Azure/kubelogin) plugin installed, here is how
you can locally fetch the kube config :

```bash
az login
Expand Down
4 changes: 2 additions & 2 deletions terraform/modules/azure-kubernetes-cluster/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ variable "tags" {
variable "k8s_version" {
description = "(Optional) Version of Kubernetes specified when creating the AKS managed cluster. If not specified, the latest recommended version will be used at provisioning time (but won't auto-upgrade)."
type = string
default = "1.23.5"
default = "1.28"
}

variable "managed" {
Expand All @@ -80,7 +80,7 @@ variable "managed" {
variable "rbac_enabled" {
description = "(Required) Is Role Based Access Control Enabled? Changing this forces a new resource to be created."
type = bool
default = false
default = true
}

variable "vm_size" {
Expand Down
8 changes: 4 additions & 4 deletions terraform/staging/main.tf
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
terraform {

backend "azurerm" {
resource_group_name = "rg-ai-cfia-terraform-state"
storage_account_name = "tfcfiastate"
container_name = "infra-terraform-state"
key = "tf/terraform.tfstate"
resource_group_name = var.terraform_state_resource_group_name
storage_account_name = var.terraform_state_storage_account_name
container_name = var.terraform_state_container_name
key = var.terraform_state_key
}

# backend "gcs" {
Expand Down
22 changes: 21 additions & 1 deletion terraform/staging/variables.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
variable "terraform_state_resource_group_name" {
description = "Name of the resource group for the Terraform state"
type = string
}

variable "terraform_state_storage_account_name" {
description = "Name of the storage account for the Terraform state"
type = string
}

variable "terraform_state_container_name" {
description = "Name of the container for the Terraform state"
type = string
}

variable "terraform_state_key" {
description = "Key (filename) of the Terraform state file"
type = string
}

variable "location_1" {
description = "Azure cloud first computing region"
type = string
Expand Down Expand Up @@ -40,7 +60,7 @@ variable "auto_scaling_default_node" {
variable "zones" {
description = "A list of Availability Zones across which the Node Pool should be spread. Changing this forces a new resource to be created."
type = list(string)
default = ["1", "2"]
default = ["1"]
}

variable "node_count" {
Expand Down

0 comments on commit 40f0ab6

Please sign in to comment.