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
46 changes: 46 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,51 @@
# Changelog

## [0.49.0](https://www.github.com/JGodin-C2C/devops-stack/compare/v0.48.0...v0.49.0) (2021-12-02)


### ⚠ BREAKING CHANGES

* **eks:** send http traffic on NLB to port 80 on cluster (#810)

### Features

* **docs:** improve KinD docs ([#820](https://www.github.com/JGodin-C2C/devops-stack/issues/820)) ([f5e3f2b](https://www.github.com/JGodin-C2C/devops-stack/commit/f5e3f2b07d59b24923c31c60eef18622f02fe546))
* **keycloak:** pass a user list to keycloak ([#788](https://www.github.com/JGodin-C2C/devops-stack/issues/788)) ([c2835ec](https://www.github.com/JGodin-C2C/devops-stack/commit/c2835ecaba5ffb02908fa77049cffecb976787e3))
* **kind:** add experimental support for KIND ([#785](https://www.github.com/JGodin-C2C/devops-stack/issues/785)) ([518e3e6](https://www.github.com/JGodin-C2C/devops-stack/commit/518e3e6885082429298607314215e15fcacb0d07))
* **sks:** add output for cluster security group id ([#816](https://www.github.com/JGodin-C2C/devops-stack/issues/816)) ([108dcb2](https://www.github.com/JGodin-C2C/devops-stack/commit/108dcb28ded4beb1ac76657b832b0fe8f3cbf832))
* **traefik:** tls version >= 1.2 ([#793](https://www.github.com/JGodin-C2C/devops-stack/issues/793)) ([c49580e](https://www.github.com/JGodin-C2C/devops-stack/commit/c49580efa834d1a5001abb18f0d9cf120970efc3))
* **velero,k3s:** Add velero deployment for k3s ([3fea84d](https://www.github.com/JGodin-C2C/devops-stack/commit/3fea84d51e3e9598251b03ff633419d3b61fbf0f))
* **velero:** Add azure configuration for velero ([e4a9aa4](https://www.github.com/JGodin-C2C/devops-stack/commit/e4a9aa41460408ccb1f9059c5623df3854c64e55))
* **velero:** move velero variable to top ([d30dda7](https://www.github.com/JGodin-C2C/devops-stack/commit/d30dda70430aed8424b7236e4af7a3beff2d715f))


### Bug Fixes

* **argocd:** fix kube-prometheus-stack dependency on OIDC ([#795](https://www.github.com/JGodin-C2C/devops-stack/issues/795)) ([5848af8](https://www.github.com/JGodin-C2C/devops-stack/commit/5848af8970a8c273b8243fae3f5dd98167af17d2))
* **eks:** keycloak admin pass output when not installed ([#817](https://www.github.com/JGodin-C2C/devops-stack/issues/817)) ([96cd02c](https://www.github.com/JGodin-C2C/devops-stack/commit/96cd02cc9f1cd68bb39cfbf8c0cd6a93b85d6e90))
* **eks:** send http traffic on NLB to port 80 on cluster ([#810](https://www.github.com/JGodin-C2C/devops-stack/issues/810)) ([0cbd0eb](https://www.github.com/JGodin-C2C/devops-stack/commit/0cbd0eb05fcb818a623fa70489ad6b5f9302198b))

## [0.49.0](https://www.github.com/camptocamp/devops-stack/compare/v0.48.0...v0.49.0) (2021-11-19)


### ⚠ BREAKING CHANGES

* **eks:** send http traffic on NLB to port 80 on cluster (#810)

### Features

* **keycloak:** pass a user list to keycloak ([#788](https://www.github.com/camptocamp/devops-stack/issues/788)) ([c2835ec](https://www.github.com/camptocamp/devops-stack/commit/c2835ecaba5ffb02908fa77049cffecb976787e3))
* **kind:** add experimental support for KIND ([#785](https://www.github.com/camptocamp/devops-stack/issues/785)) ([518e3e6](https://www.github.com/camptocamp/devops-stack/commit/518e3e6885082429298607314215e15fcacb0d07))
* **sks:** add output for cluster security group id ([#816](https://www.github.com/camptocamp/devops-stack/issues/816)) ([de31691](https://www.github.com/camptocamp/devops-stack/commit/de31691b49cdafd7236d8a0395d2af2b8bc30d23))
* **traefik:** tls version >= 1.2 ([#793](https://www.github.com/camptocamp/devops-stack/issues/793)) ([c49580e](https://www.github.com/camptocamp/devops-stack/commit/c49580efa834d1a5001abb18f0d9cf120970efc3))


### Bug Fixes

* **argocd:** fix kube-prometheus-stack dependency on OIDC ([#795](https://www.github.com/camptocamp/devops-stack/issues/795)) ([5848af8](https://www.github.com/camptocamp/devops-stack/commit/5848af8970a8c273b8243fae3f5dd98167af17d2))
* **eks:** keycloak admin pass output when not installed ([#817](https://www.github.com/camptocamp/devops-stack/issues/817)) ([980979b](https://www.github.com/camptocamp/devops-stack/commit/980979b1f4ab443a6689f6fbce8845b24bebd70f))
* **eks:** send http traffic on NLB to port 80 on cluster ([#810](https://www.github.com/camptocamp/devops-stack/issues/810)) ([0cbd0eb](https://www.github.com/camptocamp/devops-stack/commit/0cbd0eb05fcb818a623fa70489ad6b5f9302198b))

## [0.48.0](https://www.github.com/camptocamp/devops-stack/compare/v0.47.0...v0.48.0) (2021-09-22)


Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
MODULES = argocd-helm aks/azure eks/aws openshift4/aws k3s/docker k3s/libvirt sks/exoscale
MODULES = argocd-helm aks/azure eks/aws openshift4/aws k3s/docker k3s/libvirt sks/exoscale kind/kind
MOD_REFS = $(addsuffix .adoc,$(addprefix docs/modules/ROOT/pages/references/terraform_modules/,$(MODULES)))

APPLICATIONS = $(shell ls -d argocd/*/ | cut -f2 -d'/')
Expand Down
25 changes: 25 additions & 0 deletions argocd/apps/templates/velero.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{{- if index $.Values "apps" "velero" "enabled" }}
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: velero
namespace: argocd
spec:
project: "devops-stack"
source:
path: argocd/velero
repoURL: {{ .Values.spec.source.repoURL }}
targetRevision: {{ .Values.spec.source.targetRevision }}
helm:
values: |
velero:
{{- index .Values "velero" | toYaml | nindent 10 }}
destination:
namespace: velero
server: {{ .Values.spec.destination.server }}
{{- if .Values.spec.syncPolicy }}
syncPolicy:
{{ toYaml .Values.spec.syncPolicy | nindent 4 }}
{{- end }}
{{- end }}
2 changes: 1 addition & 1 deletion argocd/argocd/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ description: |
* ArgoCD Notifications
dependencies:
- name: "argo-cd"
version: "3.17.3"
version: "3.26.9"
repository: "https://argoproj.github.io/argo-helm"
- name: "argocd-applicationset"
version: "1.3.1"
Expand Down
11 changes: 11 additions & 0 deletions argocd/velero/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
apiVersion: "v2"
name: "velero"
version: "0"
description: |
This chart installs velero.
Velero is an open source tool to safely backup and restore, perform disaster recovery, and migrate Kubernetes cluster resources and persistent volumes.
dependencies:
- name: "velero"
version: "2.23.6"
repository: "https://vmware-tanzu.github.io/helm-charts/"
1 change: 1 addition & 0 deletions argocd/velero/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
---
1 change: 1 addition & 0 deletions docs/modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*** xref:ROOT:howtos/quickstart_ocp_ipi_aws.adoc[OpenShift (IPI) on AWS]
*** xref:ROOT:howtos/quickstart_k3s_docker.adoc[K3s on Docker]
*** xref:ROOT:howtos/quickstart_k3s_libvirt.adoc[K3s on Libvirt]
*** xref:ROOT:howtos/quickstart_kind.adoc[KinD]
** Pipelines
*** xref:ROOT:howtos/pipelines.adoc[Deploying with Pipelines]
*** xref:ROOT:howtos/pipelines_gitlab.adoc[Create your GitLab Pipeline]
Expand Down
28 changes: 25 additions & 3 deletions docs/modules/ROOT/pages/explanations/data_persistence.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,29 @@ In order to achieve this, clusters need to be totally stateless and
achieve data persistence outside of the cluster
(using external RDBMS, NoSQL databases, or object storage).

We thus recommend to avoid the use of storageClasses,
which allow self provisioning of Persistent Volumes (PVs), as it breaks
the blue/green infrastructure paradigm that the DevOps Stack supports.
= synchronizing

In order to keep the cluster stateless, we use a tool to synchronize
both blue and green.

This tool is velero. Started as a backup tool, cluster sync as been added as
a use case.

== Velero

To begin using velero, you will need to settup a blob storage/S3 storage in your
terraform code.

You can then pass this structure to the devops stack to have it setted up:
For k3s , configuration is automatic and the backups are stored in the deployed
minio.

For Azure :
```
velero = {
storage = [storage_name]
container = [containeri(Blob storage) name]
resource_group = [resource group]
}

```
38 changes: 38 additions & 0 deletions docs/modules/ROOT/pages/howtos/quickstart_kind.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
= Kind Quickstart

== Prerequisites

- Access to a functional Docker Engine,
- Knowledge of https://terraform.io[Terraform] basics
- Minimal Terraform version: 0.14
- `jq` binary
- https://argoproj.github.io/argo-cd/cli_installation/[argocd] CLI


include::partial$terraform_instant_intro.adoc[]

```hcl
# terraform/main.tf

module "cluster" {
source = "git::https://github.com/camptocamp/devops-stack.git//modules/kind/kind?ref=master"

cluster_name = "my-cluster"
}
```

If your docker setup doesn't support the bridge0 like on MacOSX, you cannot access to the container IP so the computed base domain isn't reachable.


include::partial$tf_apply.adoc[]

include::partial$wait_for_keycloak.adoc[]

include::partial$access_keycloak.adoc[]

include::partial$tf_destroy.adoc[]


== Reference

See the xref:ROOT:references/terraform_modules/kind/kind.adoc[Kind reference page].
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ enabled
[cols=",,",options="header",]
|===
|Repository |Name |Version
|https://argoproj.github.io/argo-helm |argo-cd |3.17.3
|https://argoproj.github.io/argo-helm |argo-cd |3.26.9
|https://argoproj.github.io/argo-helm |argocd-applicationset |1.3.1
|https://argoproj.github.io/argo-helm |argocd-notifications |1.4.4
|===
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ cluster Ingress Controller.
|===
|Key |Type |Default |Description
|traefik |object
|`{"additionalArguments":["--metrics.prometheus=true","--serversTransport.insecureSkipVerify=true"],"deployment":{"replicas":2},"logs":{"access":{"enabled":true}}}`
|`{"additionalArguments":["--metrics.prometheus=true","--serversTransport.insecureSkipVerify=true"],"deployment":{"replicas":2},"logs":{"access":{"enabled":true}},"tlsOptions":{"default":{"minVersion":"VersionTLS12"}}}`
|Values passed to the traefik chart
|===
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The `aks/azure` Terraform module provides a way to install and configure:
|===
|Name |Version
|[[requirement_terraform]] <<requirement_terraform,terraform>> |>= 0.13
|[[requirement_azuread]] <<requirement_azuread,azuread>> |~> 1.5
|[[requirement_azuread]] <<requirement_azuread,azuread>> |~> 2.0
|[[requirement_azurerm]] <<requirement_azurerm,azurerm>> |~> 2.62
|[[requirement_helm]] <<requirement_helm,helm>> |~> 2.0
|[[requirement_kubernetes]] <<requirement_kubernetes,kubernetes>> |~> 2.0
Expand All @@ -25,7 +25,7 @@ The `aks/azure` Terraform module provides a way to install and configure:
[cols="a,a",options="header,autowidth"]
|===
|Name |Version
|[[provider_azuread]] <<provider_azuread,azuread>> |~> 1.5
|[[provider_azuread]] <<provider_azuread,azuread>> |~> 2.0
|[[provider_azurerm]] <<provider_azurerm,azurerm>> |~> 2.62
|[[provider_random]] <<provider_random,random>> |~> 3.0
|===
Expand All @@ -45,7 +45,6 @@ The `aks/azure` Terraform module provides a way to install and configure:
|===
|Name |Type
|https://registry.terraform.io/providers/hashicorp/azuread/latest/docs/resources/application[azuread_application.oauth2_apps] |resource
|https://registry.terraform.io/providers/hashicorp/azuread/latest/docs/resources/application_app_role[azuread_application_app_role.argocd_admin] |resource
|https://registry.terraform.io/providers/hashicorp/azuread/latest/docs/resources/application_password[azuread_application_password.oauth2_apps] |resource
|https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/dns_cname_record[azurerm_dns_cname_record.wildcard] |resource
|https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/kubernetes_cluster_node_pool[azurerm_kubernetes_cluster_node_pool.this] |resource
Expand All @@ -60,8 +59,9 @@ The `aks/azure` Terraform module provides a way to install and configure:
|https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/user_assigned_identity[azurerm_user_assigned_identity.kube_prometheus_stack_prometheus] |resource
|https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/user_assigned_identity[azurerm_user_assigned_identity.this] |resource
|https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/password[random_password.grafana_admin_password] |resource
|https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/password[random_password.oauth2_apps] |resource
|https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string[random_string.storage_account] |resource
|https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/uuid[random_uuid.argocd_app_role] |resource
|https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/uuid[random_uuid.resource_app_id] |resource
|https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/client_config[azurerm_client_config.current] |data source
|https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/dns_zone[azurerm_dns_zone.this] |data source
|https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/kubernetes_cluster[azurerm_kubernetes_cluster.cluster] |data source
Expand Down Expand Up @@ -139,6 +139,12 @@ list(object({
|n/a
|yes

|[[input_enable_velero]] <<input_enable_velero,enable_velero>>
|Flag to enable velero
|`bool`
|`false`
|no

|[[input_extra_app_projects]] <<input_extra_app_projects,extra_app_projects>>
|Extra AppProjects objects to deploy.
|`list(any)`
Expand Down Expand Up @@ -166,7 +172,7 @@ list(object({
|[[input_kubernetes_version]] <<input_kubernetes_version,kubernetes_version>>
|Specify which Kubernetes release to use.
|`string`
|`"1.20.7"`
|`"1.21.2"`
|no

|[[input_network_policy]] <<input_network_policy,network_policy>>
Expand Down Expand Up @@ -237,6 +243,22 @@ object({
|`"master"`
|no

|[[input_velero]] <<input_velero,velero>>
|Storage account used to configure backup and clusters synchronisation. More info here : http://
|

[source]
----
object({
storage = string
container = string
resource_group = string
})
----

|n/a
|yes

|[[input_vnet_subnet_id]] <<input_vnet_subnet_id,vnet_subnet_id>>
|The ID of a Subnet where the Kubernetes Node Pool should exist. Changing this forces a new resource to be created.
|`string`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,12 @@ No modules.
|`{}`
|no

|[[input_velero]] <<input_velero,velero>>
|Velero settings
|`any`
|`{}`
|no

|[[input_wait_for_app_of_apps]] <<input_wait_for_app_of_apps,wait_for_app_of_apps>>
|Allow to disable wait for app of apps
|`bool`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ The `eks/aws` Terraform module provides a way to install and configure:
|[[input_cluster_version]] <<input_cluster_version,cluster_version>>
|Kubernetes version to use for the EKS cluster.
|`string`
|`"1.18"`
|`"1.21"`
|no

|[[input_cognito_user_pool_domain]] <<input_cognito_user_pool_domain,cognito_user_pool_domain>>
Expand Down Expand Up @@ -156,6 +156,12 @@ The `eks/aws` Terraform module provides a way to install and configure:
|`false`
|no

|[[input_enable_velero]] <<input_enable_velero,enable_velero>>
|Flag to enable velero
|`bool`
|`false`
|no

|[[input_extra_app_projects]] <<input_extra_app_projects,extra_app_projects>>
|Extra AppProjects objects to deploy.
|`list(any)`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,12 @@ The `k3s/docker` Terraform module provides a way to install and configure:
|`true`
|no

|[[input_enable_velero]] <<input_enable_velero,enable_velero>>
|Flag to enable velero
|`bool`
|`false`
|no

|[[input_extra_app_projects]] <<input_extra_app_projects,extra_app_projects>>
|Extra AppProjects objects to deploy.
|`list(any)`
Expand Down Expand Up @@ -122,7 +128,7 @@ The `k3s/docker` Terraform module provides a way to install and configure:
|[[input_k3s_version]] <<input_k3s_version,k3s_version>>
|The K3s version to use
|`string`
|`"v1.20.10-k3s1"`
|`"v1.21.6-k3s1"`
|no

|[[input_keycloak_users]] <<input_keycloak_users,keycloak_users>>
Expand Down Expand Up @@ -248,6 +254,7 @@ map(object({
|[[output_keycloak_admin_password]] <<output_keycloak_admin_password,keycloak_admin_password>> |The password of Keycloak's admin user.
|[[output_keycloak_users]] <<output_keycloak_users,keycloak_users>> |n/a
|[[output_kubeconfig]] <<output_kubeconfig,kubeconfig>> |The content of the KUBECONFIG file.
|[[output_minio_keys]] <<output_minio_keys,minio_keys>> |The minio key pair
|[[output_repo_url]] <<output_repo_url,repo_url>> |n/a
|[[output_target_revision]] <<output_target_revision,target_revision>> |n/a
|===
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,12 @@ The `k3s/libvirt` Terraform module provides a way to install and configure:
|`true`
|no

|[[input_enable_velero]] <<input_enable_velero,enable_velero>>
|Flag to enable velero
|`bool`
|`false`
|no

|[[input_extra_app_projects]] <<input_extra_app_projects,extra_app_projects>>
|Extra AppProjects objects to deploy.
|`list(any)`
Expand Down Expand Up @@ -215,6 +221,7 @@ object({
|[[output_keycloak_admin_password]] <<output_keycloak_admin_password,keycloak_admin_password>> |The password of Keycloak's admin user.
|[[output_keycloak_users]] <<output_keycloak_users,keycloak_users>> |n/a
|[[output_kubeconfig]] <<output_kubeconfig,kubeconfig>> |The content of the KUBECONFIG file.
|[[output_minio_keys]] <<output_minio_keys,minio_keys>> |The minio key pair
|[[output_repo_url]] <<output_repo_url,repo_url>> |n/a
|[[output_target_revision]] <<output_target_revision,target_revision>> |n/a
|===
Loading