Cara Upload File Ke OpenShift Red Hat Cloud
Untuk melakukan upload file ke OpenShift RedHat Cloud tidak menggunakan service FTP seperti web hosting pada umumnya tetapi harus menggunakan Git. Yang sudah sering menggunakan Git akan lebih mudah. Selain Git kita juga membutuhkan Ruby untuk instalasi rhc (OpenShift client tools). Saya telah melakukan instalasi untuk distro Linux Ubuntu, untuk instalasi pada sistem operasi lainnya baca di developers.openshift.com.
Install Git
1 | sudo apt-get install git-core |
Install Ruby
Ruby diinstall pada virtual environment.
1 | sudo apt-get install curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev |
Download rbenv dan Ruby via Git
1 2 3 4 5 6 7 8 | cd git clone git://github.com/sstephenson/rbenv.git .rbenv echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile echo 'eval "$(rbenv init -)"' >> ~/.bash_profile git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bash_profile source ~/.bash_profile |
Jadi setiap ingin menjalankan rbenv ketik
1 | source ~/.bash_profile |
Jalankan perintah install Ruby 2.2.2 pada rbenv
1 2 | rbenv install -v 2.2.2 rbenv global 2.2.2 |
Cek instalasi Ruby
1 | ruby -v |
Install rhc
1 | gem install rhc |
Setting rhc
1 | rhc setup |
1 2 | Login to openshift.redhat.com: mail@email.com Password: password |
Selanjutnya akan dibuatkan key
1 2 3 | 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 day |
Lokasi key
1 2 | No SSH keys were found. We will generate a pair of keys for you. Created: /home/user/.ssh/id_rsa.pub |
Upload key
1 2 3 4 5 6 | 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' from /home/user/.ssh/id_rsa.pub ... done |
Upload/Download Source Code
Clone/download source code dari repository aplikasi OpenShift. Alamat repository berada pada halaman setting aplikasi yang sudah terinstall pada OpenShift.
1 |
Buka folder hasil clone, lakukan perubahan. Setelah perubahan selesai lanjut ke proses upload/push ke server.
1 2 3 | git add -A git commit -m "update source code" git push |
selamat mencoba 🙂
referensi:
developers.openshift.com
digitalocean.com
mas musa boleh minta tolong buatkan tutorial migrasi vm dari RHEV ke ZSTACK???
belum pernah pakai itu om, malahan baru dengar namanya. coba cek di dokumentasi resminya apakah bisa migrasi (export/import) vm.