Jump to content
modifiedcontent

Has anyone installed Processwire on Amazon EC2?

Recommended Posts

11 hours ago, LostKobrakai said:

not as plain replacement for a single VPS elsewhere (which really has no great benefit to be run on amazon or not)

I've assumed that I can use Amazon in place of a traditional VPS, such as Servint (who I like), for a significant saving. Maybe I'm wrong in that assumption..?

To test that assumption and learn I've been working with Amazon EC2 to see if I can teach myself how to host multiple sites. So far so good.

  • Like 2

Share this post


Link to post
Share on other sites
3 hours ago, alan said:

To test that assumption and learn I've been working with Amazon EC2 to see if I can teach myself how to host multiple sites. So far so good.

A write-up/tutorial would be much appreciated when you're ready! :)

  • Like 2

Share this post


Link to post
Share on other sites
10 hours ago, alan said:

I've assumed that I can use Amazon in place of a traditional VPS

You absolutely can, but that's not why EC2 is so powerful and it's by no means suddenly more scaleable than a VPS elsewhere. That's what people are often missing. The scaleablity praise for amazon comes from things like autoscaling, which dynamically adds new EC2 instances or destroys unused ones, which has the same problems and hurdles you've had on heroku as well (except on aws you have to do the setup on your own as well). And for the complexity of amazons security management and other things involved in AWS it's probably better for unexperienced people to just go with digitalocean/linode for single instance VPS, because the savings in money on AWS are probably counteracted by the time saved not setting up EC2, but simple clicking a few buttons somewhere else.

  • Like 3

Share this post


Link to post
Share on other sites
4 hours ago, LostKobrakai said:

You absolutely can, but that's not why EC2 is so powerful and it's by no means suddenly more scaleable than a VPS elsewhere. That's what people are often missing. The scaleablity praise for amazon comes from things like autoscaling, which dynamically adds new EC2 instances or destroys unused ones, which has the same problems and hurdles you've had on heroku as well (except on aws you have to do the setup on your own as well). And for the complexity of amazons security management and other things involved in AWS it's probably better for unexperienced people to just go with digitalocean/linode for single instance VPS, because the savings in money on AWS are probably counteracted by the time saved not setting up EC2, but simple clicking a few buttons somewhere else.

I agree with all that you are saying, however I also think that people want more choices.  It may be complex setting things up, but what does it hurt to find out how to make it work?  I know I am interested in learning how to make the different AWS services work with ProcessWIre.

  • Like 1

Share this post


Link to post
Share on other sites
14 hours ago, Robin S said:

A write-up/tutorial would be much appreciated when you're ready! :)

I plan to ^_^

I am not there yet, but I have PW working and am just hunting down a bug, if that proves trivial and other tests work OK then I will certainly write it up.

Thanks @LostKobrakai for your comments, you are clearly way ahead of me in this department—it's very helpful to hear from someone with your knowledge. Re:

7 hours ago, LostKobrakai said:

with digitalocean/linode for single instance VPS

I did look at both of these a little, but it seemed they were principally aimed at people who routinely take bare Linux and get LAMP running, I may be wrong. But based on that assumption and guessing the docs on Amazon were perhaps going to encompass me (someone who'd heard of `yum` but hardly ever used it) I returned to Amazon.

I tried Amazon Lightsail but fell off the process when it looked like I had to use the bitnami LAMP bundle (see below), or use Amazon tuts written for EC2, not Lightsail, and using those with Lightsail did not work and I was on too thin knowledge-ice to keep going. So I simply decided to try EC2 + the Amazon tuts written for getting EC2 LAMP, and so far, so good.

Re:

3 hours ago, cstevensjr said:

but that's not why EC2 is so powerful and it's by no means suddenly more scaleable than a VPS elsewhere

Thanks for noting this, I did understand that I was almost 'misusing' EC2 by looking to simply make a tiny VPS in the cloud and almost certainly not using any of the amazing features AWS offers, but I am not coming to AWS for the reasons most would and it's helpful to note that as I don't want to mislead :).  I'm coming to AWS from a weird angle, where I want to make a solid, modest cloud VPS equivalent, where I can host 10 sites or so, needing no elastic redundancy or power-up capabilities BUT wanting to take advantage of paying for use (low) rather than a flat monthly fee that I pay a traditional hoster, where my low consumption of resources is not reflected in my fixed monthly bill. I should have stated that earlier ;)

Aside

I was put off when looking at Amazon + bitnami by reviews of the bitnami LAMP bundle. Conversely I have so far been left confident about the Amazon Linux distro and the tutorial for getting LAMP up. It's not been quite as simple as following a tutorial, but I've not had to search too far to keep proceeding and I feel less intimidated logging into AWS than I used to, so that's one take away at least ;)

One of the review that made me stop looking at Amazon + bitnami:

