Skip to content

Commit

Permalink
Merge pull request #784 from GoogleCloudPlatform/revert-terraform
Browse files Browse the repository at this point in the history
fix restoring existing projects
  • Loading branch information
daniel-sanche committed Jul 7, 2021
2 parents ca348a0 + c0fb631 commit 42bae4e
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 11 deletions.
Binary file modified docs/images/user-guide/64-cost-est.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/user-guide/65-cost-est2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions terraform/02_project.tf
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,14 @@ resource "google_project_service" "cloudtrace" {
disable_dependent_services = true
}

resource "google_project_service" "cloudprofiler" {
project = data.google_project.project.project_id

service = "cloudprofiler.googleapis.com"

disable_dependent_services = true
}

resource "google_project_service" "errorreporting" {
project = data.google_project.project.project_id

Expand Down
2 changes: 1 addition & 1 deletion terraform/03_gke_cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ resource "google_container_cluster" "gke" {
}
}

initial_node_count = 2
initial_node_count = 4

autoscaling {
min_node_count = 3
Expand Down
4 changes: 2 additions & 2 deletions terraform/loadgen/00_loadgen.tf
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ resource "google_container_cluster" "gke_loadgen" {
# interesting things.
node_pool {
node_config {
machine_type = "n1-standard-1"
machine_type = "n1-standard-2"

oauth_scopes = [
"https://www.googleapis.com/auth/cloud-platform"
Expand All @@ -84,7 +84,7 @@ resource "google_container_cluster" "gke_loadgen" {

autoscaling {
min_node_count = 1
max_node_count = 3
max_node_count = 10
}

management {
Expand Down
2 changes: 1 addition & 1 deletion tests/provisioning/loadgen_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def testNodeMachineType(self):
client = cluster_manager.ClusterManagerClient()
cluster_info = client.get_cluster(name=TestLoadGenerator.name)
machine_type = cluster_info.node_config.machine_type
self.assertEqual(machine_type, 'n1-standard-1')
self.assertEqual(machine_type, 'n1-standard-2')

def testNumberOfNode(self):
"""Test if the number of nodes in the node pool is as specified"""
Expand Down
2 changes: 1 addition & 1 deletion tests/provisioning/provision_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def testNumberOfNode(self):
client = cluster_manager.ClusterManagerClient()
cluster_info = client.get_cluster(name=TestGKECluster.name)
node_count = cluster_info.current_node_count
self.assertTrue(node_count == 3)
self.assertEqual(node_count, 4)

def testStatusOfServices(self):
""" Test if all the service deployments are ready """
Expand Down
12 changes: 6 additions & 6 deletions website/content/en/docs/User Guide/Cost Explained/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ In order to use the calculator you should first select a product from the scroll

**Resources Information**
Region: "us-east1"
- Loadgen Cluster 1x "n1-standard-1"
- GKE cluster (for the hipster shop microservices) 2x "n1-standard-2"
- Loadgen Cluster 1x "n1-standard-2"
- GKE cluster (for the hipster shop microservices) 4x "n1-standard-2"
- App Engine (Standard, F1)
- SQL PostgresQL - "db-f1-micro"

Expand All @@ -44,7 +44,7 @@ Choose GKE Standard -> fill the number of machines, machine type and region and
![image](/docs/images/user-guide/60-gke-billing.png)

**App Engine**
For AppEngine -we should choose 'Standard' - F1, as AppEngine scale to 0 when not used in our learning environment with periodical test our cost fall under the free tier([AppEngine pricing] (https://cloud.google.com/appengine/pricing))
For AppEngine -we should choose 'Standard' - F1, as AppEngine scale to 0 when not used in our learning environment with periodical test our cost fall under the free tier ([AppEngine pricing](https://cloud.google.com/appengine/pricing))
![image](/docs/images/user-guide/61-AppEngine-billing.png)

> You can see detailed usage and billing cost in the [AppEngine console](https://console.cloud.google.com/appengine)
Expand All @@ -61,10 +61,10 @@ Similarly we can also add to the estimation the cost of our storage(buckets), i
You can view this information easily using Metrics Explorer, by choosing Resource Type: `GCS Bucket` and Metric `Total bytes`

![image](/docs/images/user-guide/63-storage-metrics.png)
As you can see it is well below 1GB which costs 0.02$.
At the end you will have an estimation that includes all the components, and you also save it or email it to be referenced later. Which is ˜130$ a month for Sandbox components.
As you can see it is well below 1GB which costs $0.02.
At the end you will have an estimation that includes all the components, and you also save it or email it to be referenced later. Which is ~$250 a month for Sandbox components.

> Please note that is only estimation for the compute components and additional charges like networking and metrics will be added based on usage.
![image](/docs/images/user-guide/64-cost-est.png)
![image](/docs/images/user-guide/65-cost-est2.png)
![image](/docs/images/user-guide/65-cost-est2.png)
Binary file modified website/content/en/docs/images/user-guide/64-cost-est.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified website/content/en/docs/images/user-guide/65-cost-est2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 42bae4e

Please sign in to comment.