Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lab2 #405

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

Lab2 #405

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions lab1/DevOps_Practices.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# DevOps Principles and Practices
DevOps is a set of principles and practices that aim to improve collaboration, communication, and integration between development (Dev) and operations (Ops) teams in software development and deployment processes. The core principles and practices of DevOps include:

**1. Culture of Collaboration:** DevOps emphasizes fostering a culture of collaboration and shared responsibility among development, operations, and other stakeholders involved in the software development lifecycle. This includes breaking down silos, encouraging open communication, and promoting a sense of ownership and accountability for the entire software delivery process.


**2. Automation:** Automation is a crucial aspect of DevOps. It involves using tools and technologies to automate repetitive tasks, such as build and deployment processes, testing, and infrastructure provisioning. Automation helps reduce manual errors, improves efficiency, and enables faster and more frequent software releases.


Example Tools: Jenkins, GitLab CI/CD, CircleCI

**3. Continuous Integration (CI):** Continuous Integration is the practice of frequently merging code changes from multiple developers into a shared repository. This is usually accompanied by automated builds and tests to detect integration issues early on. CI helps identify and resolve conflicts and integration problems quickly, leading to more stable and reliable software.

Example Tools: Travis CI, Bamboo, TeamCity.

**4. Continuous Delivery (CD):** Continuous Delivery focuses on ensuring that software is always in a releasable state. It involves automating the entire software delivery process, from code commit to deployment, including testing, packaging, and configuration management. CD enables organizations to release software updates frequently, reliably, and with minimal manual intervention.


Example Tools: Spinnaker, Argo CD, Octopus Deploy.

**5. Infrastructure as Code (IaC):** Infrastructure as Code is the practice of managing and provisioning infrastructure resources (such as servers, networks, and databases) through machine-readable configuration files. IaC allows for versioning, reproducibility, and consistency in deploying and managing infrastructure, leading to improved agility, scalability, and reduced manual effort.


Example Tools: Terraform, Ansible, AWS CloudFormation.

**6. Monitoring and Feedback Loops:** DevOps emphasizes real-time monitoring and feedback loops to gather insights about the performance, availability, and user experience of software applications. Monitoring helps identify issues, bottlenecks, and areas for improvement, allowing teams to proactively respond, optimize, and continuously enhance the software.


Example Tools: Prometheus, Grafana, New Relic.

**7. Continuous Learning and Improvement:** DevOps promotes a culture of continuous learning and improvement. This involves regularly reflecting on processes, identifying areas of inefficiency or bottlenecks, and experimenting with new approaches and technologies. Feedback and data-driven decision-making are encouraged to drive iterative improvements in the software delivery pipeline.


Example Tools: Jira, Azure DevOps, GitLab



21 changes: 21 additions & 0 deletions lab1/Scenario.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Scenario: XYZ Software Development Team

The XYZ software development team is working on a complex web application that needs to be deployed and maintained across multiple environments. They are facing several challenges in their development and deployment process, which can be addressed by applying DevOps principles and practices.

## Challenge 1: Manual and Error-Prone Deployment Process
The team currently relies on manual deployment procedures, which are time-consuming and error-prone. They frequently encounter issues during the deployment process, leading to delays and inconsistencies between environments.

### DevOps Practice 1: Automation
By implementing automation, the team can streamline their deployment process. They can use tools like deployment scripts or configuration management tools (e.g., Ansible, Puppet) to automate the provisioning and configuration of their application across different environments. Automation ensures consistent and reliable deployments, reduces manual errors, and saves time.

## Challenge 2: Lack of Collaboration between Development and Operations
The development and operations teams work in silos, resulting in a lack of communication and coordination. There is minimal knowledge sharing, leading to misunderstandings, delays in issue resolution, and a limited understanding of operational requirements.

### DevOps Practice 2: Culture of Collaboration
By fostering a culture of collaboration, the team can break down the barriers between development and operations. They can establish regular meetings, such as daily stand-ups or joint planning sessions, to encourage open communication, shared understanding, and collaborative problem-solving. This practice ensures that the development team has a better understanding of operational needs and constraints, leading to improved software quality and smoother deployments.

## Challenge 3: Inefficient Testing and Feedback Loop
The team struggles with late-stage testing and inadequate feedback loops. Testing is primarily conducted manually, leading to longer testing cycles, delayed bug detection, and a lack of visibility into the application's performance and stability.

### DevOps Practice 3: Continuous Integration and Continuous Delivery (CI/CD)
By implementing CI/CD practices, the team can address the testing and feedback challenges. They can set up a CI pipeline that automates the build, testing, and integration of code changes as they are committed. This allows for early detection of integration issues and reduces the time between code changes and test feedback. Additionally, by incorporating automated tests (unit tests, integration tests, etc.) into the pipeline, the team can gain faster feedback on the application's quality and identify issues earlier in the development cycle.
32 changes: 32 additions & 0 deletions lab2/CircleCI/CircleCI.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# CircleCI

