-
Notifications
You must be signed in to change notification settings - Fork 8
Local PC
Selain komputer maka hal yang utama adalah koneksi internet. Anda akan dibawa untuk mengenal banyak situs di Dunia Internet yang menawarkan opsi untuk membantu kita membangun projek.
Hal yang penting dilakukan adalah cara aman untuk simpan password untuk akses ke banyak situs. Lasspass adalah salah satu yang terbaik untuk bisa Anda pakai.
Ada begitu banyak perangkat editor yang bisa didapatkan secara online dengan gratis.
Ada ada baiknya Anda mencoba Notepad++. Banyak fitur dan plugin yang dapat diprogram agar kita lebih nyaman bekerja bahkan untuk otomatisasi seperti update git repository secara mudah.
Dari sekian banyak langkah yang Anda lakukan ada baiknya mencatat apa saja yang sudah dilakukan agar dapat kita lakukan otomatisasi maupun kilas balik jika ada masalah dengan pemrograman.
Pencatatan di GitHub Wiki seperti yang anda baca ini adalah cara yang memungkinkan Anda agar tidak kehilangan jejak apa saja yang sudah diterapkan. Kita akan bahas sampai GCP Build History.
Pada tahap bekerja di Local PC kita perlu siapkan perangkat utama yaitu Gcloud SDK, ikuti cara instal dan setel file batch agar otomatis berada di ruang kerja yang kita siapkan.
Your current Cloud SDK version is: 241.0.0
Installing components from version: 241.0.0
┌─────────────────────────────────────────────────────────────────────┐
│ These components will be installed. │
├────────────────────────────────────────────────┬─────────┬──────────┤
│ Name │ Version │ Size │
├────────────────────────────────────────────────┼─────────┼──────────┤
│ gcloud app Python Extensions (Extra Libraries) │ 1.9.74 │ 28.5 MiB │
└────────────────────────────────────────────────┴─────────┴──────────┘
For the latest full release notes, please visit:
https://cloud.google.com/sdk/release_notes
Do you want to continue (Y/n)? y
╔════════════════════════════════════════════════════════════╗
╠═ Creating update staging area ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: gcloud app Python Extensions (Extra Libra... ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Creating backup and activating new installation ═╣
╚════════════════════════════════════════════════════════════╝
Performing post processing steps...done.
Update done!
WARNING: There are alternate versions of the following Google Cloud Platform tools on
your system PATH. Please double check your PATH:
C:\Program Files\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\endpointscfg.py
C:\Program Files\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\dev_appserver.py
Press any key to continue . . .Karena pada tahap project kita akan bekerja di platform Unix maka ada baiknya kita mulai membiasakan perintah² Unix Standard spt sed, grep dll.
Ada beberapa macam tools yg ditawarkan, Anda bisa pilih UnxUtils atau Cygwin.
Download dan Unzip dimanapun Anda suka, misal di C:\UnxUtils. Kemudian setel PATH nya di file cloud_env.bat supaya otomatis aktif setiap buka perangkat Gcloud SDK.
C:\Program Files\Google\Cloud SDK\cloud_env.bat
ECHO OFF
CLS
SET Prompt=$$
SET PATH=C:\UnxUtils\usr\local\wbin;%PATH%;
SET PATH=C:\Program Files\Google\Cloud SDK\google-cloud-sdk\bin;%PATH%;
SET PROJECT=C:\Users\Chetabahana\Project\Google\GAE\python\market
ECHO Google Cloud SDK! Run "gcloud -h" to get available commands.
CD %PROJECT%
pwd
git fetch origin
git reset --hard origin/master
SET date=%DATE:~0,2%
SET hour=%TIME:~0,2%
SET minute=%TIME:~3,2%
IF "%date:~0,1%"==" " SET date=0%DATE:~1,1%
IF "%hour:~0,1%"==" " SET hour=0%TIME:~1,1%
IF "%minute:~0,1%"==" " SET minute=0%TIME:~1,1%
SET VERSION=%date%%hour%%minute%
sed -e "s/-[0-9]\{1,\}-\([a-zA-Z0-9_]*\)'/-%VERSION%-local'/g" cloudbuild.yaml > tmp.txt
mv -f tmp.txt cloudbuild.yaml
findstr "\<version.*" cloudbuild.yaml | sed "s/ args: \['app', 'deploy', /SERVING: \[/g"
REM tutorial-env\Scripts\activate.bat
ECHO ---
ECHO ONJika Anda mengembangkan projek dengan sistem Windows maka Anda akan banyak menemukan konflik konfigurasi dengan Linux. Untuk mengatasi hal ini maka kita perlu sistem dengan pola Unix yang bekerja dengan Sistem Windows. Salah satu projek yang dikenal adalah Cygwin.
C:\Users\Chetabahana> MKLINK
Creates a symbolic link.
MKLINK [[/D] | [/H] | [/J]] Link Target
/D Creates a directory symbolic link. Default is a file
symbolic link.
/H Creates a hard link instead of a symbolic link.
/J Creates a Directory Junction.
Link specifies the new symbolic link name.
Target specifies the path (relative or absolute) that the new link
refers to.
C:\Users\Chetabahana>CD C:\
C:\> MKDIR D:\Cygwin
C:\> MKLINK /J cygwin D:\Cygwin
Junction created for cwgwin <<===>> D:\CygwinUntuk menampilkan isi direktori, Anda dapat menggunakan perintah ls atau dir. ls -la akan memberikan rincian lebih lanjut, termasuk izin akses file, ukuran dan tanggal modifikasi.
$ pwd
/home/Chetabahana
$ ls /
bin Cygwin.bat Cygwin.ico Cygwin-Terminal.ico dev etc home lib sbin tmp usr var
$ export CYGWIN="winsymlinks:native"
$ ls -la /
lrwxrwxrwx 1 Chetabahana None 18 Apr 14 14:41 / -> /cygdrive/d/Cygwin
$ ls -la /cygdrive/d/Cygwin
total 421
drwxrwx---+ 1 Chetabahana None 0 Apr 16 11:55 .
drwxrwx---+ 1 SYSTEM SYSTEM 0 Apr 16 10:43 ..
drwxr-xr-x+ 1 Chetabahana None 0 Apr 14 23:48 bin
-rwxr-xr-x 1 Chetabahana Administrators 57 Apr 14 14:54 Cygwin.bat
-rw-r--r-- 1 Chetabahana Administrators 157097 Apr 14 14:54 Cygwin.ico
-rw-r--r-- 1 Chetabahana Administrators 53342 Apr 14 14:54 Cygwin-Terminal.ico
drwxr-xr-x+ 1 Chetabahana None 0 Apr 14 14:49 dev
drwxrwx---+ 1 Chetabahana None 0 Apr 14 23:49 etc
drwxrwxrwt+ 1 Chetabahana None 0 Apr 14 14:57 home
drwxr-xr-x+ 1 Chetabahana None 0 Apr 14 23:48 lib
drwxr-xr-x+ 1 Chetabahana None 0 Apr 14 14:48 sbin
drwxrwxrwt+ 1 Chetabahana None 0 Apr 16 10:36 tmp
drwxr-xr-x+ 1 Chetabahana None 0 Apr 14 21:30 usr
drwxrwx---+ 1 Chetabahana None 0 Apr 14 14:48 var
Perhatikan bahwa drive di Cygwin diperlakukan sebagai direktori, dan penggunaan garis miring di tempat backslash DOS (d:/Cygwin bukannya d:\Cygwin).
/cygdrive/. Contoh: DOS C: dapat diakses di Cygwin dengan /cygdrive/c, atau D: /cygdrive/d, dll.
$ ls /cygdrive
c d
$ ls /cygdrive/c
'$Recycle.Bin' 'Documents and Settings' Recovery autoexec.bat
grldr 'System Volume Information' Boot hiberfil.sys
bootmgr Users BOOTSECT.BAK pagefile.sys
Windows config.sys 'Program Files' winx.ld
cygwin ProgramData
$ ls -la /cygdrive/c | grep "\->"
lrwxrwxrwx 1 Chetabahana None cygwin -> /cygdrive/d/Cygwin
lrwxrwxrwx 1 SYSTEM SYSTEM Documents and Settings -> /cygdrive/c/Users
$ ls -la /cygdrive/c/Users
drwxr-xr-x+ 1 Administrators .
d---r-x---+ 1 NT SERVICE+TrustedInstaller ..
lrwxrwxrwx 1 SYSTEM 'All Users' -> /cygdrive/c/ProgramData
drwxrwx---+ 1 Chetabahana Chetabahana
drwxr-xr-x+ 1 Administrators Default
lrwxrwxrwx 1 SYSTEM 'Default User' -> /cygdrive/c/Users/Default
-rwxr-xr-x+ 1 SYSTEM desktop.ini
drwxrwxrwx+ 1 Administrators Public
drwxrwx---+ 1 SYSTEM temp
drwxrwx---+ 1 SYSTEM UpdatusUser
$ ls /cygdrive/d
'$RECYCLE.BIN' Cygwin Docker GitHub Google 'System Volume Information'
$ ls -la /cygdrive/c/Users/Chetabahana | grep "\->"
lrwxrwxrwx 1 Chetabahana None .docker -> /cygdrive/d/Docker
$ mkdir /cygdrive/c/Users/Chetabahana/Project
$ ln -s -v /cygdrive/d/GitHub /cygdrive/c/Users/Chetabahana/Project/GitHub
$ ln -s -v /cygdrive/d/Google /cygdrive/c/Users/Chetabahana/Project/Google
$ ls -l /cygdrive/c/Users/Chetabahana/Project
lrwxrwxrwx 1 Chetabahana None 18 Apr 14 14:23 GitHub -> /cygdrive/d/GitHub
lrwxrwxrwx 1 Chetabahana None 18 Apr 14 14:23 Google -> /cygdrive/d/Google$ ls /cygdrive/d/GitHub
Chetabahana MarketLeader
$ ls /cygdrive/d/GitHub/Chetabahana
backend default drupal joomla market portfolio wordpress
$ ls /cygdrive/c/Users/Chetabahana/Project/GitHub/Chetabahana
backend default drupal joomla market portfolio wordpress
$ ls /cygdrive/d/GitHub/MarketLeader
Google-AdWords-API Google-Sites-API Google-Trends-API Google-Content-API
Toko-Chetabahana Tutorial-Buka-Toko
$ ls /cygdrive/c/Users/Chetabahana/Project/GitHub/MarketLeader
Google-AdWords-API Google-Sites-API Google-Trends-API Google-Content-API
Toko-Chetabahana Tutorial-Buka-Toko$ ls /cygdrive/d/Google
GAE GCE GCR GCS
$ ls /cygdrive/c/Users/Chetabahana/Project/Google
GAE GCE GCR GCS
$ ls /cygdrive/c/Users/Chetabahana/Project/Google/GAE
Java Node Php Python
$ ls /cygdrive/c/Users/Chetabahana/Project/Google/GAE/Php
drupal joomla wordpress
$ ls /cygdrive/c/Users/Chetabahana/Project/Google/GAE/Python
default market portfolio
$ ls /cygdrive/c/Users/Chetabahana/Project/Google/GCE
Shell
$ ls /cygdrive/c/Users/Chetabahana/Project/Google/GCE/Shell
backend
$ cd /cygdrive/c/Users/Chetabahana/Project/Google/GCE/Shell/backend
$ ln -s -v ~/.ssh .ssh
'.ssh' -> '/home/Chetabahana/.ssh'$ ls /cygdrive/c/Users/Chetabahana/Project/GitHub/MarketLeader/Toko-Chetabahana
_config.yml docs LICENSE README.md virtual-env
$ cd /cygdrive/c/Users/Chetabahana/Project/Google/GAE/Python/market
$ ln -s -v /cygdrive/d/GitHub/MarketLeader/Toko-Chetabahana/virtual-env virtual-env
'virtual-env' -> '/cygdrive/d/GitHub/MarketLeader/Toko-Chetabahana/virtual-env'
$ ls /cygdrive/c/Users/Chetabahana/Project/Google/GAE/Python/market/virtual-env
bin get-pip.py include lib pyvenv.cfg requirements.txt share
$ ls /cygdrive/c/Users/Chetabahana/Project/Google/GAE/Python/market/virtual-env/bin
__pycache__ easy_install-3.7 pybabel rst2man.py
activate faker pycodestyle rst2odt.py
activate.csh gprof2dot pygmentize rst2odt_prepstyles.py
activate.fish gunicorn pyjwt rst2pseudoxml.py
autopep8 gunicorn_paster python rst2s5.py
cairosvg isympy python3 rst2xetex.py
celery jp.py raven rst2xml.py
chardetect markdown_py rst2html.py rstpep2html.py
django-admin pip rst2html4.py sqlformat
django-admin.py pip3 rst2html5.py uwsgi.exe
easy_install pip3.7 rst2latex.py weasyprint
$ ls /cygdrive/c/Users/Chetabahana/Project/Google/GAE/Python/market
_common.env LICENSE scripts
apollo.config.js locale setup.cfg
app.json manage.py static
app.yaml media templates
CHANGELOG.md package.json tests
cloudbuild.yaml package-lock.json tox.ini
common.env Procfile tsconfig.json
deployment README.md tslint.json
docker-compose.override.yml requirements.txt virtual-env
docker-compose.yml requirements_dev.txt webpack.config.js
Dockerfile runtime.txt webpack.d.ts
docs saleor webpack-bundle.json
$ ln -s -v /cygdrive/c/Users/Chetabahana/Project/Google/GAE/Python/market /srv
'/srv' -> '/cygdrive/c/Users/Chetabahana/Project/Google/GAE/Python/market'
$ ls /
bin dev home sbin tmp var etc lib srv usr
$ ls -la / | grep "\->"
lrwxrwxrwx 1 Chetabahana None 18 Apr 14 14:41 / -> /cygdrive/d/Cygwin
$ ls /srv
_common.env LICENSE scripts
apollo.config.js locale setup.cfg
app.json manage.py static
app.yaml media templates
CHANGELOG.md package.json tests
cloudbuild.yaml package-lock.json tox.ini
common.env Procfile tsconfig.json
deployment README.md tslint.json
docker-compose.override.yml requirements.txt virtual-env
docker-compose.yml requirements_dev.txt webpack.config.js
Dockerfile runtime.txt webpack.d.ts
docs saleor webpack-bundle.json
$ cd /srv/virtual-env/bin
$ ln -s /usr/bin/python python
$ ln -s python python3
$ ls -l /srv/virtual-env/bin/python*
lrwxrwxrwx 1 /srv/virtual-env/bin/python -> /usr/bin/python
lrwxrwxrwx 1 /srv/virtual-env/bin/python3 -> python
$ ls -l /usr/bin/python*
lrwxrwxrwx 1 /usr/bin/python -> /usr/bin/python3.7
lrwxrwxrwx 1 /usr/bin/python2 -> python2.7.exe
-rwxr-xr-x 1 /usr/bin/python2.7.exe
lrwxrwxrwx 1 /usr/bin/python3 -> python3.6m.exe
lrwxrwxrwx 1 /usr/bin/python3.6 -> python3.6m.exe
-rwxr-xr-x 1 /usr/bin/python3.6m.exe
lrwxrwxrwx 1 /usr/bin/python3.7 -> python3.7m.exe
lrwxrwxrwx 1 /usr/bin/python3.7-config -> python3.7m-config
-rwxr-xr-x 1 /usr/bin/python3.7m.exe
-rwxr-xr-x 1 /usr/bin/python3.7m-config
Secara lengkap skema projek akan mengikuti bagan berikut:
Untuk menuju ke pola ini maka kita perlu siapkan sarananya. Di sesi ini selanjutnya kita bahas secara detil untuk tema Buka Toko sedangkan tema lain akan kita bahas pada sesi² berikutnya.
This documentation is mapped under Mapping and licensed under Apache License, Version 2.0.
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
http://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.
Copyright (c) 2018-2020 Chetabahana Project
You are on the wiki of our repo
- Site
- Main
- Project
- Pratinjau
- Pola Dasar
- Bagan Kerja
- Field Tutorial
- Cloud Site API
- Google Ads API
- Cloud Tasks API
- Google Trends API
- Basis Implementasi
- Beranda
- Perangkat
- Pasang Aplikasi
- Penyetelan Aplikasi
- Menyiapkan Frontend
- Menjalankan Backend API
- Menjalankan Toko



