Laravel & google cloud platform do mix!

16
Laravel & Google Cloud Platform Do Mix ! Abdelrahman Omran [email protected] @omranic

Transcript of Laravel & google cloud platform do mix!

Page 1: Laravel & google cloud platform do mix!

Laravel & Google Cloud Platform Do Mix!

Abdelrahman [email protected]

@omranic

Page 2: Laravel & google cloud platform do mix!

Session Outline

This is just a proof of concept session, you get the concepts and dig deeper.

Here’s what we’ll learn today?

1. What’s Google Cloud Platform? & Why?2. What’s Google App Engine?3. What’s Google Cloud Console?4. What’s the other Google Cloud Services?5. What’s Laravel? & Why?6. Launch your Laravel Project on GCP in less than

10 minutes!

Go ahead and register for a free trial with $300 free credit and make some awesome powerful apps! ;)https://cloud.google.com/free-trial/

Page 3: Laravel & google cloud platform do mix!

What’s GCP?

Page 4: Laravel & google cloud platform do mix!

What’s GAE?

Page 5: Laravel & google cloud platform do mix!

What’s GCC?

Page 6: Laravel & google cloud platform do mix!

Other GCP Services?

Page 7: Laravel & google cloud platform do mix!

Why GCP?

Page 8: Laravel & google cloud platform do mix!

What’s Laravel? & Why?

Page 9: Laravel & google cloud platform do mix!

The hybrid mix!

Page 10: Laravel & google cloud platform do mix!

Technical Steps #1

1. Download Google App Engine SDK for PHP & follow installation steps on

the same page according to your OS: https://cloud.google.

com/appengine/downloads

2. Google Cloud Console > Create New Project “gcpcairo2” https://console.

cloud.google.com

3. git clone https://github.com/laravel/laravel.git gcpcairo2

Page 11: Laravel & google cloud platform do mix!

Technical Steps #2

3. git checkout 5.1

4. Install `shpasser/GaeSupportL5` composer package: https://github.

com/shpasser/GaeSupportL5

Add the following line to the `require` array in your project’s composer.json

"shpasser/gae-support-l5": "~1.0"

5. Run `composer install` inside project’s directory to install all requirements.

Page 12: Laravel & google cloud platform do mix!

Technical Steps #3

6. Then include the service provider within `config/app.php` file:

Shpasser\GaeSupportL5\GaeSupportServiceProvider::class,

7. Generate Laravel key:

php -r "copy('.env.example', '.env');"

php artisan key:generate

Page 13: Laravel & google cloud platform do mix!

Technical Steps #4

7. Now it’s time to prepare the project for Google App Engine:

php artisan gae:setup --config gcpcairo2

8. Add the following lines to your `.env` for cache performance:CACHE_SERVICES_FILE=true

CACHE_CONFIG_FILE=true

CACHE_ROUTES_FILE=true

CACHE_COMPILED_VIEWS=true

Page 14: Laravel & google cloud platform do mix!

Technical Steps #5

9. Temporary enable debug mode in `.env` file: APP_DEBUG=true

10. It’s time to deploy your application online:

appcfg.py -A gcpcairo2 -V v1 update . --noauth_local_webserver

11. You’re done! Access: https://gcpcairo2.appspot.com

Page 15: Laravel & google cloud platform do mix!

Register Now & Get Started

Go ahead and register for a free trial with $300 free creditand make some awesome powerful apps! ;)

https://cloud.google.com/free-trial/

Page 16: Laravel & google cloud platform do mix!

Thanks!

Abdelrahman [email protected]@omranic