GitLab (in progress!)
Table of Contents
Chapter 1 - Open Source Development @ GitLab
- Clone GitLab Community Edition (CE) Codebase
- Read GitLab CE Documentation
- Read GitLab CE Contributing Guide
- Setup GitLab CE Public SSH Keys
- SSH Key Guide
- Check locally for existing key
- Configure GitLab to run at Relative URL (i.e. http://127.0.0.1:8080/gitlab) instead of a FQDN
- https://docs.gitlab.com/ce/install/relative_url.html
Tech
- Definitions
- FQDN - Full Qualified Domain Name
- PORO - Plain Old Ruby Objects (vs ORM like ActiveRecord)
- LDAP - Lightweight Directory Access Protocol for accessing distributed directory info services over IP network
-
MRI - Matz’s Ruby Interpreter (official Ruby interpreter CRuby)
- Gems (not all listed)
- Knapsack - Loaded by Rakefile it splits tests across CI nodes ensuring tests run comparable time on each node
- rails-deprecated_sanitizer - Allows use of Rails 4.2 with old html-scanner for HTML/XML sanitization (XSS prevention) instead of Loofah
- responders - Adds responders (i.e.
respond_with
) automatically to flash messages, HTTP headers, controller action redirection, etc - sprockets-es6 - Sprockets transformer converts ES6 into vanilla ES5 using Babel JS
- default_value_for - Allows declarative definition of default values in ActiveRecord models
- pg - PostgreSQL DB
- mysql - MySQL DB
- devise - Authentication
- devise-two-factor - Two-factor Authentication for Devise using TOTP (time-based one-time password algorithm)
- doorkeeper - OAuth 2 for Rails app
- omniauth - Multi-provider Authentication
- jwt - OAuth JSON Web Token (JWT)
- recaptcha - reCAPTCHA website spam protection
- akismet - Ruby client for Akismet API to prevent spam in comments and contact forms
- rqrcode-rails3 - QR code rendering in Rails using SVG, PNG, JPEG or GIF format
- attr_encrypted - Generate attr_accessors that encrypt and decrypt attributes for PORO and ORM
- u2f - Register and Authenticate keychain devices and mobile phones to securely access web services. Server-side it uses U2F protocol (Two-Factor Authentication Standard) defined by FIDO Alliance specifications
- browser - Detect web browser, bots, and device info
- gitlab_git - GitLab Git library repo
- gitlab_omniauth-ldap - GitLab OAuth Middleware (LDAP)
- gollum-lib - Git-powered Wiki and API
- gollum-rugged_adapter - Backend adapter for Gollum to use Rugged (libgit2) instead of Grit
- github-linguist - Detect blob languages used in repository and generate language breakdown graphs
- grape - REST-like API framework for Ruby with simple DSL
- grape-entity - Facade on top of object model uses Entities to convert Ruby objects into exposed API responses
- rack-cors - Rack Middleware to allow AJAX by handling CORS
- kaminari - Pagination
- hamlit - HAML implementation (>8x faster than original HAML)
- carrierwave - File uploads (vs Paperclip)
- dropzonejs-rails - Drag-and-drop File Upload using JS
- fog - Interface for metagem integration of cloud service providers
- unf - Fog dependency for AWS storage. Unicode Normalisation Form (UNF) support for Ruby
- seed-fu - Seed data system handing for Rails
- nokogiri - HTML/XML Dom, SAX and Reader parser. Search documents via XPath or CSS3 selectors
- html-pipeline - Chainable HTML filters (i.e. markdown, syntax highlighting, Emoji, Task Lists) to transform HTML string or Nokogiri fragment into markup
- deckar01-task_list - Integrate Task Lists into Markdown. Integrates with HTML Pipeline
- gitlab-markup - Convert markup to HTML, sanitise HTML from harm, apply syntax highlighting, apply HTML Pipeline filters, and render
- redcarpet - Markdown processing
- RedCloth - Parse Textile to convert into HTML for Ruby
- rdoc - Generate HTML and online documentation
- org-ruby - Parse org-mode files and convert into HTML or Textile
- creole - Creole Markup language to XHTML converter
- wikicloth - MediaWiki Markup language implemented in Ruby
- asciidoctor - Convert AsciiDoc to HTML5 format
- rouge - Syntax highlighter outputs HTML
- truncato - Truncate HTML strings whilst keeping markup valid
- diffy - Generate difference from two strings or files using Unix diff algorithm
- unicorn - HTTP server for Rack applications for serving fast clients. Slow clients must use reverse proxy for full buffering of request/response
- unicorn-worker-killer - Kill and automatic restart of Unicorn workers based on max qty requests and max process memory (RSS)
- state_machines-activerecord - Integrate State Machines into ActiveRecord
- after_commit_queue - Allows callbacks on event to run after State Machine DB transaction committed using hook
- acts-as-taggable-on - Custom tags within tag contexts for Issues in Social Networking to allow differentiation between tags
- sidekiq-cron - Scheduling add-on for Sidekiq whereby Cron Notation used and parsed by Rufus-Scheduler to runs a thread alongside Sidekiq workers to schedule jobs at specific times
- settingslogic - Settings using ERB enabled YAML file with singleton design pattern
- version_sorter - Sort strings representing version numbers
- redis-rails - Cache store for Redis in Ruby on Rails (Cache, Session, HTTP Cache)
- babosa - Create human-friendly identifiers (slugs) and language transliteration
- rack-attack - Rack Middleware to block, throttle and track client requests
- ace-rails-ap - Ace embeddable code editor written in JS and maintained by Cloud9 IDE
- mousetrap-rails - Keyboard shortcut handling in web apps
- charlock_holmes - Detect character encodings in provided input
- oj - Optimised JSON (faster JSON parsing and object marshalling)
- chronic - Natural language date/time parser
- addressable - Parse URL/URI
- gemojione - Expose EmojiOne unicode/image assets and APIs to easily lookup and convert Emoji representations
- gon - Use Gon to push Ruby variables to Gon watchers in JS files (uses AJAX)
- jquery-atwho-rails - Bind textarea for WYSIWYG with Emoji using At.js
- request-store - Allows use of
RequestStore.store
instead ofThread.current
so values stored local to request and do not remain longer than expect regardless of whether using a Single-Threaded (Webrick) or Multi-Threaded web server (Thin, Puma) - base32 - Encode string in base32
- select2-rails - Selection boxes with searching, remote data sets, and infinite scrolling of results
- virtus - Extend Classes, Modules, Instances with optional Data Types accompanying Attributes
- net-ssh - SSH2 client protocol implementation to allow program to invoke and interact with processes on remote servers via SSH2
- sentry-raven - Sentry crash/error reporting API integration
- premailer-rails - CSS styling of emails
- allocations - Count objects allocated but not released (alternative to using slower
ObjectSpace.each_object
) - method_source - Utility that returns sourcecode of a method
- influxdb - Ruby Client for InfluxDB (open source time series DB supported by Grafana)
- foreman - Procfile based applications management
- brakeman - Static analysis security vulnerability scanner for Ruby on Rails
- letter_opener_web - Interface to browse emails of the letter_opener gem
- rerun - Launches program, watches filesystem, and restarts app when filesystem changes (no-frills alternative to Guard)
- bullet - Notifies user when should add eager loading (N+1 queries) to reduce quantity of queries made by app to increase performance
- rblineprof - Ruby codebase profiler showing time to load each line of code
- ruby-prof - Similar to above
- web-console - Debugging tool that provides web console in browser of Ruby on Rails app
- activerecord_sane_schema_dumper - Remove useless whitespace from Rails generated db/schema.rb
- fuubar - RSpec formatter that uses progress bar instead of string of letters for feedback
- teaspoon - JS test runner for Rails (i.e. use with teaspoon-jasmine Gem)
- flay - Analyse two code snippets to compare structural similarities
- bundler-audit - Audit a Gemfile for vulnerable versions of gems and insecure sources
- benchmark-ips - Benchmarking Ruby code block with iterations per second (IPS)
- sham_rack - Test Rack app by stubbing out external HTTP services
- timecop - Test time-dependent code (freeze or travel in time)
- octokit - Ruby toolkit for GitHub API
- mail_room - Forward mail from Gmail IMAP to callback URL or job worker (i.e. Sidekiq for later processing)
- email_reply_parser - Parse plain text email content
- activerecord-session_store - Session store backed by ActiveRecord class
- nested_form - Handle multiple nested models in single form (i.e. Formtastic)
- paranoia -
destroy
on ActiveRecord object does not destroy object, instead adeleted_at
field is added - health_check - Rails app up and running with access to configured resources and integration with performance monitoring tools (i.e. NewRelic)
-
vmstat - Check Memory, CPU, Network, etc
-
Rakefile - loads GitLab Rails app and Knapsack
-
Docker Image of GitLab CE - Refer to ./docker directory and docker-compose.yml
- Unicorn - config.ru
- Ruby version - .ruby-version # 2.3.1
- pkgr.io Dependencies - .pkgr.yml specifies additional build and runtime dependencies to install on server
-
GitLab CI - .gitlab-ci.yml
- Mechanism to run dynos for application on Heroku platform
- Development - Procfile
- Production
- RUnit in https://gitlab.com/gitlab-org/omnibus-gitlab OR
- Init scripts in lib/support/init.d (which call scripts in bin/)
Jobs @ GitLab
Help @ GitLab
Written on October 26, 2016