Scaling based on CPU Bitnami prestashop single VM

188 views
Skip to first unread message

Juan Domingo Gálvez Cobo

unread,
May 14, 2016, 6:01:02 AM5/14/16
to gce-discussion
Hello, I'm new with google cloud compute engine.

- I have a f1-micro VM with prestashop bitnami launchpad: https://cloud.google.com/launcher/solution/bitnami-launchpad/prestashop up and running
- I want to configure it with scaling based on cpu.

-I read that I have to create a group of instances (for example: 6 new instances) in the Instance group page and select:

Autoscaling --> On.
Autoscale based on --> CPU usage
Target CPU usage --> % CPU usage i want to use

But I don't how to use my f1-micro VM instance with prestashop to do this.

Anyone knows how to configure it? 
Do I have to copy in some way the data to the new group of instances? 
Do i have to use the same hard disk?

Thank you in advance.

Kamran (Google Cloud Support)

unread,
May 14, 2016, 2:30:50 PM5/14/16
to gce-dis...@googlegroups.com

Hello Juan,


The autoscaling capabilities of GCE allow you to automatically add or remove instances from a managed instance group based on increases or decreases in load. However, in order to use this feature your VMs need to be stateless. This means the applications running on your VMs save the permanent data outside of the VMs.


Bitnami PrestaShop consists of Debian OS, and OpenSSL, MySQL, Apache, PHP, Varnish, phpMyAdmin, PrestaShop packages.


The MySQL component of the PrestaShop stack is a database management system which stores permanent data locally. This makes your VM stateful and therefore ineligible to be used as an instance template for a managed instances group.


That being said, to be able to use PrestaShop stack in a managed instances group, you will need to migrate, stateful components like MySQL databases from your VMs to an unmanaged VM instance(s). Another option would be configuring your applications to use Google Cloud SQL instead of the local MySQL. You will also need to do some research to find out if any other stack’s components write permanent data on the VM’s local disk(s) which may make it stateful.


After making your VM a stateless one, you can follow the instructions described in this article to create an instance template from the VM and set up a managed instance group with the autoscaling capabilities.


I hope this answers your question.


Sincerely,

Juan Domingo Gálvez Cobo

unread,
May 15, 2016, 4:59:36 AM5/15/16
to gce-dis...@googlegroups.com
Ok, thank you very much. I'll try it.


El sábado, 14 de mayo de 2016, 20:30:50 (UTC+2), Kamran (Google Cloud Support) escribió:

Hello Juan,


The autoscaling capabilities of GCE allow you to automatically add or remove instances from a managed instance group based on increases or decreases in load. However, in order to use this feature your VMs need to be stateless. That means that applications running on your VMs save the permanent data outside of the VMs.


Bitnami PrestaShop consists of Debian OS, and OpenSSL, MySQL, Apache, PHP, Varnish, phpMyAdmin, PrestaShop packages.


The MySQL component of the PrestaShop stack is a database management system which stores permanent data locally. This makes your VM stateful and therefore ineligible to be used as an instance template for a managed instances group.


That being said, to be able to use PrestaShop stack in a managed instances group, you will need to migrate, stateful components like MySQL databases from your VMs to an unmanaged VM instance(s). Another option would be configuring your applications to use Google Cloud SQL instead of the local MySQL. You will also need to do some research to find out if any other stack’s components write permanent data on the VM’s local disk(s) which may make it stateful.


After making your VM a stateless one, you can follow the instructions described in this article to create an instance template from the VM and set up a managed instance group with the autoscaling capabilities.


I hope this answers your question.


Sincerely,
Message has been deleted

Martin Garcia

unread,
Apr 6, 2017, 5:35:51 PM4/6/17
to gce-discussion, juang...@mijusbox.com
Hello Juan

I'm having the same problem. I wonder if you succeeded on the scaling of prestashop. 

Regards, 
M
Reply all
Reply to author
Forward
0 new messages