Jenkins and DevOps Pipeline Course Notes
Introduction to Jenkins
- Jenkins is an open-source automation server.
- It aids in building, testing, and deploying software applications.
- Gwynne Faraday is the instructor.
- Jenkins is used to create a DevOps pipeline.
Understanding DevOps Pipeline
- DevOps: Combination of Development and Operations.
- DevOps Pipeline: Set of processes/tools for continuous delivery of software applications.
- Automates build, test, and deployment phases.
- Improves efficiency and reliability in software development.
Course Outline
- Building a full DevOps pipeline using:
- Jenkins
- Linode servers
- GitHub
- Docker and Docker Hub
- Project: Curriculum app in Faraday Academy GitHub organization.
Key Features of Jenkins
- Automation with Continuous Integration (CI) and Continuous Deployment (CD) pipelines.
- Watches for events in repositories and reacts (build, test, deploy).
- Provides logs of every step in the pipeline.
- Ensures consistency across testing environments.
- Large community support with numerous tutorials available.
- Plugin architecture for customization.
- Self-hosted by default.
Benefits of Using Jenkins
- Open-source and does not require payment for an enterprise plan.
- Control over configuration and deployment.
- Used by large, mid-sized, and small companies.
- Improves software delivery cycles.
Comparisons with Other CI/CD Tools
- Alternatives: Travis CI, CircleCI, GitHub Actions, GitLab CI.
- Jenkins advantages:
- Open-source
- Self-hosting option
- Total control over configuration.
Potential Drawbacks of Jenkins
- Plugins: Dependency on community-supported plugins which may not be updated/documented well.
- User Interface: Considered outdated compared to modern tools.
- Documentation: Can be outdated; ensure it matches the Jenkins version used.
- Self-hosted Maintenance: Requires installation, updates, and security management.
Key Terminology
- Continuous Integration (CI): Automates integration of code changes from multiple contributors.
- Continuous Delivery (CD): Packages the app for deployment using automated tools.
- Pipeline: Defined steps that build, test, and deploy applications.
- Controller: Main instance managing Jenkins configurations and agents.
- Agents: Environments running pipeline steps.
Jenkins Architecture Overview
- App development environment on GitHub.
- Linode servers running Jenkins (controller) and Docker (deployment).
- CI/CD process initiated upon code changes.
Getting Started with Linode
- Sign up for Linode to receive a $50 credit for 60 days.
- Create servers for Jenkins and Docker.
- Access Jenkins interface via IP address.
Setting Up Jenkins
- Access Jenkins and input initial password (fetched via SSH).
- Install suggested plugins for easier setup.
- Create admin user for Jenkins.
Navigating Jenkins Interface
- Top navigation and sidebar for various functionalities.
- Dashboard for job management and build history.
- Manage Jenkins for configurations and plugin management.
Installing Plugins
- Install Blue Ocean plugin for modern UI.
- Install Docker plugins for Docker integration.
Creating a Pipeline in Blue Ocean
- Connect to GitHub repository.
- Create a
Jenkinsfile
to define pipeline stages and steps.
- Stages include:
- Checkout code
- Running tests
- Building application
- Deploying to Docker Hub.
Environment Configuration
- Use environment variables for sensitive data (e.g., Docker credentials).
- Ensure all required software (e.g., git, node.js, npm) is installed on the server.
Conclusion
- Successfully built a DevOps pipeline using Jenkins and connected services.
- Course emphasizes hands-on experience and problem-solving.
- Additional resources and feedback encouraged through comments.
Additional Resources: Check the ReadMe linked in the course description.