Successfully reported this slideshow.
Your SlideShare is downloading. ×

Václav Makeš - Infrastructure as code - Jak nahazovat stroje a nic moc nevědět (13. sraz přátel PHP v Praze)

Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Loading in …3
×

Check these out next

1 of 18 Ad

Václav Makeš - Infrastructure as code - Jak nahazovat stroje a nic moc nevědět (13. sraz přátel PHP v Praze)

Download to read offline

"Zkoušel jsem si super-hyper-cool technologii a tak trošku nemohu na počı́tači nic dělat. Reinstalace?“
Jak řešit tyto situace ve velkém týmu elegantně?

"Zkoušel jsem si super-hyper-cool technologii a tak trošku nemohu na počı́tači nic dělat. Reinstalace?“
Jak řešit tyto situace ve velkém týmu elegantně?

Advertisement
Advertisement

More Related Content

Similar to Václav Makeš - Infrastructure as code - Jak nahazovat stroje a nic moc nevědět (13. sraz přátel PHP v Praze) (20)

Advertisement

More from Péhápkaři (20)

Advertisement

Václav Makeš - Infrastructure as code - Jak nahazovat stroje a nic moc nevědět (13. sraz přátel PHP v Praze)

  1. 1. Infrastructure as code Infrastructure as code Jak nahazovat stroje a nic moc nevˇedˇet V´aclav Makeˇs 22. prosince 2016 Infrastructure as code V´aclav Makeˇs 1 / 18
  2. 2. Infrastructure as code V´aclav Makeˇs makes.cz vaclav at makes.cz Twitter – VaclavMakes pom´ah´am, konzultuji Infrastructure as code V´aclav Makeˇs 2 / 18
  3. 3. Infrastructure as code Localhost – 1. use case ” Zkouˇsel jsem si super-hyper-cool technologii a tak troˇsku nemohu na poˇc´ıtaˇci nic dˇelat. Reinstalace?“ Infrastructure as code V´aclav Makeˇs 3 / 18
  4. 4. Infrastructure as code Localhost – 1. use case (reinstalace) konfigurace .gitconfig .gitignore .bashrc pouˇz´ıvan´y SW Chrome, PhpStorm git, wget, ..., gource Infrastructure as code V´aclav Makeˇs 4 / 18
  5. 5. Infrastructure as code Localhost – 1. use case (reinstalace) naskriptuji si to s´am (Bash) dost pr´ace reakce na zmˇeny (restart Nginx) idempotence nˇeco chytˇrejˇs´ıho Ansible Puppet Chef ... Infrastructure as code V´aclav Makeˇs 5 / 18
  6. 6. Infrastructure as code Localhost – 1. use case (reinstalace) −−− − hosts : l o c a l ta sk s : − name : Copy g i t i g n o r e copy : s r c=cnf /. g i t i g n o r e dest =˜/. g i t i g n o r e − name : I n s t a l l packages from Homebrew . homebrew : name={{ item }} s t a t e=present with items : − g i t − wget − gource Infrastructure as code V´aclav Makeˇs 6 / 18
  7. 7. Infrastructure as code Localhost – 2. use case ” Nov´y kolega“ Infrastructure as code V´aclav Makeˇs 7 / 18
  8. 8. Infrastructure as code Localhost – 2. use case (nov´y kolega) sluˇzby PHP PostgreSQL / MySQL Nginx / Apache Redis RabbitMQ ... konfigurace php.ini dalˇs´ı projekty Infrastructure as code V´aclav Makeˇs 8 / 18
  9. 9. Infrastructure as code CI server – 2. use case (nov´y kolega) to sam´e co na localhostu co kdyˇz CI neum´ı napˇr. RabbitMQ Infrastructure as code V´aclav Makeˇs 9 / 18
  10. 10. Infrastructure as code Localhost – 2. use case (nov´y kolega) Docker Infrastructure as code V´aclav Makeˇs 10 / 18
  11. 11. Infrastructure as code Localhost – 2. use case (nov´y kolega) git clone spuˇstˇen´ı cel´e aplikace = 1 command frontend backend fixtures samples Infrastructure as code V´aclav Makeˇs 11 / 18
  12. 12. Infrastructure as code Localhost – 2. use case (nov´y kolega) FROM php :7.1 − apache COPY ./ p r o j e c t . conf / etc / apache2 / p r o j e c t . conf RUN echo ”Europe/Prague” > / etc / timezone RUN a2enmod r e w r i t e RUN apt−get i n s t a l l −y −−force −yes g i t unzip mysql−c l i e n t wget z i p WORKDIR /app Infrastructure as code V´aclav Makeˇs 12 / 18
  13. 13. Infrastructure as code Produkce – 3. use case ” Aplikace na produkci – pouˇz´ıv´am Docker a sluˇzby cloudu“ Infrastructure as code V´aclav Makeˇs 13 / 18
  14. 14. Infrastructure as code Produkce – 3. use case (Docker) AWS – ECS DigitalOcean – vlastn´ı cluster (Kubernetes) custom HW – vlastn´ı cluster (Kubernetes) vyuˇzit´ı AWS RDS, AWS S3, ... Infrastructure as code V´aclav Makeˇs 14 / 18
  15. 15. Infrastructure as code Nasazov´an´ı na servery bez Dockeru – 4. use case ” Aplikace na serverech – nepouˇz´ıv´am Docker, poˇr´ad ˇreˇs´ım instalace a konfigurace.“ Infrastructure as code V´aclav Makeˇs 15 / 18
  16. 16. Infrastructure as code Nasazov´an´ı na servery bez Dockeru – 4. use case konfigurace jako na localhostu spolehlivˇejˇs´ı neˇz dokumentace nov´y server do konkr´etn´ıho stavu spuˇstˇen´ı serveru skrze API (lze pomoc´ı Ansible) instalace pomoc´ı Ansible (jako localhost) udrˇzov´an´ı st´al´eho serveru zmˇeny konfigurace a konsekvence (restarty po zmˇenˇe konfigurace) v´yhody ” code-review“ pˇrehled zmˇen – Git historie zamezen´ı chyb (AWS Console) Infrastructure as code V´aclav Makeˇs 16 / 18
  17. 17. Infrastructure as code N´astroje princip pull push n´astroje custom (Bash) Docker Ansible Chef Puppet ... Infrastructure as code V´aclav Makeˇs 17 / 18
  18. 18. Infrastructure as code Dˇekuji za pozornost Infrastructure as code V´aclav Makeˇs 18 / 18

×