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 name: default
steps: steps:
- name: infra - name: cluster
image: hashicorp/terraform:1.0.0 image: hashicorp/terraform:1.0.0
commands: commands:
- plan - plan

View File

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

View File

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

View File

@ -1,7 +1,7 @@
.POSIX: .POSIX:
.EXPORT_ALL_VARIABLES: .EXPORT_ALL_VARIABLES:
KUBECONFIG = ../infra/kubeconfig.yaml KUBECONFIG = ../cluster/kubeconfig.yaml
default: apply 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 Using Rancher Kubernetes Engine, with some config specific to CoreOS
## Bootstrap `./bootstrap.tf` ## `./bootstrap.tf`
Install some essential Helm charts (network, storage,...) 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 pxe >> os
os >> bare_metal_machines os >> bare_metal_machines
with Cluster("./infra"): with Cluster("./cluster"):
terraform = Terraform("RKE") terraform = Terraform("RKE")
kubernetes_nodes = Node("Kuberentes node(s)") kubernetes_nodes = Node("Kuberentes node(s)")
argocd = ArgoCD("ArgoCD") argocd = ArgoCD("ArgoCD")

View File

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