mirror of
https://github.com/khuedoan/homelab.git
synced 2024-12-23 01:24:36 +07:00
Rename infra layer to cluster
This commit is contained in:
parent
921453ef91
commit
b672b7a46b
@ -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
|
||||||
|
10
Makefile
10
Makefile
@ -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/
|
||||||
|
@ -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
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
.POSIX:
|
.POSIX:
|
||||||
.EXPORT_ALL_VARIABLES:
|
.EXPORT_ALL_VARIABLES:
|
||||||
|
|
||||||
KUBECONFIG = ../infra/kubeconfig.yaml
|
KUBECONFIG = ../cluster/kubeconfig.yaml
|
||||||
|
|
||||||
default: apply
|
default: apply
|
||||||
|
|
||||||
|
@ -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,...)
|
@ -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")
|
||||||
|
@ -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"
|
||||||
|
Loading…
Reference in New Issue
Block a user