Any developer who has worked in team will have to face the activity of setting up their local work environment to start contributing to the project. Whether you are working remotely or onsite, this kind of activity is often time consuming due to the personal configurations of your workstation. This "time wasting" is not predictable and even justifiable to the customer, that is the issue. I think the only way to fix that it's to find a reproducible process which takes the same time to be completed, indipendently by the operating system and configurations. This is why, starting from the last project I've been involved in, I started to lay the groundwork to build it using Docker, Config Split, Drupal Console and Drush.
My session is aimed at programmers and project managers looking for a way to bring new developers on board and make them operational in a given time. It will be a good starting point to discuss about that.
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
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
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
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';
}
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.
}
}