0% menganggap dokumen ini bermanfaat (0 suara)
15 tayangan9 halaman

Membuat Project Pada Google App Engine Tutorial

Diunggah oleh

Dipake Ramerame
Hak Cipta
© © All Rights Reserved
Kami menangani hak cipta konten dengan serius. Jika Anda merasa konten ini milik Anda, ajukan klaim di sini.
Format Tersedia
Unduh sebagai DOCX, PDF, TXT atau baca online di Scribd
0% menganggap dokumen ini bermanfaat (0 suara)
15 tayangan9 halaman

Membuat Project Pada Google App Engine Tutorial

Diunggah oleh

Dipake Ramerame
Hak Cipta
© © All Rights Reserved
Kami menangani hak cipta konten dengan serius. Jika Anda merasa konten ini milik Anda, ajukan klaim di sini.
Format Tersedia
Unduh sebagai DOCX, PDF, TXT atau baca online di Scribd
Anda di halaman 1/ 9

Membuat Project pada Google App Engine

1. Buka halaman https://appengine.google.com

2. Sign in dengan menggunakan email google

3. Berikut adalah tampilan halaman setelah login.

4. Aktivasi akun google untuk mendapatkan credit $300 selama 1 tahun yang dapat digunakan untuk
melakukan pembayaran. Isi dan lengkapi form yang tampil. Bagian in dapat diisi dengan
menggunakan akun Jenius.

5. Setelah selesai maka akan tampil halaman berikut:


6. Setelah itu buka halaman dashboard App Engine

7. Klik Create Application dan kemudian akan tampil halaman berikut ini:
Pilih region dimana aplikasi akan ditempatkan
Pilih platform yang akan digunakan.

App engine telah berhasil dibuat.

8. Buat sebuah project baru sebagai tempat dari aplikasi yang nantinya akan dideploy
1. Setelah project terbuat maka pilih Project tersebut pada Google Cloud Platform Console
2. Download dan Install Google Cloud SDK dari https://cloud.google.com/sdk/docs/quickstart-windows
a. Jalankan Google Cloud SDK shell
b. Tambahkan lokasi dimana Google Cloud SDK ter-install ke dalam User variable dengan
nama PATH
c. Jalankan perintah gcloud init
d. Login dengan akun google
e. Pilih Cloud Platform Project yang akan digunakan
Pilih ID project yang telah dibuat sebelumnya [1].

9. Download dan install Cloud SDK For Java dari


https://cloud.google.com/appengine/docs/standard/java/download
• Buka command prompt
• Untuk membuat App Engine:
1. Ubah directory ke lokasi dimana project Maven akan dibuat
2. Jalankan perintah berikut ini

mvn archetype:generate -Dappengine-version=1.9.74 -Djava8=true -


DCloudSDK_Tooling=false -Dapplication-id= vertical-veld-317509 -
Dfilter=com.google.appengine.archetypes:

Set -Dappengine-version to the most recent version of the App Engine SDK for Java,
and application-id to the ID of your GCP project.
Set -Djava8=false to deploy the project in the Java 7 runtime.
Set -Djava8=true to deploy the project in the Java 8 runtime.
Set -DCloudSDK_Tooling=false to use the App Engine SDK for Java tooling.

3. When prompted to choose an archetype, choose the value 2 for the App Engine
skeleton archetype. This creates an empty project that contains the required directory
structure and files.
4. When prompted for version, press ENTER to select the default most recent version.
5. When prompted to Define value for property 'groupId', supply the desired namespace
for your app; for example, com.mycompany.myapp.
6. When prompted to Define value for property 'artifactId', supply the project name; for
example, myapp.
7. When prompted to Define value for property 'version', accept the default value.
8. When prompted to Define value for property 'package', supply your preferred package
name (or accept the default). The generated Java files will have the package name
you specify here.
9. When prompted to confirm your choices, accept the default value (Y).
10. Wait for the project to finish creating the necessary directories and files. Then go into
new project directory, for example myapp/.

When the project successfully finishes you will see a message similar to this one:
[INFO] -------------------------------------------------------
[INFO] Using following parameters for creating project from Archetype: guestbook-
archetype:4.0.2
[INFO] -------------------------------------------------------
[INFO] Parameter: groupId, Value: com.example
[INFO] Parameter: artifactId, Value: myendpoint
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] Parameter: package, Value: com.example
[INFO] Parameter: packageInPathFormat, Value: com/example
[INFO] Parameter: CloudSDK_Tooling, Value: false
[INFO] Parameter: groupId, Value: com.example
[INFO] Parameter: service, Value: default
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] Parameter: application-id, Value: your-app-id
[INFO] Parameter: package, Value: com.example
[INFO] Parameter: artifactId, Value: myendpoint
[INFO] Parameter: java8, Value: true
[INFO] Parameter: appengine-version, Value: 1.9.74
[INFO] Project created from Archetype in dir: C:\Users\FACULTY\myendpoint
[INFO] -------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] -------------------------------------------------------
[INFO] Total time: 03:35 min
[INFO] Finished at: 2019-05-16T11:35:26+07:00
[INFO] -------------------------------------------------------

10. Untuk meng-compile


• Buka command prompt
• Ubah ke lokasi dimana project berada
cd C:\Users\HP\AppData\Local\Google\Cloud SDK\difa
• Lakukan perintah mvn clean package
• Tunggu hingga proses build selesai
11. Untuk menjalankan pada server local
• Buka command prompt
• Ubah ke lokasi dimana project berada
• Lakukan perintah mvn appengine:run
• Tunggu sampai proses selesai, project dapat diakses pada alamat: \localhost:8080
12. Untuk meng-upload ke google app engine
• Buka command prompt
• Ubah ke lokasi dimana project berada
• Lakukan perintah mvn appengine:deploy
• Tunggu sampai proses selesai, akan tampil alamat di mana project dapat diakses.
• Biasanya akan berbentuk : [idproject].appspot.com

Anda mungkin juga menyukai