Quote

 

This image is really awful! 
1) All applications are installed in /opt/bitnami instead of their default locations. If an expert, like me, tries to work with it, he has to learn all configs from scretch. 
2) All applications are highly coupled. In order to change mysql data location I had to edit 15!!! files. 
3) It's not possible to restart single application, as all of them are installed in a bundle. 
4) There's no even restart for the bundle service. 

The result: 2 work hours lost + moved to other image 

Probably it was the worst experience I ever had with preinstalled images.

Source

 

I was also concerned that I may end up paying bitnami for LAMP (per month?) plus Amazon and yet one of my motivations for this exercise was trying to lower my VPS costs (which due to currency changes is about 50% up on what I used to pay).

  • Like 1

Share this post


Link to post
Share on other sites

Over six months into the project and I have, touch wood, had a great experience moving from traditional hosting to Amazon EC2 for hosting around 10 sites.

I still plan to write this up, but just wanted to share one little tip I found, probably something any DBA would instantly know but that I had to learn the hard way.

I modified a script to export all databases and set it via cron to run at midnight. This worked AOK for 6 months, then I found service `httpd` was down one morning. The reason was simply that the day before I had added one more database to my EC2 and that had tipped the backup process over the brink as far as server load went. Each db was backed up, one after the other, and cumulatively this added to too much intense load.

The solution I used was simply to add a 5min pause in the loop in the backup script, between databases. Fixed.

Hope this helps someone 👍

  • Like 2

Share this post


Link to post
Share on other sites
On 1/10/2018 at 2:36 PM, alan said:

Over six months into the project and I have, touch wood, had a great experience moving from traditional hosting to Amazon EC2 for hosting around 10 sites.

Sounds like a useful tutorial. Looking forward to it.

Share this post


Link to post
Share on other sites
On 1/10/2018 at 6:14 PM, gmclelland said:

I've had good success with running sites on a $10/month 2GB Linode VPS and https://serverpilot.io/ $10/month per server.

For regular users there are usually cheaper (and quite likely easier) options than AWS. For an example I'd like to host my sites on AWS – the tech is fun, and it'd be useful experience overall from a professional point of view – but the pricing is really high compared to regular VPS solutions. Not to mention that in most cases I really do just need a VPS, so I wouldn't benefit much from the full AWS stack 🙂

I'm currently hosting my sites on Linode as well ($20/month), but also experimenting with Contabo. So far so good, and the pricing is a quarter of what I've been paying for Linode – in fact even less, considering that my test server has more horsepower than the one at Linode.

  • Like 1

Share this post


Link to post
Share on other sites

@teppo, please could you post the output of lscpu from your vps and let us know which plan you are on. TQ.

Share this post


Link to post
Share on other sites
2 minutes ago, netcarver said:

@teppo, please could you post the output of lscpu from your vps and let us know which plan you are on. TQ.

The Linode VPS or the new Contabo one? 🙂

Share this post


Link to post
Share on other sites

Well, I was thinking of Contabo, but now you mention it, could you post both?

Share this post


Link to post
Share on other sites

Linode (Linode 4GB):

Spoiler

Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                2
On-line CPU(s) list:   0,1
Thread(s) per core:    1
Core(s) per socket:    1
Socket(s):             2
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 62
Model name:            Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz
Stepping:              4
CPU MHz:               2799.996
BogoMIPS:              5602.32
Hypervisor vendor:     KVM
Virtualization type:   full
L1d cache:             32K
L1i cache:             32K
L2 cache:              4096K
L3 cache:              16384K
NUMA node0 CPU(s):     0,1
Flags:                 fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon rep_good nopl xtopology cpuid tsc_known_freq pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm cpuid_fault pti ssbd ibrs ibpb fsgsbase tsc_adjust smep erms xsaveopt arat

Contabo (VPS S SSD):

Spoiler

Architecture:        x86_64
CPU op-mode(s):      32-bit, 64-bit
Byte Order:          Little Endian
CPU(s):              4
On-line CPU(s) list: 0-3
Thread(s) per core:  1
Core(s) per socket:  4
Socket(s):           1
NUMA node(s):        1
Vendor ID:           GenuineIntel
CPU family:          6
Model:               79
Model name:          Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz
Stepping:            1
CPU MHz:             2199.996
BogoMIPS:            4399.99
Hypervisor vendor:   KVM
Virtualization type: full
L1d cache:           32K
L1i cache:           32K
L2 cache:            4096K
L3 cache:            16384K
NUMA node0 CPU(s):   0-3
Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon rep_good nopl xtopology cpuid tsc_known_freq pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch cpuid_fault invpcid_single pti ssbd ibrs ibpb fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm rdseed adx smap xsaveopt arat umip

By the way, updated my previous message. Didn't remember that I took the tiniest SSD package, not the medium one – so the price is not half but actually around a quarter of the Linode VPS. Admittedly this may be a bit small for some needs, but it should run all my sites just fine 🙂

  • Like 1

Share this post


Link to post
Share on other sites

Nice, thank you Teppo. I'm pretty impressed by the Contabo VPS S SSD spec - especially the 8gigs of RAM - thanks for pointing to them.

Share this post


Link to post
Share on other sites

Sorry for the silence @teppo and @netcarver, life changes here have pulled me, for a while, away from PW dev :/ Not bad changes, but just taking my time so I cannot PW.

I pay $30 CDN per month to host around 10 sites on AWS. AWS HW is "On Demand Linux t2.micro" w/ 64GB SSD added.

Hope all is good w/ you guys here in PW-land : )

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By FrancisChung
      I was wondering if anyone has used AMPPS before? Seems like a decent MAMP replacement for Ubuntu, but I'm wondering if anyone can give their take or experiences on it.
       
    • By Lex Sanchez
      Hi everyone:
      I do not know if someone before using ProcessWire with AWS CloudFront, currently I have problems with the login, it does not work for any reason, when I check in the logs generated by ProcessWire, it only indicates This request was aborted because it appears to be forged. (in /wire/core/SessionCSRF.php line 190).
      I have allowed CloudFront to forward all headers, cookies and allow all methods (GET, POST, PUT).
      When I perform the same process from the ip server if it works or from the balancer.
    • By Karl_T
      Short question: is it possible that Processwire uses AWS S3 with s3fs as a remote file system(mount to asset folder)? Please advise anything that have to be take care of.
       
      Background:
      I am currently trying to make Processwire running inside AWS Beanstalk as I want to take advantages of the auto scaling function that my client wanted.
      I have found a discussion here: 
       
      By reading this and the link inside, I realize that to use the auto scaling I need to configure my web server to be stateless. So, I was looking for a method that can serve the purpose and then I found s3fs.  s3fs is a FUSE filesystem that allows you to mount an Amazon S3 bucket as a local filesystem, quoted from their github. I guess that mounting s3 bucket using s3fs to the asset folder should be the right thing to do.
      My site needs many image upload as it is an e-commerce site using padloper while the admin always using the local file system for images. I have thought of using modules like AmazonS3Cloudfront or FieldtypeFileS3. It seems like those modules are not support my use case. s3fs suits better and more simple. One of my concerns is that I am not sure can the URL of the images can be generated by the default API like $image->url correctly. 
      Before implementing this, I would like to ask the advise from anyone having implemented this with processwire as I am new to AWS. Is it possible? Any better alternatives?
      I think if not implementing auto scaling, it is also good to separate asset away in some cases, like reducing requests. Thank you for your reading. 
    • By fbg13
      FieldtypeFileS3
      https://github.com/f-b-g-m/FieldtypeFileS3
      The module extends the default FieldtypeFile and InputfieldFile modules and adds few extra methods.
      For the most part it behaves just like the default files modules, the biggest difference is how you get the file's url. Instead of using $page->fieldname->eq(0)->url you use $page->fieldname->eq(0)->s3url(). Files are not stored locally, they are deleted when the page is saved, if page saving is ommited the file remains on the local server until the page is saved. Another difference is the file size, the default module get the file size directly from the local file, while here it's stored in the database.
      There is an option to store the files locally, its intented in case one wants to stop using S3 and change back to local storage. What it does is it changes the s3url() method to serve files from local server instead of S3, disables uploading to S3 and disables local file deletion on page save. It does not tranfer files from S3 to local server, that can be done with the aws-cli's through the sync function. Files stored on S3 have the same structure as they would have on the local server.
      -------------------------------------------------------- --------------------------------------------------------
      Been struggling with this for quite a while, but i think i finally managed to make it work/behave the way i wanted.

      All feedback is welcome!
    • By hellomoto
      I have web hosting with the following .htaccess en root, to point it to a subdirectory "audino.us", wherein I have PW installed:
      RewriteEngine on RewriteCond %{HTTP_HOST} ^(www.)?something.com$ RewriteCond %{REQUEST_URI} !^/something.com/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /audino.us/$1 RewriteCond %{HTTP_HOST} ^(www.)?something.com$ RewriteRule ^(/)?$ something.com/index.php [L] RewriteCond %{HTTP_HOST} ^(www.)?something.com$ RewriteRule ^(/)?$ something.com [L] However when I go to audino.us/pw to access the admin, it becomes audino.us/audino.us/pw, and doesn't allow me to log in. How do I render the above to be recursive (?), i.e., to apply to all subordinate URLs? Is this to be done within the .htaccess in /audino.us, or in the root .htaccess above? Please help, I can't log in. Thanks much.
×
×
  • Create New...