![CircleCI Logo](https://circleci.com/circleci-logo-stacked-fb.png)

## Description
CircleCI is a modern continuous integration and delivery (CI/CD) platform that automates the building, testing, and deployment of applications. It provides a scalable and flexible infrastructure for teams to streamline their software development processes and deliver high-quality code with speed and confidence.

## Purpose and Benefits
In the DevOps context, CircleCI serves as a vital tool for automating the software development lifecycle. Its primary purpose is to enable teams to build, test, and deploy their applications quickly and reliably. Here are some of the key benefits of using CircleCI in a DevOps environment:

- **Continuous Integration**: CircleCI enables continuous integration by automatically building and testing code changes as they are pushed to the version control system. This helps catch issues early and ensures code quality.
- **Fast and Reliable Builds**: CircleCI uses a distributed infrastructure to parallelize builds, making them faster and more efficient. It also provides tools for caching dependencies and artifacts, further speeding up the build process.
- **Automated Testing**: CircleCI allows you to run automated tests for your applications, including unit tests, integration tests, and even end-to-end tests. This ensures that your code functions as expected and reduces the risk of introducing bugs.
- **Deployment Automation**: CircleCI integrates with deployment tools and platforms, allowing you to automate the deployment of your applications to various environments, such as staging and production.
- **Scalability and Flexibility**: CircleCI is designed to scale with your team's needs. It supports parallel builds, allows customization through configuration files, and integrates with popular version control systems and cloud providers.

## Key Features and Functionalities
- **YAML Configuration**: CircleCI uses a simple and intuitive YAML configuration file to define your build and deployment processes, making it easy to version control and share configurations across your team.
- **Distributed Builds**: CircleCI distributes builds across multiple containers, enabling parallel execution and reducing build times. It also provides resource class options to allocate appropriate resources for your builds.
- **Caching**: CircleCI allows you to cache dependencies, reducing the time spent downloading and installing dependencies in subsequent builds, resulting in faster build times.
- **Workflows**: CircleCI supports defining complex workflows to orchestrate multiple jobs and automate your entire CI/CD pipeline, including building, testing, and deploying applications.
- **Integration Ecosystem**: CircleCI integrates seamlessly with popular development tools and platforms, such as GitHub, Bitbucket, Docker, AWS, and many others, allowing you to build a comprehensive CI/CD workflow.
- **Notifications and Insights**: CircleCI provides real-time notifications and detailed build logs, allowing you to quickly identify and resolve issues. It also offers analytics and insights to monitor build and test performance.

## Use Cases and Examples
- **Web Application Development**: CircleCI is commonly used for building, testing, and deploying web applications. It enables teams to automate their CI/CD processes, ensuring the rapid delivery of reliable code updates.
- **Mobile App Development**: CircleCI supports building and testing mobile applications for iOS and Android platforms. It integrates with mobile testing frameworks and allows for continuous integration and deployment of mobile apps.
- **Open-Source Projects**: CircleCI is widely adopted by open-source projects to automate their CI/CD pipelines. It provides an easy-to-use platform for contributors to validate and build code changes before merging.
- **Microservices Architecture**: CircleCI can be used to build, test, and deploy individual microservices in a distributed architecture. It enables teams to ensure the seamless integration and quality of each microservice.
- **Containerized Workflows**: CircleCI is well-suited for container-based workflows. It can build and test Docker containers, allowing for efficient and reliable containerized application development and deployment.

For more detailed information, please refer to the [CircleCI documentation](https://circleci.com/docs/).
27 changes: 27 additions & 0 deletions lab2/FleekResearch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
## IPFS
**IPFS (InterPlanetary File System)** is a **decentralized** and distributed protocol designed to enable a peer-to-peer file sharing and content-addressable storage system. It provides a new approach to storing and accessing files on the internet by using a unique content-based addressing system instead of relying on traditional location-based addressing. In IPFS, files are identified and retrieved based on their content, using cryptographic hashes, which ensures data integrity and tamper resistance. This **peer-to-peer** network allows users to store and retrieve files from multiple sources, making it more resilient to failures and censorship. IPFS combines ideas from distributed file systems, **decentralized** web protocols, and blockchain technology to create a resilient, efficient, and decentralized file storage and sharing solution for the internet.

## Fleek
**Fleek** is a platform that simplifies the deployment and hosting of **decentralized** applications (DApps) on the web. It provides developers with tools and infrastructure to build, deploy, and manage their DApps on decentralized storage networks like IPFS and distributed computing platforms like Ethereum. Fleek abstracts away the complexities of configuring and deploying DApps, offering a seamless user experience. It automates the deployment process, ensuring that DApps are easily accessible, secure, and scalable. Fleek also offers features like version control, automatic updates, and continuous integration/continuous deployment (CI/CD) workflows, enabling developers to iterate and improve their DApps efficiently. With Fleek, developers can focus on building their DApps while leveraging the benefits of **decentralized** technologies for hosting and distribution, ultimately enabling the creation of a more resilient and censorship-resistant web.

## Configuration Steps
1. Create an account and login on [Fleek service](https://app.fleek.co/).
2. Click on **Add new site**.
3. Click on **Connect to Github** and enter your credential. In this step authentication steps might be needed such as verification from respective Github account and/or email.
4. Choose the repository which contains the files needed to be uploaded.
5. In the **Continues Deployment** section pick the **IPFS** as the Hosting Service and click next.
6. Since the file in the lab assignment is a static HTML file there is no need to configure any options in the last section, press **Deploy Site**.
> For more information about the configuration options please refer to Observation section.
7. Wait until the content deployed and the URL is appeared in the logs.
## URL
> https://calm-fire-9069.on.fleek.co//

## Observation
1. It is recommended to connect only the needed Github repository to the service rather than the entire account, because of security and confidentiality reasons.
2. It is possible to deploy more than static HTML content, and use frameworks like React, Nextjs, NuxtJs, Svelte, ... . The option is in the last section of the deployment and in the **Framework** dropdown menu.
3. It is possible to deploy docker images. The option is in the last section of the deployment and in the **Docker Image Name** Input.
4. In the final section of deployment, under the **advance**, there is the option to define environmental variables for build purposes.
5. The content uploaded to the network is continuously publishing through the network, one can check the **Last Published** and **Current IPFS Hash** by clicking on the website in their respective dashboard.
6. There are JavaScript and Go integrations for IPFS.
7. There Desktop application and command-line tools for IPFS.
8. More information can be found in the [official IPFS documentation](https://docs.ipfs.tech/).
31 changes: 31 additions & 0 deletions lab2/Kubernetes/Kubernetes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

# Kubernetes

![Kubernetes Logo](https://1000logos.net/wp-content/uploads/2022/07/Kubernetes-Logo-768x432.png)

## Description
Kubernetes is an open-source container orchestration platform that automates the deployment, scaling, and management of containerized applications. It provides a robust and flexible infrastructure for running and coordinating distributed systems at scale.

## Purpose and Benefits
In the DevOps context, Kubernetes plays a crucial role in enabling efficient and reliable application deployment and management. Its primary purpose is to simplify the deployment and scaling of containerized applications across a cluster of machines. Some of the key benefits of using Kubernetes in a DevOps environment include:

- **Scalability**: Kubernetes allows you to easily scale your application by automatically distributing containers across multiple nodes, ensuring optimal resource utilization.
- **Resilience and Fault Tolerance**: Kubernetes provides built-in mechanisms for handling failures and maintaining the desired state of your applications, improving overall system resilience.
- **Portability**: With Kubernetes, you can deploy and manage your applications consistently across various environments, such as on-premises, public clouds, or hybrid setups.
- **Resource Efficiency**: Kubernetes optimizes resource allocation, ensuring that containers are scheduled and run on the most appropriate nodes, reducing wasted resources.

## Key Features and Functionalities
- **Container Orchestration**: Kubernetes automates the deployment, scaling, and management of containers, allowing you to run and coordinate applications across a cluster of machines.
- **Service Discovery and Load Balancing**: Kubernetes provides built-in mechanisms for service discovery and load balancing, allowing applications to easily find and communicate with each other.
- **Auto Scaling**: Kubernetes can automatically scale your application based on resource utilization or custom-defined metrics, ensuring that your application can handle varying workloads.
- **Rolling Updates and Rollbacks**: Kubernetes supports seamless rolling updates, enabling you to update your applications without downtime. It also allows for easy rollbacks in case of issues.
- **Secrets and Configuration Management**: Kubernetes provides a secure way to manage sensitive information and application configuration through secrets and configuration maps.
- **Monitoring and Logging**: Kubernetes integrates with various monitoring and logging tools, making it easier to gather insights and troubleshoot issues in your cluster.

## Use Cases and Examples
- **Microservices Architecture**: Kubernetes is widely used for deploying and managing microservices-based applications. It helps in scaling individual microservices independently and ensures their reliable communication.
- **Continuous Integration and Deployment (CI/CD)**: Kubernetes can be integrated with CI/CD pipelines to automate the deployment of applications from development to production environments, providing a seamless delivery process.
- **Hybrid and Multi-Cloud Environments**: Kubernetes allows organizations to manage their applications consistently across multiple cloud providers or on-premises data centers, providing flexibility and portability.
- **Highly Available Web Applications**: Kubernetes can be used to deploy highly available web applications, automatically scaling resources and managing failovers to ensure continuous availability.

For more detailed information, please refer to the [Kubernetes official documentation](https://kubernetes.io/docs/).
Loading