Skip to content

Commit

Permalink
Revert to non-random routes
Browse files Browse the repository at this point in the history
  • Loading branch information
hoffmaen committed Sep 12, 2024
1 parent c0dde97 commit 30bb0c1
Show file tree
Hide file tree
Showing 14 changed files with 68 additions and 50 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/test-sample-apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,31 +59,31 @@ jobs:
- name: Logging into target CloudFoundry
run: cf8 login -a "${{ secrets.CF_API }}" -u "${{ secrets.CF_USERNAME }}" -p "${{ secrets.CF_PASSWORD }}" -o "${{ secrets.CF_ORG }}" -s "${{ secrets.CF_SPACE }}" --origin uaa
- name: Deploy CloudFoundry sample apps
run: cf8 push -f "${GITHUB_WORKSPACE}/http2/apps-manifest.yml" --var domain=${{ secrets.CF_DOMAIN }} --vars-file "${GITHUB_WORKSPACE}/http2/gradle.properties"
run: cf8 push -f "${GITHUB_WORKSPACE}/http2/apps-manifest.yml" --var domain=${{ secrets.CF_DOMAIN }} --vars-file "${GITHUB_WORKSPACE}/http2/gradle.properties" --no-route
- name: Test Sample apps
run: |
echo "### Testing HTTP2_APP app ###"
yq e '.applications.[].name' "${GITHUB_WORKSPACE}/http2/apps-manifest.yml" | grep -i 'http2' | while read -r HTTP2_APP; do
ROUTE=$(cf8 app $HTTP2_APP | grep routes: | awk '{print $2 }')
cf8 update-destination $HTTP2_APP ${{ secrets.CF_DOMAIN }} --hostname $ROUTE --app-protocol http2
ROUTE=${{ github.run_id }}-$HTTP2_APP
cf8 map-route $HTTP2_APP ${{ secrets.CF_DOMAIN }} --hostname $ROUTE --app-protocol http2
echo "curl -v --http2-prior-knowledge -H 'Connection: close' 'https://$ROUTE.${{ secrets.CF_DOMAIN }}'"
curl -v --http2-prior-knowledge -H "Connection: close" "https://$ROUTE.${{ secrets.CF_DOMAIN }}"
done
echo "Testing GRPC apps"
ROUTE=$(cf8 app go-grpc-test | grep routes: | awk '{print $2 }')
cf8 update-destination go-grpc-test ${{ secrets.CF_DOMAIN }} --hostname $ROUTE --app-protocol http2
ROUTE=${{ github.run_id }}-go-grpc-test
cf8 map-route go-grpc-test ${{ secrets.CF_DOMAIN }} --hostname $ROUTE --app-protocol http2
grpcurl $ROUTE.${{ secrets.CF_DOMAIN }}:443 example.Example.Run
ROUTE=$(cf8 app java-grpc-test | grep routes: | awk '{print $2 }')
cf8 update-destination java-grpc-test ${{ secrets.CF_DOMAIN }} --hostname $ROUTE --app-protocol http2
ROUTE=${{ github.run_id }}-java-grpc-test
cf8 map-route java-grpc-test ${{ secrets.CF_DOMAIN }} --hostname $ROUTE --app-protocol http2
grpcurl -proto http2/java-grpc/app/src/main/proto/example.proto $ROUTE.${{ secrets.CF_DOMAIN }}:443 example.Example.Run
ROUTE=$(cf8 app node-grpc-test | grep routes: | awk '{print $2 }')
cf8 update-destination node-grpc-test ${{ secrets.CF_DOMAIN }} --hostname $ROUTE --app-protocol http2
ROUTE=${{ github.run_id }}-node-grpc-test
cf8 map-route node-grpc-test ${{ secrets.CF_DOMAIN }} --hostname $ROUTE --app-protocol http2
grpcurl -proto http2/node-grpc/example.proto $ROUTE.${{ secrets.CF_DOMAIN }}:443 Example.Run
ROUTE=$(cf8 app python-grpc-test | grep routes: | awk '{print $2 }')
cf8 update-destination python-grpc-test ${{ secrets.CF_DOMAIN }} --hostname $ROUTE --app-protocol http2
ROUTE=${{ github.run_id }}-python-grpc-test
cf8 map-route python-grpc-test ${{ secrets.CF_DOMAIN }} --hostname $ROUTE --app-protocol http2
grpcurl -proto http2/python-grpc/example.proto $ROUTE.${{ secrets.CF_DOMAIN }}:443 Example.Run
ROUTE=$(cf8 app ruby-grpc-test | grep routes: | awk '{print $2 }')
cf8 update-destination ruby-grpc-test ${{ secrets.CF_DOMAIN }} --hostname $ROUTE --app-protocol http2
ROUTE=${{ github.run_id }}-ruby-grpc-test
cf8 map-route ruby-grpc-test ${{ secrets.CF_DOMAIN }} --hostname $ROUTE --app-protocol http2
grpcurl -proto http2/ruby-grpc/example.proto $ROUTE.${{ secrets.CF_DOMAIN }}:443 Example.Run
- name: Clean-up
if: success() || failure()
Expand Down
25 changes: 15 additions & 10 deletions http2/apps-manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,27 @@ applications:
path: ./go-grpc/
buildpacks:
- go_buildpack
random-route: true
default-route: false
routes:
- route: go-grpc-test.((domain))
protocol: http2
- name: go-http2-test
<<: *stack
<<: *go_defaults
path: ./go-http2/
buildpacks:
- go_buildpack
random-route: true
default-route: false
routes:
- route: go-http2-test.((domain))
protocol: http2
- name: java-grpc-test
<<: *stack
<<: *java_defaults
path: ./java-grpc/app/build/distributions/app-((version)).zip
buildpacks:
- java_buildpack
random-route: true
default-route: false
routes:
- route: java-grpc-test.((domain))
protocol: http2
env:
JBP_CONFIG_OPEN_JDK_JRE: '{ jre: { version: 11.+ }}'
- name: java-http2-test
Expand All @@ -50,8 +53,9 @@ applications:
path: ./java-http2/app/build/distributions/app-((version)).zip
buildpacks:
- java_buildpack
random-route: true
default-route: false
routes:
- route: java-http2-test.((domain))
protocol: http2
env:
JBP_CONFIG_OPEN_JDK_JRE: '{ jre: { version: 11.+ }}'
- name: node-grpc-test
Expand All @@ -60,8 +64,9 @@ applications:
path: ./node-grpc/
buildpacks:
- https://github.com/cloudfoundry/nodejs-buildpack
random-route: true
default-route: false
routes:
- route: node-grpc-test.((domain))
protocol: http2
- name: node-http2-test
<<: *stack
<<: *node_defaults
Expand Down
5 changes: 3 additions & 2 deletions http2/go-grpc/app-manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ applications:
- go_buildpack
disk_quota: 32M
memory: 32M
random-route: true
default-route: false
routes:
- route: go-grpc-test.((domain))
protocol: http2
5 changes: 3 additions & 2 deletions http2/go-http2/app-manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ applications:
- go_buildpack
disk_quota: 32M
memory: 32M
random-route: true
default-route: false
routes:
- route: go-http2-test.((domain))
protocol: http2
5 changes: 3 additions & 2 deletions http2/java-grpc/app-manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ applications:
path: ./app/build/distributions/app.zip
buildpacks:
- java_buildpack
random-route: true
default-route: false
routes:
- route: java-grpc-test.((domain))
protocol: http2
env:
JBP_CONFIG_OPEN_JDK_JRE: '{ jre: { version: 11.+ }}'
5 changes: 3 additions & 2 deletions http2/java-http2/app-manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ applications:
path: ./app/build/distributions/app.zip
buildpacks:
- java_buildpack
random-route: true
default-route: false
routes:
- route: java-http2-test.((domain))
protocol: http2
env:
JBP_CONFIG_OPEN_JDK_JRE: '{ jre: { version: 11.+ }}'
5 changes: 3 additions & 2 deletions http2/node-grpc/app-manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ applications:
memory: 256M
buildpacks:
- https://github.com/cloudfoundry/nodejs-buildpack
random-route: true
default-route: false
routes:
- route: node-grpc-test.((domain))
protocol: http2
5 changes: 3 additions & 2 deletions http2/node-http2/app-manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ applications:
memory: 256M
buildpacks:
- https://github.com/cloudfoundry/nodejs-buildpack
random-route: true
default-route: false
routes:
- route: node-http2-test.((domain))
protocol: http2
5 changes: 3 additions & 2 deletions http2/python-grpc/app-manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ applications:
memory: 512M
buildpacks:
- https://github.com/cloudfoundry/python-buildpack
random-route: true
default-route: false
routes:
- route: python-grpc-test.((domain))
protocol: http2
5 changes: 3 additions & 2 deletions http2/python-http2/app-manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ applications:
memory: 512M
buildpacks:
- https://github.com/cloudfoundry/python-buildpack
random-route: true
default-route: false
routes:
- route: python-http2-test.((domain))
protocol: http2
6 changes: 3 additions & 3 deletions http2/ruby-grpc/app-manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ applications:
memory: 256M
buildpacks:
- https://github.com/cloudfoundry/ruby-buildpack
random-route: true
default-route: false

routes:
- route: ruby-grpc-test.((domain))
protocol: http2
14 changes: 9 additions & 5 deletions http2/ruby-grpc/example_pb.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion http2/ruby-grpc/example_services_pb.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions http2/ruby-http2/app-manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ applications:
memory: 256M
buildpacks:
- https://github.com/cloudfoundry/ruby-buildpack
random-route: true
default-route: false
routes:
- route: ruby-http2-test.((domain))
protocol: http2

0 comments on commit 30bb0c1

Please sign in to comment.