com presentations: Tweak: phpday16.html phpday16.xml
[email protected] (Rasmus Lerdorf) Fri, 13 May 2016 06:16:01 +0000
| Newsgroups | php.pres |
|---|---|
| Message-ID | <[email protected]> |
Commit: 0ba91dca5adae4060dd0ada78a38a59b2354fbc9 Author: Rasmus Lerdorf <[email protected]> Fri, 13 May 2016 08:16:01 +0200 Parents: 0b94a878daebdc764d5d006b44a1908f4f635744 Branches: master Link: http://git.php.net/?p=presentations.git;a=commitdiff;h=0ba91dca5adae4060dd0ada78a38a59b2354fbc9 Log: Tweak Changed paths: M phpday16.html M phpday16.xml
diff_0ba91dca5adae4060dd0ada78a38a59b2354fbc9.txt
(text/plain, 21 KB)
diff --git a/phpday16.html b/phpday16.html index e0981a3..966d949 100644 --- a/phpday16.html +++ b/phpday16.html @@ -558,8 +558,8 @@ $bytes = random_bytes(10); var_dump( $int ); var_dump( bin2hex($bytes) );</code></pre> - <pre class="output" style="font-size:1.2em;">int(259) -string(20) "8953b9ae2aed4675b644" + <pre class="output" style="font-size:1.2em;">int(384) +string(20) "31a6980238001b39cd09" </pre> </section> </section> <section> <section id="perf2014"> @@ -1308,172 +1308,6 @@ protected function write(array $record) }</code></pre> </section> </section> <section> - <section id="deploy"> - <h1 style="text-align:center;">Let's deploy it!</h1> - </section> -<section id="deploy0"> - <p class="p" style="font-size:2em;text-align:left;">Atomic</p> - <p class="p" style="font-size:2em;text-align:left;">No performance hit</p> - <ul> - <li style="font-size: 1.5em;">No restarts</li> - <li style="font-size: 1.5em;">No LB removal</li> - <li style="font-size: 1.5em;">No thundering herd</li> - <li style="font-size: 1.5em;">Cache reuse</li> - </ul> - </section> -<section id="deploy1"> - <p class="p" style="font-size:1.1em;text-align:left;">Must be able to serve two versions of the site concurrently!</p> - <img src="/presentations/slides/intro/atomic_deploy1.png" width="" height=""> - </section> -<section id="deploy2"> - <img src="/presentations/slides/intro/atomic_deploy2.png" width="" height=""> - </section> -<section id="deploy3"> - <p class="p" style="font-size:1.1em;text-align:left;">Requests that begin on DocumentRoot A must finish on A</p> - </section> -<section id="deploy4"> - <p class="p" style="font-size:1.1em;text-align:left;">Set the DocumentRoot to symlink target!</p> - <p class="p" style="font-size:1.1em;text-align:left;">Easy with nginx</p> - <pre><code class="ini" data-trim style="font-size:1.1em;">fastcgi_param DOCUMENT_ROOT $realpath_root</code></pre> - <p class="p" style="font-size:1.1em;text-align:left;">Apache</p> - <div align="left" style="font-size: 1.25em; color: ; text-align: left; margin-left: 1em; margin-right: ; margin-top: ; margin-bottom: ;"><a href="https://github.com/etsy/mod_realdoc" target="">github.com/etsy/mod_realdoc</a></div> - </section> -<section id="deploy5"> - <p class="p" style="font-size:1.1em;text-align:left;">Avoid hardcoding full paths</p> - <p class="p" style="font-size:1.1em;text-align:left;">Watch your include_path setting</p> - <p class="p" style="font-size:1.1em;text-align:left;">incpath extension can resolve your include_path for you</p> - <div align="left" style="font-size: 1.25em; color: ; text-align: left; margin-left: 1em; margin-right: ; margin-top: ; margin-bottom: ;"><a href="https://github.com/etsy/incpath" target="">https://github.com/etsy/incpath</a></div> - </section> -<section id="deploy6"> - <p class="p" style="font-size:1.1em;text-align:left;">Version all static assets</p> - <p class="p" style="font-size:1.1em;text-align:left;">DB Schema changes need special care</p> - </section> </section> - <section> - <section id="etsy_deploy"> - <h2 style="text-align:center;">How do you manage deploys?</h2> - </section> -<section id="etsy_deploy0"> - <p class="p" style="font-size:2em;text-align:left;">At Etsy we use irc</p> - <pre><code class="shell nohighlight" data-trim style="font-size:0.9em;">Channel: #push Topic: <prod> *joe frank|bob -devbot: Swapping symlinks. Your code is about to start taking production traffic -pushbot: joe frank : Your code is live. Time to watch graphs: http://etsy/abcd -Rasmus: .join -*** pushbot has changed the topic on #push to <prod> joe frank|bob Rasmus -frank: .good -*** pushbot has changed the topic on #push to <prod> *joe *frank|bob Rasmus -joe: .done -*** pushbot has changed the topic on #push to <prod> bob Rasmus -pushbot: bob Rasmus: You're up -bob: .in -*** pushbot has changed the topic on #push *bob Rasmus -Rasmus: .in -*** pushbot has changed the topic on #push *bob *Rasmus</code></pre> - </section> -<section id="etsy_deploy1"> - <p class="p" style="font-size:2em;text-align:left;">pushbot commands</p> - <ul> - <li style="list-style-type: none;"><strong>.join</strong> - join push queue</li> - <li style="list-style-type: none;"><strong>.in</strong> - code has been pushed</li> - <li style="list-style-type: none;"><strong>.good</strong> - your stuff looks good</li> - <li style="list-style-type: none;"><strong>.uhoh</strong> - your stuff looks bad</li> - <li style="list-style-type: none;"><strong>.hold</strong> - there is a problem, hold everything</li> - <li style="list-style-type: none;"><strong>.nm</strong> - never mind (leave queue)</li> - <li style="list-style-type: none;"><strong>.done</strong> - push done</li> - </ul> - </section> -<section id="etsy_deploy2"> - <img src="/presentations/slides/intro/deployinator.png" width="" height=""> - </section> -<section id="etsy_deploy3"> - <pre><code class="shell nohighlight" data-trim style="font-size:0.9em;">Channel: #push Topic: <princess> bob Rasmus -Jenkins: Starting build #36803 for job qa -Jenkins: Starting build #38784 for job princess -Jenkins: Project qa build #36803: SUCCESS in 6 min 19 sec: http://ci/job/qa/36803/ -pushbot: bob Rasmus : qa tests have passed -devbot: [who_tried] Everyone in this push has run Try recently. w00t! -Jenkins: Project princess build #38784: SUCCESS in 1 min 10 sec: http://ci/job/princess/38784/ -pushbot: bob Rasmus : princess tests have passed -bob: .good -Rasmus: .good -*** pushbot has changed the topic on #push to <princess> *bob *Rasmus -pushbot: bob Rasmus : everyone is ready, checking on Jenkins... -Jenkins: qa: last build: 36803 (9 min 5 sec ago): SUCCESS: http://ci/job/qa/36803/ -Jenkins: princess: last build: 38784 (2 min 54 sec ago): SUCCESS: http://ci/job/princess/38784/</code></pre> - </section> -<section id="etsy_deploy4"> - <p class="p" style="font-size:2.5em;text-align:left;">Deploy to Production:</p> - <ul> - <li style="font-size: 2em;">ssh to deploy host</li> - <li style="font-size: 2em;">dsh to all targets</li> - <li style="font-size: 2em;">rsync files</li> - </ul> - </section> -<section id="etsy_deploy5"> - <pre><code class="shell nohighlight" data-trim style="font-size:0.9em;">Channel: #push Topic: <prod> bob Rasmus -devbot: Swapping symlinks. Your code is about to start taking production traffic -pushbot: bob Rasmus : Your code is live. Time to watch graphs: http://etsy/et5cp -Jenkins: Starting build #39452 for job prod -pushbot: bob Rasmus : prod tests have passed -Jenkins: Project prod build #39452: SUCCESS in 30 sec: http://ci/job/prod/39452/ -bob: .good -Rasmus: .good -*** pushbot has changed the topic on #push to <prod> *bob *Rasmus -pushbot: bob Rasmus : everyone is ready, checking on Jenkins... -Jenkins: prod: last build: 39452 (1 min 39 sec ago): SUCCESS: http://ci/job/prod/39452/ -bob: .done -pushbot: clear -*** pushbot has changed the topic on #push to clear</code></pre> - </section> -<section id="etsy_deploy6"> - <p class="p" style="font-size:2.5em;text-align:left;">Graph Everything!</p> - <ul> - <li style="font-size: 2em;">Statsd</li> - <li style="font-size: 2em;">Ganglia</li> - <li style="font-size: 2em;">Graphite</li> - </ul> - </section> -<section id="etsy_deploy7"> - <p class="p" style="font-size:2.5em;text-align:left;">Log Everything!</p> - <ul> - <li style="font-size: 2em;">logster</li> - <li style="font-size: 2em;">Supergrep</li> - <li style="font-size: 2em;">Logstash</li> - <li style="font-size: 2em;">Elastic Search</li> - </ul> - </section> -<section id="etsy_deploy8"> - <ul> - <li style="font-size: 1.5em;">Commit to master</li> - <li style="font-size: 1.5em;">Deploy from HEAD</li> - <li style="font-size: 1.5em;">Branches?</li> - <li style="font-size: 1.5em;">Branches are in code via feature flags</li> - </ul> - </section> -<section id="etsy_deploy9"> - <p class="p" style="font-size:2.5em;text-align:left;">Blameless post-mortems</p> - </section> -<section id="etsy_deploy10"> - <div align="left" style="font-size: 1.2em; color: ; text-align: left; margin-left: 2em; margin-right: ; margin-top: ; margin-bottom: ;"><a href="https://github.com/etsy/deployinator" target="">github.com/etsy/deployinator</a></div> - <div align="left" style="font-size: 1.2em; color: ; text-align: left; margin-left: 2em; margin-right: ; margin-top: ; margin-bottom: ;"><a href="https://github.com/etsy/statsd" target="">github.com/etsy/statsd</a></div> - <div align="left" style="font-size: 1.2em; color: ; text-align: left; margin-left: 2em; margin-right: ; margin-top: ; margin-bottom: ;"><a href="https://github.com/etsy/logster" target="">github.com/etsy/logster</a></div> - <div align="left" style="font-size: 1.2em; color: ; text-align: left; margin-left: 2em; margin-right: ; margin-top: ; margin-bottom: ;"><a href="https://github.com/etsy/morgue" target="">github.com/etsy/morgue</a></div> - <div align="left" style="font-size: 1.2em; color: ; text-align: left; margin-left: 2em; margin-right: ; margin-top: ; margin-bottom: ;"><a href="https://github.com/etsy/feature" target="">github.com/etsy/feature</a></div> - <div align="left" style="font-size: 1.2em; color: ; text-align: left; margin-left: 2em; margin-right: ; margin-top: ; margin-bottom: ;"><a href="https://github.com/etsy/supergrep" target="">github.com/etsy/supergrep</a></div> - <div align="left" style="font-size: 1.2em; color: ; text-align: left; margin-left: 2em; margin-right: ; margin-top: ; margin-bottom: ;"><a href="https://github.com/etsy/PushBot" target="">github.com/etsy/PushBot</a></div> - <div align="left" style="font-size: 1.2em; color: ; text-align: left; margin-left: 2em; margin-right: ; margin-top: ; margin-bottom: ;"><a href="https://github.com/etsy/TryLib" target="">github.com/etsy/TryLib</a></div> - </section> </section> - <section> - <section id="prod_perc95"> - <h2 margin-bottom="2em">PHP 7 in production</h2><br> - <img src="/presentations/slides/intro/perc95.png" align="center" width="882" height="465"> - </section> -<section id="prod_cpu"> - <img src="/presentations/slides/intro/cpu.png" align="center" width="882" height="465"> - </section> -<section id="prod_mem"> - <img src="/presentations/slides/intro/mem.png" align="center" width="882" height="465"> - </section> </section> - <section> <section id="php7_tune_opcache"> <h2 margin-bottom="2em">PHP 7 Tuning</h2><br> <p class="p" style="font-size:2em;">Opcache</p> @@ -1654,6 +1488,172 @@ NUMA node1 CPU(s): 12-23,36-47</code></pre> </ul> </section> </section> <section> + <section id="deploy"> + <h1 style="text-align:center;">Let's deploy it!</h1> + </section> +<section id="deploy0"> + <p class="p" style="font-size:2em;text-align:left;">Atomic</p> + <p class="p" style="font-size:2em;text-align:left;">No performance hit</p> + <ul> + <li style="font-size: 1.5em;">No restarts</li> + <li style="font-size: 1.5em;">No LB removal</li> + <li style="font-size: 1.5em;">No thundering herd</li> + <li style="font-size: 1.5em;">Cache reuse</li> + </ul> + </section> +<section id="deploy1"> + <p class="p" style="font-size:1.1em;text-align:left;">Must be able to serve two versions of the site concurrently!</p> + <img src="/presentations/slides/intro/atomic_deploy1.png" width="" height=""> + </section> +<section id="deploy2"> + <img src="/presentations/slides/intro/atomic_deploy2.png" width="" height=""> + </section> +<section id="deploy3"> + <p class="p" style="font-size:1.1em;text-align:left;">Requests that begin on DocumentRoot A must finish on A</p> + </section> +<section id="deploy4"> + <p class="p" style="font-size:1.1em;text-align:left;">Set the DocumentRoot to symlink target!</p> + <p class="p" style="font-size:1.1em;text-align:left;">Easy with nginx</p> + <pre><code class="ini" data-trim style="font-size:1.1em;">fastcgi_param DOCUMENT_ROOT $realpath_root</code></pre> + <p class="p" style="font-size:1.1em;text-align:left;">Apache</p> + <div align="left" style="font-size: 1.25em; color: ; text-align: left; margin-left: 1em; margin-right: ; margin-top: ; margin-bottom: ;"><a href="https://github.com/etsy/mod_realdoc" target="">github.com/etsy/mod_realdoc</a></div> + </section> +<section id="deploy5"> + <p class="p" style="font-size:1.1em;text-align:left;">Avoid hardcoding full paths</p> + <p class="p" style="font-size:1.1em;text-align:left;">Watch your include_path setting</p> + <p class="p" style="font-size:1.1em;text-align:left;">incpath extension can resolve your include_path for you</p> + <div align="left" style="font-size: 1.25em; color: ; text-align: left; margin-left: 1em; margin-right: ; margin-top: ; margin-bottom: ;"><a href="https://github.com/etsy/incpath" target="">https://github.com/etsy/incpath</a></div> + </section> +<section id="deploy6"> + <p class="p" style="font-size:1.1em;text-align:left;">Version all static assets</p> + <p class="p" style="font-size:1.1em;text-align:left;">DB Schema changes need special care</p> + </section> </section> + <section> + <section id="etsy_deploy"> + <h2 style="text-align:center;">How do you manage deploys?</h2> + </section> +<section id="etsy_deploy0"> + <p class="p" style="font-size:2em;text-align:left;">At Etsy we use irc</p> + <pre><code class="shell nohighlight" data-trim style="font-size:0.9em;">Channel: #push Topic: <prod> *joe frank|bob +devbot: Swapping symlinks. Your code is about to start taking production traffic +pushbot: joe frank : Your code is live. Time to watch graphs: http://etsy/abcd +Rasmus: .join +*** pushbot has changed the topic on #push to <prod> joe frank|bob Rasmus +frank: .good +*** pushbot has changed the topic on #push to <prod> *joe *frank|bob Rasmus +joe: .done +*** pushbot has changed the topic on #push to <prod> bob Rasmus +pushbot: bob Rasmus: You're up +bob: .in +*** pushbot has changed the topic on #push *bob Rasmus +Rasmus: .in +*** pushbot has changed the topic on #push *bob *Rasmus</code></pre> + </section> +<section id="etsy_deploy1"> + <p class="p" style="font-size:2em;text-align:left;">pushbot commands</p> + <ul> + <li style="list-style-type: none;"><strong>.join</strong> - join push queue</li> + <li style="list-style-type: none;"><strong>.in</strong> - code has been pushed</li> + <li style="list-style-type: none;"><strong>.good</strong> - your stuff looks good</li> + <li style="list-style-type: none;"><strong>.uhoh</strong> - your stuff looks bad</li> + <li style="list-style-type: none;"><strong>.hold</strong> - there is a problem, hold everything</li> + <li style="list-style-type: none;"><strong>.nm</strong> - never mind (leave queue)</li> + <li style="list-style-type: none;"><strong>.done</strong> - push done</li> + </ul> + </section> +<section id="etsy_deploy2"> + <img src="/presentations/slides/intro/deployinator.png" width="" height=""> + </section> +<section id="etsy_deploy3"> + <pre><code class="shell nohighlight" data-trim style="font-size:0.9em;">Channel: #push Topic: <princess> bob Rasmus +Jenkins: Starting build #36803 for job qa +Jenkins: Starting build #38784 for job princess +Jenkins: Project qa build #36803: SUCCESS in 6 min 19 sec: http://ci/job/qa/36803/ +pushbot: bob Rasmus : qa tests have passed +devbot: [who_tried] Everyone in this push has run Try recently. w00t! +Jenkins: Project princess build #38784: SUCCESS in 1 min 10 sec: http://ci/job/princess/38784/ +pushbot: bob Rasmus : princess tests have passed +bob: .good +Rasmus: .good +*** pushbot has changed the topic on #push to <princess> *bob *Rasmus +pushbot: bob Rasmus : everyone is ready, checking on Jenkins... +Jenkins: qa: last build: 36803 (9 min 5 sec ago): SUCCESS: http://ci/job/qa/36803/ +Jenkins: princess: last build: 38784 (2 min 54 sec ago): SUCCESS: http://ci/job/princess/38784/</code></pre> + </section> +<section id="etsy_deploy4"> + <p class="p" style="font-size:2.5em;text-align:left;">Deploy to Production:</p> + <ul> + <li style="font-size: 2em;">ssh to deploy host</li> + <li style="font-size: 2em;">dsh to all targets</li> + <li style="font-size: 2em;">rsync files</li> + </ul> + </section> +<section id="etsy_deploy5"> + <pre><code class="shell nohighlight" data-trim style="font-size:0.9em;">Channel: #push Topic: <prod> bob Rasmus +devbot: Swapping symlinks. Your code is about to start taking production traffic +pushbot: bob Rasmus : Your code is live. Time to watch graphs: http://etsy/et5cp +Jenkins: Starting build #39452 for job prod +pushbot: bob Rasmus : prod tests have passed +Jenkins: Project prod build #39452: SUCCESS in 30 sec: http://ci/job/prod/39452/ +bob: .good +Rasmus: .good +*** pushbot has changed the topic on #push to <prod> *bob *Rasmus +pushbot: bob Rasmus : everyone is ready, checking on Jenkins... +Jenkins: prod: last build: 39452 (1 min 39 sec ago): SUCCESS: http://ci/job/prod/39452/ +bob: .done +pushbot: clear +*** pushbot has changed the topic on #push to clear</code></pre> + </section> +<section id="etsy_deploy6"> + <p class="p" style="font-size:2.5em;text-align:left;">Graph Everything!</p> + <ul> + <li style="font-size: 2em;">Statsd</li> + <li style="font-size: 2em;">Ganglia</li> + <li style="font-size: 2em;">Graphite</li> + </ul> + </section> +<section id="etsy_deploy7"> + <p class="p" style="font-size:2.5em;text-align:left;">Log Everything!</p> + <ul> + <li style="font-size: 2em;">logster</li> + <li style="font-size: 2em;">Supergrep</li> + <li style="font-size: 2em;">Logstash</li> + <li style="font-size: 2em;">Elastic Search</li> + </ul> + </section> +<section id="etsy_deploy8"> + <ul> + <li style="font-size: 1.5em;">Commit to master</li> + <li style="font-size: 1.5em;">Deploy from HEAD</li> + <li style="font-size: 1.5em;">Branches?</li> + <li style="font-size: 1.5em;">Branches are in code via feature flags</li> + </ul> + </section> +<section id="etsy_deploy9"> + <p class="p" style="font-size:2.5em;text-align:left;">Blameless post-mortems</p> + </section> +<section id="etsy_deploy10"> + <div align="left" style="font-size: 1.2em; color: ; text-align: left; margin-left: 2em; margin-right: ; margin-top: ; margin-bottom: ;"><a href="https://github.com/etsy/deployinator" target="">github.com/etsy/deployinator</a></div> + <div align="left" style="font-size: 1.2em; color: ; text-align: left; margin-left: 2em; margin-right: ; margin-top: ; margin-bottom: ;"><a href="https://github.com/etsy/statsd" target="">github.com/etsy/statsd</a></div> + <div align="left" style="font-size: 1.2em; color: ; text-align: left; margin-left: 2em; margin-right: ; margin-top: ; margin-bottom: ;"><a href="https://github.com/etsy/logster" target="">github.com/etsy/logster</a></div> + <div align="left" style="font-size: 1.2em; color: ; text-align: left; margin-left: 2em; margin-right: ; margin-top: ; margin-bottom: ;"><a href="https://github.com/etsy/morgue" target="">github.com/etsy/morgue</a></div> + <div align="left" style="font-size: 1.2em; color: ; text-align: left; margin-left: 2em; margin-right: ; margin-top: ; margin-bottom: ;"><a href="https://github.com/etsy/feature" target="">github.com/etsy/feature</a></div> + <div align="left" style="font-size: 1.2em; color: ; text-align: left; margin-left: 2em; margin-right: ; margin-top: ; margin-bottom: ;"><a href="https://github.com/etsy/supergrep" target="">github.com/etsy/supergrep</a></div> + <div align="left" style="font-size: 1.2em; color: ; text-align: left; margin-left: 2em; margin-right: ; margin-top: ; margin-bottom: ;"><a href="https://github.com/etsy/PushBot" target="">github.com/etsy/PushBot</a></div> + <div align="left" style="font-size: 1.2em; color: ; text-align: left; margin-left: 2em; margin-right: ; margin-top: ; margin-bottom: ;"><a href="https://github.com/etsy/TryLib" target="">github.com/etsy/TryLib</a></div> + </section> </section> + <section> + <section id="prod_perc95"> + <h2 margin-bottom="2em">PHP 7 in production</h2><br> + <img src="/presentations/slides/intro/perc95.png" align="center" width="882" height="465"> + </section> +<section id="prod_cpu"> + <img src="/presentations/slides/intro/cpu.png" align="center" width="882" height="465"> + </section> +<section id="prod_mem"> + <img src="/presentations/slides/intro/mem.png" align="center" width="882" height="465"> + </section> </section> + <section> <section id="thank_you"> <h2 style="text-align:center;">Thank You</h2> <div align="left" style="font-size: 1.2em; color: ; text-align: left; margin-left: 2em; margin-right: ; margin-top: ; margin-bottom: ;"><a href="https://github.com/rlerdorf/php7dev" target="">https://github.com/rlerdorf/php7dev</a></div> diff --git a/phpday16.xml b/phpday16.xml index 9ae660f..4bfff75 100644 --- a/phpday16.xml +++ b/phpday16.xml @@ -52,12 +52,12 @@ <slide>slides/intro/bc7.xml</slide> <slide>slides/intro/phan.xml</slide> +<slide>slides/intro/php7_tuning.xml</slide> +<slide>slides/intro/numa.xml</slide> <slide>slides/intro/deploy_2016.xml</slide> <slide>slides/intro/etsy_deploy.xml</slide> <slide>slides/intro/php7prod.xml</slide> -<slide>slides/intro/php7_tuning.xml</slide> -<slide>slides/intro/numa.xml</slide> <slide>slides/intro/thank_you.xml</slide>