Add GCP appengine support#207
Conversation
|
@mastoj this is fantastic - thank you very much! Adding a new deployment option for another cloud platform will be an excellent addition. There's probably a bit of testing needed for this but I think it might well be possible to get this in for v1. There's also the sibling repository which contains the docs for this - something that would need doing for this would be to also document the new option in the template and how it impacts the FAKE script etc.. I'm happy to help you out with some pointers if needed - just let me know. |
|
@isaacabraham first draft of the documentation is done for appengine. I keep appengine and GKE separate, I guess there will be some conflicts between the branches, but I can resolve and rebase in the GKE branch to make it look pretty :). |
|
thanks @mastoj this is really great. Let me take some time to review and try this out (I have no previous Google Cloud experience) I'll focus on GCP appengine for now and leave kubernetes for later if that works for you |
|
Then you are the perfect person to test it out :). Note that I haven’t
tried it on windows, but I think it should work on both OS.
I added a docs PR as well.
…On Wed, 2 Jan 2019 at 13:24, Tomasz Heimowski ***@***.***> wrote:
thanks @mastoj <https://github.com/mastoj> this is really great. Let me
take some time to review and try this out (I have no previous Google Cloud
experience)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#207 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAemsOGLH4Eq7VtyItArTy-w-Q5_al_zks5u_KT-gaJpZM4ZkIhp>
.
|
|
I started playing with this, and it's really awesome! I added a couple comments here and in the docs PR |
|
Thanks. I tried to keep it as simple as possible.
Will look at the comments later tonight.
…On Fri, 4 Jan 2019 at 13:41, Tomasz Heimowski ***@***.***> wrote:
I started playing with this, and it's really awesome!
I managed to deploy basic template to Google Cloud quite easily:
https://safe-template-test.appspot.com/
I added a couple comments here and in the docs PR
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#207 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAemsKf8eORc3Dw5Bp0x6P1iTxWr0LaNks5u_0vhgaJpZM4ZkIhp>
.
|
|
Docs LGTM now. Can you answer questions in this PR here? |
|
I can answer questions to my best ability.
…On Tue, 8 Jan 2019 at 13:10, Tomasz Heimowski ***@***.***> wrote:
Docs LGTM now. Can you answer questions in this PR here?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#207 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAemsFE0_N-WayA50VH3y_QBflFiu3Kzks5vBIq5gaJpZM4ZkIhp>
.
|
|
Just to be clear - I mean addressing the questions/comments I posted for this PR regarding "Docker" FAKE target, port 8080 etc. |
|
@theimowski I'm a little bit confused. What questions/comments do you mean? Do you have a review not submitted? I can't see any comments/questions in this PR that I haven't addressed. |
| //#if (deploy == "docker") | ||
| //#if (deploy == "docker" || deploy == "gcp-appengine") | ||
| ==> "Bundle" | ||
| ==> "Docker" |
There was a problem hiding this comment.
Are we including Docker target only because one can run it separately from the Deploy chain?
There was a problem hiding this comment.
Yes, for two reasons.
- So you can test the container locally
- You might want to create a more advanced setup where you build and publish the container image separately from the deploy.
|
Ha correct! Sorry it was dumb me not knowing how this GH feature works :) They should be visible now |
|
@theimowski, haha, now you know :). Questions answered. |
|
Let's just change env var |
|
@theimowski I used the |
|
Right, I forgot about Please change the new variables to Also since this is running in a docker container, I'm thinking whether there's a way to configure docker image to stick with exposing 8085, and then do some kind of port translation in Google Cloud configuration? The advantage would be getting rid of the additional environment variable. |
|
I search for a way to do exactly that, but as stated here, https://cloud.google.com/appengine/docs/flexible/custom-runtimes/build#listening_to_port_8080, it says that it is port 8080 the container should listen to. I haven't figured out a way around that. Changed it to |
|
@theimowski no, that's fine with me - I think it was more the use of the word "suave" was misleading - firstly it could (and most likely would) be Saturn or Giraffe, but secondly the old name didn't explain what it was doing. SERVER_PORT is fine as well IMHO. Can you also check that the docs elsewhere on the docs site e.g. https://safe-stack.github.io/docs/faq-build/ don't need any updating? Ta! |
|
@isaacabraham on that page you can read:
Maybe it could be changed to:
and also link https://safe-stack.github.io/docs/template-overview/#deploy instead which should have all deploy options available. |
|
Many thanks @mastoj for this! I'll release it in v0.43, afterwards we can have a closer look at the GKE |
Add support for google cloud appengine.
gcp-appenginedeploy optionapp.yamlthat is used for deploy to GCP appenginetemplate.jsonto includeDockerfileandapp.yamlforgcp-appenginedeploy typeTo really test you need a gcp project and gcloud installed. For now the same Dockerfile as for docker deploy is used, it might make sense to change to a dedicated one for gcp later for easier integration with other gcp services.
To do a test deploy run the following two commands:
Deploy of appengine flex apps is not super fast, but as long as there are no errors it should work.