Skip to content

Commit

Permalink
Maas updates
Browse files Browse the repository at this point in the history
  • Loading branch information
saamalik committed Aug 20, 2024
1 parent 4228e61 commit b1129ff
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 41 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/maas-tfapply.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:

- name: Terraform Init
id: init
run: terraform init -backend-config="endpoints=[\"${{ secrets.SC_ETCD_ENDPOINT }}\"]"
run: terraform init -backend-config="access_key=${{ secrets.SC_S3_ACCESS_KEY }}" -backend-config="secret_key=${{ secrets.SC_S3_SECRET_KEY }}"

- name: Terraform Workspace
id: workspace
Expand All @@ -56,6 +56,6 @@ jobs:
id: apply
run: |
terraform apply -auto-approve -no-color -input=false \
-var 'sc_host=${{ secrets.SC_HOST }}' \
-var 'sc_project_name=FDefault' \
-var 'sc_api_key=${{ secrets.SC_API_KEY }}' \
-var 'sc_host=${{ secrets.SC_CUSTENG_HOST }}' \
-var 'sc_project_name=Demo-VM-Orchestrator' \
-var 'sc_api_key=${{ secrets.SC_CUSTENG_API_KEY }}' \
44 changes: 24 additions & 20 deletions maas-clusters/cluster-east.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# #############################################
# # 501
# #############################################
- name: maas-501-pa-phil
- name: maas-cluster-501
cluster_tags:
- "type: reserve" # drive-thru, reserve, combo
- "stage: true"
Expand All @@ -11,7 +11,11 @@
- name: control-plane
control_plane: true
count: 1
resource_pool: BareMetal-GPU
resource_pool: picard-demo
- name: worker
control_plane: false
count: 3
resource_pool: picard-demo
# - name: worker
# control_plane: true
# count: 1
Expand All @@ -22,24 +26,24 @@
#############################################
# 502
#############################################
- name: maas-502-nj-newark
cluster_tags:
- "type: reserve" # drive-thru, reserve, combo
- "stage: true"
- "vm-name: picard-edge-2"
- "region: east"
node_pools:
- name: control-plane
control_plane: true
count: 1
resource_pool: BareMetal-GPU
# - name: worker
# control_plane: true
# count: 1
# resource_pool: BareMetal-GPU
profiles:
- name: DevMaas
tag: 1.0.0
# - name: maas-502-nj-newark
# cluster_tags:
# - "type: reserve" # drive-thru, reserve, combo
# - "stage: true"
# - "vm-name: picard-edge-2"
# - "region: east"
# node_pools:
# - name: control-plane
# control_plane: true
# count: 1
# resource_pool: BareMetal-GPU
# # - name: worker
# # control_plane: true
# # count: 1
# # resource_pool: BareMetal-GPU
# profiles:
# - name: DevMaas
# tag: 1.0.0
##############################################
## 503
##############################################
Expand Down
28 changes: 15 additions & 13 deletions maas-tf-scripts/main.tf
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
terraform {
required_version = ">= 0.15.0"
backend "etcdv3" {
lock = true
prefix = "/spectrocloud-maas/"
#endpoints = ["ip:2379"] # Passed in from terraform
cacert_path = "certs/ca.crt"
cert_path = "certs/client.crt"
key_path = "certs/client.key"
}

required_version = ">= 0.14.0"

required_providers {
spectrocloud = {
version = "=0.10.5"
source = "spectrocloud/spectrocloud"
#version = "> 0.4.1"
source = "spectrocloud/spectrocloud"
}
}
}

backend "s3" {
bucket = "terraform-state-spectro"
key = "project-maas-clusters/terraform.tfstate"
region = "us-east-1"
#endpoint = "https://10.10.137.64:9000"
#skip_credentials_validation = true
#skip_metadata_api_check = true
#skip_region_validation = true
#force_path_style = true
#access_key, secret_key initialize with backend-config
}
}
locals {
# TODO remove?
datacenter = "Datacenter"
Expand Down
8 changes: 4 additions & 4 deletions maas-tf-scripts/modules/maas/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ resource "spectrocloud_cluster_maas" "cluster" {
name = var.name
tags = var.cluster_tags

cloud_account_id = "62166854f62df85d6cf9bd9d"
cloud_account_id = "6501b663afe6ad52c94c3043"
#skip_completion = var.skip_wait_for_completion
cloud_config {
domain = "maas.sc"
Expand All @@ -47,11 +47,11 @@ resource "spectrocloud_cluster_maas" "cluster" {
}

instance_type {
min_memory_mb = 4096
min_cpu = 2
min_memory_mb = 8096
min_cpu = 4
}

azs = ["az1", "az2", "az3"]
azs = ["az1"]
}
}

Expand Down

0 comments on commit b1129ff

Please sign in to comment.