[google-appengine] Java url-stream-handler: native vs urlfetch

2017-11-20 Thread Nilson Pontello
What are the advantages and disadvantages while using *native* vs *urlfetch*
?

It is known that *urlfetch* doesn't need billing enabled and you can also 
use it in order to identity your app to apis and services 
.

In theory, because there is nothing in the middle, *native* has a better 
performance than *urlfetch*. Has anyone compared both and measure the 
throughput?

https://cloud.google.com/appengine/docs/standard/java/config/appref#url-stream-handler

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/6e816707-2d33-4352-9d10-146f281383d7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: GAE roadmap

2017-11-20 Thread Nilson Pontello
Hi Samuel,

There is no roadmap, unfortunately.

What I did to predict a small portion of what is coming next was a filter 
inside public bugtracker for *Accepted* feature requests:

https://issuetracker.google.com/issues?q=componentid:187191%2B%20status:accepted

But you won't get any ETA.

Regards






On Thursday, 16 November 2017 09:59:01 UTC-2, Samuel Cousin wrote:
>
> Hi Ken
>
> Mostly interested in the state & direction of nodejs support on GAE, and 
> the associated APIs for datastore and Firebase. Tangentially also 
> interested into (possible?) Elixir integration with the same products
>
> On a broader level, a fellow GCP user mentioned an effort by Google to 
> streamline & stabilize the product line in Q1, to make it less "confusing" 
> and bring things "out of beta". I wanted to know if there was any truth to 
> that, or if it was just rumors. While for the most part we're quite happy 
> with the products that we are using, from a nodejs perspective the 
> ecosystem does look a bit uneven 
>
> Cheers
>
> On Wednesday, November 15, 2017 at 9:46:27 PM UTC, Kenworth (Google Cloud 
> Platform) wrote:
>>
>> There is no current public roadmap documentation available for GAE (or 
>> GCP) other than occasional roadmap announcements at industry events. Is 
>> there a specific product / feature you are interested in?
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/321cacc4-45ac-4703-9c39-71b41ac01912%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: App Engine Flex overwriting public folder permissions on deploy

2017-11-20 Thread 'Gary Aure' via Google App Engine
Hi,

I have the same question. I need a specific folder in flexible environment 
to be writable because I am using a chunk uploader that does not support 
Cloud Storage for temporary storing chunked files. Chunked were deleted 
once the whole file has completed uploading.

On Tuesday, April 25, 2017 at 2:22:24 AM UTC+8, Jordan (Cloud Platform 
Support) wrote:
>
> Is there a specific reason why you require the need to perform writes to 
> your 'public/app' folder? Scalable applications in the cloud should 
> normally never perform writes to the local filesystem, as data written in 
> an App Engine instance is released with the instance when it is no longer 
> needed (e.g. when incoming traffic reduces and your App Engine instances 
> scale down 
> 
> ).
>
> It is recommended you perform writes to a non-volatile/persistent location 
> like Google Cloud Storage  or the Google 
> Cloud Datastore  that can be 
> written/read by your application running in multiple App Engine instances. 
> You can follow the Reading and Writing Files 
>  
> guide for PHP which explains how to use Google Cloud Storage as a wrapper 
> for reading and writing files in an App Engine PHP app.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/0b3aacd5-d9dc-46b3-8ca4-0f90640271f5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: "www.custom-url.com is already mapped to a project" error when trying to point custom domain to App Engine app

2017-11-20 Thread 'Yannick (Cloud Platform Support)' via Google App Engine
You are now able to manually override domain mappings yourself by using the 
Admin 
API 'DomainOverrideStrategy' option 

. 

- Simply create your domain mapping via the API Explorer 

 by 
filling out the 'appsId' parameter and setting the 'overrideStrategy' 
parameter to "OVERRIDE" (without the quotes). 

- Then add and fill out the 'DomainMapping' parameters 

 in 
the 'Request body'. Also ensure you turn on 'Authorize requests using OAuth 
2.0' so that you may prove your ownership over the project ID 'appsId' found 
in the Cloud Console 
. 

On Saturday, November 18, 2017 at 10:29:23 AM UTC-5, Juan Carlos García 
Sigüenza wrote:
>
> any notices about the issue? I have the same problem
>
> El jueves, 12 de octubre de 2017, 22:59:23 (UTC+2), Glenn Goodrich 
> escribió:
>>
>> @Kenworth,
>>
>> I have the same issue and have opened an issue with issue tracker. Do you 
>> know any more about this problem? I have attached screenshots of my issue. 
>> I have not deleted the project. I would like to find a way to add the 'www' 
>> subdomain so I can get SSL for that as well. As it is now, I can only 
>> access my site using propertytax.io without the 'www'. I would 
>> appreciate any help you have to offer. 
>>
>>
>>
>> On Sunday, October 1, 2017 at 6:59:14 PM UTC-5, Kenworth (Google Cloud 
>> Platform) wrote:
>>>
>>> @Chris
>>>
>>> I did not receive any messages / email privately. Since your project can 
>>> still be restored, please try to restore it and remove the associated 
>>> domains on the old project. 
>>>
>>> If you are still affected after the above suggestion, you should open a 
>>> new Issue  on the 
>>> Issue Tracker so our engineering team can look into it. Please refer to 
>>> this thread as a background to your case.
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/5d3dd60a-fe75-4dd3-b8f1-5faecb53fb06%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: "www.custom-url.com is already mapped to a project" error when trying to point custom domain to App Engine app

2017-11-20 Thread Juan Carlos García Sigüenza
it's works very fine!!! very thank you!!!

