{"id":19967553,"url":"https://github.com/rishavnandi/jenkins_pipeline","last_synced_at":"2026-03-19T12:51:01.504Z","repository":{"id":262391747,"uuid":"610875335","full_name":"rishavnandi/jenkins_pipeline","owner":"rishavnandi","description":null,"archived":false,"fork":false,"pushed_at":"2024-11-12T06:52:30.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-12T08:44:04.639Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"wtfpl","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rishavnandi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-07T16:52:33.000Z","updated_at":"2024-11-12T06:52:34.000Z","dependencies_parsed_at":"2024-11-12T07:42:43.670Z","dependency_job_id":null,"html_url":"https://github.com/rishavnandi/jenkins_pipeline","commit_stats":null,"previous_names":["rishavnandi/jenkins_pipeline"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rishavnandi%2Fjenkins_pipeline","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rishavnandi%2Fjenkins_pipeline/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rishavnandi%2Fjenkins_pipeline/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rishavnandi%2Fjenkins_pipeline/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rishavnandi","download_url":"https://codeload.github.com/rishavnandi/jenkins_pipeline/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241404163,"owners_count":19957650,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T02:42:34.034Z","updated_at":"2026-02-26T18:06:54.590Z","avatar_url":"https://github.com/rishavnandi.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Complete CI/CD Pipeline for a Flask Application\n\n## Overview\n\nThis project is a web application that allows users to view stock price graphs and historical data for a given ticker symbol. It is built using Flask for the backend and uses yfinance to fetch stock data. The application is containerized using Docker and can be deployed on AWS using Terraform and Ansible.\n\nThis project was created for the purpose of learning and practicing CI/CD pipelines, infrastructure as code, and containerization.\nSo, it is not optimized for production use and is not recommended to be used in a production environment.\n\n## Features\n\n- Real-time stock price graphs using FinViz charts\n- Historical price data in a tabular format\n- Responsive web design with mobile support\n- Automated CI/CD pipeline with Jenkins\n- Infrastructure as Code using Terraform\n- Automated deployment using Ansible\n- Containerized application using Docker\n\n## Prerequisites\n\n- Docker\n- Terraform\n- Ansible\n- Jenkins\n- AWS account with appropriate permissions\n- Python\n- pip package manager\n\n## Setup Instructions\n\n### Local Development\n\n1. **Clone the repository:**\n   ```bash\n   git clone https://github.com/jenkins_pipeline.git\n   cd jenkins_pipeline\n   ```\n\n2. **Create and activate a virtual environment (recommended):**\n   ```bash\n   python -m venv venv\n   source venv/bin/activate  # On Windows: venv\\Scripts\\activate\n   ```\n\n3. **Install dependencies:**\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n4. **Run the application:**\n   ```bash\n   flask run\n   ```\n   The application will be available at `http://localhost:5000`\n\n### Docker Deployment\n\n1. **Build the Docker image:**\n   ```bash\n   docker build -t flask-stock-app .\n   ```\n\n2. **Run the Docker container:**\n   ```bash\n   docker run -p 5000:5000 flask-stock-app\n   ```\n   Access the application at `http://localhost:5000`\n\n### Production Deployment\n\n#### 1. Infrastructure Setup\n\n1. **Configure AWS credentials:**\n   ```bash\n   export AWS_ACCESS_KEY_ID=\"your_access_key\"\n   export AWS_SECRET_ACCESS_KEY=\"your_secret_key\"\n   export AWS_DEFAULT_REGION=\"your_preferred_region\"\n   ```\n\n#### 2. Jenkins CI/CD Setup\n\n1. **Deploy Jenkins server:**\n   ```bash\n   cd jenkins/terraform\n   terraform init\n   terraform apply\n   ```\n\n2. **Configure Jenkins:**\n   ```bash\n   cd ../ansible\n   ansible-playbook playbook.yml\n   ```\n\n3. **Access Jenkins UI:**\n   - Navigate to `http://\u003cjenkins-server-ip\u003e:8080`\n   - Use the initial admin password displayed in the Ansible output\n   - Install suggested plugins\n   - Create admin user\n   - Configure the following credentials:\n     - Docker Hub credentials\n     - AWS credentials\n     - GitHub credentials\n\n4. **Configure Jenkins Pipeline:**\n   - Create a new pipeline job\n   - Point it to your repository\n   - Use the provided Jenkinsfile\n\n#### 3. Application Deployment\n\n1. **Update variables:**\n   - Edit `main-server/ansible/vars.yml` with your Docker image details\n   - Edit `jenkins/ansible/vars.yml` with your GitHub repository\n\n2. **Deploy application:**\n   ```bash\n   cd main-server/ansible\n   ansible-playbook playbook.yml\n   ```\n\n## Project Structure\n\n```\n.\n├── app.py                 # Flask application\n├── Dockerfile            # Docker configuration\n├── requirements.txt      # Python dependencies\n├── static/              # Static assets\n├── templates/           # HTML templates\n├── main-server/         # Main application deployment\n│   ├── ansible/        # Ansible playbooks\n│   └── terraform/      # Infrastructure as code\n└── jenkins/            # Jenkins CI/CD setup\n    ├── ansible/        # Jenkins configuration\n    └── terraform/      # Jenkins infrastructure\n```\n\n## Acknowledgments\n\n- yfinance for stock data API\n- FinViz for stock charts\n- Flask framework\n- Jenkins community\n- Terraform and Ansible communities\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frishavnandi%2Fjenkins_pipeline","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frishavnandi%2Fjenkins_pipeline","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frishavnandi%2Fjenkins_pipeline/lists"}