Scheduling# Operating systems as the foundation of Devops stack This lesson tries to explore the convergence between operating systems and the devops movement.
- Operating systems and the rise of microservices
- Dependency Management And Provisioning
- Delivery of services
- Abstracting Resources
- Serverless computing
- Documentation
An operation system is a system software that manages computer hardware and software resources and provides common services for computer programs. The main features required of an operating system are:
- Memory management
- Process management
- Interrupts
- Device drivers
- File system and I/O management
- Networking
- Security
Microservices represent an architectural style of development that structures the application as a collection of loosely coupled services.
https://martinfowler.com/articles/microservices.html
- Componentization via Services
A component is a unit of software that is independently replaceable and upgradeable 2. Organized around business capabilities
Any organization that designs a system (defined broadly) will produce a design whose structure is a copy of the organization's communication structure.
-- Melvyn Conway, 1967 3. Products not projects
This mentality brings power to the developers and makes them in charge of all the product lifecycle. Amazon are famous for this approach : You build it, you run it! 4. Smart endpoints and dumb pipes
This brings a major difference from SOA, making the transport and communications more coarse-grained from the ESB approaches, leaving the logic simple and standard for the transport layer 5. Decentralized governance
This encourages the asynchronous calls between services and makes the services more independent from each other 6. Decentralized data management
Transaction are hard and distributed transactions are even worse, so new approaches have been developed making room for the eventual consistency to be used. There is a theorem in theoretical computer science called CAP theory that in a distributed system you can not achieve all of the following:
- Consistency
- Availability
- Partition tolerance
- Infrastructure automation
This characteristic is best described by the Amazon principle: Build it fast and fail fast! In order to create agile software, the services must be developed, tested and deployed as fast as possible and retrieved as fast if anything fails. This has brought the continuous integration and continuous delivery movements to be a part of the software development and project management. 8. Design for failure
This a natural response to the distributed nature of the microservices. For a better understanding of the distributed system needs, take a look at Distributed systems fallacies 9. Evolutionary design Any piece of software is meant to be replaced as the code deprecates in time. This approach encourages for small iterations in adding features and keeping it simple, as the needs of the users will change.
'Premature optimization is the root of all evil.' - Donald Knuth
Once the code is modularized and dependencies are created in order to be reused, the need to organize and manage them becomes more and more complex and can bring a lot of problems if not handled properly https://en.wikipedia.org/wiki/DLL_Hell
- Install, upgrade and remove software automatically
- Resolve package dependencies
- Use central trusted repositories
- Can search information on installed packages and files
Main formats are
- rpm - rpm, yum
- deb - dpkg, apt
- Chocolatey
- OneGet
- pip - python
- gem/rubygems - ruby
- npm - Nodejs
http://codefol.io/posts/deployment-versus-provisioning-versus-orchestration https://devopscube.com/devops-tools-for-infrastructure-automation/
Once the need for many machines to serve as nodes in the distributed system arised, manual management of a datacenter become a high cost and new solutions appeared.
Infrastructure as a service (IaaS) refers to online services that provide high-level APIs used to dereference various low-level details of underlying network infrastructure like physical computing resources, location, data partitioning, scaling, security, backup. Although the advantages can be really easy to seduce a company to use Iaas, the are things to take into consideration: https://www.itworld.com/article/3237168/cloud-computing/10-cloud-mistakes-that-can-sink-your-business.html
Platform as a Service (PaaS) is a category of cloud computing services that provides a platform allowing customers to develop, run, and manage applications without the complexity of building and maintaining the infrastructure typically associated with developing and launching an app.
Software as a service is a software licensing and delivery model in which software is licensed on a subscription basis and is centrally hosted.
https://en.wikipedia.org/wiki/Virtual_machine
https://www.docker.com/what-container
https://blog.codeship.com/container-os-comparison/
http://homepage.cs.uri.edu/~thenry/resources/unix_art/ch01s06.html https://devopsbootcamp.osuosl.org/operating-systems.html https://cs.uwec.edu/~buipj/teaching/cs.388.s14/static/pdf/upe.pdf