SlideShare ist ein Scribd-Unternehmen logo
1 von 57
Downloaden Sie, um offline zu lesen
LISBON 2018
DRUPAL DEVELOPER DAYS
Welcome aboard the team
Roberto Peruzzo
Agenda
• Why on-boarding is expensive
• Ingredients to make easy on-boarding
• My recipe
Diamond Sponsor
Platinum Sponsors
Gold Sponsors
Roberto Peruzzo
@robertoperuzzo

www.studioaqua.it

it.linkedin.com/in/robertoperuzzo

www.robertoperuzzo.it
Freelance Web Developer
Where I live
Bassano del Grappa
Grappa Nardini
http://www.thanksskateboardingmag.com
https://www.studioaqua.it
What we do?
• Develop new features
• Manage security updates
• Design Drupal projects from scratch
https://www.drupal.org/project/iubenda_integration
W H Y I S A N E W M E M B E R
E X P E N S I V E ?
The working team is like a family
New member can…
• help to reach your goals
• show you something in a different point of view
• improve the quality of what you are doing
• teach you something new
I've learned…
Breakdown of plans
Because you probably don’t know what he/she needs.
Why?
Everyone uses their own tools
The best path to follow
• OS independent
• Less tools installed
• Automate as much as you can
• Local and Live environments have the same settings
M Y R E C I P E
My Recipe
• 1 Git project repo
• 1 Docker application
• 1 docker-compose.yml by Wodby
• 1 RoboFile.php
Git is a free and open source distributed version control
system designed to handle everything from small to very
large projects with speed and efficiency.
Git
https://github.com/robertoperuzzo/ddd-lisbon2018
https://nvie.com/posts/a-successful-git-
branching-model/
A successful Git
branching model
(Vincent Driessen)
It is a container platform provider that enables true
independence between applications and infrastructure
and developers and IT ops to unlock their potential and
creates a model for better collaboration and innovation.
Docker
https://www.docker.com/what-docker
A container image is a
lightweight, stand-alone,
executable package of a
piece of software that includes
everything needed to run it:
code, runtime, system tools,
system libraries, settings.
Docker container
https://www.docker.com/what-container
Containers are more portable and efficient
Containers Virtual Machines
With Docker you can create containers holding project specific
data while they depend on common images. You can even copy
whole development environments from one machine to another or
only share the settings of a development environment with others.
Why use Docker?
https://www.drupal.org/node/2736447
Docker4Drupal is a set of docker images optimized for
Drupal. Use docker-compose.yml file from the latest stable
release to spin up local environment on Linux, Mac OS X
and Windows.
Docker4drupal
https://github.com/wodby/docker4drupal
Robo is a task runner you always have been looking for. It
allows you to write fully customizable tasks in common OOP
PHP style.
Robo.li
https://robo.li
P R E PA R I N G Y O U R P R O J E C T
L O C A L D E V S E T T I N G S
docker-compose.yml - mariadb
mariadb:
image: wodby/mariadb:$MARIADB_TAG
container_name: "${PROJECT_NAME}_mariadb"
stop_grace_period: 30s
environment:
MYSQL_ROOT_PASSWORD: $DB_ROOT_PASSWORD
MYSQL_DATABASE: $DB_NAME
MYSQL_USER: $DB_USER
MYSQL_PASSWORD: $DB_PASSWORD
# volumes:
# - ./mariadb-init:/docker-entrypoint-initdb.d # Place init .sql file(s) here.
# - /path/to/mariadb/data/on/host:/var/lib/mysql # I want to manage volumes
manually.
docker-compose.yml - php
php:
image: wodby/drupal-php:$PHP_TAG
container_name: "${PROJECT_NAME}_php"
environment:
PHP_SENDMAIL_PATH: /usr/sbin/sendmail -t -i -S mailhog:1025
DB_HOST: $DB_HOST
DB_USER: $DB_USER
DB_PASSWORD: $DB_PASSWORD
DB_NAME: $DB_NAME
DB_DRIVER: $DB_DRIVER
volumes:
## For macOS users (https://docs.docker.com/docker-for-mac/osxfs-caching/)
- ./:/var/www/html:delegated
docker-compose.yml - ngnix
nginx:
image: wodby/drupal-nginx:$NGINX_TAG
container_name: "${PROJECT_NAME}_nginx"
depends_on:
- php
environment:
NGINX_STATIC_CONTENT_OPEN_FILE_CACHE: "off"
NGINX_ERROR_LOG_LEVEL: debug
NGINX_BACKEND_HOST: php
NGINX_SERVER_ROOT: /var/www/html/web
volumes:
- ./:/var/www/html:delegated
labels:
- 'traefik.backend=nginx'
- 'traefik.port=80'
- 'traefik.frontend.rule=Host:${PROJECT_BASE_URL}'
https://docs.docker.com/docker-for-mac/osxfs-caching/#delegated
https://store.docker.com/editions/community/docker-ce-desktop-mac
Delegated flag needs Docker CE edge channel.
settings.php
// Set up a config sync directory.
// This is defined inside the read-only "config" directory, deployed via
Git.
$config_directories[CONFIG_SYNC_DIRECTORY] = $app_root . '/../config/
sync';
// Local settings. These come last so that they can override anything.
if (file_exists($app_root . '/' . $site_path . '/settings.local.php')) {
include $app_root . '/' . $site_path . '/settings.local.php';
}
settings.local.php - database
// Docker database container setting.
$databases['default']['default'] = [
'database' => 'drupal',
'username' => 'drupal',
'password' => 'drupal',
'prefix' => '',
'host' => 'mariadb',
'port' => '3306',
'namespace' => 'DrupalCoreDatabaseDrivermysql',
'driver' => 'mysql',
];
settings.local.php - trusted host
// Trusted hosts.
$settings['trusted_host_patterns'] = [
'^ddd18.docker.localhost$',
];
Setup Robo
> cd myproject
> composer require consolidation/robo
> ./vendor/bin/robo init
RoboFile.php
<?php
class RoboFile extends RoboTasks {
/**
* Set up the local dev environment ready to start working
on.
*/
public function build() {
// Put here your tasks.
}
}
RoboFile.php - drupal init
// Drupal init.
$this->taskExecStack()
->stopOnFail()
->exec('make up')
->exec('docker-compose exec --user 82 php drupal init --
destination=/var/www/html/console/ --no-interaction')
->run();
RoboFile.php - local settings
// Local settings.
$this->taskFilesystemStack()
->stopOnFail()
->chmod('web/sites/default', 0755)
->symlink('../../../settings.local.php', 'web/sites/
default/settings.local.php')
->chmod('web/sites/default', 0555)
->run();
RoboFile.php - drupal install
// Drupal install.
$this->taskExecStack()
->exec('docker-compose exec --user 82 php drupal
site:install --force --no-interaction')
->run();
RoboFile.php - db settings
// Remove database settings from settings.php.
$this->taskFilesystemStack()
->chmod('web/sites/default/settings.php', 0644)
->run();
$this->taskReplaceInFile('web/sites/default/settings.php')
->regex('/$databases[([.Ss]*));/i')
->to('')
->run();
$this->taskFilesystemStack()
->chmod('web/sites/default/settings.php', 0444)
->run();
W H AT T H E N E W M E M B E R H A S
T O D O
Clone the project
> git clone <git-repo> <project-name>
Build the project
> cd <project-name>
> composer install
Run Docker
Build the local environment
> ./vendor/bin/robo build
D E M O T I M E
A N Y Q U E S T I O N S ?
@robertoperuzzo

roberto.peruzzo@studioqua.it
@robertoperuzzo
T H A N K S F O R Y O U R T I M E !

Weitere ähnliche Inhalte

Was ist angesagt?

Headless approach and Acquia - Case study - Chris Ozog
Headless approach and Acquia - Case study - Chris OzogHeadless approach and Acquia - Case study - Chris Ozog
Headless approach and Acquia - Case study - Chris OzogDrupalCamp Kyiv
 
Apache HBase - Lab Assignment
Apache HBase - Lab AssignmentApache HBase - Lab Assignment
Apache HBase - Lab AssignmentFarzad Nozarian
 
Building Your Own Drupal Distribution
Building Your Own Drupal DistributionBuilding Your Own Drupal Distribution
Building Your Own Drupal DistributionAniket Maithani
 
Headless Host Scanning
Headless Host ScanningHeadless Host Scanning
Headless Host ScanningJan Schaumann
 
Speed up Drupal development with Drush
Speed up Drupal development with DrushSpeed up Drupal development with Drush
Speed up Drupal development with Drushkbasarab
 
CI workflow in a web studio
CI workflow in a web studioCI workflow in a web studio
CI workflow in a web studiodeWeb
 
LDAP, SAML and Hue
LDAP, SAML and HueLDAP, SAML and Hue
LDAP, SAML and Huegethue
 
Introduction to Drupal, Training conducted at MES-AIMAT, Aluva on 2013-09-26
Introduction to Drupal, Training conducted at MES-AIMAT, Aluva on 2013-09-26Introduction to Drupal, Training conducted at MES-AIMAT, Aluva on 2013-09-26
Introduction to Drupal, Training conducted at MES-AIMAT, Aluva on 2013-09-26Zyxware Technologies
 
Chef Fundamentals Training Series Module 4: The Chef Client Run and Expanding...
Chef Fundamentals Training Series Module 4: The Chef Client Run and Expanding...Chef Fundamentals Training Series Module 4: The Chef Client Run and Expanding...
Chef Fundamentals Training Series Module 4: The Chef Client Run and Expanding...Chef Software, Inc.
 
Best Practice Site Architecture in Drupal 8
Best Practice Site Architecture in Drupal 8Best Practice Site Architecture in Drupal 8
Best Practice Site Architecture in Drupal 8Pantheon
 
Apache HDFS - Lab Assignment
Apache HDFS - Lab AssignmentApache HDFS - Lab Assignment
Apache HDFS - Lab AssignmentFarzad Nozarian
 
Fast Paced Drupal 8: Accelerating Development with Composer, Drupal Console a...
Fast Paced Drupal 8: Accelerating Development with Composer, Drupal Console a...Fast Paced Drupal 8: Accelerating Development with Composer, Drupal Console a...
Fast Paced Drupal 8: Accelerating Development with Composer, Drupal Console a...Acquia
 
Common Pitfalls for your Drupal Site, and How to Avoid Them
Common Pitfalls for your Drupal Site, and How to Avoid ThemCommon Pitfalls for your Drupal Site, and How to Avoid Them
Common Pitfalls for your Drupal Site, and How to Avoid ThemAcquia
 
Chef Fundamentals Training Series Module 2: Workstation Setup
Chef Fundamentals Training Series Module 2: Workstation SetupChef Fundamentals Training Series Module 2: Workstation Setup
Chef Fundamentals Training Series Module 2: Workstation SetupChef Software, Inc.
 

Was ist angesagt? (18)

Headless approach and Acquia - Case study - Chris Ozog
Headless approach and Acquia - Case study - Chris OzogHeadless approach and Acquia - Case study - Chris Ozog
Headless approach and Acquia - Case study - Chris Ozog
 
Apache HBase - Lab Assignment
Apache HBase - Lab AssignmentApache HBase - Lab Assignment
Apache HBase - Lab Assignment
 
Building Your Own Drupal Distribution
Building Your Own Drupal DistributionBuilding Your Own Drupal Distribution
Building Your Own Drupal Distribution
 
Shark - Lab Assignment
Shark - Lab AssignmentShark - Lab Assignment
Shark - Lab Assignment
 
Introduction to Kalabox
Introduction to KalaboxIntroduction to Kalabox
Introduction to Kalabox
 
Cooking with Chef
Cooking with ChefCooking with Chef
Cooking with Chef
 
Headless Host Scanning
Headless Host ScanningHeadless Host Scanning
Headless Host Scanning
 
Drupal from scratch
Drupal from scratchDrupal from scratch
Drupal from scratch
 
Speed up Drupal development with Drush
Speed up Drupal development with DrushSpeed up Drupal development with Drush
Speed up Drupal development with Drush
 
CI workflow in a web studio
CI workflow in a web studioCI workflow in a web studio
CI workflow in a web studio
 
LDAP, SAML and Hue
LDAP, SAML and HueLDAP, SAML and Hue
LDAP, SAML and Hue
 
Introduction to Drupal, Training conducted at MES-AIMAT, Aluva on 2013-09-26
Introduction to Drupal, Training conducted at MES-AIMAT, Aluva on 2013-09-26Introduction to Drupal, Training conducted at MES-AIMAT, Aluva on 2013-09-26
Introduction to Drupal, Training conducted at MES-AIMAT, Aluva on 2013-09-26
 
Chef Fundamentals Training Series Module 4: The Chef Client Run and Expanding...
Chef Fundamentals Training Series Module 4: The Chef Client Run and Expanding...Chef Fundamentals Training Series Module 4: The Chef Client Run and Expanding...
Chef Fundamentals Training Series Module 4: The Chef Client Run and Expanding...
 
Best Practice Site Architecture in Drupal 8
Best Practice Site Architecture in Drupal 8Best Practice Site Architecture in Drupal 8
Best Practice Site Architecture in Drupal 8
 
Apache HDFS - Lab Assignment
Apache HDFS - Lab AssignmentApache HDFS - Lab Assignment
Apache HDFS - Lab Assignment
 
Fast Paced Drupal 8: Accelerating Development with Composer, Drupal Console a...
Fast Paced Drupal 8: Accelerating Development with Composer, Drupal Console a...Fast Paced Drupal 8: Accelerating Development with Composer, Drupal Console a...
Fast Paced Drupal 8: Accelerating Development with Composer, Drupal Console a...
 
Common Pitfalls for your Drupal Site, and How to Avoid Them
Common Pitfalls for your Drupal Site, and How to Avoid ThemCommon Pitfalls for your Drupal Site, and How to Avoid Them
Common Pitfalls for your Drupal Site, and How to Avoid Them
 
Chef Fundamentals Training Series Module 2: Workstation Setup
Chef Fundamentals Training Series Module 2: Workstation SetupChef Fundamentals Training Series Module 2: Workstation Setup
Chef Fundamentals Training Series Module 2: Workstation Setup
 

Ähnlich wie Welcome aboard the team

Improving your Drupal 8 development workflow DrupalCampLA
Improving your Drupal 8 development workflow DrupalCampLAImproving your Drupal 8 development workflow DrupalCampLA
Improving your Drupal 8 development workflow DrupalCampLAJesus Manuel Olivas
 
Building and Maintaining a Distribution in Drupal 7 with Features
Building and Maintaining a  Distribution in Drupal 7 with FeaturesBuilding and Maintaining a  Distribution in Drupal 7 with Features
Building and Maintaining a Distribution in Drupal 7 with FeaturesNuvole
 
Using Composer with Drupal and Drush
Using Composer with Drupal and DrushUsing Composer with Drupal and Drush
Using Composer with Drupal and DrushPantheon
 
Composer tools and frameworks for drupal.ppt
Composer tools and frameworks for drupal.pptComposer tools and frameworks for drupal.ppt
Composer tools and frameworks for drupal.pptPromet Source
 
Composer tools and frameworks for Drupal
Composer tools and frameworks for DrupalComposer tools and frameworks for Drupal
Composer tools and frameworks for DrupalPromet Source
 
Composer Tools & Frameworks for Drupal
Composer Tools & Frameworks for DrupalComposer Tools & Frameworks for Drupal
Composer Tools & Frameworks for DrupalPantheon
 
Modernize Your Drupal Development
Modernize Your Drupal DevelopmentModernize Your Drupal Development
Modernize Your Drupal DevelopmentChris Tankersley
 
Depolying Drupal with Git, Drush Make and Capistrano
Depolying Drupal with Git, Drush Make and CapistranoDepolying Drupal with Git, Drush Make and Capistrano
Depolying Drupal with Git, Drush Make and Capistranolibsys
 
Migration from Drupal 7 to Drupal 8 - How Docker can save our lives!
Migration from Drupal 7 to Drupal 8 - How Docker can save our lives!Migration from Drupal 7 to Drupal 8 - How Docker can save our lives!
Migration from Drupal 7 to Drupal 8 - How Docker can save our lives!DrupalCamp Kyiv
 
Drupal Day 2012 - Automating Drupal Development: Make!les, Features and Beyond
Drupal Day 2012 - Automating Drupal Development: Make!les, Features and BeyondDrupal Day 2012 - Automating Drupal Development: Make!les, Features and Beyond
Drupal Day 2012 - Automating Drupal Development: Make!les, Features and BeyondDrupalDay
 
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis OverviewLeo Lorieri
 
From Zero to Hadoop: a tutorial for getting started writing Hadoop jobs on Am...
From Zero to Hadoop: a tutorial for getting started writing Hadoop jobs on Am...From Zero to Hadoop: a tutorial for getting started writing Hadoop jobs on Am...
From Zero to Hadoop: a tutorial for getting started writing Hadoop jobs on Am...Alexander Dean
 
Drush to simplify Drupalers work - Sivaji
Drush to simplify Drupalers work - SivajiDrush to simplify Drupalers work - Sivaji
Drush to simplify Drupalers work - SivajiDrupal Camp Delhi
 
Ts drupal6 module development v0.2
Ts   drupal6 module development v0.2Ts   drupal6 module development v0.2
Ts drupal6 module development v0.2Confiz
 
Face your fears: Drush and Aegir
Face your fears: Drush and AegirFace your fears: Drush and Aegir
Face your fears: Drush and AegirIztok Smolic
 
Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016
Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016
Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016Paul McKibben
 
Drupal VM for Drupal 8 Dev - Drupal Camp STL 2017
Drupal VM for Drupal 8 Dev - Drupal Camp STL 2017Drupal VM for Drupal 8 Dev - Drupal Camp STL 2017
Drupal VM for Drupal 8 Dev - Drupal Camp STL 2017Jeff Geerling
 
Exploring composer in drupal 8 with drupal project - salva molina
Exploring composer in drupal 8 with drupal project - salva molinaExploring composer in drupal 8 with drupal project - salva molina
Exploring composer in drupal 8 with drupal project - salva molinaSalvador Molina (Slv_)
 

Ähnlich wie Welcome aboard the team (20)

Improving your Drupal 8 development workflow DrupalCampLA
Improving your Drupal 8 development workflow DrupalCampLAImproving your Drupal 8 development workflow DrupalCampLA
Improving your Drupal 8 development workflow DrupalCampLA
 
Building and Maintaining a Distribution in Drupal 7 with Features
Building and Maintaining a  Distribution in Drupal 7 with FeaturesBuilding and Maintaining a  Distribution in Drupal 7 with Features
Building and Maintaining a Distribution in Drupal 7 with Features
 
Using Composer with Drupal and Drush
Using Composer with Drupal and DrushUsing Composer with Drupal and Drush
Using Composer with Drupal and Drush
 
Composer tools and frameworks for drupal.ppt
Composer tools and frameworks for drupal.pptComposer tools and frameworks for drupal.ppt
Composer tools and frameworks for drupal.ppt
 
Composer tools and frameworks for Drupal
Composer tools and frameworks for DrupalComposer tools and frameworks for Drupal
Composer tools and frameworks for Drupal
 
Composer Tools & Frameworks for Drupal
Composer Tools & Frameworks for DrupalComposer Tools & Frameworks for Drupal
Composer Tools & Frameworks for Drupal
 
Modernize Your Drupal Development
Modernize Your Drupal DevelopmentModernize Your Drupal Development
Modernize Your Drupal Development
 
Depolying Drupal with Git, Drush Make and Capistrano
Depolying Drupal with Git, Drush Make and CapistranoDepolying Drupal with Git, Drush Make and Capistrano
Depolying Drupal with Git, Drush Make and Capistrano
 
Migration from Drupal 7 to Drupal 8 - How Docker can save our lives!
Migration from Drupal 7 to Drupal 8 - How Docker can save our lives!Migration from Drupal 7 to Drupal 8 - How Docker can save our lives!
Migration from Drupal 7 to Drupal 8 - How Docker can save our lives!
 
Migration from drupal 7 to drupal 8
Migration from drupal 7 to drupal 8Migration from drupal 7 to drupal 8
Migration from drupal 7 to drupal 8
 
Migration from drupal 7 to drupal 8
Migration from drupal 7 to drupal 8Migration from drupal 7 to drupal 8
Migration from drupal 7 to drupal 8
 
Drupal Day 2012 - Automating Drupal Development: Make!les, Features and Beyond
Drupal Day 2012 - Automating Drupal Development: Make!les, Features and BeyondDrupal Day 2012 - Automating Drupal Development: Make!les, Features and Beyond
Drupal Day 2012 - Automating Drupal Development: Make!les, Features and Beyond
 
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
 
From Zero to Hadoop: a tutorial for getting started writing Hadoop jobs on Am...
From Zero to Hadoop: a tutorial for getting started writing Hadoop jobs on Am...From Zero to Hadoop: a tutorial for getting started writing Hadoop jobs on Am...
From Zero to Hadoop: a tutorial for getting started writing Hadoop jobs on Am...
 
Drush to simplify Drupalers work - Sivaji
Drush to simplify Drupalers work - SivajiDrush to simplify Drupalers work - Sivaji
Drush to simplify Drupalers work - Sivaji
 
Ts drupal6 module development v0.2
Ts   drupal6 module development v0.2Ts   drupal6 module development v0.2
Ts drupal6 module development v0.2
 
Face your fears: Drush and Aegir
Face your fears: Drush and AegirFace your fears: Drush and Aegir
Face your fears: Drush and Aegir
 
Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016
Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016
Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016
 
Drupal VM for Drupal 8 Dev - Drupal Camp STL 2017
Drupal VM for Drupal 8 Dev - Drupal Camp STL 2017Drupal VM for Drupal 8 Dev - Drupal Camp STL 2017
Drupal VM for Drupal 8 Dev - Drupal Camp STL 2017
 
Exploring composer in drupal 8 with drupal project - salva molina
Exploring composer in drupal 8 with drupal project - salva molinaExploring composer in drupal 8 with drupal project - salva molina
Exploring composer in drupal 8 with drupal project - salva molina
 

Mehr von Roberto Peruzzo

COSA SIGNIFICA CONVERTIRE UN MODULO DA D7 A D8
COSA SIGNIFICA CONVERTIRE UN MODULO DA D7 A D8COSA SIGNIFICA CONVERTIRE UN MODULO DA D7 A D8
COSA SIGNIFICA CONVERTIRE UN MODULO DA D7 A D8Roberto Peruzzo
 
Studio di una Architettura per un Sistema Distributivo ad Alta Affidabilità
Studio di una Architettura per un Sistema Distributivo ad Alta AffidabilitàStudio di una Architettura per un Sistema Distributivo ad Alta Affidabilità
Studio di una Architettura per un Sistema Distributivo ad Alta AffidabilitàRoberto Peruzzo
 
Implementazione Object-oriented del metodo AMR per il calcolo di un campo gra...
Implementazione Object-oriented del metodo AMR per il calcolo di un campo gra...Implementazione Object-oriented del metodo AMR per il calcolo di un campo gra...
Implementazione Object-oriented del metodo AMR per il calcolo di un campo gra...Roberto Peruzzo
 
DrupalDay - Localizing Drupal Commerce
DrupalDay - Localizing Drupal CommerceDrupalDay - Localizing Drupal Commerce
DrupalDay - Localizing Drupal CommerceRoberto Peruzzo
 
Drupal Days 2014 - Drupal Commerce Kickstart
Drupal Days 2014 - Drupal Commerce KickstartDrupal Days 2014 - Drupal Commerce Kickstart
Drupal Days 2014 - Drupal Commerce KickstartRoberto Peruzzo
 

Mehr von Roberto Peruzzo (6)

COSA SIGNIFICA CONVERTIRE UN MODULO DA D7 A D8
COSA SIGNIFICA CONVERTIRE UN MODULO DA D7 A D8COSA SIGNIFICA CONVERTIRE UN MODULO DA D7 A D8
COSA SIGNIFICA CONVERTIRE UN MODULO DA D7 A D8
 
DevOps is dead
DevOps is deadDevOps is dead
DevOps is dead
 
Studio di una Architettura per un Sistema Distributivo ad Alta Affidabilità
Studio di una Architettura per un Sistema Distributivo ad Alta AffidabilitàStudio di una Architettura per un Sistema Distributivo ad Alta Affidabilità
Studio di una Architettura per un Sistema Distributivo ad Alta Affidabilità
 
Implementazione Object-oriented del metodo AMR per il calcolo di un campo gra...
Implementazione Object-oriented del metodo AMR per il calcolo di un campo gra...Implementazione Object-oriented del metodo AMR per il calcolo di un campo gra...
Implementazione Object-oriented del metodo AMR per il calcolo di un campo gra...
 
DrupalDay - Localizing Drupal Commerce
DrupalDay - Localizing Drupal CommerceDrupalDay - Localizing Drupal Commerce
DrupalDay - Localizing Drupal Commerce
 
Drupal Days 2014 - Drupal Commerce Kickstart
Drupal Days 2014 - Drupal Commerce KickstartDrupal Days 2014 - Drupal Commerce Kickstart
Drupal Days 2014 - Drupal Commerce Kickstart
 

Kürzlich hochgeladen

WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdfPearlKirahMaeRagusta1
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2
 
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT  - Elevating Productivity in Today's Agile EnvironmentHarnessing ChatGPT  - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT - Elevating Productivity in Today's Agile EnvironmentVictorSzoltysek
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfonteinmasabamasaba
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesVictorSzoltysek
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...masabamasaba
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech studentsHimanshiGarg82
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfkalichargn70th171
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Hararemasabamasaba
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyviewmasabamasaba
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionOnePlan Solutions
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareJim McKeeth
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastPapp Krisztián
 

Kürzlich hochgeladen (20)

WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT  - Elevating Productivity in Today's Agile EnvironmentHarnessing ChatGPT  - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 

Welcome aboard the team

  • 1. LISBON 2018 DRUPAL DEVELOPER DAYS Welcome aboard the team Roberto Peruzzo
  • 2. Agenda • Why on-boarding is expensive • Ingredients to make easy on-boarding • My recipe
  • 12. What we do? • Develop new features • Manage security updates • Design Drupal projects from scratch
  • 14. W H Y I S A N E W M E M B E R E X P E N S I V E ?
  • 15. The working team is like a family
  • 16. New member can… • help to reach your goals • show you something in a different point of view • improve the quality of what you are doing • teach you something new
  • 19. Because you probably don’t know what he/she needs. Why?
  • 20. Everyone uses their own tools
  • 21. The best path to follow • OS independent • Less tools installed • Automate as much as you can • Local and Live environments have the same settings
  • 22. M Y R E C I P E
  • 23. My Recipe • 1 Git project repo • 1 Docker application • 1 docker-compose.yml by Wodby • 1 RoboFile.php
  • 24. Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. Git https://github.com/robertoperuzzo/ddd-lisbon2018
  • 26. It is a container platform provider that enables true independence between applications and infrastructure and developers and IT ops to unlock their potential and creates a model for better collaboration and innovation. Docker https://www.docker.com/what-docker
  • 27. A container image is a lightweight, stand-alone, executable package of a piece of software that includes everything needed to run it: code, runtime, system tools, system libraries, settings. Docker container https://www.docker.com/what-container
  • 28. Containers are more portable and efficient Containers Virtual Machines
  • 29. With Docker you can create containers holding project specific data while they depend on common images. You can even copy whole development environments from one machine to another or only share the settings of a development environment with others. Why use Docker? https://www.drupal.org/node/2736447
  • 30. Docker4Drupal is a set of docker images optimized for Drupal. Use docker-compose.yml file from the latest stable release to spin up local environment on Linux, Mac OS X and Windows. Docker4drupal https://github.com/wodby/docker4drupal
  • 31. Robo is a task runner you always have been looking for. It allows you to write fully customizable tasks in common OOP PHP style. Robo.li https://robo.li
  • 32. P R E PA R I N G Y O U R P R O J E C T L O C A L D E V S E T T I N G S
  • 33. docker-compose.yml - mariadb mariadb: image: wodby/mariadb:$MARIADB_TAG container_name: "${PROJECT_NAME}_mariadb" stop_grace_period: 30s environment: MYSQL_ROOT_PASSWORD: $DB_ROOT_PASSWORD MYSQL_DATABASE: $DB_NAME MYSQL_USER: $DB_USER MYSQL_PASSWORD: $DB_PASSWORD # volumes: # - ./mariadb-init:/docker-entrypoint-initdb.d # Place init .sql file(s) here. # - /path/to/mariadb/data/on/host:/var/lib/mysql # I want to manage volumes manually.
  • 34. docker-compose.yml - php php: image: wodby/drupal-php:$PHP_TAG container_name: "${PROJECT_NAME}_php" environment: PHP_SENDMAIL_PATH: /usr/sbin/sendmail -t -i -S mailhog:1025 DB_HOST: $DB_HOST DB_USER: $DB_USER DB_PASSWORD: $DB_PASSWORD DB_NAME: $DB_NAME DB_DRIVER: $DB_DRIVER volumes: ## For macOS users (https://docs.docker.com/docker-for-mac/osxfs-caching/) - ./:/var/www/html:delegated
  • 35. docker-compose.yml - ngnix nginx: image: wodby/drupal-nginx:$NGINX_TAG container_name: "${PROJECT_NAME}_nginx" depends_on: - php environment: NGINX_STATIC_CONTENT_OPEN_FILE_CACHE: "off" NGINX_ERROR_LOG_LEVEL: debug NGINX_BACKEND_HOST: php NGINX_SERVER_ROOT: /var/www/html/web volumes: - ./:/var/www/html:delegated labels: - 'traefik.backend=nginx' - 'traefik.port=80' - 'traefik.frontend.rule=Host:${PROJECT_BASE_URL}' https://docs.docker.com/docker-for-mac/osxfs-caching/#delegated
  • 37. settings.php // Set up a config sync directory. // This is defined inside the read-only "config" directory, deployed via Git. $config_directories[CONFIG_SYNC_DIRECTORY] = $app_root . '/../config/ sync'; // Local settings. These come last so that they can override anything. if (file_exists($app_root . '/' . $site_path . '/settings.local.php')) { include $app_root . '/' . $site_path . '/settings.local.php'; }
  • 38. settings.local.php - database // Docker database container setting. $databases['default']['default'] = [ 'database' => 'drupal', 'username' => 'drupal', 'password' => 'drupal', 'prefix' => '', 'host' => 'mariadb', 'port' => '3306', 'namespace' => 'DrupalCoreDatabaseDrivermysql', 'driver' => 'mysql', ];
  • 39. settings.local.php - trusted host // Trusted hosts. $settings['trusted_host_patterns'] = [ '^ddd18.docker.localhost$', ];
  • 40. Setup Robo > cd myproject > composer require consolidation/robo > ./vendor/bin/robo init
  • 41. RoboFile.php <?php class RoboFile extends RoboTasks { /** * Set up the local dev environment ready to start working on. */ public function build() { // Put here your tasks. } }
  • 42. RoboFile.php - drupal init // Drupal init. $this->taskExecStack() ->stopOnFail() ->exec('make up') ->exec('docker-compose exec --user 82 php drupal init -- destination=/var/www/html/console/ --no-interaction') ->run();
  • 43. RoboFile.php - local settings // Local settings. $this->taskFilesystemStack() ->stopOnFail() ->chmod('web/sites/default', 0755) ->symlink('../../../settings.local.php', 'web/sites/ default/settings.local.php') ->chmod('web/sites/default', 0555) ->run();
  • 44. RoboFile.php - drupal install // Drupal install. $this->taskExecStack() ->exec('docker-compose exec --user 82 php drupal site:install --force --no-interaction') ->run();
  • 45. RoboFile.php - db settings // Remove database settings from settings.php. $this->taskFilesystemStack() ->chmod('web/sites/default/settings.php', 0644) ->run(); $this->taskReplaceInFile('web/sites/default/settings.php') ->regex('/$databases[([.Ss]*));/i') ->to('') ->run(); $this->taskFilesystemStack() ->chmod('web/sites/default/settings.php', 0444) ->run();
  • 46. W H AT T H E N E W M E M B E R H A S T O D O
  • 47. Clone the project > git clone <git-repo> <project-name>
  • 48.
  • 49. Build the project > cd <project-name> > composer install
  • 50.
  • 52. Build the local environment > ./vendor/bin/robo build
  • 53.
  • 54.
  • 55. D E M O T I M E
  • 56. A N Y Q U E S T I O N S ? @robertoperuzzo
 roberto.peruzzo@studioqua.it
  • 57. @robertoperuzzo T H A N K S F O R Y O U R T I M E !