-
Notifications
You must be signed in to change notification settings - Fork 10
/
index.html
142 lines (113 loc) · 5.65 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<!--
Copyright 2020 Google LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!DOCTYPE html>
<html lang="en">
<head>
<title>App Engine to Cloud Run</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Helper tool to migrate an App Engine service to a Cloud Run service.">
<meta name="theme-color" content="#1c74e9">
<link rel="stylesheet" href="style.css">
<link rel="icon" type="image/svg+xml" href="images/cloud-run.svg">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="App Engine to Cloud Run">
<meta name="twitter:description" content="Helper tool to migrate an App Engine service to a Cloud Run service.">
<meta name="twitter:image" content="https://googlecloudplatform.github.io/app-engine-cloud-run-converter/images/app-engine-to-cloud-run.png">
<meta property="og:type" content="profile">
<meta property="og:title" content="App Engine to Cloud Run">
<meta property="og:description" content="Helper tool to migrate an App Engine service to a Cloud Run service.">
<meta property="og:url" content="https://googlecloudplatform.github.io/app-engine-cloud-run-converter/">
<meta property="og:image" content="https://googlecloudplatform.github.io/app-engine-cloud-run-converter/images/app-engine-to-cloud-run.png">
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "SoftwareApplication",
"url": "https://googlecloudplatform.github.io/app-engine-cloud-run-converter",
"name": "App Engine to Cloud Run",
"abstract": "Helper tool to migrate an App Engine service to a Cloud Run service.",
"image": "https://googlecloudplatform.github.io/app-engine-cloud-run-converter/images/app-engine-to-cloud-run.png"
}
</script>
</head>
<body id="dropzone">
<header>
<h1>App Engine to Cloud Run</h1>
<p>Helper tool to migrate an App Engine service to a Cloud Run service.</p>
<p>Data is never uploaded. All processing is happening client side in your browser. This tool is <a href="https://github.com/GoogleCloudPlatform/app-engine-cloud-run-converter">on GitHub</a>, feel free to <a href="https://github.com/GoogleCloudPlatform/app-engine-cloud-run-converter/issues">report issues</a>.</p>
<p class="disclaimer">This is not an officially supported Google product.</p>
</header>
<main>
<div class="group">
<h2 class="gae">Your App Engine service</h2>
<p>Select, Drag and drop or copy paste your App Engine app.yaml:</p>
<form id="gae">
<input type="file" id="yaml-selector" accept=".yml, .yaml">
<label for="appyaml"><code>app.yaml</code>:</label>
<textarea id="appyaml" class="file yaml input" spellcheck="false">
runtime: nodejs10
service: my-service
instance_class: F2
handlers:
- url: /.*
script: auto
secure: always
redirect_http_response_code: 301
env_variables:
LIMIT: 100
QUEUE_ID: 'emails'
automatic_scaling:
max_concurrent_requests: 80
max_instances: 10
</textarea>
<label for="project-id">GCP Project ID:</label>
<input type="text" id="project-id" name="project-id" class="input">
<label for="region">App Engine region:</label>
<input type="text" id="region" name="region" class="input">
<label for="gae-cloudsql-use">
<input type="checkbox" id="gae-cloudsql-use" name="gae-cloudsql-use" class="input">
I use Cloud SQL
</label>
<div id="gae-cloudsql-instance-container" style="display: none;">
<label for="gae-cloudsql-instance">Cloud SQL instance name:</label>
<input type="text" id="gae-cloudsql-instance" name="gae-cloudsql-instance" class="input">
</div>
</form>
</div>
<div class="group">
<h2 class="run">Migrating to Cloud Run</h2>
<ul id="warnings" style="display: none;">
</ul>
<div id="to-run">
<div id="dockerfile-container" style="display: none;">
<p>Create a file named <code>Dockerfile</code> at the root of your source tree, with the following content:</p>
<label for="dockerfile"><code>Dockerfile</code>:</label>
<textarea id="dockerfile" class="file"></textarea>
</div>
<div id="procfile-container" style="display: none;">
<p>Create a file named <code>Procfile</code> at the root of your source tree, with the following content:</p>
<label for="procfile"><code>Procfile</code>:</label>
<textarea id="procfile" class="file"></textarea>
</div>
<p>Create a file named <code>service.yaml</code> with the following content:</p>
<label for="serviceyaml"><code>service.yaml</code>:</label>
<textarea id="serviceyaml" class="yaml file" spellcheck="false"></textarea>
<p>To build and deploy to Cloud Run, run the following command:</p>
<pre><code id="gcloud"></code></pre>
<p>Contrary to App Engine, Cloud Run services are private by default. To make your new service public, you need to run the following command once:</p>
<pre><code id="make-public"></code></pre>
</div>
</div>
</main>
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-yaml/3.13.1/js-yaml.min.js"></script>
<script type="module" src="index.js"></script>
</body></html>