I am working on a project that involves using an Google App Engine (GAE) server to control one or more Google Compute Engine (GCE) instances. The rest of the project is working well, but I am having a problem with one specific aspect: file management. I want my GAE to edit a file on my GCE instance, and after days of research I have come up blank on how to do that.
The most straightforward example of this is:
Step 1) User enters text into a GAE form.
Step 2) User clicks a button to indicate they would like to "submit" the text to GCE
Step 3) GAE replaces the contents of a particular (hard-coded path) text file on the GCE with the user's new content.
Step 4) (bonus step) GCE notices that the file has changed (either by detecting a change or by way of GAE alerting it when the new content is pushed) and runs a script to process the new file.
I understand that this is easy to do using SCP or other terminal commands. I have already done that, and that works fine. What I need is a way for GAE to send that content directly, without my intervention.
I have full access to all instances of GAE and GCE involved in this project, and can set up whatever code is needed on either of the platforms.
Thank you in advance for your help!