El lunes, 20 de noviembre de 2017, 15:06:08 (UTC+1), Yannick (Cloud 
Platform Support) escribió:
>
> You are now able to manually override domain mappings yourself by using 
> the Admin API 'DomainOverrideStrategy' option 
> 
> . 
>
> - Simply create your domain mapping via the API Explorer 
> 
>  by 
> filling out the 'appsId' parameter and setting the 'overrideStrategy' 
> parameter to "OVERRIDE" (without the quotes). 
>
> - Then add and fill out the 'DomainMapping' parameters 
> 
>  in 
> the 'Request body'. Also ensure you turn on 'Authorize requests using OAuth 
> 2.0' so that you may prove your ownership over the project ID 'appsId' found 
> in the Cloud Console 
> . 
>
> On Saturday, November 18, 2017 at 10:29:23 AM UTC-5, Juan Carlos García 
> Sigüenza wrote:
>>
>> any notices about the issue? I have the same problem
>>
>> El jueves, 12 de octubre de 2017, 22:59:23 (UTC+2), Glenn Goodrich 
>> escribió:
>>>
>>> @Kenworth,
>>>
>>> I have the same issue and have opened an issue with issue tracker. Do 
>>> you know any more about this problem? I have attached screenshots of my 
>>> issue. I have not deleted the project. I would like to find a way to add 
>>> the 'www' subdomain so I can get SSL for that as well. As it is now, I can 
>>> only access my site using propertytax.io without the 'www'. I would 
>>> appreciate any help you have to offer. 
>>>
>>>
>>>
>>> On Sunday, October 1, 2017 at 6:59:14 PM UTC-5, Kenworth (Google Cloud 
>>> Platform) wrote:

 @Chris

 I did not receive any messages / email privately. Since your project 
 can still be restored, please try to restore it and remove the associated 
 domains on the old project. 

 If you are still affected after the above suggestion, you should open 
 a new Issue  on 
 the Issue Tracker so our engineering team can look into it. Please refer 
 to 
 this thread as a background to your case.

>>>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/9cfaaf7e-bdc8-4eef-b618-655241ff0453%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Cloud Storage Client-Side Javascript File Upload 403 SignatureDoesNotMatch

2017-11-20 Thread 'Yannick (Cloud Platform Support)' via Google App Engine
Hello Scott, the "StringToSign" field tells you what it expects the 
canonical string to look like. You should double-check that the string your 
client uses is exactly the same (including any whitespace).

For this kind of technical question I also recommend that you post it to 
Stack Overflow using one of the tags 
 monitored by our 
community technical support team.

On Sunday, November 19, 2017 at 2:06:17 PM UTC-5, Scott Campbell wrote:
>
> I am trying to upload audio files on the Client-Side directly to my Google 
> Cloud Storage bucket, for the purpose of avoiding a server-side upload 
> (which has file size limits).
>
> My Issue: I am getting a 403  SignatureDoesNotMatch  error on upload. 
>
> Here is the error from the response:
>
>
>1. 
>   1. SignatureDoesNotMatch
>   2. The request signature we calculated does not match the 
>   signature you provided. Check your Google secret key and signing method.
>   
>   3. PUT audio/mp3 152552 
>   /bucketname/pathtofile/019%20-%20top%20cntndr%20V1.mp3   >
>   4. 
>
>
>
> I have created a signed url. It looks like this:
>
> https://storage.googleapis.com/google-testbucket/testdata.txt?GoogleAccessId=1234567890...@developer.gserviceaccount.com&Expires=1331155464&Signature=BCl
> z9e4UA2MRRDX62TPd8sNpUCxVsqUDG3YGPWvPcwN%2BmWBPqwgUYcOSszCPlgWREeF7oPGowkeKk
> 7J4WApzkzxERdOQmAdrvshKSzUHg8Jqp1lw9tbiJfE2ExdOOIoJVmGLoDeAGnfzCd4fTsWcLbal9
> sFpqXsQI8IQi1493mw%3D
>
>
> The signed url is built following the guidlines found in the Google Docs 
> here 
> https://cloud.google.com/storage/docs/access-control/create-signed-urls-program
>
> However, the client-side javascript portion of handling this signed url is 
> very unclear in the documentation.
>
>
>
>
> Here is my python code to create and return the signed url.
>
>
> GOOGLE_SERVICE_CREDENTIALS = 'google-service-credentials.json'
>
> def get_signed_url(request):
> filename = request.GET.get('filename')
> expiration = request.GET.get('expiration')
> type = request.GET.get('type')
> signed_url = CloudStorageSignedURL(
> method='PUT',
> file_name=filename,
> expiration_m=expiration,
> content_type=type
> )
> signed_url = signed_url.sign_url()
>
>
> return JsonResponse({ 'signed_url': signed_url })
>
>
>
>
>
>
> class CloudStorageSignedURL(object):
>
>
> def __init__(self, method, file_name, expiration_m, content_type):
> self.HTTP_method = method
> self.content_type = 'content-type: ' + content_type
> self.expiration = int(expiration_m)
> self.file_name = file_name
>
>
> def sign_url(self):
>
>
> expiration_dt = datetime.utcnow() + timedelta(minutes=self.
> expiration)
> expiration = int(time.mktime( expiration_dt.timetuple() ))
> bucket_path = '/' + settings.CLOUD_STORAGE_BUCKET + '/dev/tests/' 
> + self.file_name
> signature_string = self.HTTP_method + '\n' + '\n' + self.content_type 
> + "\n" + str(expiration) + '\n' + bucket_path
> print(signature_string)
> creds = ServiceAccountCredentials.from_json_keyfile_name(
> GOOGLE_SERVICE_CREDENTIALS)
> client_email = creds.service_account_email
> signature = creds.sign_blob(signature_string)[1]
> encoded_signature = base64.urlsafe_b64encode(signature).decode(
> 'utf-8')
> base_url = settings.CLOUD_STORAGE_ROOT + 'dev/tests/' + self.
> file_name
>
>
> return base_url + '?GoogleAccessId=' + client_email + '&Expires=' 
> + str(expiration) + '&Signature=' + encoded_signature
>
>
>
>
>
>
> *Client-side Javascript to upload the file*
>
> import $ from 'jquery';
> import axios from 'axios';
>
>
>
> $("document").ready( () => {
>   console.log('window loaded');
>
>
>   $("#id_audio_file").change(function() {
>
> const file = this.files[0]
>
> const url = window.location.href.replace('submit/', 'upload/');
> $.get(url + `?filename=${file.name}&expiration=10&type=${file.type}`, 
> (data) => {
>   upload(data.signed_url, file);
> })
>
>   });
> });
>
>
>
> function upload(url, file) {
>
>   const config = {
> headers: {
>   'Content-Type': file.type,
> }
>   }
>
>   axios.put(url, file, config)
> .then(function (res) {
>   console.log(res);
> })
> .catch(function (err) {
>   console.log(err);
> });
> }
>
>
>
>
> I really feel like I covered all the bases here, but I am obviously 
> missing something minute.  Any help would be greatly appreciated!
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/go

