Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 3 additions & 10 deletions cli
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,7 @@ terraform_apply() {
create_cluster_ssh_tunnel() {
# Function to check if the tunnel is already running
is_tunnel_running() {
if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "win32" ]]; then
tasklist | grep -q "[s]sh.exe.*6443:localhost:6443.*${instance_ipv4}"
else
pgrep -f "ssh.*-L 6443:localhost:6443.*${instance_ipv4}" > /dev/null
fi
ps -ef | grep -E "ssh.*-L 6443:localhost:6443.*${instance_ipv4}" | grep -v grep > /dev/null
}

echo "Checking for existing SSH tunnel..."
Expand Down Expand Up @@ -181,7 +177,7 @@ cmd_create() {
create_cluster_ssh_tunnel

# 4. Platform setup
#terraform_apply 02-platform
terraform_apply 02-platform

# 5. Workload deployment
#terraform_apply 03-workloads
Expand Down Expand Up @@ -215,10 +211,7 @@ cmd_connect() {

cmd_cleanup() {
# kill tunnels
if pgrep -f "ssh.*-L 6443:localhost:6443.*" > /dev/null
then
pkill -f "ssh.*-L 6443:localhost:6443.*"
fi
ps -W | grep "ssh.*-L 6443:localhost:6443" | awk '{print $1}' | xargs -r kill -9

# terraform destroy
terraform_destroy 00-vm
Expand Down
30 changes: 6 additions & 24 deletions terraform/02-platform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -59,32 +59,14 @@ module "traefik" {
manifest = yamldecode(file("${path.module}/manifests/traefik.yaml"))
}

module "rabbitmq" {
module "docker_registry" {
depends_on = [module.traefik]
source = "./modules/helm-release"
manifest = yamldecode(file("${path.module}/manifests/rabbitmq.yaml"))
manifest = yamldecode(file("${path.module}/manifests/docker-registry.yaml"))
}

module "loki" {
module "mssql" {
depends_on = [module.docker_registry]
source = "./modules/helm-release"
manifest = yamldecode(file("${path.module}/manifests/loki.yaml"))
}

module "grafana" {
source = "./modules/helm-release"
manifest = yamldecode(file("${path.module}/manifests/grafana.yaml"))
}

module "tempo" {
source = "./modules/helm-release"
manifest = yamldecode(file("${path.module}/manifests/tempo.yaml"))
}

module "mimir" {
source = "./modules/helm-release"
manifest = yamldecode(file("${path.module}/manifests/mimir.yaml"))
}

module "alloy" {
source = "./modules/helm-release"
manifest = yamldecode(file("${path.module}/manifests/alloy.yaml"))
manifest = yamldecode(file("${path.module}/manifests/mssql.yaml"))
}
173 changes: 0 additions & 173 deletions terraform/02-platform/manifests/alloy.yaml

This file was deleted.

13 changes: 13 additions & 0 deletions terraform/02-platform/manifests/docker-registry.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: helm.cattle.io/v1
kind: HelmChart
metadata:
name: docker-registry
namespace: kube-system
spec:
repo: https://helm.twun.io
chart: twuni/docker-registry
targetNamespace: docker-registry
createNamespace: true
version: 2.3.0
valuesContent: |-
{}
Loading