Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Private npm - What can you do with your own npm...
Search
Szabolcs Szabolcsi-Toth
November 19, 2014
Programming
0
100
Private npm - What can you do with your own npm registry
My talk for the NodeBp meetup, November 2014
Szabolcs Szabolcsi-Toth
November 19, 2014
Tweet
Share
Other Decks in Programming
See All in Programming
XP, Testing and ninja testing
m_seki
3
220
Railsアプリケーションと パフォーマンスチューニング ー 秒間5万リクエストの モバイルオーダーシステムを支える事例 ー Rubyセミナー 大阪
falcon8823
4
1k
童醫院敏捷轉型的實踐經驗
cclai999
0
210
Select API from Kotlin Coroutine
jmatsu
1
210
技術同人誌をMCP Serverにしてみた
74th
1
470
すべてのコンテキストを、 ユーザー価値に変える
applism118
2
1.1k
#kanrk08 / 公開版 PicoRubyとマイコンでの自作トレーニング計測装置を用いたワークアウトの理想と現実
bash0c7
1
660
#QiitaBash MCPのセキュリティ
ryosukedtomita
0
530
GoのGenericsによるslice操作との付き合い方
syumai
3
710
PicoRuby on Rails
makicamel
2
120
ふつうの技術スタックでアート作品を作ってみる
akira888
0
230
『自分のデータだけ見せたい!』を叶える──Laravel × Casbin で複雑権限をスッキリ解きほぐす 25 分
akitotsukahara
1
600
Featured
See All Featured
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
48
5.4k
Build The Right Thing And Hit Your Dates
maggiecrowley
36
2.8k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
8
800
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
7
720
StorybookのUI Testing Handbookを読んだ
zakiyama
30
5.8k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
8
680
Scaling GitHub
holman
459
140k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
3.1k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Large-scale JavaScript Application Architecture
addyosmani
512
110k
How to train your dragon (web standard)
notwaldorf
94
6.1k
Transcript
PRIVATE NPM What can you do with your own npm
registry
HELLO I'm Szabolcs Szabolcsi-Toth Senior Front-end Engineer @ Ustream @_Nec
NPM
NPM Public and open ecosystem of open source modules Has
several public mirrors
NPM IS GREAT but "what if" you want to do
sensitive stuff you want to do proprietary stuff you want to use npm, but internally distribute modules you don’t trust availability
PRIVATE NPM REGISTRY
“Don’t run your own registry, use ours” Laurie Voss
PRIVATE NPM REGISTRIES Full mirror Caching GBytes of data Only
what needed
OUR USECASE AT USTREAM
SYSOP REQUIREMENT “what happens when an npm install dies during
a major deployment?” “we're f**ked”
SINOPIA github.com/rlidwka/sinopia
SINOPIA caching registry use with chef/docker simple storage
WORKING WITH SINOPIA
AUTHENTICATION simple adduser publisher/reader rights since npm 1.5-alpha (v2.0.0) users
can scope credentials to different registries
PER-PROJECT CONFIGURATION .npmrc per project registry configuration since v1.4.11 package.json
use ‘publishConfig’
PUBLISH - UNPUBLISH n p m p u b l
i s h - - r e g i s t r y h t t p : / / y o u r - o w n . r e g i s t r y . u r l m o d u l e n a m e n p m u n p u b l i s h - - f o r c e - - r e g i s t r y h t t p : / / y o u r - o w n . r e g i s t r y . u r l m o d u l e n a m e
SECURITY Ours only accessible from a well defined domain /
ip pool
USECASES
YOU CAN DO... private modules (obviously)
YOU CAN DO... Versioned modules for deployment Configuration management and
distribution
YOU CAN DO... Not just backend modules Front-end module registry
YOU CAN... Prepare for the open source world Test, use,
then go open source Get used to the tools, workflow and mindset
EXAMPLES
CONFIGURATION MANAGEMENT AND DISTRIBUTION This is how we distribute configurations
for our node apps
BUILD & DEPLOYMENT GIT FEATURE BETA LIVE FEATURE BETA LIVE
BUILD & DEPLOYMENT GIT NPM FEATURE BETA LIVE FEATURE BETA
LIVE MODULE v0.2.4 MODULE v0.1.2 MODULE v0.2.1 MODULE v0.1.1
BUILD & DEPLOYMENT GIT NPM FEATURE BETA LIVE FEATURE BETA
LIVE MODULE v0.2.4 MODULE v0.1.2 MODULE v0.2.1 MODULE v0.1.1
BUILD & DEPLOYMENT GIT NPM FEATURE BETA LIVE FEATURE BETA
LIVE MODULE v0.2.4 MODULE v0.1.2 MODULE v0.2.1 MODULE v0.1.1
BUILD & DEPLOYMENT GIT NPM FEATURE BETA LIVE FEATURE BETA
LIVE MODULE v0.2.4 MODULE v0.1.2 MODULE v0.2.1 MODULE v0.1.1
BUILD & DEPLOYMENT GIT NPM FEATURE BETA LIVE FEATURE BETA
LIVE MODULE v0.2.4 MODULE v0.1.2 MODULE v0.2.1 MODULE v0.1.1
BUILD & DEPLOYMENT GIT NPM FEATURE BETA LIVE FEATURE BETA
LIVE MODULE v0.2.4 MODULE v0.1.2 MODULE v0.2.1 MODULE v0.1.1
CONFIGURATION MANAGEMENT AND DISTRIBUTION Works with Modules, or even better:
Configurations
FRONT-END MODULES Internal ‘bower’ using our private npm registry Flat
dep tree cli, or package.json This is also a problem at npm
FINALLY
DRAWBACKS Feature lag Deal with securing and hosting and backup
THE FUTURE npm is working on this! scoped packages (prefixed
with your org)
NPME npme (as enterprise) use it like npm you host
it selective mirror OAuth2, more is coming developed by npm - no feature lag still in trial
NPME It's not free Support npm, use a good solution
no price information yet
THANK YOU! @_Nec