Slide 1

Slide 1 text

No content

Slide 2

Slide 2 text

@brodock Gabriel Mazetto

Slide 3

Slide 3 text

3

Slide 4

Slide 4 text

Why your company should have a Developer’s Toolkit and how to build one

Slide 5

Slide 5 text

This talk is programming language agnostic

Slide 6

Slide 6 text

I will focus more on the Why and less on the How…
 
 But you will learn enough to be able to do it yourself at the end, trust me.

Slide 7

Slide 7 text

Let’s start talking about why you should do it…

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

All that time invested (wasted) solving programming challenges online were finally rewarded!

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

Now you are in and you are part of the team!

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

No content

Slide 15

Slide 15 text

But instead of something simple and straightforward…

Slide 16

Slide 16 text

No content

Slide 17

Slide 17 text

Yes, your new company uses Cloud and SaaS for everything…

Slide 18

Slide 18 text

No content

Slide 19

Slide 19 text

No content

Slide 20

Slide 20 text

No content

Slide 21

Slide 21 text

No content

Slide 22

Slide 22 text

Let’s switch roles a little bit… You are now wearing the Tech-Lead Hat

Slide 23

Slide 23 text

No content

Slide 24

Slide 24 text

No content

Slide 25

Slide 25 text

No content

Slide 26

Slide 26 text

Have you ever thought of how much it cost to onboard a new developer?

Slide 27

Slide 27 text

Salary WorkDaysInAMonth * DaysOnboarding Salary 21 * 10

Slide 28

Slide 28 text

Let’s look at some Salary data on Glassdoor…

Slide 29

Slide 29 text

No content

Slide 30

Slide 30 text

No content

Slide 31

Slide 31 text

No content

Slide 32

Slide 32 text

Salary 21 * 10 6500 21 * 10 = 3905,23

Slide 33

Slide 33 text

So let’s talk about how to do it…

Slide 34

Slide 34 text

Here are a few principles to guide you…

Slide 35

Slide 35 text

Principles:
 
 1. minimal effort to get started

Slide 36

Slide 36 text

Principles:
 
 2. good enough defaults

Slide 37

Slide 37 text

Principles:
 
 3. expose the internals and make it easy to hack

Slide 38

Slide 38 text

Principles:
 
 4. automate/scriptize as much as possible

Slide 39

Slide 39 text

Principles:
 
 5. be as flexible as possible

Slide 40

Slide 40 text

No content

Slide 41

Slide 41 text

It hides complexity, but it doesn’t remove it

Slide 42

Slide 42 text

Packaging new software is not easy…

Slide 43

Slide 43 text

You are always running in “production mode” 
 by default

Slide 44

Slide 44 text

No content

Slide 45

Slide 45 text

# create your own postgresql data per application mkdir postgres initdb --locale=C -E utf-8 postgres/data # run postgresql postgresql -D /path/to/your/postgres/data \ -k /path/to/your/postgres -h 127.0.0.1

Slide 46

Slide 46 text

# create your own redis server per application mkdir redis cd redis && wget https://raw.githubusercontent.com/antirez/redis/5.0/ redis.conf # run redis server redis-server /path/to/redis/redis.conf

Slide 47

Slide 47 text

How to package and distribute?

Slide 48

Slide 48 text

# Simple Procfile redis: redis-server redis/redis.conf postgresql: postgresql -D pg/data -k pg -h 127.0.0.1 # Execute with `foreman start`

Slide 49

Slide 49 text

No content

Slide 50

Slide 50 text

Here are some other useful tools you can use

Slide 51

Slide 51 text

Makefiles

Slide 52

Slide 52 text

Rules and Dependencies

Slide 53

Slide 53 text

.NOTPARALLEL: 
 all: install configure install: echo "Use any shell command here." echo "Syntax require we ident with TABs" apt-get install git -y configure: git-config --global user.name "Gabriel Mazetto" git-config --global user.email "[email protected]"

Slide 54

Slide 54 text

Custom variables

Slide 55

Slide 55 text

# Local variables git_name: 'Gabriel Mazetto' git_email: '[email protected]' 
 # Exported variables RAILS_ENV: 'test'
 
 .NOTPARALLEL: 
 all: install configure install: @echo "Use any shell command here." @echo "Syntax require we ident with TABs" apt-get install git -y configure: git-config --global user.name "${git_name}" git-config --global user.email "${git_email}"

Slide 56

Slide 56 text

Interfearence Steps

Slide 57

Slide 57 text

.NOTPARALLEL: 
 all: .git-config .git-config: @echo "this will be executed only once, or whenever you remove the file" git-config --global user.name "Gabriel Mazetto" git-config --global user.email "[email protected]" clean: rm .git-config

Slide 58

Slide 58 text

.NOTPARALLEL: 
 all: .git-config .git-config: @echo "this will be executed only once, or whenever you remove the file" git-config --global user.name "Gabriel Mazetto" git-config --global user.email "[email protected]" # make sure clean is not matched to an existing file on disk .PHONY: clean clean: rm .git-config

Slide 59

Slide 59 text

Some other uses for a Makefile…

Slide 60

Slide 60 text

Rakefiles

Slide 61

Slide 61 text

desc 'Install all dependencies' task :install do puts "Use any shell command here." puts "Syntax require we ident with TABs" system "apt-get install git -y" end desc 'Configure everything' task :configure do system 'git-config --global user.name "Gabriel Mazetto" system 'git-config --global user.email "[email protected]"' end task :default => [:install, :configure]

Slide 62

Slide 62 text

file '.git-config' do system 'git-config --global user.name "Gabriel Mazetto"' end directory 'gitlab' do system 'git clone https://gitlab.com/gitlab-org/gitlab-ce .' end task :clone_to, [:path] do system "git clone https://gitlab.com/gitlab-org/gitlab-ce #{@path}" end

Slide 63

Slide 63 text

How we do at

Slide 64

Slide 64 text

GitLab depends on multiple applications with specific configurations

Slide 65

Slide 65 text

Production:
 Omnibus setup,
 
 Kubernetes Helm Chart

Slide 66

Slide 66 text

No content

Slide 67

Slide 67 text

GitLab Development Kit
 (GDK)

Slide 68

Slide 68 text

# Read the Getting Started here: # https://gitlab.com/gitlab-org/gitlab-development-kit # install GDK rubygem gem install gitlab-development-kit # initialize a new contained environment gdk init gitlab # will clone and setup everything cd gitlab && gdk install # to execute GitLab on your local machine gdk run # to regenerate configuration files gdk reconfigure # to update all dependent repositories gdk update

Slide 69

Slide 69 text

Questions?

Slide 70

Slide 70 text

Thanks