Git Product home page Git Product logo

jenkins-ans's Introduction

Ansible playbooks for configuring Nginx servers and deploying MongoDB

Overview

This repository contains Ansible playbooks for configuring Nginx and MongoDB, along with a Jenkinsfile for automating the deployment process.

Project Image

Table of Contents

Jenkins Pipeline

The Jenkinsfile in this repository is a declarative Jenkins Pipeline that automates the deployment of Ansible playbooks for both Nginx and MongoDB configurations. Here is an explanation of the stages and their purpose:

  1. Preparing: A preliminary stage to set up the environment.

  2. Git Pulling: This stage pulls the latest changes from the repository.

  3. Playbook Initializing: An intermediary stage for initialization.

  4. Playbook Running: The main stage that runs the Ansible playbook based on user parameters. The pipeline provides two parameters: "Playbook Name" and "Playbook Action."

    • The "Playbook Name" parameter allows you to specify the name of the Ansible playbook you want to execute, such as "nginx" or "mongodb."
    • The "Playbook Action" parameter offers two choices: "Dry-Run" and "Playbook-deploy." A "Dry-Run" lets you perform a test run without making any changes, while "Playbook-deploy" actually applies the configuration changes.

    Depending on the selected action, the corresponding Ansible playbook will be executed.

  5. Playbook Deployed: A final stage to indicate that the deployment is complete.

Prerequisites

Before using this repository, make sure you have the following installed:

  • Ansible on the control machine
  • Jenkins server with the Ansible plugin installed

Getting Started

  1. Clone this repository to your local machine.
  2. To perform specific tasks for Nginx and MongoDB configuration, navigate to the "Nginx Configure" and "MongoDB Configuration" directories, respectively. Each directory contains a dedicated README with instructions for that task.
  3. Configure your Jenkins job to accept the specified parameters for the pipeline to function correctly.
  4. Execute the Jenkins pipeline to deploy the desired configuration.

Nginx Configuration

For detailed instructions on configuring Nginx using Ansible, please refer to the Nginx Configuration README.

MongoDB Configuration

For detailed instructions on configuring MongoDB using Ansible, please refer to the MongoDB Configuration README.

Feedback

We welcome your feedback and suggestions! If you encounter any issues or have ideas for improvements, please open an issue.

License

This project is licensed under the MIT License.

jenkins-ans's People

Contributors

ennolan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.