Letsencrypt failed to renew

We were getting this letsencrypt renewal error on some Ubuntu 16.04 machines: OSError: Command /opt/eff.org/certbot/venv/bin/python2.7 – setuptools pkg_resources pip wheel failed with error code 1 Googling around, hit a few walls and finally found the solution, just need to run this in Ubuntu: export LC_ALL=”en_US.UTF-8″ export LC_CTYPE=”en_US.UTF-8″ Then continue on with the letsencrypt-auto script will do.

Ubuntu run out of space?

If you are getting ‘running out of space’ from your SSH console, but running a df -h shows that there are still plenty of free space left, then most likely inode is the one that run out. To confirm it, just run the command df -i from the result you should be able to a 100% in the mount point, for my case, its at the / partition, hence even tab won’t work. Strategy to solve it is simple, find out which directory use up the inode, and clear it up. `for i in /*; do echo $i; find $i |wc -l;…
aws

Scaling PHP CMS in AWS

There’s two major challenge when scaling a traditional CMS like Prestashop / Drupal: – Centralized session – File storage synchronized – Isolate Backend traffic to a single instance Let’s dive into details for each of them:   Centralized Session This is the easiest one to be taken care of, we will use Redis as the session backend, in AWS, the service is called ElasticCache: Create a new Redis node in AWS for starting, the micro size instance would be sufficient, just scale up later when traffic has grown Get the Endpoint name which should be something like: xxxxx.cedsrp.0001.apse1.cache.amazonaws.com:6379 Put the…

Laratalks #7 – All about A.I.

When comes to Artificial Intelligence, PHP programming language would never cross most programmer’s mind. So happen there is a PHP community called Laravens. They were founded around 6 months ago and organize monthly gathering called Laratalks. Each time they will invite guests from the industry to share cool knowledge among the community. July Laratalks’ topic was about A.I.. When this event details first pop up in my mailbox, I was so excited and signup straightaway. If you are a PHP developer, you would agree that it’s quite hard to find resources to develop AI in PHP. Even though it’s technically possible,…
Freedom-is-a-humans-natural-state-Alive-Again-Positive-Living-1024x684

Cloud – From Freedom to Jail, then back to Freedom

Freedom and flexibility are the main reasons people move to cloud, especially when there are tools like AWS RDBMS. They allow you to move to cloud and freed from your current on-premise vendor. With a BONUS! They also provide the tool that can help you to convert your database from one platform to another, FREEDOM!!! But without realizing it, we are merely switching from one vendor, to another. Meaning from an on-premise vendor to AWS or other cloud service provider. So what? It save costs! Switching to cloud provider will also switch your steady and paid-off budget to an unpredictable one. The…
Capture

Cloud – Who stolen my vCPU ?

As discussed in previous posts like public vs private cloud, you are getting vCPU for your public cloud servers, which is shared among other VMs in the same hypervisor. But how do you know if the hypervisor,  the physical hardware CPU itself is being overpopulated? What you need to do is: SSH to your server Run the top command: type top and press enter Take a look at the %st, yap, st stands for steal, the value should remain at 0%: It’s impossible to monitor it by human eyes, for us we add it to Zabbix monitoring by using the Zabbix-agent…
Public-vs-Private-Cloud

Public cloud and Private cloud

What’s the difference between Public and Private The only main difference between the two is simple: Using public cloud: Sharing the physical hardware with other user Using private cloud: All the VM is sitting on your dedicated servers, sharing resource with no others but your own VM A wider definition of ‘Cloud’ itself could simply be – Offsite infrastructure / Public vs. Private == Shared hosting vs. Dedicated hosting Due to the maturity of virtualisation technology, sharing the same piece of hardware is will no longer be a security concern. Unless you are going for compliance such as PCI-DSS, then…
AWS_Auto_Scaling_using_EC2_Management_Console

Scaling on the Cloud – How and When ? Part 2

We have discussed about the HOW of scaling in Part 1, let’s discuss on the WHEN of scaling. 1. Preemptive Scaling In other words, manual scaling. You are expecting an increase of traffic like: A crazy product promotion with huge discount on your e-commerce site Marketing spending to draw huge traffic, such as LINE events, Facebook campaigns, etc. Your guts telling you your site is going viral tomorrow What’s good is this manual thing? Well, there are a few: Run load tests on the manual preemptive infra, tell your marketing team, management team with prove that the infra is ready…
Capture

Scaling on the Cloud – How and When ? Part 1

Cloud computing has been known for its flexibility, it can scale anytime. I will scale it down when traffic is low to save my cost, with just a button. I will scale it up when traffic is high to handle my traffic spike, with just a button. But in real world implementation, is it really just with a button? There are two types of scaling: Vertically and Horizontally, of course there are a fresh and new way – Serverless cloud, we will get to that later, due to lack of application support, at least in local market.   Vertical Scaling…