Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

Issue #8 - (phase 1) script based war deployment and testing #17

Closed
wants to merge 1 commit into from

Conversation

joakime
Copy link
Contributor

@joakime joakime commented Sep 12, 2016

This is phase 1 for the automatic deployment of webapps and integration testing against the jetty9 base image.

More webapps and cleaner integeration testing will be subsequent phases.

@joakime
Copy link
Contributor Author

joakime commented Sep 12, 2016

Consider this script and demo webapp just a P.O.C

do
echo "module: $module"
appengine_deploy "${module}"
done
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be a good idea to remove the deployed version after the tests have run.

gcloud app versions delete "${test_runid}"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noted.

Do you know how to create an machine/instance (or whatever the correct name is) with a specific environment configurations? (like say 2GB or 5GB for the webapp?)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's possible to tweak the VMs via some settings in app.yaml. See docs. Is that what you mean?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll try the app.yaml approach ...

resources:
  cpu: .5
  memory_gb: 1.3
  disk_size_gb: 10

This would be good for testing the GAE_MEMORY_MB issue as well.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True, though if you just wanted to test that the jetty runtime obeys the GAE_MEMORY_MB env variable, you could just override that variable with an arbitrary value in a custom dockerfile, and then verify that the jvm was started with max heap set to 80% of that value.

I don't think we need to worry about testing that the GAE_MEMORY_MB value is set properly for various VM configurations; I would consider that to be on the app engine platform's side of the contract. @meltsufin Do you have any thoughts on this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that we don't need to verify the value of GAE_MEMORY_MB because that may change. We just want to make sure that it is set, and that we are assigning 80% of it to JVM heap.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Point is, we need to test the environment behavior as well. If we deploy in flex or not, the behavior is different, and is dependent on the memory_gb setting, so having at least the 4 different memory configurations is a good thing to test and ensure that we dont have a regression (which is the root goal of this issue and initial PR)

@meltsufin
Copy link
Member

I think this is on the right track continuing what @aslo started. I like the actual tests being in Java and Maven rather than shell scripts, as long as it can be done with a reasonable amount of effort. Ultimately, we may be able to get by without using gcloud CLI at all and use APIs directly for interacting with cloud services.

<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>appengine-maven-plugin</artifactId>
<version>0.1.1-beta</version>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The latest version is 0.1.2

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That will be a separate PR for issue #22

@meltsufin
Copy link
Member

Is Alex's comment on gcloud app versions delete "${test_runid}" the only thing we're blocking on before committing this?

@joakime
Copy link
Contributor Author

joakime commented Sep 15, 2016

The versions delete will come in with subsequent commit / pull request

@meltsufin
Copy link
Member

meltsufin commented Sep 16, 2016

If the app doesn't successfully come up, will the test fail?

@meltsufin
Copy link
Member

Closing in favor of #45.

@meltsufin meltsufin closed this Sep 23, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants