top | item 7767161

Laravel Forge – PHP Platforms On Linode, DigitalOcean, AWS, Rackspace

216 points| uptown | 11 years ago |forge.laravel.com

78 comments

order
[+] fideloper|11 years ago|reply
Forge does the following for you:

  * API wrapper for many platforms
  * SSH-key only access (password access disabled)
  * Firewall management
  * CRON management
  * Sets up server dependencies and manages SSH keys
  * Handles private networking between servers and firewalls to open ports between them
  * Push to deploy (via Github)
  * Handles spinning up more queue workers (beanstalkd + supervisord) by clicking a button
  * Allows you to enter in "recipes" to run scripts (bash, php, others as well) on your servers
  * Allows you to "archive" servers - which means Forge will   "forget" your server, 
    eliminating the ability for Forge to access the server at all. 
    To re-enable the server from within Forge, you need to add  in a 
    new ssh public key which Forge will re-generate for you.
Forge is not:

  * Server management (if your server goes down, you contact the hosting, not Forge)
[+] jsamuel|11 years ago|reply
The need among PHP developers for a service that also does ongoing server management is why we built ServerPilot (https://serverpilot.io/).

While Forge is an advanced deployment tool similar to PuPHPet (https://puphpet.com/), ServerPilot is a modern alternative to cPanel for developers using their own servers.

[+] gchucky|11 years ago|reply
The other piece of this is Laravel Homestead (https://github.com/laravel/homestead), a Vagrant box to make local development easier. Through Forge, you can deploy basically the same environment Homestead provides to any of the services. It's an easier way of keeping your dev and prod environments the same.
[+] Perihelion|11 years ago|reply
I guess it's worth noting that Linode and Rackspace can provide server management for you if sysadmin work isn't your forte.
[+] olssonm|11 years ago|reply
Signed up right away deployed a new server on Digital Ocean.

Really easy and powerful tool – BUT (this is a big one), why lock someone in with GitHub? Sure, GitHub is great. But what if I use BitBucket? Or even my own solution for my private projects?

This has killed many other services before for me, Pagoda Box (if I recall correctly) also forced someone to use GitHub, so did Appfog (or PHPfog rather).

I like Fortrabbits solution, where you at least can push your own code.

[+] robjmills|11 years ago|reply
Taylor has just mentioned on Twitter that he's going to start looking at Gitlab and Bitbucket tonight.
[+] Kiro|11 years ago|reply
> so did Appfog (or PHPfog rather)

I never had to use GitHub for PHPFog. What do you mean exactly?

[+] laravel|11 years ago|reply
You can push your own code on Forge... you have full server access.
[+] kylec|11 years ago|reply
I really like that this service allows the use of existing VPS providers instead of wrapping their service around one and charging a monthly premium. Unfortunately, PHP is one of the easiest to install, low-maintenance language platforms, so I don't know how much value they can add there, but give me something like Heroku that I can use with my own VPSs and I'll gladly pay you $10/month.
[+] yla92|11 years ago|reply
> something like Heroku that I can use with my own VPSs and I'll gladly pay you $10/month.

You could try something like Dokku, Docker powered mini-Heroku https://github.com/progrium/dokku If I am not wrong, DigitalOcean has dokku-installed images which you can just use within a few minutes.

[+] speg|11 years ago|reply
Since it is just creating machines for you (i.e., it's created under your DigitalOcean account) can't you just stop paying for forge after you've created your servers, and keep using your DO account normally.
[+] ianhawes|11 years ago|reply
For those that don't use Laravel, PuPHPet[0] is a great utility to generate local and deployable pre-made Vagrant boxes with a variety of apps. If you're interested in testing the Laravel Forge images locally, they use Homestead[1] which is the official Vagrant image for the Laravel Framework (as of 4.2)

[0] https://puphpet.com/

[1] http://laravel.com/docs/homestead?version=4.2

[+] adamors|11 years ago|reply
Problem with PuPHPet is that it's really buggy. I've used it more than 10 times (also recommended it to colleagues) and we managed to provision a box correctly maybe on two occasions.

Every time there was a different bug. Either something didn't install, or the config files weren't being loaded etc. I ended up learning Puppet because of it, so I guess some good has come of it ..

[+] ddorian43|11 years ago|reply
For ruby there is https://www.cloud66.com/ and https://intercityup.com . Is there something also for python ?
[+] ixmatus|11 years ago|reply
I know this is an answer most people don't want to hear, but why not build your own Ansible / provisioning workflow and use that to do everything these services do?

I have one built in Ansible for our Python webapp and the entire configuration is encoded in the playbooks, rolling up the application into a source distribution, pip installing it, and also installing the dependencies...

Very easy, dependable, and extremely flexible.

[+] _RPM|11 years ago|reply
I think Laravel is a great framework. I just don't understand why the creator has to claim his ownership of the trademark "Laravel" on every page / documentation of the framework or anything that mentions the name. I mean Laravel is awesome, sure, but it's not some innovative piece of technology, like say the Linux kernel is. It is just another PHP framework with pretty features.
[+] MJR|11 years ago|reply
It's just another web framework, Coca-Cola is just another sugar water drink, Calvin and Hobbes is just another comic and a Lamborghini Aventador is just another car.

"Just another" is a really easy thing to say when it's someone else's creation. And more importantly trademarks are not indicators of quality or innovation. He's the owner and he chose to put it in the footer. This doesn't seem like a big deal.

[+] thestepafter|11 years ago|reply
I am really having a hard time seeing the value in this. All of the mentioned hosting services provide control panels that allow you to quickly provision a server. Running git pull from Github is pretty simple. I love Laravel and want to support Taylor but I'm just not seeing the benefit.
[+] meritt|11 years ago|reply
It's not simply provisioning the server. It's also installing all the relevant packages, configuration, and deployment. The value is toward people who don't have the sysadmin/devops skills (or perhaps time) to manage that themselves.
[+] dmourati|11 years ago|reply
I just downloaded and installed laravel yesterday. As a devops (more on the ops side) kind of guy, I was hoping for something simpler. I have a very basic PHP webapp I need to design with two or three user inputs. These inputs form a user-driven SQL query (AWS Redshift) and then generate html to create a graph (Google Charts).

I have a mockup in Balsamiq of how I want this to look. I also have a test query from PHP showing that I can connect to AWS Redshift. What I don't have is the PHP to render the user interface. Again, we are talking one text field, one three-way button and that's about it.

Anyone able to help point me in the right direction?

Thanks.

[+] BenBradleySmith|11 years ago|reply
https://laracasts.com is a website run by Jeffrey Way formerly head of web development at TutsPlus and a brilliant teacher. He has a number of lessons available for free at https://laracasts.com/tags/free including a series of lessons taking you through most of the basics (https://laracasts.com/series/laravel-from-scratch/episodes/1).

It's only $9 a month which imo is great value. I'd take a look through the free lessons and if you like what you see sign up for a month or 2 and start building.

In addition to this Dayle Rees has an excellent book which can be found at https://leanpub.com/codebright which takes you through all the basic stuff and more. I personally prefer Laracasts as I am more video inclined and Jeffrey is an incredible teacher but they are both great resources.

[+] fideloper|11 years ago|reply
I don't think I'd use a framework for that use case. I'd pull in the AWS PHP SDK (amazing that we can use three sets of acronyms like that) via Composer, and then create a "quick script", if such a thing exists, to handle orchestrating all of that.

Rendering HTML isn't the highlight of Laravel (altho the template language is pretty nice)

[+] mcdougle|11 years ago|reply
Do you have experience in Rails? Honestly, Laravel just feels like "PHP on Rails" to me. It's a full framework like Rails, so it takes some getting used to. The Code Bright [1] tutorial was great for learning the syntax, and the Laravel documentation [2] helps during development

I'm not sure what your idea is, exactly, but once you get Laravel up and running it's fairly easy to do what it sounds like you're saying. Create a Model to interact with the database, create a controller for your routing, and then a couple of views for your form/success page/etc.

[1] http://daylerees.com/codebright [2] http://laravel.com/docs

[+] krapp|11 years ago|reply
The "Laravelesque" way to do this would be:

- POST route to a controller which calls a model which handles the database stuff, then redirects to..

- the GET route which calls a controller which calls a model which pulls from the database and returns a View which parses the result of the query into a template.

Although you could do it all inside the route closures as well if you wanted... I don't know how much extra overhead there is doing it one way versus the other.

If you want to use Laravel I might suggest picking up one of the starters you can find on github or reading up on MVC, it's really not that hard although it can seem complicated because Laravel puts so much effort into trying to cover every possible model.

Although, given what you're describing, Slim Framework with Twig and a simple class for SQL might be easier.

[+] conradfr|11 years ago|reply
Depends on what "basic PHP" really mean. Modern PHP can be overwhelming for people from PHP4 / 5.0 eras.

I would (arbitrarily) reduce your choices to those two :

- Your project is not public and/or not likely to evolve much beyond the initial requirements : get Bootstrap and use a "basic" PHP script. You can already do a lot with raw PHP with the SPL (autoloader etc), filters (http://www.php.net/manual/en/book.filter.php), etc.

- If you need more, use a microframework like Silex or Flight. The learning curve will be steeper, but you'll also get more feature out of the box, if you need them.

[+] ezegolub|11 years ago|reply
Does someone have a high level overview of how this works? The only route in is through signing up and i don't want to hand over my CC# just to see what's this about.
[+] ddorian43|11 years ago|reply
Use digitalocean api to create servers and ssh into them to do stuff.
[+] nppc|11 years ago|reply
Nice !

This is going to make a big difference. For many, the setting up and launching part is a boring routine that they go through so often. I think the flat pricing model is the best part.

[+] ashishk|11 years ago|reply
How are OS limits/configs (such as open file limits, connection limits, etc.) handled? Can these be specified in the web panel?
[+] ing33k|11 years ago|reply
would be interested to test it before using, why not offer a free plan with 1 server max ?
[+] 8ig8|11 years ago|reply
I think that $10 is a reasonable bet to try out something that could save someone a lot of time and effort. Having a minimum helps weed out the casual tire-kickers. The people that pay the $10 to try it out _want_ to make this service work for them.
[+] icelancer|11 years ago|reply
I sort of agree. This looks really interesting but there is a distinct lack of a demo or good walkthrough at least.
[+] mmanfrin|11 years ago|reply
Is there something like this for rails? I am an okay bit-above-junior rails dev, but I can't deploy to anything other than heroku (and I cant find any good guides on learning to manage a server/deploy).
[+] JohnnyBrown|11 years ago|reply
Deploying a rails app to a VPS (e.g. digital ocean or linode) isn't that much harder than setting up a development rails server on your work machine. If you have some time in the next few days for a screenshare I'll walk you through it - johnnybrown<%= prime_numbers[3] %>@gmail.com
[+] omfg|11 years ago|reply
Is there anything like this for Python / Django? I've come across similar service for Ruby / Rails but not Python yet..
[+] dylanlacom|11 years ago|reply
Would this work for a wordpress site?
[+] laravel|11 years ago|reply
Probably so honestly. It's not super Laravel specific. I have installed ExpressionEngine on a Forge box in testing but haven't tried Wordpress.
[+] tedchs|11 years ago|reply
Man, I wish this had a different name... it's going to be a hard sell saying "we should use this thing I found that sounds like 'larval' which is a word that means juvenile/immature".
[+] noir_lord|11 years ago|reply
Maybe we could suggest renaming it to bikeshed, then using the framework with the new name would be "bikeshedding".
[+] kbar13|11 years ago|reply
That's not even remotely close to being the first thing that I think of when I learned about laravel.
[+] seanfisher|11 years ago|reply
Laravel is a widely used PHP framework.
[+] TOGoS|11 years ago|reply
I've had the misfortune of being forced to use Laravel on a project, and the larval connotations are pretty apt. Basically it's yet another PHP framework that adds megabytes of bloat to your application in order to give you alternate ways of doing things that are already trivial to do in PHP without providing anything that's actually helpful. Its one redeeming 'feature' is that they didn't go too far out of their way to make it incompatible with Composer, so once you work your way through Laraval's inane routing DSL (which, being built upon PHP, is a shitty DSL, and doesn't add any value over an if-else chain anyway) you can reference whatever libraries you need to get the job done without a lot of contortions. Even then, it throws good practice out the window by defaulting to throwing all the application-specific classes in the global namespace (which makes Composer's work harder, since it has to scan the entire app/ directory to build the class -> file map) and failing to provide any way to pass context to your code other than through global state.

Don't even get me started on the ubiquitous, ridiculously verbose, unhelpful, and intelligence-insulting comments. It's this kind of thing that makes me want to take up shooting sprees.