Konfigurasi client OpenShift di blankOn9
Openshift adalah cloud computing yang di kelola oleh redhat dengan mode PAAS (Plafrom As s Service).
Openshift menyediakan Cloud Hosting gratis dengan memberikan 3 gear yang bisa anda gunakan untuk membuat 3 cloud hosting.
untuk lebih lengkapnya bisa baca di sini https://en.wikipedia.org/wiki/OpenShift, oh iya sebelum instal tools clientnya ada baiknya daftar dulu dimari gan https://www.openshift.com/app/account/new
jika sudah daftar lanjut, klik menus aplication, sebelumnya isi namespace dulu (You need to set a namespace before you can create applications)
setelah klik php5.4 lalu isi Public Url –> klik Create Aplication tunggu aja sampe 9 menit kalo ga salah, lumayan bisa bikin kopi dulu lah gan 🙂
setelah itu kita bisa milih databasenya, MonggoDb 2.4, mysql 5.5, PostgreSQL 9.2 nah ane milih databasenya mysql aja deh 😛
Do you want to add the MySQL 5.5 cartridge to your application? pilih Add Catridge
Selanjutnya install Openshift Client Tools atau RHC
#sudo apt-get install ruby-full git-core
#sudo gem install rhc
setelah install ruby,git dan rhc sekarang waktunya konfig rhc di laptop anda 🙂
#rhc setup
If you have your own OpenShift server, you can specify it now. Just hit enter to use the server for OpenShift Online: openshift.redhat.com.
Enter the server hostname: |openshift.redhat.com| enter
You can add more servers later using ‘rhc server’.
Login to openshift.redhat.com: useropenshift@gmail.com
Password: **********
OpenShift can create and store a token on disk which allows to you to access the server without using your password. The key is stored in your home directory and
should be kept secret. You can delete the key at any time by running ‘rhc logout’.
Generate a token now? (yes|no) yes
Generating an authorization token for this client … lasts about 1 month
Saving configuration to /home/arsitek/.openshift/express.conf … done
No SSH keys were found. We will generate a pair of keys for you.
Created: /home/arsitek/.ssh/id_rsa.pub
Your public SSH key must be uploaded to the OpenShift server to access code. Upload now? (yes|no) yes
Since you do not have any keys associated with your OpenShift account, your new key will be uploaded as the ‘default’ key.
Uploading key ‘default’ … done
Checking for git … found git version 1.9.0.rc3
Checking common problems .. done
Checking for a domain … jenong
Checking for applications … found 2
cipa http://cipa-jenong.rhcloud.com/
cipa2 http://cipa2-jenong.rhcloud.com/
You are using 2 of 3 total gears
The following gear sizes are available to you: small
Kalau mau remote cloud hosting di openshift, anda cukup menggunakan perintah berikut melalui terminal.
#rhc ssh namaApps contohnya seperti ini #rhc ssh cipa2
[cipa2-jenong.rhcloud.com 5637133b89f5cf0d9c0xxxxx]\> lsapp-deployments app-root git mysql php
#rhc apps
cipa2 @ http://cipa2-jenong.rhcloud.com/ (uuid: 5637133b89f5cf0d9c00xxxx)
————————————————————————-
Domain: jenong
Created: 2:39 PM
Gears: 1 (defaults to small)
Git URL: ssh://5637133b89f5cf0d9c00xxxx@cipa2-jenong.rhcloud.com/~/git/cipa2.git/
SSH: 5637133b89f5cf0d9c00xxxx@cipa2-jenong.rhcloud.com
Deployment: auto (on git push)
php-5.4 (PHP 5.4)
—————–
Gears: Located with mysql-5.5
mysql-5.5 (MySQL 5.5)
———————
Gears: Located with php-5.4
Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/
Database Name: cipa2xx
Password: xxxxxxxx
Username: adminxxxxx
#git clone ssh://5637133b89f5cf0d9c0xxxx@cipa2-jenong.rhcloud.com/~/git/cipa2.git/
#cd cipa2/php
#vi index.php –> edit bagian yg dibawah ini
<h1>Welcome to your PHP application on OpenShift EDIT from cipa2</h1>
#git config –global user.email “useropenshift@gmail.com”
#git config –global user.name “cipa2”
#git commit -a -m ‘pesan perubahan’
#git push
warning: push.default is unset; its implicit value is changing in
Git 2.0 from ‘matching’ to ‘simple’. To squelch this message
and maintain the current behavior after the default changes, use:
git config –global push.default matching
To squelch this message and adopt the new behavior now, use:
git config –global push.default simple
When push.default is set to ‘matching’, git will push local branches
to the remote branches that already exist with the same name.
In Git 2.0, Git will default to the more conservative ‘simple’
behavior, which only pushes the current branch to the corresponding
remote branch that ‘git pull’ uses to update the current branch.
See ‘git help config’ and search for ‘push.default’ for further information.
(the ‘simple’ mode was introduced in Git 1.7.11. Use the similar mode
‘current’ instead of ‘simple’ if you sometimes use older versions of Git)
Counting objects: 5, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 353 bytes | 0 bytes/s, done.
Total 3 (delta 1), reused 0 (delta 0)
remote: Stopping PHP 5.4 cartridge (Apache+mod_php)
remote: Waiting for stop to finish
remote: Waiting for stop to finish
remote: Stopping MySQL 5.5 cartridge
remote: Building git ref ‘master’, commit 235fd18
remote: Checking .openshift/pear.txt for PEAR dependency…
remote: Preparing build for deployment
remote: Deployment id is e16cbb40
remote: Activating deployment
remote: Starting MySQL 5.5 cartridge
remote: Starting PHP 5.4 cartridge (Apache+mod_php)
remote: Application directory “/” selected as DocumentRoot
remote: ————————-
remote: Git Post-Receive Result: success
remote: Activation status: success
remote: Deployment completed with status: success
To ssh://5637133b89f5cf0d9c0xxxxx@cipa2-jenong.rhcloud.com/~/git/cipa2.git/
a8aa342..235fd18 master -> master
nah liat lah perubahannya di http://cipa2-jenong.rhcloud.com/
#selamat mencoba 🙂
nb: sebenarnya keuntungan pakai PaaS ini mempermudah seorang developer, jadi tidak harus pusing siapkan paltformnya, contoh : ga usah ribet konfigurasi tomcat atau webservernya dan databasenya, kekurangannya : pekerjaan support macem ane ini ga butuhkan lagi 😛
Latest posts by dedyeuy (see all)
- Konfigurasi client OpenShift di blankOn9 - 2 Nov 2015
- Install steam – Dota2 di BlankOn9 - 19 Okt 2015
- Apa itu liferay dan bagaimana konfigurasinya part 3 - 15 Okt 2015