What is Sass and what are its top alternatives?
Sass is a popular CSS preprocessor that offers features like variables, nesting, mixins, and functions to help streamline and organize stylesheets. It helps improve the efficiency of coding by allowing reusable code snippets and maintaining consistency throughout the project. However, one limitation of Sass is the learning curve for beginners due to the syntax differences from regular CSS.
- Less: Less is a CSS preprocessor that offers features similar to Sass, such as variables, mixins, and nested rules. It is known for its ease of use and compatibility with existing CSS code. Pros include its simpler syntax compared to Sass, while cons include a smaller community and less extensive documentation.
- PostCSS: PostCSS is a tool that allows for transforming CSS with JavaScript plugins, offering flexibility and customizability in the processing of stylesheets. Key features include a wide range of plugins for various tasks and the ability to create custom plugins. Pros include its modular approach and performance optimizations, while cons may include a steeper learning curve for complex setups.
- Stylus: Stylus is a preprocessor with a minimalistic syntax that aims to be expressive and efficient. It allows for defining variables, mixins, and functions in a clean and concise manner. Pros include its simplicity and flexibility, while cons may include a smaller community compared to Sass.
- CSS Modules: CSS Modules is a way to locally scope CSS by default, avoiding global namespace clashes and improving maintainability of styles. It offers features like composition, local scope, and automatic vendor prefixing. Pros include improved encapsulation of styles and better modularization, while cons may include more complex setup compared to traditional preprocessors like Sass.
- Stylelint: Stylelint is a linting tool for CSS that helps enforce consistent coding conventions and detect errors in stylesheets. It can be used alongside any CSS preprocessor, including Sass, to improve code quality and maintainability. Pros include its ability to catch potential issues early on, while cons may include the initial setup and configuration overhead.
- CSS Nano: CSS Nano is a minification tool for CSS that helps optimize stylesheets by removing unnecessary characters and reducing file size. It offers features like minification, compression, and optimization of styles. Pros include improved performance and faster load times, while cons may include potential loss of readability in the minified code.
- Gulp: Gulp is a task runner tool that automates repetitive tasks in the development workflow, such as minification, compilation, and optimization of CSS and other assets. It can be used in conjunction with Sass to streamline the build process. Pros include its flexibility and extensibility through plugins, while cons may include a potentially steep learning curve for beginners.
- Grunt: Grunt is another popular task runner tool similar to Gulp, offering automation of tasks like Sass compilation, image optimization, and code minification. It provides a configuration-based approach to defining tasks in the build process. Pros include its wide range of plugins and community support, while cons may include a more verbose configuration compared to Gulp.
- Tailwind CSS: Tailwind CSS is a utility-first CSS framework that helps build custom designs without writing CSS from scratch. It offers a set of predefined utility classes for common styles and components. Pros include rapid prototyping and streamlined development process, while cons may include a departure from traditional CSS and potential bloating of stylesheets.
- BEM (Block Element Modifier): BEM is a naming convention for CSS classes that helps maintain a clear and structured codebase. It aims to improve readability, scalability, and maintainability of stylesheets by following a specific naming pattern. Pros include better organization and naming consistency, while cons may include the initial learning curve and potential verbosity in class names.
Top Alternatives to Sass
- Stylus
Stylus is a revolutionary new language, providing an efficient, dynamic, and expressive way to generate CSS. Supporting both an indented syntax and regular CSS style. ...
- styled-components
Visual primitives for the component age. Use the best bits of ES6 and CSS to style your apps without stress 💅 ...
- PostCSS
PostCSS is a tool for transforming CSS with JS plugins. These plugins can support variables and mixins, transpile future CSS syntax, inline images, and more. ...
- Bootstrap
Bootstrap is the most popular HTML, CSS, and JS framework for developing responsive, mobile first projects on the web. ...
- Less
Less is a CSS pre-processor, meaning that it extends the CSS language, adding features that allow variables, mixins, functions and many other techniques that allow you to make CSS that is more maintainable, themable and extendable. ...
- node-sass
It is a library that provides binding for Node.js to LibSass, the C version of the popular stylesheet preprocessor, Sass. It allows you to natively compile .scss files to css at incredible speed and automatically via a connect middleware. ...
- JavaScript
JavaScript is most known as the scripting language for Web pages, but used in many non-browser environments as well such as node.js or Apache CouchDB. It is a prototype-based, multi-paradigm scripting language that is dynamic,and supports object-oriented, imperative, and functional programming styles. ...
- Git
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. ...
Sass alternatives & related posts
- Simple69
- Indented syntax54
- Efficient38
- Built for node.js33
- Open source32
- Expressive24
- Maintainable21
- Feature-rich17
- Better than CS13
- Variables6
- Functions5
- @extend directive3
- Contempt for curly brackets2
- Very clean2
- Mixins2
- Is Easy2
- No colons, semi-colons or even curly braces2
- Its unique1
- Dynamic selectors1
- Scriptable1
- Easy Efficiently1
- Transparent1
- Supports orthogonal architecture1
related Stylus posts
We chose Pug because writing raw HTML is about as enjoyable as a fart in a spacesuit, and writing decently-rendering HTML for enterprise email clients is a soul-sucking type of black magic.
Pug takes HTML as a (...markdown) language out of the stack by using a simple, sane syntax to represent HTML in just JavaScript©. Piecing together what you need from any number of standalone - including functional - components is both delightfully easy, and easy to maintain.
All you're really writing are exportable JavaScript functions that take a single Object
parameter - once that concept takes hold, you'll quickly swear off angle brackets in favor of neatly indented and extensible e-mail, invoice, and reporting templates.
There's a jstransformer
filter for instant interop with just about every preprocessor ( Stylus , in our case) and file format out there. Pass that compiled HTML though Juice on Node.js and bam - rugged HTML-emails that hold up in even the wonkiest Lotus Notes clients.
That the end result is 'just HTML' is the final cherry on top. Debugging needs only DevTools, and Puppeteer 's now all you need to create fancy-pants PDFs to your heart's content.
Originally, I was going to start using Sass with Parcel, but then I learned about Stylus, which looked interesting because it can get the property values of something directly instead of through variables, and PostCSS, which looked interesting because you can customize your Pre/Post-processing. Which tool would you recommend?
styled-components
- Very easy to use and integrate11
- Huihui1
related styled-components posts
I was building a personal project that I needed to store items in a real time database. I am more comfortable with my Frontend skills than my backend so I didn't want to spend time building out anything in Ruby or Go.
I stumbled on Firebase by #Google, and it was really all I needed. It had realtime data, an area for storing file uploads and best of all for the amount of data I needed it was free!
I built out my application using tools I was familiar with, React for the framework, Redux.js to manage my state across components, and styled-components for the styling.
Now as this was a project I was just working on in my free time for fun I didn't really want to pay for hosting. I did some research and I found Netlify. I had actually seen them at #ReactRally the year before and deployed a Gatsby site to Netlify already.
Netlify was very easy to setup and link to my GitHub account you select a repo and pretty much with very little configuration you have a live site that will deploy every time you push to master.
With the selection of these tools I was able to build out my application, connect it to a realtime database, and deploy to a live environment all with $0 spent.
If you're looking to build out a small app I suggest giving these tools a go as you can get your idea out into the real world for absolutely no cost.
Recently, the team at Stream published a React Native SDK for our new Chat by Stream product. React Native brings the power of JavaScript to the world of mobile development, making it easy to develop apps for multiple platforms. We decided to publish two different endpoints for the SDK – Expo and React Native (non-expo), to avoid the hurdle and setup of using the Expo library in React Native only projects on the consumer side.
The capability of style customization is one a large deal breaker for frontend SDKs. To solve this, we decided to use styled-components in our SDK, which makes it easy to add support for themes on top of our existing components. This practice reduces the maintenance effort for stylings of custom components and keeps the overall codebase clean.
For module bundling, we decided to go with Rollup.js instead of Webpack due to its simplicity and performance in the area of library/module providers. We are using Babel for transpiling code, enabling our team to use JavaScript's next-generation features. Additionally, we are using the React Styleguidist component documentation, which makes documenting the React Native code a breeze.
- The "babel" of CSS21
- Customizable15
- Autoprefixer8
- Variables2
- Mixins1
- CSS MQPacker1
- PostCSS Flexbugs Fixes1
related PostCSS posts
Simple controls over complex technologies, as we put it, wouldn't be possible without neat UIs for our user areas including start page, dashboard, settings, and docs.
Initially, there was Django. Back in 2011, considering our Python-centric approach, that was the best choice. Later, we realized we needed to iterate on our website more quickly. And this led us to detaching Django from our front end. That was when we decided to build an SPA.
For building user interfaces, we're currently using React as it provided the fastest rendering back when we were building our toolkit. It’s worth mentioning Uploadcare is not a front-end-focused SPA: we aren’t running at high levels of complexity. If it were, we’d go with Ember.js.
However, there's a chance we will shift to the faster Preact, with its motto of using as little code as possible, and because it makes more use of browser APIs. One of our future tasks for our front end is to configure our Webpack bundler to split up the code for different site sections. For styles, we use PostCSS along with its plugins such as cssnano which minifies all the code.
All that allows us to provide a great user experience and quickly implement changes where they are needed with as little code as possible.
ReactQL is a React + GraphQL front-end starter kit. #JSX is a natural way to think about building UI, and it renders to pure #HTML in the browser and on the server, making it trivial to build server-rendered Single Page Apps. GraphQL via Apollo was chosen for the data layer; #GraphQL makes it simple to request just the data your app needs, and #Apollo takes care of communicating with your API (written in any language; doesn't have to be JavaScript!), caching, and rendering to #React.
ReactQL is written in TypeScript to provide full types/Intellisense, and pick up hard-to-diagnose goofs that might later show up at runtime. React makes heavy use of Webpack 4 to handle transforming your code to an optimised client-side bundle, and in throws back just enough code needed for the initial render, while seamlessly handling import
statements asynchronously as needed, making the payload your user downloads ultimately much smaller than trying to do it by hand.
React Helmet was chosen to handle <head>
content, because it works universally, making it easy to throw back the correct <title>
and other tags on the initial render, as well as inject new tags for subsequent client-side views.
styled-components, Sass, Less and PostCSS were added to give developers a choice of whether to build styles purely in React / JavaScript, or whether to defer to a #css #preprocessor. This is especially useful for interop with UI frameworks like Bootstrap, Semantic UI, Foundation, etc - ReactQL lets you mix and match #css and renders to both a static .css file during bundling as well as generates per-page <style>
tags when using #StyledComponents.
React Router handles routing, because it works both on the server and in the client. ReactQL customises it further by capturing non-200 responses on the server, redirecting or throwing back custom 404 pages as needed.
Koa is the web server that handles all incoming HTTP requests, because it's fast (TTFB < 5ms, even after fully rendering React), and its natively #async, making it easy to async/await inside routes and middleware.
Bootstrap
- Responsiveness1.6K
- UI components1.2K
- Consistent943
- Great docs779
- Flexible677
- HTML, CSS, and JS framework472
- Open source411
- Widely used375
- Customizable368
- HTML framework242
- Easy setup77
- Popular77
- Mobile first77
- Great grid system57
- Great community52
- Future compatibility38
- Integration34
- Very powerful foundational front-end framework28
- Standard24
- Javascript plugins23
- Build faster prototypes19
- Preprocessors18
- Grids14
- Good for a person who hates CSS9
- Clean8
- Easy to setup and learn4
- Love it4
- Rapid development4
- Great and easy to use3
- Easy to use2
- Devin schumacher rules2
- Boostrap2
- Community2
- Provide angular wrapper2
- Great and easy2
- Powerful grid system, Rapid development, Customization2
- Great customer support2
- Popularity2
- Clean and quick frontend development2
- Great and easy to make a responsive website2
- Sprzedam opla2
- Painless front end development1
- Love the classes?1
- Responsive design1
- Poop1
- So clean and simple1
- Design Agnostic1
- Numerous components1
- Material-ui1
- Recognizable1
- Intuitive1
- Vue1
- Felxible, comfortable, user-friendly1
- Pre-Defined components1
- It's fast1
- Geo1
- Not tied to jQuery1
- The fame1
- Easy setup21
- Javascript is tied to jquery26
- Every site uses the defaults16
- Grid system break points aren't ideal15
- Too much heavy decoration in default look14
- Verbose styles8
- Super heavy1
related Bootstrap posts
I'm planning to create a web application and also a mobile application to provide a very good shopping experience to the end customers. Shortly, my application will be aggregate the product details from difference sources and giving a clear picture to the user that when and where to buy that product with best in Quality and cost.
I have planned to develop this in many milestones for adding N number of features and I have picked my first part to complete the core part (aggregate the product details from different sources).
As per my work experience and knowledge, I have chosen the followings stacks to this mission.
UI: I would like to develop this application using React, React Router and React Native since I'm a little bit familiar on this and also most importantly these will help on developing both web and mobile apps. In addition, I'm gonna use the stacks JavaScript, jQuery, jQuery UI, jQuery Mobile, Bootstrap wherever required.
Service: I have planned to use Java as the main business layer language as I have 7+ years of experience on this I believe I can do better work using Java than other languages. In addition, I'm thinking to use the stacks Node.js.
Database and ORM: I'm gonna pick MySQL as DB and Hibernate as ORM since I have a piece of good knowledge and also work experience on this combination.
Search Engine: I need to deal with a large amount of product data and it's in-detailed info to provide enough details to end user at the same time I need to focus on the performance area too. so I have decided to use Solr as a search engine for product search and suggestions. In addition, I'm thinking to replace Solr by Elasticsearch once explored/reviewed enough about Elasticsearch.
Host: As of now, my plan to complete the application with decent features first and deploy it in a free hosting environment like Docker and Heroku and then once it is stable then I have planned to use the AWS products Amazon S3, EC2, Amazon RDS and Amazon Route 53. I'm not sure about Microsoft Azure that what is the specialty in it than Heroku and Amazon EC2 Container Service. Anyhow, I will do explore these once again and pick the best suite one for my requirement once I reached this level.
Build and Repositories: I have decided to choose Apache Maven and Git as these are my favorites and also so popular on respectively build and repositories.
Additional Utilities :) - I would like to choose Codacy for code review as their Startup plan will be very helpful to this application. I'm already experienced with Google CheckStyle and SonarQube even I'm looking something on Codacy.
Happy Coding! Suggestions are welcome! :)
Thanks, Ganesa
For Etom, a side project. We wanted to test an idea for a future and bigger project.
What Etom does is searching places. Right now, it leverages the Google Maps API. For that, we found a React component that makes this integration easy because using Google Maps API is not possible via normal API requests.
You kind of need a map to work as a proxy between the software and Google Maps API.
We hate configuration(coming from Rails world) so also decided to use Create React App because setting up a React app, with all the toys, it's a hard job.
Thanks to all the people behind Create React App it's easier to start any React application.
We also chose a module called Reactstrap which is Bootstrap UI in React components.
An important thing in this side project(and in the bigger project plan) is to measure visitor through out the app. For that we researched and found that Keen was a good choice(very good free tier limits) and also it is very simple to setup and real simple to send data to
Slack and Trello are our defaults tools to comunicate ideas and discuss topics, so, no brainer using them as well for this project.
- Better than css215
- Variables177
- Mixins141
- Maintainable99
- Used by bootstrap79
- Open source55
- Extendable50
- Functions43
- Dynamic39
- Fast30
- CSS is valid LESS, very easy to pick up2
related Less posts
ReactQL is a React + GraphQL front-end starter kit. #JSX is a natural way to think about building UI, and it renders to pure #HTML in the browser and on the server, making it trivial to build server-rendered Single Page Apps. GraphQL via Apollo was chosen for the data layer; #GraphQL makes it simple to request just the data your app needs, and #Apollo takes care of communicating with your API (written in any language; doesn't have to be JavaScript!), caching, and rendering to #React.
ReactQL is written in TypeScript to provide full types/Intellisense, and pick up hard-to-diagnose goofs that might later show up at runtime. React makes heavy use of Webpack 4 to handle transforming your code to an optimised client-side bundle, and in throws back just enough code needed for the initial render, while seamlessly handling import
statements asynchronously as needed, making the payload your user downloads ultimately much smaller than trying to do it by hand.
React Helmet was chosen to handle <head>
content, because it works universally, making it easy to throw back the correct <title>
and other tags on the initial render, as well as inject new tags for subsequent client-side views.
styled-components, Sass, Less and PostCSS were added to give developers a choice of whether to build styles purely in React / JavaScript, or whether to defer to a #css #preprocessor. This is especially useful for interop with UI frameworks like Bootstrap, Semantic UI, Foundation, etc - ReactQL lets you mix and match #css and renders to both a static .css file during bundling as well as generates per-page <style>
tags when using #StyledComponents.
React Router handles routing, because it works both on the server and in the client. ReactQL customises it further by capturing non-200 responses on the server, redirecting or throwing back custom 404 pages as needed.
Koa is the web server that handles all incoming HTTP requests, because it's fast (TTFB < 5ms, even after fully rendering React), and its natively #async, making it easy to async/await inside routes and middleware.
Which #GridFramework to use? My team and I closed on Bootstrap !
On a related note and as far as stylesheets go, we had to chose between #CSS, #SCSS, #Sass , Less Finally opted for Sass
As syntactically awesome as the name announces it.
- Needs Microsoft BuildTools and Python 2.7 to install1
related node-sass posts
JavaScript
- Can be used on frontend/backend1.7K
- It's everywhere1.5K
- Lots of great frameworks1.2K
- Fast898
- Light weight745
- Flexible425
- You can't get a device today that doesn't run js392
- Non-blocking i/o286
- Ubiquitousness237
- Expressive191
- Extended functionality to web pages55
- Relatively easy language49
- Executed on the client side46
- Relatively fast to the end user30
- Pure Javascript25
- Functional programming21
- Async15
- Full-stack13
- Setup is easy12
- Future Language of The Web12
- Its everywhere12
- Because I love functions11
- JavaScript is the New PHP11
- Like it or not, JS is part of the web standard10
- Expansive community9
- Everyone use it9
- Can be used in backend, frontend and DB9
- Easy9
- Most Popular Language in the World8
- Powerful8
- Can be used both as frontend and backend as well8
- For the good parts8
- No need to use PHP8
- Easy to hire developers8
- Agile, packages simple to use7
- Love-hate relationship7
- Photoshop has 3 JS runtimes built in7
- Evolution of C7
- It's fun7
- Hard not to use7
- Versitile7
- Its fun and fast7
- Nice7
- Popularized Class-Less Architecture & Lambdas7
- Supports lambdas and closures7
- It let's me use Babel & Typescript6
- Can be used on frontend/backend/Mobile/create PRO Ui6
- 1.6K Can be used on frontend/backend6
- Client side JS uses the visitors CPU to save Server Res6
- Easy to make something6
- Clojurescript5
- Promise relationship5
- Stockholm Syndrome5
- Function expressions are useful for callbacks5
- Scope manipulation5
- Everywhere5
- Client processing5
- What to add5
- Because it is so simple and lightweight4
- Only Programming language on browser4
- Test1
- Hard to learn1
- Test21
- Not the best1
- Easy to understand1
- Subskill #41
- Easy to learn1
- Hard 彤0
- A constant moving target, too much churn22
- Horribly inconsistent20
- Javascript is the New PHP15
- No ability to monitor memory utilitization9
- Shows Zero output in case of ANY error8
- Thinks strange results are better than errors7
- Can be ugly6
- No GitHub3
- Slow2
- HORRIBLE DOCUMENTS, faulty code, repo has bugs0
related JavaScript posts
Oof. I have truly hated JavaScript for a long time. Like, for over twenty years now. Like, since the Clinton administration. It's always been a nightmare to deal with all of the aspects of that silly language.
But wowza, things have changed. Tooling is just way, way better. I'm primarily web-oriented, and using React and Apollo together the past few years really opened my eyes to building rich apps. And I deeply apologize for using the phrase rich apps; I don't think I've ever said such Enterprisey words before.
But yeah, things are different now. I still love Rails, and still use it for a lot of apps I build. But it's that silly rich apps phrase that's the problem. Users have way more comprehensive expectations than they did even five years ago, and the JS community does a good job at building tools and tech that tackle the problems of making heavy, complicated UI and frontend work.
Obviously there's a lot of things happening here, so just saying "JavaScript isn't terrible" might encompass a huge amount of libraries and frameworks. But if you're like me, yeah, give things another shot- I'm somehow not hating on JavaScript anymore and... gulp... I kinda love it.
How Uber developed the open source, end-to-end distributed tracing Jaeger , now a CNCF project:
Distributed tracing is quickly becoming a must-have component in the tools that organizations use to monitor their complex, microservice-based architectures. At Uber, our open source distributed tracing system Jaeger saw large-scale internal adoption throughout 2016, integrated into hundreds of microservices and now recording thousands of traces every second.
Here is the story of how we got here, from investigating off-the-shelf solutions like Zipkin, to why we switched from pull to push architecture, and how distributed tracing will continue to evolve:
https://eng.uber.com/distributed-tracing/
(GitHub Pages : https://www.jaegertracing.io/, GitHub: https://github.com/jaegertracing/jaeger)
Bindings/Operator: Python Java Node.js Go C++ Kubernetes JavaScript OpenShift C# Apache Spark
- Distributed version control system1.4K
- Efficient branching and merging1.1K
- Fast959
- Open source845
- Better than svn726
- Great command-line application368
- Simple306
- Free291
- Easy to use232
- Does not require server222
- Distributed27
- Small & Fast22
- Feature based workflow18
- Staging Area15
- Most wide-spread VSC13
- Role-based codelines11
- Disposable Experimentation11
- Frictionless Context Switching7
- Data Assurance6
- Efficient5
- Just awesome4
- Github integration3
- Easy branching and merging3
- Compatible2
- Flexible2
- Possible to lose history and commits2
- Rebase supported natively; reflog; access to plumbing1
- Light1
- Team Integration1
- Fast, scalable, distributed revision control system1
- Easy1
- Flexible, easy, Safe, and fast1
- CLI is great, but the GUI tools are awesome1
- It's what you do1
- Phinx0
- Hard to learn16
- Inconsistent command line interface11
- Easy to lose uncommitted work9
- Worst documentation ever possibly made7
- Awful merge handling5
- Unexistent preventive security flows3
- Rebase hell3
- When --force is disabled, cannot rebase2
- Ironically even die-hard supporters screw up badly2
- Doesn't scale for big data1
related Git posts
Our whole DevOps stack consists of the following tools:
- GitHub (incl. GitHub Pages/Markdown for Documentation, GettingStarted and HowTo's) for collaborative review and code management tool
- Respectively Git as revision control system
- SourceTree as Git GUI
- Visual Studio Code as IDE
- CircleCI for continuous integration (automatize development process)
- Prettier / TSLint / ESLint as code linter
- SonarQube as quality gate
- Docker as container management (incl. Docker Compose for multi-container application management)
- VirtualBox for operating system simulation tests
- Kubernetes as cluster management for docker containers
- Heroku for deploying in test environments
- nginx as web server (preferably used as facade server in production environment)
- SSLMate (using OpenSSL) for certificate management
- Amazon EC2 (incl. Amazon S3) for deploying in stage (production-like) and production environments
- PostgreSQL as preferred database system
- Redis as preferred in-memory database/store (great for caching)
The main reason we have chosen Kubernetes over Docker Swarm is related to the following artifacts:
- Key features: Easy and flexible installation, Clear dashboard, Great scaling operations, Monitoring is an integral part, Great load balancing concepts, Monitors the condition and ensures compensation in the event of failure.
- Applications: An application can be deployed using a combination of pods, deployments, and services (or micro-services).
- Functionality: Kubernetes as a complex installation and setup process, but it not as limited as Docker Swarm.
- Monitoring: It supports multiple versions of logging and monitoring when the services are deployed within the cluster (Elasticsearch/Kibana (ELK), Heapster/Grafana, Sysdig cloud integration).
- Scalability: All-in-one framework for distributed systems.
- Other Benefits: Kubernetes is backed by the Cloud Native Computing Foundation (CNCF), huge community among container orchestration tools, it is an open source and modular tool that works with any OS.
Often enough I have to explain my way of going about setting up a CI/CD pipeline with multiple deployment platforms. Since I am a bit tired of yapping the same every single time, I've decided to write it up and share with the world this way, and send people to read it instead ;). I will explain it on "live-example" of how the Rome got built, basing that current methodology exists only of readme.md and wishes of good luck (as it usually is ;)).
It always starts with an app, whatever it may be and reading the readmes available while Vagrant and VirtualBox is installing and updating. Following that is the first hurdle to go over - convert all the instruction/scripts into Ansible playbook(s), and only stopping when doing a clear vagrant up
or vagrant reload
we will have a fully working environment. As our Vagrant environment is now functional, it's time to break it! This is the moment to look for how things can be done better (too rigid/too lose versioning? Sloppy environment setup?) and replace them with the right way to do stuff, one that won't bite us in the backside. This is the point, and the best opportunity, to upcycle the existing way of doing dev environment to produce a proper, production-grade product.
I should probably digress here for a moment and explain why. I firmly believe that the way you deploy production is the same way you should deploy develop, shy of few debugging-friendly setting. This way you avoid the discrepancy between how production work vs how development works, which almost always causes major pains in the back of the neck, and with use of proper tools should mean no more work for the developers. That's why we start with Vagrant as developer boxes should be as easy as vagrant up
, but the meat of our product lies in Ansible which will do meat of the work and can be applied to almost anything: AWS, bare metal, docker, LXC, in open net, behind vpn - you name it.
We must also give proper consideration to monitoring and logging hoovering at this point. My generic answer here is to grab Elasticsearch, Kibana, and Logstash. While for different use cases there may be better solutions, this one is well battle-tested, performs reasonably and is very easy to scale both vertically (within some limits) and horizontally. Logstash rules are easy to write and are well supported in maintenance through Ansible, which as I've mentioned earlier, are at the very core of things, and creating triggers/reports and alerts based on Elastic and Kibana is generally a breeze, including some quite complex aggregations.
If we are happy with the state of the Ansible it's time to move on and put all those roles and playbooks to work. Namely, we need something to manage our CI/CD pipelines. For me, the choice is obvious: TeamCity. It's modern, robust and unlike most of the light-weight alternatives, it's transparent. What I mean by that is that it doesn't tell you how to do things, doesn't limit your ways to deploy, or test, or package for that matter. Instead, it provides a developer-friendly and rich playground for your pipelines. You can do most the same with Jenkins, but it has a quite dated look and feel to it, while also missing some key functionality that must be brought in via plugins (like quality REST API which comes built-in with TeamCity). It also comes with all the common-handy plugins like Slack or Apache Maven integration.
The exact flow between CI and CD varies too greatly from one application to another to describe, so I will outline a few rules that guide me in it: 1. Make build steps as small as possible. This way when something breaks, we know exactly where, without needing to dig and root around. 2. All security credentials besides development environment must be sources from individual Vault instances. Keys to those containers should exist only on the CI/CD box and accessible by a few people (the less the better). This is pretty self-explanatory, as anything besides dev may contain sensitive data and, at times, be public-facing. Because of that appropriate security must be present. TeamCity shines in this department with excellent secrets-management. 3. Every part of the build chain shall consume and produce artifacts. If it creates nothing, it likely shouldn't be its own build. This way if any issue shows up with any environment or version, all developer has to do it is grab appropriate artifacts to reproduce the issue locally. 4. Deployment builds should be directly tied to specific Git branches/tags. This enables much easier tracking of what caused an issue, including automated identifying and tagging the author (nothing like automated regression testing!).
Speaking of deployments, I generally try to keep it simple but also with a close eye on the wallet. Because of that, I am more than happy with AWS or another cloud provider, but also constantly peeking at the loads and do we get the value of what we are paying for. Often enough the pattern of use is not constantly erratic, but rather has a firm baseline which could be migrated away from the cloud and into bare metal boxes. That is another part where this approach strongly triumphs over the common Docker and CircleCI setup, where you are very much tied in to use cloud providers and getting out is expensive. Here to embrace bare-metal hosting all you need is a help of some container-based self-hosting software, my personal preference is with Proxmox and LXC. Following that all you must write are ansible scripts to manage hardware of Proxmox, similar way as you do for Amazon EC2 (ansible supports both greatly) and you are good to go. One does not exclude another, quite the opposite, as they can live in great synergy and cut your costs dramatically (the heavier your base load, the bigger the savings) while providing production-grade resiliency.