Introduction to Verdaccio - Trivago 2019

juancarlospicado 118 views 59 slides Jan 07, 2020
Slide 1
Slide 1 of 59
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39
Slide 40
40
Slide 41
41
Slide 42
42
Slide 43
43
Slide 44
44
Slide 45
45
Slide 46
46
Slide 47
47
Slide 48
48
Slide 49
49
Slide 50
50
Slide 51
51
Slide 52
52
Slide 53
53
Slide 54
54
Slide 55
55
Slide 56
56
Slide 57
57
Slide 58
58
Slide 59
59

About This Presentation

Introduction to Verdaccio in the Trivago Open Source conference by Ayush Sharma & Juan Picado


Slide Content

A lightweight private npm proxy registry Ayush Sharma & Juan Picado trivago open-source conference Dec 2nd 2019

Juan Picado Front-End Engineer at eBay Maintainer at Verdaccio Berlin 🇩🇪 @jotadeveloper

Ayush Sharma Software Engineer at trivago Maintainer at Verdaccio Düsseldorf 🇩🇪 @ayusharma_

Plan The problems An introduction to Verdaccio ( by Juan ) Live demo with Verdaccio Q & A

Front-End Tooling Back-End What is a registry? All projects meet in the registry

Node.js Package Managers npm Inc Facebook, Google, Exponent, Tilde Zoltan Kochan

General workflow Public registry eg. NPM Inc Mostly we interact with public registries directly.

All packages come from the registry https:// twitter .com/bitandbang/status/1134872073896169472

Concept of a private registry Public Remote(s)

You are missing a lot

The Problem(s)

Availability

The main registry might remove packages by mistake https://blog.npmjs.org/post/169432444640/npm-operational-incident-6-jan-2018

Control / Sharing / Integration

Your code is just small part of your Application https://twitter.com/liran_tal/status/1067775376229834754

A modern application is highly modularized

https://twitter.com/housecor/status/1078634947831914496 97% of the code your app uses is shared

https://twitter.com/housecor/status/1078634947831914496 create-react-app has ~100k weekly downloads .

https://twitter.com/rauchg/status/807626710350839808 You need private registry to write integration tests.

Security

You might have made a mistake https://twitter.com/seldo/status/791061480904855552

You might have made a mistake https://blog.npmjs.org/post/101934969510/oh-no-i-accidentally-published-private-data-to

Affordability / Pricing

Self Hosted SaaS 💰💰💰 💰💰 SaaS uses volumed based pricing FOSS

Case Study “We ran the math, npm charges $7/customer/mo and every user has to have a paid account ; verdaccio can effortlessly scale to hundreds of users and tens of packages a month” “We use it in production on a single DigitalOcean droplet, $5/mo ” https://sheetjs.com/

Quick recap to problems Availability Control Security Affordability Latency ( Not a big factor ) Firewall ( In China )

A lightweight private npm proxy registry

Lightweight Private Registry Proxy (Uplinks) Cache (Storage) Entirely Optional Configuration Pluggable Application Web User Interface MIT License What’s Verdaccio?

Installation node > 8

Docker and Kubernetes 6 .600.000 pulls https://github.com/verdaccio/docker-examples

Private Registry All benefits of npmjs registry without sending the code to the public

@scopes and .npmrc It is hard to maintain and insecure

Uplinks Handle the distribution efficiently pnpm install --registry http://verdaccio.npm.tool

Accessing secured registries Uplinks

Storage can be hosted in the cloud Storage

Web Interface React, Typescript, Material-UI

Plugins Build plugin your own plugin https://verdaccio.org/docs/en/dev-plugins

E2E Tests Testing packages before publishing them

E2E Verdaccio helps avoiding mistakes https://twitter.com/adamlacombe/status/1084968234607144961

E2E create-react-app

E2E

Keep in Touch http://chat.verdaccio.org https://opencollective.com/verdaccio https://twitter.com/verdaccio_npm https://github.com/verdaccio

https://verdaccio.org/docs/en/talks

Thanks