[google-appengine] using /.well-known/ URL path with flex environment

2017-11-20 Thread Vick Khera
I'm trying to confirm a service that requires me to drop a file into the 
/.well-known/ path on my server. I've found many articles online that 
suggest adding a "handler" section to my app.yaml file and mapping the 
.well-known url to a directory named well-known. However, that a) doesn't 
see to work in the flex environment, and b) is not documented as a known 
section for app.yaml in the flex environment, so it kind of follows that it 
won't work.

What is the recommended way to serve this URL in flex environment?

I'm running WordPress using the PHP 7.1 environment using the template from 
github.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/433a4b59-cdd4-4542-b828-915637c48508%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: How to extract values from log line for log based metric?

2017-11-20 Thread 'Yannick (Cloud Platform Support)' via Google App Engine
Hello Attila, I believe you want to be looking into Logs-based Metric Labels 
 which 
allow you to specify a regular expression to run on your logs when defining 
them. To make you you understand the entire picture, you should read the 
entire Logs-based Metrics 
 section.

On Saturday, November 18, 2017 at 2:41:24 PM UTC-5, Attila-Mihaly Balazs 
wrote:
>
> Hello,
>
> I'm trying to set up a log based metric based on some values extracted 
> from the log lines. However I can't seem to find the field from which to 
> extract the log line(s). I tried "textPayload" and "protoPayload.line[0]", 
> however neither seem to work. Also, I couldn't find an example for this 
> case in the documentation (which seems to show log based metrics based on 
> other fields like "status code" or "user agent").
>
> Did anyone set up a log based metric based on values extracted from the 
> logged line(s)? If so, which field did you use?
>
> Thanks,
> Attila Balazs
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/761b48c1-a62a-4610-94a6-6af3ea512779%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Writing Datastore controller for appengine and GCE?

2017-11-20 Thread 'Jordan (Cloud Platform Support)' via Google App Engine
If you are looking to deploy to App Engine Standard it is recommended to 
follow its documentation 
.
 
Currently the App Engine Standard Go environment is not recommended to use 
the new Google Cloud Client Libraries 
 which allows 
access to Google Services from any client such as a Google Compute Engine 
VM. 

As also reiterated in the documentation for the Cloud Datastore API 
,
 
the App Engine Standard Go environment is currently limited to the use of 
the older App Engine SDK  as 
opposed to the new Google Cloud Client Library for Go. 


- Note that you could indeed try to use the new Google Cloud Client Library 
for Go on the App Engine Standard Go environment, but as it is not fully 
supported yet you may run into issues. It is recommended to report all 
issues and feature requests specific to the Google Cloud Client Library for 
Go directly to the engineering team in their Git Issue Tracker 

. 

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/ae9231dc-99a3-40d6-872b-4109b06e366f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [google-appengine] App Engine Flex Environment PHP Runtime document root not found

2017-11-20 Thread Vick Khera
On Thursday, April 20, 2017 at 2:34:02 PM UTC-4, Takashi Matsuo (Google) 
wrote:
>
>
> There are two extensions for using memcached; `memcache` and `memcached` 
> extensions. Yeah it's confusing, but in short, the `memcache` is an old 
> one, and not actively maintained. On our runtime, we only provide 
> `memcached` extension for PHP 7.0.x and PHP 7.1.x. So if you have a plan to 
> migrate to PHP 7, I recommend that you look into `memcached` extension, 
> instead of `memcache`.
>
> Of course you can do:
>
> ```
> $ composer require 'ext-memcached:*'
> ```
> To enable the extension on our runtime.
>

This confuses me a little. You say the flex environment provides the 
memcached extension, yet I also have to include it in my composer. If I 
don't require it in composer (so it installs into the vendor directory), is 
the Memcached extension just not available to my application? Would the 
symptom of that be a very long delay in the code execution requesting the 
module?
 

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/8f1922b3-78dc-4590-bdc0-900c0dfeecbe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: using /.well-known/ URL path with flex environment

2017-11-20 Thread Vick Khera
My best lead to solving this seems to be to use an nginx location directive 
like this and placing the files into a directory called well-known in my 
application root directory.

location /.well-known/ {
alias /some/path/well-known/;
}

However, I do not know what the absolute path to the application root 
directory is in the flex environment. I was not able to find it searching 
the documents, either. Where can I find this? Is it provided as a variable 
in the nginx config?

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/b680fc5c-a323-417a-83b2-532379c5d53c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Strange behavior with my dispatch.yaml

2017-11-20 Thread 'Jordan (Cloud Platform Support)' via Google App Engine
Your '- url: "*/"  service: default' rule in your dispatch.yaml is the 
cause. You specifically specify that any domain '*' without parameters 
should serve the default service. 

E.g:  'admin-dot-X.appspot.com' conforms into your '*/' rule, so it 
will serve your default service. Where as '*admin*-dot-X.appspot.com
*/help*' does not as it has '/help' at the end, and since it also doesn't 
fall into your '- url: "*/admin/*"' rule either it will fall back to use 
normal -dot- notation routing rules 

 and 
serve your *admin* service. 

- You should therefore remove your  '- url: "*/"' default service rule so 
that it may properly default onto -dot- notation routing and serve your 
admin service. Note that when there isn't a rule specified in your dispatch 
file and there is no -dot- notation used only then will it serve the 
default service.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/2f22989b-4a82-445e-b640-46e21e5af242%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: site sell google storage to porn + nonlegal stream sites

2017-11-20 Thread 'Kenworth (Google Cloud Platform)' via Google App Engine
Hi, thank you for submitting this issue. Please fill up this form 
 to report 
