Slide 1

Slide 1 text

DEPLOYING YOUR LARAVEL APPLICATION. NEO IGHODARO

Slide 2

Slide 2 text

DEPLOYING YOUR LARAVEL APPLICATION Neo Ighodaro CTO, @hotelsng & Founder, @CreativityKills Twitter: @neoighodaro Website: https://neoighodaro.com

Slide 3

Slide 3 text

DEPLOYING YOUR LARAVEL APPLICATION Neo Ighodaro CTO, @hotelsng & Founder, @CreativityKills Twitter: @neoighodaro Website: https://neoighodaro.com

Slide 4

Slide 4 text

WE WILL COVER 1. Choosing your application server 2. Server deployment options 1. Shared Hosts 2. Cloud VPS e.g Digital Ocean, Linode 3. Platform as a Service (PaaS) e.g Heroku, Pagodabox, Fortrabbit 3. Automatic deployment using CI tools e.g Jenkins 4. Handling Stuff like Queues and Workers

Slide 5

Slide 5 text

CHOOSING YOUR APPLICATION SERVER.

Slide 6

Slide 6 text

1. The nature of your application 2. The potential size of the application 3. The features and needs of your application 4. Flexibility 5. Price also matters A FEW THINGS TO CONSIDER

Slide 7

Slide 7 text

Simple applications might not require a buff server, so most times a basic server will do

Slide 8

Slide 8 text

Complex architecture however more than often require capable servers

Slide 9

Slide 9 text

Features can go out of hand

Slide 10

Slide 10 text

Flexibility. Some cloud servers allow you to scale up and down depending on traffic

Slide 11

Slide 11 text

SERVER DEPLOYMENT OPTIONS

Slide 12

Slide 12 text

SERVER DEPLOYMENT OPTIONS

Slide 13

Slide 13 text

1. Shared Hosting SERVER DEPLOYMENT OPTIONS

Slide 14

Slide 14 text

1. Shared Hosting 2. Cloud VPS e.g Digital Ocean, Linode SERVER DEPLOYMENT OPTIONS

Slide 15

Slide 15 text

1. Shared Hosting 2. Cloud VPS e.g Digital Ocean, Linode 3. Platform as a Service (PaaS) e.g Heroku, Pagodabox, Fortrabbit SERVER DEPLOYMENT OPTIONS

Slide 16

Slide 16 text

SHARED HOSTING Shared hosting is Web hosting in which the service provider serves pages for multiple Web sites, each having its own Internet domain name, from a single Web server.

Slide 17

Slide 17 text

SHARED HOSTING

Slide 18

Slide 18 text

SHARED HOSTING

Slide 19

Slide 19 text

CLOUD VPS Cloud VPS is…well…VPS in the cloud. Mostly better than shared hosting but requires some knowledge of operating systems and how they work.

Slide 20

Slide 20 text

CLOUD VPS

Slide 21

Slide 21 text

CLOUD VPS

Slide 22

Slide 22 text

PLATFORM AS A SERVICE Platform as a Service, often simply referred to as PaaS, is a category of cloud computing that provides a platform and environment to allow developers to build applications and services over the internet.

Slide 23

Slide 23 text

CLOUD VPS

Slide 24

Slide 24 text

CLOUD VPS

Slide 25

Slide 25 text

INTRODUCTION TO AUTODEPLOYMENT USING JENKINS.

Slide 26

Slide 26 text

WHAT IS CONTINUOUS INTEGRATION? Continuous Integration (CI) is a development practice that requires developers to integrate code into a shared repository several times a day. Each check-in is then verified by an automated build, allowing teams to detect problems early.

Slide 27

Slide 27 text

MEET JENKINS Jenkins is an open source automation server written in Java.

Slide 28

Slide 28 text

MEET JENKINS

Slide 29

Slide 29 text

HANDLING LARAVEL QUEUES AND WORKERS.

Slide 30

Slide 30 text

WHAT ARE QUEUES? Queues allow you to defer the processing of a time consuming task, such as sending an email, until a later time. Deferring these time consuming tasks drastically speeds up web requests to your application.

Slide 31

Slide 31 text

WHAT ARE QUEUES? dispatch(new ProcessPodcast);

Slide 32

Slide 32 text

WHAT ARE QUEUES? $ php artisan queue:work --queue=high,default

Slide 33

Slide 33 text

RUNNING WORKERS IN THE BACKGROUND USING SUPERVISOR Supervisor is a client/server system that allows its users to monitor and control a number of processes on UNIX-like operating systems. It shares some of the same goals of programs like launchd, daemontools, and runit.

Slide 34

Slide 34 text

RUNNING WORKERS IN THE BACKGROUND USING SUPERVISOR [program:laravel-worker] process_name=%(program_name)s_%(process_num)02d command=php /path/to/artisan queue:work --sleep=3 --tries=3 autostart=true autorestart=true numprocs=8 stdout_logfile=/home/forge/app.com/worker.log redirect_stderr=true

Slide 35

Slide 35 text

RUNNING WORKERS IN THE BACKGROUND USING SUPERVISOR $ supervisorctl start

Slide 36

Slide 36 text

THANKS.