Rename infra layer to cluster

This commit is contained in:
Khue Doan 2021-08-20 19:31:04 +07:00
parent 921453ef91
commit b672b7a46b
12 changed files with 15 additions and 15 deletions

View File

@ -3,7 +3,7 @@ type: kubernetes
name: default
steps:
- name: infra
- name: cluster
image: hashicorp/terraform:1.0.0
commands:
- plan

View File

@ -6,9 +6,9 @@ default: apply
metal:
make -C metal
.PHONY: infra
infra:
make -C infra
.PHONY: cluster
cluster:
make -C cluster
.PHONY: apps
apps:
@ -23,12 +23,12 @@ docs:
make -C docs
.PHONY: apply
apply: metal infra apps
apply: metal cluster apps
lint:
# TODO (feature) Add lint checks for everything
make -C metal lint
make -C infra lint
make -C cluster lint
hooks:
cp ./scripts/hooks/* .git/hooks/

View File

@ -25,9 +25,9 @@ A single `make` command will automatically:
- Build the `./metal` layer:
- Create an ephemeral, stateless PXE server
- Install Linux on all servers in parallel
- Build the `./infra` layer:
- Create a Kubernetes [cluster](./infra/cluster.tf) using RKE
- Install some [Helm chart for bootstrap](./infra/bootstrap.tf)
- Build the `./cluster` layer:
- Create a Kubernetes [cluster](./cluster/cluster.tf) using RKE
- Install some [Helm chart for bootstrap](./cluster/bootstrap.tf)
- Build the `./apps` layer:
- Kustomize creates Argo [applications](./apps/resources)
- ArgoCD install those applications

View File

@ -1,7 +1,7 @@
.POSIX:
.EXPORT_ALL_VARIABLES:
KUBECONFIG = ../infra/kubeconfig.yaml
KUBECONFIG = ../cluster/kubeconfig.yaml
default: apply

View File

@ -1,9 +1,9 @@
# Private cloud infrastructure
# Kubernetes cluster
## Kubernetes cluster `./cluster.tf`
## `./cluster.tf`
Using Rancher Kubernetes Engine, with some config specific to CoreOS
## Bootstrap `./bootstrap.tf`
## `./bootstrap.tf`
Install some essential Helm charts (network, storage,...)

View File

@ -26,7 +26,7 @@ with Diagram("Provision (separated by logical layers)", graph_attr=graph_attr, o
pxe >> os
os >> bare_metal_machines
with Cluster("./infra"):
with Cluster("./cluster"):
terraform = Terraform("RKE")
kubernetes_nodes = Node("Kuberentes node(s)")
argocd = ArgoCD("ArgoCD")

View File

@ -8,4 +8,4 @@
delegate_to: localhost
template:
src: backend.tfvars.j2
dest: "{{ playbook_dir }}/../infra/backend.tfvars"
dest: "{{ playbook_dir }}/../cluster/backend.tfvars"