Slide 1

Slide 1 text

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

Slide 2

Slide 2 text

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/

Slide 3

Slide 3 text

What’s GCP?

Slide 4

Slide 4 text

What’s GAE?

Slide 5

Slide 5 text

What’s GCC?

Slide 6

Slide 6 text

Other GCP Services?

Slide 7

Slide 7 text

Why GCP?

Slide 8

Slide 8 text

What’s Laravel? & Why?

Slide 9

Slide 9 text

The hybrid mix!

Slide 10

Slide 10 text

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

Slide 11

Slide 11 text

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.

Slide 12

Slide 12 text

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

Slide 13

Slide 13 text

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

Slide 14

Slide 14 text

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

Slide 15

Slide 15 text

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

Slide 16

Slide 16 text

Thanks! Abdelrahman Omran [email protected] @omranic