Skip to content

Commit

Permalink
feat(example): devops-stack on scaleway
Browse files Browse the repository at this point in the history
chore(scaleway): first example
  • Loading branch information
Xaving committed Jun 11, 2024
1 parent 496f298 commit 000dd09
Show file tree
Hide file tree
Showing 8 changed files with 511 additions and 166 deletions.
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,14 @@ ehthumbs_vista.db

# Folder config file
[Dd]esktop.ini
.DS_STORE
examples/*/secrets.yml
examples/*/terraform.tfstate*
examples/*/.terraform.lock.hcl
examples/*/kubeconfig.yml
examples/*/issue.txt
examples/*/log.txt
examples/*/*.png
examples/*/*.html
examples/*/issuers.yml
**/*.swp
27 changes: 27 additions & 0 deletions examples/scaleway/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
## Installation

Add your credentials to launch the project. At least the following environement variables are required: `SCW_ACCESS_KEY,SCW_ACCESS_KEY,SCW_DEFAULT_ORGANIZATION_ID,SCW_DEFAULT_PROJECT_ID,SCW_DEFAULT_PROJECT_ID`.

Configure the stack by modifying `inputs.tfvars` (e.g: cluster\_name) and launch the terraform apply with:

```bash
terraform init
terraform apply -var-file inputs.tfvars
```

## Usage
Get the kubeconfig file and the domain name with the following commands:

```bash
terraform output -raw kubeconfig_file > kubeconfig.json
terraform output base_domain
```

Your application are available at the following address: $APP\_NAME.apps.$CLUSTER\_NAME.$BASE\_DOMAIN.
e.g: prometheus.apps.devops-stack.51-51-52-52.np.io

For authentication on oidc, users and password are available in the output:
```bash
terraform output passwords
```

38 changes: 38 additions & 0 deletions examples/scaleway/inputs.tfvars
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# ###################################################
# Input for module which creates the scaleway cluster
# ###################################################
cluster_name = "devops-stack"
cluster_description = "Devops-stack on cloud provider scaleway"
cluster_tags = ["demo", "dev", "devops-stack", "test", ]
cluster_type = "kapsule"
kubernetes_version = "1.29.1"
admission_plugins = ["PodNodeSelector", ]
node_pools = {
config1 = {
node_type = "DEV1-L"
size = 2
min_size = 2
max_size = 2
autoscaling = true
autohealing = true
container_runtime = "containerd"
wait_for_pool_ready = true
}
}

# #########################
# Additional cluster config
# #########################
base_domain = "gs-fr-dev.camptocamp.com"
lb_name = "devops-stack"
zone = "fr-par-1"
lb_type = "LB-S"

# Ingress
ingress_enable_service_monitor = false

# Keycloak
cluster_issuer = "ca-issuer"

# Cert-manager
cert_manager_enable_service_monitor = false
Loading

0 comments on commit 000dd09

Please sign in to comment.