Skip to content

Sync fork #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 40 commits into from
Jan 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
02938bd
Fix Table in readme.
lcaggio Jan 16, 2023
00f781b
First commit
lcaggio Jan 17, 2023
4622b1a
Merge pull request #1095 from GoogleCloudPlatform/lcaggio/dp-20230116
lcaggio Jan 17, 2023
8fd63ce
Merge branch 'master' into lcaggio/vpc-scoped-policy
lcaggio Jan 17, 2023
8c826c8
Merge pull request #1096 from GoogleCloudPlatform/lcaggio/vpc-scoped-…
lcaggio Jan 17, 2023
07a7be2
Add shared-vpc support on Data Playgroud blueprint
lcaggio Jan 18, 2023
6477d07
Remove temp file.
lcaggio Jan 18, 2023
3c88aac
Fix dataflow shared-vpc support
lcaggio Jan 19, 2023
1fe108b
Merge pull request #1098 from GoogleCloudPlatform/lcaggio/vertex-svpc
lcaggio Jan 19, 2023
7202135
Use google_gkehub_feature_membership
wiktorn Jan 18, 2023
10e462d
Fix tests for servicemesh
wiktorn Jan 18, 2023
b38ef22
Even more test fixes
wiktorn Jan 18, 2023
c1d3736
fix destroy in stage 1 outputs (#1099)
ludoo Jan 19, 2023
0ea769e
Revert to use each.key for membership
wiktorn Jan 19, 2023
de70411
Update api-gateway tests
juliocc Jan 4, 2023
4897aa7
bump test suite versions
juliocc Jan 18, 2023
410b7f5
Fix typo in net-vpc DNS policies
juliocc Jan 18, 2023
fd19e4a
add inventories net-vpc examples
juliocc Jan 18, 2023
12f07eb
Extend net-vpc README with more tested examples
juliocc Jan 18, 2023
a0cb67e
Add inventories to gcs examples
juliocc Jan 18, 2023
2aad784
Allow dashes and underscores in tftest file ids
juliocc Jan 19, 2023
a12089e
Move VPC factory and route tests to examples.
juliocc Jan 19, 2023
1e0d777
Update DNS tests
juliocc Jan 19, 2023
9c9aafb
Update gke-cluster tests
juliocc Jan 19, 2023
44724f3
Update plan_summary to support running documentation examples
juliocc Jan 19, 2023
1820269
Add inventories to gke-nodepool examples
juliocc Jan 19, 2023
f014ee5
Fix linting
juliocc Jan 19, 2023
2aee1dd
Fix broken link
juliocc Jan 19, 2023
1335277
Fix nodepool test
juliocc Jan 19, 2023
8945165
Improvements in apigee hybrid-gke: now using workload identity and GLB
apichick Jan 13, 2023
050daa6
Merge branch 'master' into hybrid-gke-updates
ludoo Jan 20, 2023
fef45ed
Merge pull request #1101 from GoogleCloudPlatform/jccb/test-updates
juliocc Jan 20, 2023
6a63339
Merge branch 'master' into hybrid-gke-updates
apichick Jan 20, 2023
a17863c
Merge pull request #1102 from apichick/hybrid-gke-updates
apichick Jan 20, 2023
4accf87
Updated hybrid GKE readme
apichick Jan 20, 2023
3cca689
Check linting for Python dashboard files (#1107)
ludoo Jan 21, 2023
e32036d
Merge branch 'master' into hybrid-gke-README-fix
apichick Jan 22, 2023
20826d0
Merge pull request #1104 from apichick/hybrid-gke-README-fix
apichick Jan 22, 2023
551d457
Merge branch 'master' into google_gkehub_feature_membership
juliocc Jan 23, 2023
be04c4e
Merge pull request #1097 from wiktorn/google_gkehub_feature_membership
juliocc Jan 23, 2023
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
5 changes: 4 additions & 1 deletion .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,7 @@ jobs:
- name: Check python formatting
id: yapf
run: |
yapf --style="{based_on_style: google, indent_width: 2, SPLIT_BEFORE_NAMED_ASSIGNS: false}" -p -d tools/*.py
yapf --style="{based_on_style: google, indent_width: 2, SPLIT_BEFORE_NAMED_ASSIGNS: false}" -p -d \
tools/*.py \
blueprints/cloud-operations/network-dashboard/src/*py \
blueprints/cloud-operations/network-dashboard/src/plugins/*py
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,7 @@ def test_name(plan_summary, tfvars_to_yaml, tmp_path):
assert s.values[address]['project'] == 'my-project'
```

For more examples on how to write python tests, the tests for [`organization`](./tests/modules/organization/test_plan_org_policies.py) and [`net-vpc`](./tests/modules/net_vpc/test_routes.py) modules.
For more examples on how to write python tests, check the tests for the [`organization`](./tests/modules/organization/test_plan_org_policies.py) module.

#### Testing documentation examples

Expand Down
20 changes: 15 additions & 5 deletions blueprints/apigee/hybrid-gke/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,24 @@ The diagram below depicts the architecture.
terraform apply
```

Create an A record in your DNS registrar to point the environment group hostname to the public IP address returned after the terraform configuration was applied. You might need to wait some time until the certificate is provisioned.

5. Install Apigee hybrid using de ansible playbook that is in the ansible folder by running this command

ansible-playbook playbook.yaml -vvvß

## Testing the blueprint

2. Deploy an api proxy

```
./deploy-apiproxy.sh
./deploy-apiproxy.sh apis-test
```

3. In the console check the IP address that has been allocated to the Apigee ingress gateway and send some traffic to the deployed API proxy.
3. Send a request

```
curl -k -v -H "Host:HOSTNAME" \
--resolve HOSTNAME:443:IP_ADDRESS \
https://HOSTNAME/httpbin/headers
curl -v https://HOSTNAME/httpbin/headers
```
<!-- BEGIN TFDOC -->

Expand All @@ -56,4 +60,10 @@ The diagram below depicts the architecture.
| [region](variables.tf#L84) | Region. | <code>string</code> | | <code>&#34;europe-west1&#34;</code> |
| [zone](variables.tf#L90) | Zone. | <code>string</code> | | <code>&#34;europe-west1-c&#34;</code> |

## Outputs

| name | description | sensitive |
|---|---|:---:|
| [ip_address](outputs.tf#L17) | GLB IP address. | |

<!-- END TFDOC -->
13 changes: 7 additions & 6 deletions blueprints/apigee/hybrid-gke/ansible.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@

resource "local_file" "vars_file" {
content = yamlencode({
cluster = module.cluster.name
region = var.region
project_id = module.project.project_id
envgroup = local.envgroup
env = local.environment
hostname = var.hostname
cluster = module.cluster.name
region = var.region
project_id = module.project.project_id
envgroups = local.envgroups
environments = local.environments
service_accounts = local.google_sas
ingress_ip_name = local.ingress_ip_name
})
filename = "${path.module}/ansible/vars/vars.yaml"
file_permission = "0666"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

- name: Create and annotate k8s service account
kubernetes.core.k8s:
state: present
definition:
apiVersion: v1
kind: ServiceAccount
metadata:
name: "{{ k8s_service_account }}"
namespace: apigee
annotations:
iam.gke.io/gcp-service-account: "{{ google_service_account }}@{{ project_id }}.iam.gserviceaccount.com"
with_items: "{{ k8s_service_accounts }}"
loop_control:
loop_var: k8s_service_account
Loading