Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Basic Deployment techtalk
Search
Bernard Grymonpon
March 27, 2012
Technology
820
5
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Basic Deployment techtalk
Techtalk over basis deployment met SSH-keys en Capistrano
Bernard Grymonpon
March 27, 2012
More Decks by Bernard Grymonpon
See All by Bernard Grymonpon
Techtalk: beveiligde verbindingen
wonko
0
480
MySQL techtalk
wonko
0
610
Metrics & Dashboards
wonko
0
460
Varnish
wonko
0
150
Vagrant en Sneakers
wonko
0
590
Techtalk: DNS & domeinen
wonko
1
320
Arrrrcamp 2012: Testing Chef
wonko
1
500
New Relic Techtalk
wonko
1
720
DrupalCamp Ghent 2012
wonko
1
640
Other Decks in Technology
See All in Technology
Slack上でインフラをトラブルシュートする! Agentic Platform Engineeringの第一歩
teru0x1
5
1.8k
aws-iot-platform-architecture-use-cases.pdf
ma2shita
0
250
HRC_Frontend_Conference_Fukuoka_2026.pdf
ts020
0
740
10Xに技術的負債をもたらした「2つの境界の歪み」その構造と解消への営み
10xinc
0
2k
山手線を徒歩で一周してわかった、 位置情報アプリは「足」が最強のデバッガー
hinakko
0
160
Reactの設計論
uhyo
24
13k
【技術的負債conf】事業成長に伴う技術的負債の説明責任とAIによるモニタリング、認知的負債について
i35_267
3
1.7k
AI de Idea
kawaguti
PRO
2
120
開発投資の期待値を上げるプロダクトロードマップづくり ~プロダクトエンジニアが越境して事業を伸ばす~
kekekenta
1
190
作って終わりじゃないサーバーレス 〜9年運用する大規模EC物流API基盤の設計・運用のリアル〜
zozotech
PRO
0
110
Deployment の 先にある AI Agent 基盤 - kagent vNext、Agent Substrate、Hermes から読み解く Agent Runtime の現在地 / k8s-matsuri-2-ai-agent-platform-amsy810
masayaaoyama
4
630
Issue 駆動でスペシャリストの意図を届ける、AI 実装のアクセシビリティ向上
thkt
0
120
Featured
See All Featured
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
240
A Modern Web Designer's Workflow
chriscoyier
699
190k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
460
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
280
Ethics towards AI in product and experience design
skipperchong
2
380
Building Adaptive Systems
keathley
44
3.2k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
280
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.2k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
500
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.2k
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.1k
Transcript
Site deployment basics Openminds techtalk - 21/03/2012 @openminds www.openminds.be Tuesday
27 March 2012
Deployments Deployments vereenvoudigen met ssh, git en capistrano Tuesday 27
March 2012
Deployment Stappenplan voor het updaten van een site Tuesday 27
March 2012
Klassiek scenario •(backup nemen voor we beginnen?) •FTP: files uploaden
•PHPMyAdmin: enkele queries/changes/... •Surfen naar de site... Tuesday 27 March 2012
Problemen •Kans op fouten •Oude files / backups ... •Niet
iedereen kan deployen Tuesday 27 March 2012
Files •Data files (uploads, pdf, cache ...) •Programma files (php,
css, js ...) •Configuratie files (settings.php, database.yml ...) Tuesday 27 March 2012
Ideaal scenario •kopie van huidige/werkende site •nieuwe programmatuur binnenhalen •“updates”
draaien (DB, structuur) •zonder data files te overschrijven/ dupliceren •bij problemen: rollback Tuesday 27 March 2012
Kopie/backup •Bijhouden van “releases” •“current” is de actieve release •data/config
via symlinks/kopies binnen de release brengen •rollback eenvoudig Tuesday 27 March 2012
Update programma •code in versie-controle-systeem (git, svn...) •checkout van een
tag/release/versie Tuesday 27 March 2012
Update data •Moeilijk punt •Afhankelijk van beschikbare tools •db-migraties •upgrade-scripts
•wat bij rollback? Tuesday 27 March 2012
SSH Public en private keys, agents en forwarding Tuesday 27
March 2012
SSH keypair •identiteitskaart van jezelf •publiek en privaat deel •passphrase
ter bescherming •maken met ssh-keygen •één keer in een leven!!! Tuesday 27 March 2012
SSH key login •Publiek deel bij de hosting •Privaat deel
van u •Privaat deel gecontroleerd met een publiek deel op de hosting: login toegelaten •Meerdere publieke delen per hosting Tuesday 27 March 2012
publiek deel •Mag je op je site openbaar zetten •in
“.ssh/authorized_keys” waar je wil inloggen •in webinterfaces (bvb github) Tuesday 27 March 2012
Pri Pub Keypair Laptop Server Github Machines Tuesday 27 March
2012
SSH agent •“aanbieden van privaat deel” •daemon op je systeem
die je key kent •doorgeven van authenticatie-verzoeken van daemon naar daemon Tuesday 27 March 2012
Key in agent •ssh-add -l •ssh-add -K (mac os X)
Tuesday 27 March 2012
Laptop Server Pri Pub Paswoordloze login Tuesday 27 March 2012
Laptop Server Pri Pub Paswoordloze login mogelijk Paswoordloze login Tuesday
27 March 2012
Laptop Server Pri Pub Paswoordloze login mogelijk Github Pub Paswoordloze
login Tuesday 27 March 2012
Laptop Server Pri Pub Paswoordloze login mogelijk Hier niet meer
Github Pub Paswoordloze login Tuesday 27 March 2012
Agent forwarding •in .ssh/config Tuesday 27 March 2012
Laptop Server Github Pri Pub Pub Met agent forwarding Tuesday
27 March 2012
Paswoordloze login mogelijk Laptop Server Github Pri Pub Pub Met
agent forwarding Tuesday 27 March 2012
Paswoordloze login mogelijk Laptop Server Github Pri Pub Pub Met
agent forwarding Pri Tuesday 27 March 2012
Paswoordloze login mogelijk Laptop Server Github Pri Pub Pub Met
agent forwarding Pri Paswoordloze login mogelijk Tuesday 27 March 2012
Windows •Putty is de de-facto standaard •putty is eigenlijk ssh
•pagent is de agent (daemon) •puttygen maakt een nieuwe key http://www.chiark.greenend.org.uk/~sgtatham/putty/ download.html Tuesday 27 March 2012
Capistrano Automatiseren van je stappenplan Tuesday 27 March 2012
Capistrano •Origineel tool om rails te deployen •Vandaag tool om
set van taken uit te voeren op remote servers •Gemaakt in Ruby, eenvoudige dependencies, is een gem https://github.com/capistrano/capistrano#readme Tuesday 27 March 2012
Capfile •een file per project •taken in de file •roles
(eigenlijk servers) Tuesday 27 March 2012
Eenvoudige capfile desc "Echo the server's hostname" task :echo_hostname do
run "echo `hostname`" end Tuesday 27 March 2012
Rails deployment Capistrano waarvoor het gemaakt werd Een eenvoudige demo
Tuesday 27 March 2012
“Hello server!” Een eenvoudig capistrano recept Tuesday 27 March 2012
Voorbereiding •public key in .ssh/authorized_keys op de hosting •site-code op
github/centraal/... •capify in je source-tree Tuesday 27 March 2012
capify . •Maakt een Capfile •Maakt een config/deploy.rb •Deze mogen
(moeten) mee in je repository Tuesday 27 March 2012
cap deploy:setup •Directory layout opbouwen •Shared / releases / ...
Tuesday 27 March 2012
cap deploy •Op de server: nieuwe code uitchecken van github
•In de nieuwe checkout - data mappen en config files op hun plaats zetten/linken Tuesday 27 March 2012
“simple” demo Tuesday 27 March 2012
Drupal Lang leve drush! Tuesday 27 March 2012
Drupal •settings.php is config (rest in DB) •Drush kan helpen
met bvb update.php •files-map is shared •Meerdere branches is handig (drupal, modules, ...) Tuesday 27 March 2012
Drupal voorbeeld Tuesday 27 March 2012
Meer! Tuesday 27 March 2012
Multi-stage cap production deploy cap staging deploy Tuesday 27 March
2012
Multi-server role :web “web1”, “web2”, “web3” Tuesday 27 March 2012
Gateway Wanneer je achter een firewall zit... Tuesday 27 March
2012
Wordpress http://theme.fm/2011/08/tutorial-deploying- wordpress-with-capistrano-2082/ Tuesday 27 March 2012
ForkCMS https://github.com/sumocoders/forkcms_3_deploy Tuesday 27 March 2012
CakePHP https://github.com/jadb/capcake Tuesday 27 March 2012
Symfony http://symphony-cms.com/discuss/thread/51667/ of https://github.com/makenosound/symphony- capistrano Tuesday 27 March 2012
Zend Framework http://www.codewithstyle.eu/2011/05/03/deploying- zend-framework-applications-using-capistrano/ Tuesday 27 March 2012
Q&A En hierna drank en broodjes... Tuesday 27 March 2012