Skip to content
Permalink
Browse files

Move terraform and kubernetes folder to be under proxy (#127)

* Move terraform and kubernetes folder to be under proxy

There is no reason for them to be under proxy/src/... any more now that
we have a Gradle-idiomatic folder structure.
  • Loading branch information...
jianglai committed Jun 20, 2019
1 parent 9cd7c94 commit 520145f641977dce2743e003c4dab0edcf4a1e40
Showing with 8 additions and 17 deletions.
  1. +6 −6 docs/proxy-setup.md
  2. +0 −9 proxy/build.gradle
  3. 0 proxy/{src/main/java/google/registry/proxy → }/kubernetes/proxy-deployment-alpha.yaml
  4. 0 proxy/{src/main/java/google/registry/proxy → }/kubernetes/proxy-deployment-crash-canary.yaml
  5. 0 proxy/{src/main/java/google/registry/proxy → }/kubernetes/proxy-deployment-crash.yaml
  6. 0 proxy/{src/main/java/google/registry/proxy → }/kubernetes/proxy-deployment-production-canary.yaml
  7. 0 proxy/{src/main/java/google/registry/proxy → }/kubernetes/proxy-deployment-production.yaml
  8. 0 proxy/{src/main/java/google/registry/proxy → }/kubernetes/proxy-deployment-sandbox-canary.yaml
  9. 0 proxy/{src/main/java/google/registry/proxy → }/kubernetes/proxy-deployment-sandbox.yaml
  10. 0 proxy/{src/main/java/google/registry/proxy → }/kubernetes/proxy-service-canary.yaml
  11. 0 proxy/{src/main/java/google/registry/proxy → }/kubernetes/proxy-service.yaml
  12. 0 proxy/{src/main/java/google/registry/proxy → }/terraform/example_config.tf
  13. 0 proxy/{src/main/java/google/registry/proxy → }/terraform/modules/common.tf
  14. 0 proxy/{src/main/java/google/registry/proxy → }/terraform/modules/gcs.tf
  15. 0 proxy/{src/main/java/google/registry/proxy → }/terraform/modules/gke.tf
  16. 0 proxy/{src/main/java/google/registry/proxy → }/terraform/modules/gke/cluster.tf
  17. 0 proxy/{src/main/java/google/registry/proxy → }/terraform/modules/gke/output.tf
  18. 0 proxy/{src/main/java/google/registry/proxy → }/terraform/modules/gke/variables.tf
  19. 0 proxy/{src/main/java/google/registry/proxy → }/terraform/modules/iam.tf
  20. 0 proxy/{src/main/java/google/registry/proxy → }/terraform/modules/kms.tf
  21. 0 proxy/{src/main/java/google/registry/proxy → }/terraform/modules/networking.tf
  22. 0 proxy/{src/main/java/google/registry/proxy → }/terraform/modules/networking/dns.tf
  23. 0 proxy/{src/main/java/google/registry/proxy → }/terraform/modules/networking/loadbalancer.tf
  24. 0 proxy/{src/main/java/google/registry/proxy → }/terraform/modules/networking/output.tf
  25. 0 proxy/{src/main/java/google/registry/proxy → }/terraform/modules/networking/variables.tf
  26. 0 proxy/{src/main/java/google/registry/proxy → }/terraform/modules/output.tf
  27. 0 proxy/{src/main/java/google/registry/proxy → }/terraform/modules/variables.tf
  28. 0 proxy/{src/main/java/google/registry/proxy → }/terraform/update_named_ports.sh
  29. +1 −1 release/cloudbuild-proxy.yaml
  30. +1 −1 release/cloudbuild-release.yaml
@@ -103,13 +103,13 @@ $ gcloud auth application-default login
Login with the account that has "Project Owner" role of all three projects
mentioned above.

Navigate to `java/google/registry/proxy/terraform`, create a folder called
Navigate to `proxy/terraform`, create a folder called
`envs`, and inside it, create a folder for the environment that proxy is
deployed to ("alpha" for example). Copy `example_config.tf` to the environment
folder.

```bash
$ cd java/google/registry/proxy/terraform
$ cd proxy/terraform
$ mkdir -p envs/alpha
$ cp example_config.tf envs/alpha/config.tf
```
@@ -232,11 +232,11 @@ $ gcloud container clusters get-credentials --project <proxy-project> \
# Deploys environment specific kubernetes objects.
$ kubectl create -f \
java/google/registry/proxy/kubernetes/proxy-deployment-<env>.yaml
proxy/kubernetes/proxy-deployment-<env>.yaml
# Deploys shared kubernetes objects.
$ kubectl create -f \
java/google/registry/proxy/kubernetes/proxy-service.yaml
proxy/kubernetes/proxy-service.yaml
```

Repeat this for all three clusters.
@@ -535,7 +535,7 @@ Use `kubectl` to create the deployment and autoscale objects:

```bash
$ kubectl create -f \
java/google/registry/proxy/kubernetes/proxy-deployment-alpha.yaml
proxy/kubernetes/proxy-deployment-alpha.yaml
```

The kubernetes
@@ -608,7 +608,7 @@ To deploy the NodePort service:

```bash
$ kubectl create -f \
java/google/registry/proxy/kubernetes/proxy-service.yaml
proxy/kubernetes/proxy-service.yaml
```

This service object will open up port 30000 (health check), 30001 (WHOIS) and
@@ -1,14 +1,5 @@
apply plugin: 'java'

sourceSets {
main {
resources {
exclude "${javaDir}/terraform/"
exclude "${javaDir}/kubernetes/"
}
}
}

createUberJar('deployJar', 'proxy_server', 'google.registry.proxy.ProxyServer')

project.build.dependsOn deployJar
@@ -55,7 +55,7 @@ artifacts:
location: 'gs://${PROJECT_ID}-deploy/${TAG_NAME}'
# This cannot be regexs because of how Spinnaker constructs artifact paths.
paths:
- 'proxy/src/main/java/google/registry/proxy/kubernetes/proxy-*.yaml'
- 'proxy/kubernetes/proxy-*.yaml'
- 'release/cloudbuild-tag.yaml'
timeout: 3600s
options:
@@ -75,7 +75,7 @@ steps:
sed -i s%distroless/java%${PROJECT_ID}/base@$base_digest% proxy/Dockerfile
sed -i s/builder:latest/builder@$builder_digest/g release/cloudbuild-proxy.yaml
sed -i s/builder:latest/builder@$builder_digest/g release/cloudbuild-nomulus.yaml
sed -i s/GCP_PROJECT/${PROJECT_ID}/ proxy/src/main/java/google/registry/proxy/kubernetes/proxy-*.yaml
sed -i s/GCP_PROJECT/${PROJECT_ID}/ proxy/kubernetes/proxy-*.yaml
sed -i s/'$${TAG_NAME}'/${TAG_NAME}/g release/cloudbuild-sync.yaml
# Upload the gradle binary to GCS if it does not exist and point URL in gradle wrapper to it.
- name: 'gcr.io/cloud-builders/gsutil'

0 comments on commit 520145f

Please sign in to comment.
You can’t perform that action at this time.