suspected abuse on Google Cloud Platform. However, I can't provide you with 
an ETA of the investigation, but rest assured that Google strives on 
improving its products and that your feedback helps us do just that. 

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/15eb6a51-1212-4d5b-a8d7-fe4941d81bbc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Cloud Storage Client-Side Javascript File Upload 403 SignatureDoesNotMatch

2017-11-20 Thread Scott Campbell
Yannick!  Thanks again for your support, I do appreciate it.  This will 
help me debug the issue now that I know where to look.  I will link my 
stack-overflow question.  

https://stackoverflow.com/questions/47381667/getting-403-signaturedoesnotmatch-when-uploading-to-google-cloud-storage


On Monday, November 20, 2017 at 10:18:10 AM UTC-5, Yannick (Cloud Platform 
Support) wrote:
>
> Hello Scott, the "StringToSign" field tells you what it expects the 
> canonical string to look like. You should double-check that the string your 
> client uses is exactly the same (including any whitespace).
>
> For this kind of technical question I also recommend that you post it to 
> Stack Overflow using one of the tags 
>  monitored by our 
> community technical support team.
>
> On Sunday, November 19, 2017 at 2:06:17 PM UTC-5, Scott Campbell wrote:
>>
>> I am trying to upload audio files on the Client-Side directly to my 
>> Google Cloud Storage bucket, for the purpose of avoiding a server-side 
>> upload (which has file size limits).
>>
>> My Issue: I am getting a 403  SignatureDoesNotMatch  error on upload. 
>>
>> Here is the error from the response:
>>
>>
>>1. 
>>   1. SignatureDoesNotMatch
>>   2. The request signature we calculated does not match the 
>>   signature you provided. Check your Google secret key and signing 
>> method.
>>   
>>   3. PUT audio/mp3 152552 
>>   /bucketname/pathtofile/019%20-%20top%20cntndr%20V1.mp3
>>   
>>   4. 
>>
>>
>>
>> I have created a signed url. It looks like this:
>>
>> https://storage.googleapis.com/google-testbucket/testdata.txt?GoogleAccessId=123456...@developer.gserviceaccount.com
>>  &Expires=1331155464&Signature=BCl
>> z9e4UA2MRRDX62TPd8sNpUCxVsqUDG3YGPWvPcwN%2BmWBPqwgUYcOSszCPlgWREeF7oPGowkeKk
>> 7J4WApzkzxERdOQmAdrvshKSzUHg8Jqp1lw9tbiJfE2ExdOOIoJVmGLoDeAGnfzCd4fTsWcLbal9
>> sFpqXsQI8IQi1493mw%3D
>>
>>
>> The signed url is built following the guidlines found in the Google Docs 
>> here 
>> https://cloud.google.com/storage/docs/access-control/create-signed-urls-program
>>
>> However, the client-side javascript portion of handling this signed url 
>> is very unclear in the documentation.
>>
>>
>>
>>
>> Here is my python code to create and return the signed url.
>>
>>
>> GOOGLE_SERVICE_CREDENTIALS = 'google-service-credentials.json'
>>
>> def get_signed_url(request):
>> filename = request.GET.get('filename')
>> expiration = request.GET.get('expiration')
>> type = request.GET.get('type')
>> signed_url = CloudStorageSignedURL(
>> method='PUT',
>> file_name=filename,
>> expiration_m=expiration,
>> content_type=type
>> )
>> signed_url = signed_url.sign_url()
>>
>>
>> return JsonResponse({ 'signed_url': signed_url })
>>
>>
>>
>>
>>
>>
>> class CloudStorageSignedURL(object):
>>
>>
>> def __init__(self, method, file_name, expiration_m, content_type):
>> self.HTTP_method = method
>> self.content_type = 'content-type: ' + content_type
>> self.expiration = int(expiration_m)
>> self.file_name = file_name
>>
>>
>> def sign_url(self):
>>
>>
>> expiration_dt = datetime.utcnow() + timedelta(minutes=self.
>> expiration)
>> expiration = int(time.mktime( expiration_dt.timetuple() ))
>> bucket_path = '/' + settings.CLOUD_STORAGE_BUCKET + '/dev/tests/' 
>> + self.file_name
>> signature_string = self.HTTP_method + '\n' + '\n' + 
>> self.content_type 
>> + "\n" + str(expiration) + '\n' + bucket_path
>> print(signature_string)
>> creds = ServiceAccountCredentials.from_json_keyfile_name(
>> GOOGLE_SERVICE_CREDENTIALS)
>> client_email = creds.service_account_email
>> signature = creds.sign_blob(signature_string)[1]
>> encoded_signature = base64.urlsafe_b64encode(signature).decode(
>> 'utf-8')
>> base_url = settings.CLOUD_STORAGE_ROOT + 'dev/tests/' + self.
>> file_name
>>
>>
>> return base_url + '?GoogleAccessId=' + client_email + '&Expires=' 
>> + str(expiration) + '&Signature=' + encoded_signature
>>
>>
>>
>>
>>
>>
>> *Client-side Javascript to upload the file*
>>
>> import $ from 'jquery';
>> import axios from 'axios';
>>
>>
>>
>> $("document").ready( () => {
>>   console.log('window loaded');
>>
>>
>>   $("#id_audio_file").change(function() {
>>
>> const file = this.files[0]
>>
>> const url = window.location.href.replace('submit/', 'upload/');
>> $.get(url + `?filename=${file.name}&expiration=10&type=${file.type}`, 
>> (data) => {
>>   upload(data.signed_url, file);
>> })
>>
>>   });
>> });
>>
>>
>>
>> function upload(url, file) {
>>
>>   const config = {
>> headers: {
>>   'Content-Type': file.type,
>> }
>>   }
>>
>>   axios.put(url, file, config)
>> .then(function (res) {
>>   console.log(res);
>> })
>> .catch(function (err)

[google-appengine] Re: using /.well-known/ URL path with flex environment

2017-11-20 Thread Vick Khera
Here's my final solution:

location ^~ /.well-known/ {
alias /app/well-known/;
}

I figured out the path by watching a deploy and noticing the web root was 
inside /app and deduced that was the application root for flex engine. 
Using the ^~ match causes it to overrule the prohibition against serving 
files beginning with a period.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/acad8c19-d918-4ccc-ae9a-32dcc3bf323d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Why I (can not) choose AppEngine Flexible

2017-11-20 Thread 'Jordan (Cloud Platform Support)' via Google App Engine
I completely agree with your explanations on the current differences 
between App Engine Standard and Flexible, and why these differences of 
offerings between the two App Engine environments cause a desire for a type 
of feature unity to make Flex more like Standard (or vise-versa). 

We are very aware of all of the above mentioned discrepancies, and our 
teams are very hard at work on evolving the App Engine Environments into a 
state that posses these much needed solutions. 2018 is a year of evolution 
for App Engine, with such features as the Google Cloud Client Libraries 
 becoming more 
prominent and stable. Our engineers are also working hard on a possible 
scale-to-0 solution for App Engine Flexible, and are investigating possible 
solutions for Free Tiers for GAE Flex just to name a few (note that there 
is currently no ETA for these at this time).

Know that we listen very intently and are very aware of the much desired 
features for our products. We are constantly working hard to fulfill these 
desires and evolve App Engine and the Google Cloud Platform to be the 
absolute number one competitor in cloud computing. 

- If you would like updates on any of these feature requests it is 
recommended to officially request them in the Public Issue Tracker 
 where the 
engineering teams responsible will be notified. 


-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/6abe79e8-2a32-4873-804a-91de988b27bf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [google-appengine] Re: PHP Flexible Environment: Write access to directory possible?

2017-11-20 Thread 'Takashi Matsuo' via Google App Engine
Hi Jörg,

It seems like there is a method call to change the compile dir (and also
cache dir).

See:
https://www.smarty.net/docs/en/api.set.compile.dir.tpl

On Fri, Nov 17, 2017 at 1:01 PM 'Jörg Hartgen' via Google App Engine <
google-appengine@googlegroups.com> wrote:

> Dear Takashi,
>
> yes, this could be a solution.
>
> We investigated the code and found that the templates_c directory is
> hardcoded in smarty in just two places:
>
> components/renderers/template_renderer.php
> and
> components/utils/check_utils.php
>
> We could correct both these places and add the files above to the list of
> excluded files to prevent them from being overwritten when updating the
> code.
>
> In template_renderer.php:
>
> ###
> 
> include_once dirname(__FILE__) . '/' .
> '../../libs/smartylibs/Smarty.class.php';
>
> interface ITemplateRenderer
> {
> public function render($templateName, $params);
> }
>
> class SmartyTemplateRenderer implements ITemplateRenderer
> {
> /** @var Smarty */
> private $smarty;
>
> /**
> * @param string $templateDirectory
> * @param string $compileDirectory
> */
> * public function __construct($templateDirectory = 'components/templates',
> $compileDirectory = 'templates_c') {*
> $this->smarty = new Smarty();
> $this->smarty->template_dir = $templateDirectory;
> $this->smarty->compile_dir = $compileDirectory;
> }
>
> /**
> * @param string $templateName
> * @param array $params
> * @return string
> */
> public function render($templateName, $params) {
> foreach($params as $key => &$value) {
> if (is_object($value)) {
> $this->smarty->assign_by_ref($key, $value);
> } else {
> $this->smarty->assign($key, $value);
> }
> }
>
> return $this->smarty->fetch($templateName);
> }
>
> }
>
> function GetTemplateRenderer() {
> return new SmartyTemplateRenderer();
> }
>
>
> ###
>
> In check_utils.php there is only a test if the templates_c directory is
> writeable:
>
> ###
> function CheckTemplatesCacheFolderIsExistsAndWritable() {
> $templatesCacheFolder = 'templates_c';
> if (!file_exists($templatesCacheFolder) ||
> !is_writable($templatesCacheFolder)) {
>
> header('Content-Type: text/html; charset=UTF-8');
>
> $result = file_get_contents(
> 'components/templates/templates_c_folder_warning.html');
> $result = str_replace('{MESSAGE}', 'Error: the templates_c directory does
> not exist or is not writable', $result);
> $result = str_replace('{DETAILS}', 'Please make sure that the templates_c
> directory does exist in the root directory of the generated application and
> it is writable by the web server user.', $result);
> echo $result;
> exit;
> }
> }
>
> How can we proceed?
>
> Cheers
> Jorg
>
>
>
>
> Am Donnerstag, 16. November 2017 20:23:34 UTC+1 schrieb Takashi Matsuo
> (Google):
>
>> Hi Jörg,
>>
>> The Flex build pipeline set a stcict permission on everything under
>> document_root.
>> Is it possible to configure smarty to use a directory outside of the
>> document_root (e.g. /tmp, or /app/smarty_cache)?
>>
>> Technically it's possible to introduce a flag for not setting the strict
>> permission at all, so let us know if you want this option.
>>
>> On Thu, Nov 2, 2017 at 1:42 PM 'George (Cloud Platform Support)' via
>> Google App Engine  wrote:
>>
> There is a PHP example
>>> 
>>> for the flexible environment in the "Using Cloud Storage" document for PHP
>>> and flex. You may consider checking it for applicable sample code, to adapt
>>> to your particular requirements.
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Google App Engine" group.
>>>
>> To unsubscribe from this group and stop receiving emails from it, send an
>>> email to google-appengi...@googlegroups.com.
>>> To post to this group, send email to google-a...@googlegroups.com.
>>
>>
>>> Visit this group at https://groups.google.com/group/google-appengine.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/google-appengine/e8db7b1d-54c1-422f-8772-0ac0728a3776%40googlegroups.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
>> -- Takashi
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-appengine+unsubscr...@googlegroups.com.
> To post to this group, send email to google-appengine@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-appengine.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/google-appengine/3f59a530-cf38-4e18-a9f9-2a20096b322a%40googlegroups.com
> 

[google-appengine] SSL Certificate renewed in but expiration date was not updated in GAE - now not able to upload a new certificate

2017-11-20 Thread Edwin Lau
So My SSL certificate was renewed (it was done through GoDaddy), but our 
GAE settings did not seem to get updated - so the old certificate expired 
10 days ago.

I went through the whole process of generating a new private key, a CSR, a 
new certificate and tried to upload a new certificate in GAE but I keep 
getting this error:

Error

You do not have sufficient permissions to view this page.

Tracking Number: 5725570739440463356
Any suggestions what I should do? The SSL certificate was renewed long 
before expiration, I've also not made any changes to anything.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/2ff0e385-0ea7-4f5d-9453-91fe70323c31%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Writing Datastore controller for appengine and GCE?

2017-11-20 Thread Alex Buchanan
Ah, well, I have been digging through that documentation for weeks now, on 
and off. There is quite a bit of it, so I missed that note. Thanks for 
pointing it out. It took me awhile to realize that there were even two 
separate Go APIs. Maybe I skim too much.

I ended up rewriting my api calls to use the appengine library. I need my 
task workers to live in GCE though, so I'm not sure how that all plays out 
yet. I might have to give up on appengine for now.

I'm sure you guys are aware of the pitfalls here and are working on 
resolving it. Thanks again for your help.

On Monday, November 20, 2017 at 8:21:57 AM UTC-8, Jordan (Cloud Platform 
Support) wrote:
>
> If you are looking to deploy to App Engine Standard it is recommended to 
> follow its documentation 
> .
>  
> Currently the App Engine Standard Go environment is not recommended to use 
> the new Google Cloud Client Libraries 
>  which allows 
> access to Google Services from any client such as a Google Compute Engine 
> VM. 
>
> As also reiterated in the documentation for the Cloud Datastore API 
> ,
>  
> the App Engine Standard Go environment is currently limited to the use of 
> the older App Engine SDK  as 
> opposed to the new Google Cloud Client Library for Go. 
> 
>
> - Note that you could indeed try to use the new Google Cloud Client 
> Library for Go on the App Engine Standard Go environment, but as it is not 
> fully supported yet you may run into issues. It is recommended to report 
> all issues and feature requests specific to the Google Cloud Client Library 
> for Go directly to the engineering team in their Git Issue Tracker 
> 
> . 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/b00da276-c23d-4517-b3a8-74c5c2ea9bd3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Why I (can not) choose AppEngine Flexible

2017-11-20 Thread 'Steren Giannini' via Google App Engine
Thanks for the detailed feedback. We value it a lot and it helps us orient 
the direction of our products.

Regarding managed services: A new API, currently in Alpha, called "Cloud 
Tasks API" allows you to submit push tasks from App Engine Flex.
Get whitelisted by filling this form: https://goo.gl/Ya0AZd

Thanks,

Steren
Product Manager 
Google Cloud Platform

On Saturday, November 18, 2017 at 12:11:32 AM UTC-8, Attila-Mihaly Balazs 
wrote:
>
> Hello all,
>
> I would like to kick off this discussion because I think the Google 
> AppEngine team is missing an opportunity to differentiate themselves from 
> the competitors.
>
> First, a quick rundown of why I've chosen AppEngine many years ago and why 
> I continue to use/recommend it:
>
> - the free tier (important to try stuff out)
> - managed services (like Memcache, Datastore, Taskqueues, CloudSQL)
> - automatic scaling / failover
> - automatic patching / updating / tuning of the instances
>
> In short, I want to focus on delivering the solution to my stakeholders 
> and I don't have the time to become ops (even though ops is very 
> important). Also, I have confidence in the world-class ops team at Google 
> that they will keep my app secure and well-performing.
>
> Of course this is not to say that everything is rosy. One big painpoint 
> was/is the lag of updating the runtimes (only recently did we get Java 8 - 
> god knows when we'll get Java 9 - and Python 3 isn't even discussed - even 
> though major libraries are dropping support for Python 2 soon). The other 
> one is the inability to "bring your own libraries" if they require native 
> code. And finally sometimes there is a general flakyness to AppEngine, but 
> that's just a fact of life when running on such a large distributed system.
>
> So the new AppEngine flex offering comes out which is basically "we run 
> your docker image using the autoscaler". Which is great, but looses many of 
> the advantages of AppEngine standard:
>
> - free tier? forget it
> - managed services? some yes, some no (like memcache), some in beta with 
> limitations (like taskqueue - I think you can't submit push tasks with 
> AppEngine Flex)
> - the big one for me: NO automatic updating / patching / tuning / 
> optimizing of your runtime environment (see the discussion at [1])
>
> So basically: I'm paying more (since AppEngine flex is more expensive) and 
> I get less performance (since Google engineers are not assisting me in 
> tuning Nginx / the JVM / etc inside my container) and I have to play ops by 
> following the security discussions for the different parts of my stack and 
> diligently rebuild/patch my containers.
>
> At this point I'm like: screw it, there is very little difference between 
> running a bunch of docker images on the Google Cloud vs any other 
> competitor.
>
> But this could be very easily be fixed:
>
> - offer a "no questions asked, here are $300 / month" tier on Google Cloud 
> which the user can spend on anything (including running AppEngine flex 
> instances, CloudSQL instances, etc). It could even be $10 / day to avoid 
> the "because of a bug I just used up my monthly allowance" kind of 
> situations
> - allow flexible environments to scale down to 0 instances. The "it's slow 
> to start up" seem bull, since a docker container is just like a process - 
> isolated using namespaces, cgroups, etc. So it's not like you have to boot 
> a VM to serve the first request
> - have an official base image (based on Debian for example) and say: as 
> long as your docker images are derived "FROM 
> google-appengine-flex-base:latest", we promise to update/tune the 
> underlying packages and apply it to your instances without you having to do 
> anything
> - commit to provide complete access to all the Google Cloud Services in a 
> select number of programming languages (lets say C/C++ / Java - which 
> covers the JVM languages / C# - covering the .NET languages / Python 3 / 
> PHP - and the other languages can wrap the C library).
>
> This is not some genius idea, so I guess the explanation for why this 
> hasn't happened is internal politiking. Thus I would like to ask you: get 
> off of that and make AppEngine a great PaaS again (currently it's just a 
> good one).
>
> Regards,
> Attila
>
> [1] https://groups.google.com/forum/#!topic/google-appengine/QulhjoBGlHc
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/bce60c3d-a58c-4c01-8e4f-1911b02f8835%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Cloud Storage Client-Side Javascript File Upload 403 SignatureDoesNotMatch

2017-11-20 Thread 'Steren Giannini' via Google App Engine
When it comes to storing items in Cloud Storage from client side web, I 
recommend looking at the web SDK of Cloud Storage for 
Firebase: https://firebase.google.com/docs/storage/web/start

On Monday, November 20, 2017 at 12:02:08 PM UTC-8, Scott Campbell wrote:
>
> Yannick!  Thanks again for your support, I do appreciate it.  This will 
> help me debug the issue now that I know where to look.  I will link my 
> stack-overflow question.  
>
>
> https://stackoverflow.com/questions/47381667/getting-403-signaturedoesnotmatch-when-uploading-to-google-cloud-storage
>
>
> On Monday, November 20, 2017 at 10:18:10 AM UTC-5, Yannick (Cloud Platform 
> Support) wrote:
>>
>> Hello Scott, the "StringToSign" field tells you what it expects the 
>> canonical string to look like. You should double-check that the string your 
>> client uses is exactly the same (including any whitespace).
>>
>> For this kind of technical question I also recommend that you post it to 
>> Stack Overflow using one of the tags 
>>  monitored by our 
>> community technical support team.
>>
>> On Sunday, November 19, 2017 at 2:06:17 PM UTC-5, Scott Campbell wrote:
>>>
>>> I am trying to upload audio files on the Client-Side directly to my 
>>> Google Cloud Storage bucket, for the purpose of avoiding a server-side 
>>> upload (which has file size limits).
>>>
>>> My Issue: I am getting a 403  SignatureDoesNotMatch  error on upload. 
>>>
>>> Here is the error from the response:
>>>
>>>
>>>1. 
>>>   1. SignatureDoesNotMatch
>>>   2. The request signature we calculated does not match 
>>>   the signature you provided. Check your Google secret key and signing 
>>> method.
>>>   
>>>   3. PUT audio/mp3 152552 
>>>   /bucketname/pathtofile/019%20-%20top%20cntndr%20V1.mp3
>>>   
>>>   4. 
>>>
>>>
>>>
>>> I have created a signed url. It looks like this:
>>>
>>> https://storage.googleapis.com/google-testbucket/testdata.txt?GoogleAccessId=123456...@developer.gserviceaccount.com&Expires=1331155464&Signature=BCl
>>> z9e4UA2MRRDX62TPd8sNpUCxVsqUDG3YGPWvPcwN%2BmWBPqwgUYcOSszCPlgWREeF7oPGowkeKk
>>> 7J4WApzkzxERdOQmAdrvshKSzUHg8Jqp1lw9tbiJfE2ExdOOIoJVmGLoDeAGnfzCd4fTsWcLbal9
>>> sFpqXsQI8IQi1493mw%3D
>>>
>>>
>>> The signed url is built following the guidlines found in the Google Docs 
>>> here 
>>> https://cloud.google.com/storage/docs/access-control/create-signed-urls-program
>>>
>>> However, the client-side javascript portion of handling this signed url 
>>> is very unclear in the documentation.
>>>
>>>
>>>
>>>
>>> Here is my python code to create and return the signed url.
>>>
>>>
>>> GOOGLE_SERVICE_CREDENTIALS = 'google-service-credentials.json'
>>>
>>> def get_signed_url(request):
>>> filename = request.GET.get('filename')
>>> expiration = request.GET.get('expiration')
>>> type = request.GET.get('type')
>>> signed_url = CloudStorageSignedURL(
>>> method='PUT',
>>> file_name=filename,
>>> expiration_m=expiration,
>>> content_type=type
>>> )
>>> signed_url = signed_url.sign_url()
>>>
>>>
>>> return JsonResponse({ 'signed_url': signed_url })
>>>
>>>
>>>
>>>
>>>
>>>
>>> class CloudStorageSignedURL(object):
>>>
>>>
>>> def __init__(self, method, file_name, expiration_m, content_type):
>>> self.HTTP_method = method
>>> self.content_type = 'content-type: ' + content_type
>>> self.expiration = int(expiration_m)
>>> self.file_name = file_name
>>>
>>>
>>> def sign_url(self):
>>>
>>>
>>> expiration_dt = datetime.utcnow() + timedelta(minutes=self.
>>> expiration)
>>> expiration = int(time.mktime( expiration_dt.timetuple() ))
>>> bucket_path = '/' + settings.CLOUD_STORAGE_BUCKET + 
>>> '/dev/tests/' + self.file_name
>>> signature_string = self.HTTP_method + '\n' + '\n' + 
>>> self.content_type 
>>> + "\n" + str(expiration) + '\n' + bucket_path
>>> print(signature_string)
>>> creds = ServiceAccountCredentials.from_json_keyfile_name(
>>> GOOGLE_SERVICE_CREDENTIALS)
>>> client_email = creds.service_account_email
>>> signature = creds.sign_blob(signature_string)[1]
>>> encoded_signature = base64.urlsafe_b64encode(signature).decode(
>>> 'utf-8')
>>> base_url = settings.CLOUD_STORAGE_ROOT + 'dev/tests/' + self.
>>> file_name
>>>
>>>
>>> return base_url + '?GoogleAccessId=' + client_email + 
>>> '&Expires=' + str(expiration) + '&Signature=' + encoded_signature
>>>
>>>
>>>
>>>
>>>
>>>
>>> *Client-side Javascript to upload the file*
>>>
>>> import $ from 'jquery';
>>> import axios from 'axios';
>>>
>>>
>>>
>>> $("document").ready( () => {
>>>   console.log('window loaded');
>>>
>>>
>>>   $("#id_audio_file").change(function() {
>>>
>>> const file = this.files[0]
>>>
>>> const url = window.location.href.replace('submit/', 'upload/');
>>> $.get(url + 

[google-appengine] Re: Google App Engine is slow to deploy, hangs on "Updating service [someproject]..."

2017-11-20 Thread Vijay M
I have been struggling with the same issue. I tried deploying a very simple 
app and waited for several minutes before the process timed out. I even ran 
into the same timeout issue with Google's own samples from  

https://github.com/GoogleCloudPlatform/python-docs-samples/
appengine/flexible/hello_world

Coming from AWS, it has been very frustrating working with GCP. One more 
day of this and I am going back to AWS. 

On Thursday, September 29, 2016 at 12:48:26 PM UTC-7, Kevin Lau wrote:
>
>
> Is there a faster way to deploy an app? Google App Engine is slow to 
> deploy, hangs on "Updating service [someproject]..." I am using a flexible 
> environment with PHP.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/0c5f7fed-3551-4426-88e4-1383b4151084%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Connect multiple cloud sql databases to one app engine service

2017-11-20 Thread 'Jun (Cloud Platform Support)' via Google App Engine
Hi Mike,

After some further search around, it looks there is no public documentation 
mentioning GAE connects to multiple Cloud SQL instances. From my point of 
view, config at app.yaml will not get to the purpose we want, so I suggest 
that you'll need to make a feature request at the issue tracker 
.

On Friday, November 17, 2017 at 4:37:38 PM UTC-5, Mike Hardy wrote:
>
> Hi Jun, thanks for your response, but I am a little confused here. When 
> deployed, GAE uses a built in cloud sql proxy connection with Cloud SQL so 
> there is no way to specify the instance or any other parameter for cloud 
> sql proxy. I think any fix will need to use app.yaml but please correct me 
> if I'm wrong. Would love to solve this.
>
> On Friday, November 17, 2017 at 12:59:04 PM UTC-8, Jun (Cloud Platform 
> Support) wrote:
>>
>> Hi Mike,
>>
>> You should be able to connect to multiple Cloud SQL instances through 
>> Cloud SQL Proxy, and you can specify multiple instances in the instances 
>> parameter (comma separated). Please take a look at these two posts for more 
>> details: "A GCE instance connecting to two (or more) Cloud SQL databases 
>> via multiple cloud-sql-proxy-instances 
>> "
>>  
>> and "Connecting to multiple CloudSQL instances using Cloud sql proxy? 
>> ",
>>  
>> which have the similar questions. 
>>
>> - Jun
>>
>>
>> On Friday, November 17, 2017 at 12:06:49 AM UTC-5, Mike Hardy wrote:
>>>
>>> Hi, we have an app that utilizes two databases. Previously, we had the 
>>> two databases on the same instance in Cloud SQL, but we want to split the 
>>> databases into separate instances. We're having issues connecting the 
>>> databases to our Django app engine service. Is this even possible? If so, 
>>> how would the app.yaml look?
>>>
>>> old app.yaml
>>> runtime: custom
>>> env: flex
>>> entrypoint: gunicorn --timeout 360 --graceful-timeout 360 -b :$8080 
>>> localinsights.wsgi
>>>
>>> beta_settings:
>>> cloud_sql_instances: 
>>>
>>> runtime_config:
>>>   python_version: 3.6
>>>
>>> env_variables:
>>>   SQLALCHEMY_DATABASE_URI: >-
>>>   
>>> postgresql+psycopg2://:/?host=/cloudsql/
>>>
>>>
>>> settings.py
>>> DATABASES['default'] = {
>>> 'HOST': '/cloudsql/',
>>> 'ENGINE': 'psqlextra.backend',
>>> 'NAME': '',
>>> 'USER': '',
>>> 'PASSWORD': ''
>>> }
>>> DATABASES['NUMBER_2'] = {
>>> 'HOST': '/cloudsql/',
>>> 'ENGINE': 'psqlextra.backend',
>>> 'NAME': 'NUMBER_2',
>>> 'USER': '',
>>> 'PASSWORD': ''
>>> }
>>>
>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/f037c434-50d7-4f22-ad31-8e81bc851876%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: How is patching done for flexible instances?

2017-11-20 Thread 'Jun (Cloud Platform Support)' via Google App Engine
Hi Attila,

You're correct about the uncovered scenarios mentioned if your app runtime 
is container image runtime. However, we are very aware of all of the above 
mentioned scenrios, and our product teams are working hard to improve App 
Engine to a state where more needed solutions will be provided to meet 
different users' demand.

On Saturday, November 18, 2017 at 1:46:35 AM UTC-5, Attila-Mihaly Balazs 
wrote:
>
> Hello,
>
> Thank you for the reply. Just making sure that I understand correctly: 
> when you say "excludes container image runtime", it means that none of the 
> following scenarios are covered:
>
> Lets say that I'm running a CentOS based docker image on AppEngine Flex.
>
> 1) A security bug is discovered in nginx. There is an update available in 
> the repositories. However my instances are not patched until I 
> rebuild/redeploy my images (and I have to be careful to rebuild them in 
> such a away that Docker doesn't re-use a cached intermediary image which 
> would result in the package update step being skipped)
>
> 2) Let's say that I'm running Java 9 inside my flex instance, using the 
> OpenJDK build. A new version of the build is released fixing a security 
> bug. I won't get it, until I manually update my Dockerfile presumably and 
> redeploy
>
> 3) My webservice is written in Haskell, which gets compiled down to a 
> native executable statically linking zlib. Zlib has a vulnerability and 
> there is a new version. My webservice won't have that update until I 
> rebuild / redeploy it.
>
> Is my understanding correct that in all of the above scenarios the onerous 
> task of keeping the different libraries / runtimes updated falls on me? I 
> do realize that supporting (2) and (3) is somewhat of a pipedream (since 
> there are an almost infinite amount of possible configurations) and even 
> (1) can be very complicated since there are a lot of linux distributions 
> out there, but please do realize that one important reason for choosing 
> Google Appengine is that I don't have time to be ops!
>
> Thank you.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/770fe825-0493-43e6-88e3-48aa34488faa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: "www.custom-url.com is already mapped to a project" error when trying to point custom domain to App Engine app

2017-11-20 Thread todu
Please provide detailed steps explaining this.  I am having to redirect to 
appspspot instead of domain mapping. Also dont want appengine and google 
apps getting messed.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/0956831b-4a8d-40ec-af24-e8f22e1c4463%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.