Skip to content

Commit ac4e11c

Browse files
authored
Merge pull request #87 from ovh/yomovh/bump_wordpress_example_versions
Update wordpress use case for summit demo
2 parents 8c40087 + 79f8fdb commit ac4e11c

File tree

5 files changed

+8
-36
lines changed

5 files changed

+8
-36
lines changed

use-cases/wordpress-k8s-mysql/01-kube/network.tf

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -20,32 +20,3 @@ resource "ovh_cloud_project_gateway" "gateway" {
2020
network_id = tolist(ovh_cloud_project_network_private.private_network.regions_attributes[*].openstackid)[0]
2121
subnet_id = ovh_cloud_project_network_private_subnet.subnet.id
2222
}
23-
24-
25-
/*data "openstack_networking_network_v2" "ext_net" {
26-
name = "Ext-Net"
27-
external = true
28-
}
29-
resource "openstack_networking_network_v2" "network" {
30-
name = "private_network"
31-
}
32-
33-
34-
resource "openstack_networking_subnet_v2" "subnet" {
35-
name = "subnet"
36-
network_id = openstack_networking_network_v2.network.id
37-
cidr = "10.0.0.0/24"
38-
gateway_ip = "10.0.0.254"
39-
dns_nameservers = ["213.186.33.99"]
40-
ip_version = 4
41-
}
42-
43-
resource "openstack_networking_router_v2" "router" {
44-
name = "router"
45-
external_network_id = data.openstack_networking_network_v2.ext_net.id
46-
}
47-
48-
resource "openstack_networking_router_interface_v2" "router_itf_priv" {
49-
router_id = openstack_networking_router_v2.router.id
50-
subnet_id = openstack_networking_subnet_v2.subnet.id
51-
}*/

use-cases/wordpress-k8s-mysql/01-kube/provider.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ terraform {
22
required_providers {
33
ovh = {
44
source = "ovh/ovh"
5-
version = "~> 0.43.1"
5+
version = "~> 1.1.0"
66
}
77
}
88
}

use-cases/wordpress-k8s-mysql/01-kube/variables.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ variable "kubernetes" {
88

99
variable "resource_prefix" {
1010
type = string
11-
default = "tf-public-cloud-examples-workpress-on-mks-with-mysql-"
11+
default = "tf-public-cloud-examples-wordpress-on-mks-with-mysql-"
1212
}
1313

1414
variable "node_pool_flavor_name" {
1515
type = string
16-
default = "b2-7"
16+
default = "b3-8"
1717
}

use-cases/wordpress-k8s-mysql/02-db-wordpress/provider.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ terraform {
22
required_providers {
33
ovh = {
44
source = "ovh/ovh"
5-
version = "~> 0.43.1"
5+
version = "~> 1.1.0"
66

77
}
88
helm = {

use-cases/wordpress-k8s-mysql/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Deploy a Wordpress website and MySQL DB with Terraform
1+
# Deploy a Wordpress website and MySQL DB with Terraform / OpenTofu
22

33
The purpose of this tutorial is to create a Mysql database and a Wordpress website and link them together in a Kubernetes cluster.
44

@@ -11,11 +11,12 @@ We will divide the project into two layers. The first layer is used to deploy th
1111
## Requirements
1212

1313
You need the following:
14-
* [Terraform](https://www.terraform.io/) installed
14+
* [Terraform](https://www.terraform.io/) or [OpenTofu](https://opentofu.org/) installed. In the instructions below, we use the first option. If you use the second, you will need to update the commands accordingly.
1515
* an [OVHcloud Public cloud project](https://www.ovhcloud.com/en/public-cloud/)
1616
* OVHcloud API credentials
1717
* [EU](https://www.ovh.com/auth/?onsuccess=https%3A%2F%2Fwww.ovh.com%2Fauth%2FcreateToken%2F%3F)
1818
* [CA](https://ca.ovh.com/auth/?onsuccess=https%3A//ca.ovh.com%2Fauth%2FcreateToken%2F%3F)
19+
1920
## Set the environment variables
2021

2122
```bash
@@ -60,7 +61,7 @@ export OVH_CLOUD_PROJECT_SERVICE="xxx"
6061

6162
## Build and run
6263

63-
### Create the Terraform variables file (configuration)
64+
### Create the Terraform / OpenTofu variables file (configuration)
6465

6566
Two Terraform variables configuration files have been already created. Edit them to modify the needed information.
6667

0 commit comments

Comments
 (0)