Installing Openshift Origin on Digitalocean Droplet

Lately I wondered why my websites as well as the backend for my app (also available for Android) were so slow that the app was hardly usable. By wondering, I mean, I did’t get it, what’s happened in the underlying service, Openshift Online Starter v3. Actually I knew the cause, which was made by myself though. 😀

I was experimenting with SSL setup in the routes settings of Openshift project configuration page. There are 3 options for the secure route, Edge Termination, Passthrough Termination, Re-encrypt Termination, which are described on the official documentation page here. I have played with all those options, and the results were very very slow download speed, or maybe just the TTL. I had secure route to be activated for one of my subdomain need SSL, which was then to be paired with Full SSL option in CloudFlare. Yeah, I make use of it for the DNS server anyway. And as for SSL certificates for the Openshift route, I obtained it from Cloudflare’s. So, it’s obvious that there was a communication issue between them, particularly at SSL handshake session. Although, according to a comment for my question on Stackoverflow, he said that it’s a known issue on Openshift itself.

So, rather than disabling SSL for the sake of website speed, I was planning to move the data to traditional hosting, or VPS. I tended to choose the latter, as I have enough credit in Digitalocean right now. But, as I quite lazy to setup production server on a bare VPS, and my project was customized for Openshift, I’d rather searching for how to setup Openshift Origin on DigitalOcean. In the first run, I set up a Fedora Atomic droplet, that actually I didn’t understand what it was. 😀 Thanks to buddies on @FedoraID telegram group, I quite enlightened about it now. 🙂

Eventually, I found a thorough tutorial how to setup Openshift Origin on VPS. So, here I just want to share some screenshots of my success on setting it up. 🙂 FYI, it only took 2 hours for me to play around with it on Digitalocean droplet, as I realized that a 512 MB droplet would not sufficient to run Openshift service in it, as it encountered sudden stop so often due to the lack of memory.

Screenshot_20171102_005657Screenshot_20171102_015009

Screenshot_20171102_020825
Low resource (memory) on a half gig droplet

 

Advertisements

This is ephemeral world, after all

Hi my blog audience, it’s been a long time I didn’t write here, did I? Actually there was nothing weird nor wrong here. I just quite discouraged to write posts in English then. For I have decided to fill this WordPress blog with English posts only. And in fact, I am still learning English as well, so you may find some glitches in this post and few others earlier.

A few days ago, more precisely on August 25, OpenShift by RedHat emailed me and many other developers around the world. They announced something tragic news, that they would suspend their valuable OpenShift online v.2. And it’s going to happen just in a month ahead (September 30, 2017). It’s kind of surprising and overwhelming, as we have to migrate our production apps that run on OpenShift into the newer generation of it that we might haven’t given it try yet. Continue reading This is ephemeral world, after all

Kubuntu: Connect to OpenVPN Server with Network Manager Applet

Okay, you’ve successfully set up a new OpenVPN server on your VPS. What’s next?

Here, i post a brief tutorial how to connect my Kubuntu desktop to OpenVPN server with the default connection manager. Previously, I have set up OpenVPN server in just one click. And after the server is up, it automagically created several OpenVPN config files for the client. I fetched them with scp.

scp root@xxx.xxx.xxx.xxx:/root/{ca.crt,client.ovpn,client1.crt,client1.key} /home/user/Projects/web/VPN

openvpn config files
OpenVPN onfig files

Before this, I didn’t have any idea how to connect to VPN with the OVPN file. But actually, it’s so easy to do that with Kubuntu network manager plasma widget.

  1. Click on the network manager widget, then click the right corner gear.
Kubuntu plasma network manager
Kubuntu plasma network manager
  1. In the window appears, click menu File, choose Import VPN. Select the OVPN file we got previously.
  1. Edit the connection, add the rest of files. Make sure that the connection type is X.509 Certificates
Add the rest of config files
Add the rest of config files
  1. Connect it.
OpenVPN connected
OpenVPN connected

Set Up an OpenVPN Server Instantly with DigitalOcean Droplet User Data

OpenVPN is a full-featured open source Secure Socket Layer (SSL) VPN solution that accommodates a wide range of configurations. In this tutorial, we’ll set up an OpenVPN server on a Droplet and then configure access to it from Windows, OS X, iOS and Android. This tutorial will keep the installation and configuration steps as simple as possible for these setups.

Note: OpenVPN can be installed automatically on your Droplet by adding this script to its User Data when launching it. Check out this tutorial to learn more about Droplet User Data.

Setup VPS instance

First thing first, you need to create a Digitalocean account by clicking this link. Complete the registration by providing your payment method, either with credit card or Paypal account.

After you see the green button “Create Droplet”, click on it to proceed to the next step. Type in your preferred Droplet hostname, whatever you want. Then select size of droplet, in this case you’ll choose the pricing which fit you. In my case, I choose the lowest one, $5 /month droplet with 20GB storage and 512MB RAM. It’s kind of enough for me.

Then select the region you want the droplet located. This time, you may want to choose the nearest region from your country. Then select Image, it is the operating system for your VPS. Choose the Ubuntu 14.04 x64.

And finally, tick the “User Data” in the Available Settings section. When the text input appears, enter the script for creating the VPN server. Get the script by referring to the link at the bottom of this post. Find the “Note” section like above quotation. There you’ll find the link to the script. Just copy and paste it.

DO User data
DigitalOcean User data. This is just illustration, and that’s not the script you want.

And in the last section, you may skip that “Add SSH Keys”. Then you will receive the password required to login to the VPS in your email inbox. Check it later.

via How To Set Up an OpenVPN Server on Ubuntu 14.04 | DigitalOcean.

Avoiding ‘Hidden’ Bills of AWS Free Tier

I’ve got an AWS free tier account for a year recently. The free should mean free of charge, but even before a month, suddenly I got an unpaid bill notification from Amazon.

AWS Free Tier charge
AWS Free Tier bill

By looking at above image, I saw that the bill comes from EC2 service, which I use it for setting up a VPS. After deep looking at the bill information, I got the culprit. It was the Elastic IP address that got me to pay the charge.

Briefly, I requested a static IP address to be associated to my VPS. I didn’t aware that the IP has to be bound to any instances. Once it is disassociated, we will be charged at per-hour rate. And unfortunately, I disassociated it for a few hours by unknown reason. As the result, I had to pay Amazon for $0.36.

So, instead of disassociate the ellastic IP address, we just have to release it. Perhaps it will be useful for other people.

How To Set Up Automatic Deployment with Git with a VPS | DigitalOcean

Introduction

For an introduction to Git and how to install, please refer to the introduction tutorial.

This article will teach you how to use Git when you want to deploy your application. While there are many ways to use Git to deploy our application,

melalui How To Set Up Automatic Deployment with Git with a VPS | DigitalOcean.