Pour tout problème contactez-nous par mail : support@froggit.fr | La FAQ :grey_question: | Rejoignez-nous sur le Chat :speech_balloon:

Skip to content
Snippets Groups Projects
Commit 346ab5a9 authored by Nicolas's avatar Nicolas
Browse files

Rename Magento to GKE

parent 8d121adc
No related branches found
No related tags found
No related merge requests found
...@@ -4,18 +4,18 @@ image: busybox:latest ...@@ -4,18 +4,18 @@ image: busybox:latest
variables: variables:
TF_ROOT_ELASTIC: ${CI_PROJECT_DIR}/manifests/elastic TF_ROOT_ELASTIC: ${CI_PROJECT_DIR}/manifests/elastic
TF_ROOT_MAGENTO: ${CI_PROJECT_DIR}/manifests/magento TF_ROOT_GKE: ${CI_PROJECT_DIR}/manifests/gke
GCLOUD_ROOT_PSC: ${CI_PROJECT_DIR}/manifests/psc GCLOUD_ROOT_PSC: ${CI_PROJECT_DIR}/manifests/psc
cache: cache:
- key: elastic - key: elastic
paths: paths:
- ${TF_ROOT_ELASTIC}/.terraform - ${TF_ROOT_ELASTIC}/.terraform
- key: magento - key: gke
paths: paths:
- ${TF_ROOT_MAGENTO}/.terraform - ${TF_ROOT_GKE}/.terraform
check-magento: check-gke:
stage: test stage: test
tags: tags:
- docker - docker
...@@ -23,7 +23,7 @@ check-magento: ...@@ -23,7 +23,7 @@ check-magento:
name: registry.gitlab.com/gitlab-org/terraform-images/stable:latest name: registry.gitlab.com/gitlab-org/terraform-images/stable:latest
entrypoint: [""] entrypoint: [""]
variables: variables:
TF_ADDRESS: ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/terraform/state/magento TF_ADDRESS: ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/terraform/state/gke
TF_VAR_ec_apikey: $EC_API_KEY TF_VAR_ec_apikey: $EC_API_KEY
TF_VAR_project_id: $GCP_PROJECT_ID TF_VAR_project_id: $GCP_PROJECT_ID
TF_VAR_region: $GCP_REGION TF_VAR_region: $GCP_REGION
...@@ -31,7 +31,7 @@ check-magento: ...@@ -31,7 +31,7 @@ check-magento:
TF_VAR_vpc_subnetwork_name: $GCP_SUBNETWORK_NAME TF_VAR_vpc_subnetwork_name: $GCP_SUBNETWORK_NAME
GCP_SA_GITLAB: $GCP_SA_GITLAB GCP_SA_GITLAB: $GCP_SA_GITLAB
script: |- script: |-
cd $TF_ROOT_MAGENTO cd $TF_ROOT_GKE
echo $GCP_SA_GITLAB > gcp-sa.json echo $GCP_SA_GITLAB > gcp-sa.json
gitlab-terraform init gitlab-terraform init
gitlab-terraform validate gitlab-terraform validate
...@@ -41,21 +41,21 @@ check-magento: ...@@ -41,21 +41,21 @@ check-magento:
artifacts: artifacts:
name: plan name: plan
paths: paths:
- ${TF_ROOT_MAGENTO}/plan.cache - ${TF_ROOT_GKE}/plan.cache
reports: reports:
terraform: ${TF_ROOT_MAGENTO}/plan.json terraform: ${TF_ROOT_GKE}/plan.json
apply-magento: apply-gke:
stage: deploy stage: deploy
needs: needs:
- check-magento - check-gke
tags: tags:
- docker - docker
image: image:
name: registry.gitlab.com/gitlab-org/terraform-images/stable:latest name: registry.gitlab.com/gitlab-org/terraform-images/stable:latest
entrypoint: [""] entrypoint: [""]
variables: variables:
TF_ADDRESS: ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/terraform/state/magento TF_ADDRESS: ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/terraform/state/gke
TF_VAR_ec_apikey: $EC_API_KEY TF_VAR_ec_apikey: $EC_API_KEY
TF_VAR_project_id: $GCP_PROJECT_ID TF_VAR_project_id: $GCP_PROJECT_ID
TF_VAR_region: $GCP_REGION TF_VAR_region: $GCP_REGION
...@@ -63,7 +63,7 @@ apply-magento: ...@@ -63,7 +63,7 @@ apply-magento:
TF_VAR_vpc_subnetwork_name: $GCP_SUBNETWORK_NAME TF_VAR_vpc_subnetwork_name: $GCP_SUBNETWORK_NAME
GCP_SA_GITLAB: $GCP_SA_GITLAB GCP_SA_GITLAB: $GCP_SA_GITLAB
script: |- script: |-
cd $TF_ROOT_MAGENTO cd $TF_ROOT_GKE
echo $GCP_SA_GITLAB > gcp-sa.json echo $GCP_SA_GITLAB > gcp-sa.json
gitlab-terraform init gitlab-terraform init
gitlab-terraform apply -auto-approve gitlab-terraform apply -auto-approve
...@@ -71,7 +71,7 @@ apply-magento: ...@@ -71,7 +71,7 @@ apply-magento:
gcloud-psc: gcloud-psc:
stage: deploy stage: deploy
needs: needs:
- apply-magento - apply-gke
tags: tags:
- docker - docker
image: image:
...@@ -85,7 +85,7 @@ gcloud-psc: ...@@ -85,7 +85,7 @@ gcloud-psc:
GCP_SUBNETWORK_NAME: $GCP_SUBNETWORK_NAME GCP_SUBNETWORK_NAME: $GCP_SUBNETWORK_NAME
GCP_INTERNAL_IP_NAME: $GCP_INTERNAL_IP_NAME GCP_INTERNAL_IP_NAME: $GCP_INTERNAL_IP_NAME
GCP_PSC_NAME: $GCP_PSC_NAME GCP_PSC_NAME: $GCP_PSC_NAME
GCP_DNS_ZONE_MAGENTO_ELASTIC: $GCP_DNS_ZONE_MAGENTO_ELASTIC GCP_DNS_ZONE_GKE_ELASTIC: $GCP_DNS_ZONE_GKE_ELASTIC
ELASTIC_SERVICE_ATTACHMENT_URI: $ELASTIC_SERVICE_ATTACHMENT_URI ELASTIC_SERVICE_ATTACHMENT_URI: $ELASTIC_SERVICE_ATTACHMENT_URI
ELASTIC_DNS_ZONE: $ELASTIC_DNS_ZONE ELASTIC_DNS_ZONE: $ELASTIC_DNS_ZONE
script: |- script: |-
...@@ -145,3 +145,4 @@ apply-elastic: ...@@ -145,3 +145,4 @@ apply-elastic:
cd $TF_ROOT_ELASTIC cd $TF_ROOT_ELASTIC
gitlab-terraform init gitlab-terraform init
gitlab-terraform apply -auto-approve gitlab-terraform apply -auto-approve
\ No newline at end of file
...@@ -25,7 +25,7 @@ data "google_project" "project" { ...@@ -25,7 +25,7 @@ data "google_project" "project" {
resource "google_compute_global_address" "static_ip" { resource "google_compute_global_address" "static_ip" {
provider = google provider = google
project = var.project_id project = var.project_id
name = "magento-frontend" name = "gke-frontend"
} }
### Create Network ### Create Network
......
File moved
...@@ -15,7 +15,7 @@ variable "vpc_subnetwork_name" { ...@@ -15,7 +15,7 @@ variable "vpc_subnetwork_name" {
} }
variable "vpc_private_ip_address_name" { variable "vpc_private_ip_address_name" {
type = string type = string
default = "vpc-private-ip-magento" default = "vpc-private-ip-gke"
} }
### Firewall ### Firewall
...@@ -45,21 +45,21 @@ variable "cloud_nat_name" { ...@@ -45,21 +45,21 @@ variable "cloud_nat_name" {
### Kubernetes Cluster & Node Pool ### Kubernetes Cluster & Node Pool
variable "cluster_name" { variable "cluster_name" {
type = string type = string
default = "gke-magento" default = "gke-gke"
} }
variable "node_pool_name" { variable "node_pool_name" {
type = string type = string
default = "gke-preemptible-nodes-magento" default = "gke-preemptible-nodes-gke"
} }
### Cloud SQL ### Cloud SQL
variable "cloud_sql_name" { variable "cloud_sql_name" {
type = string type = string
default = "cloudsql-magento" default = "cloudsql-gke"
} }
### Memory Store ### Memory Store
variable "memory_store_name" { variable "memory_store_name" {
type = string type = string
default = "cloudsql-magento" default = "cloudsql-gke"
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment