I am ready to deploy into the Google Cloud Platform but I have ran into a problem. The website won't deploy. Here is what the code displays:
ERROR: (gcloud.app.deploy) An error occurred while parsing file: [/home/jinthemix/app.yaml]
Unexpected attribute 'pi_version' for object of type AppInfoExternal.
in "/home/jinthemix/app.yaml", line 1, column 13
Down below here is the app.yaml. I used vim app.yaml to get into the code. I am confused as to why it looks different from the code I wanted to use. So I am wondering how I can edit app.yaml so I can deploy.
This is the code I want to use:
runtime: python27
api_version: 1
threadsafe: true
handlers:
- url: /
static_files: www/index.html
upload: www/index.html
- url: /(.*)
static_files: www/\1
upload: www/(.*)
(side note: How would I link the index.html? (when someone navigates to the root page of your website, what the person sees when clicking or going to the link of the site)) Here is where the html is located:
jinthemix@cloudshell:~ (website-deploying-gc)$ ls
app.yaml IMD233 Files README-cloudshell.txt README.md www
jinthemix@cloudshell:~ (website-deploying-gc)$ cd www
jinthemix@cloudshell:~/www (website-deploying-gc)$ ls
Mixs
jinthemix@cloudshell:~/www (website-deploying-gc)$ cd Mixs
jinthemix@cloudshell:~/www/Mixs (website-deploying-gc)$ ls
'Mix 1 (1)' 'Mix 2 (2)' 'Mix 3 (3)' 'Mix 4 (4)'
jinthemix@cloudshell:~/www/Mixs (website-deploying-gc)$ cd 'Mix (1)'
jinthemix@cloudshell:~/www/Mixs/Mix 1 (1) (website-deploying-gc)$ ls
'hello.html (B) (L2).html' 'hello.html (T) (L3).html' 'hello (L1).html'
jinthemix@cloudshell:~/www/Mixs/Mix 1 (1) (website-deploying-gc)$ cd
jinthemix@cloudshell:~ (website-deploying-gc)$ cd
In general you could use any text editor program that can read YAML files to edit any app.yaml files.
I see you are using the Cloud Shell to deploy your application.
You could use any text editor supported by UNIX (e.g. vim or nano) and edit the file from the terminal by running the relevant commands each program uses to open and then save the edited file.
If you find using any of the above programs from the terminal challenging and prefer a more visual friendly interface take advantage of the Cloud Shell Editor by following the steps mentioned on the docs (basically just click on the Open editor button on the Cloud Shell, locate the file and edit it as if you were using Notepad).