{"id":28208384,"url":"https://github.com/willie-conway/deploying-microservices","last_synced_at":"2025-06-12T08:31:11.617Z","repository":{"id":282345421,"uuid":"948285165","full_name":"Willie-Conway/Deploying-Microservices","owner":"Willie-Conway","description":"A simple microservice 🎶 that allows you to interact with a collection of songs 🎧. Built using Flask 🐍 and integrated with MongoDB 🗃️ for storing song information. The service is deployed on RedHat OpenShift ☁️ and IBM Code Engine 🚀 for scalability and management.","archived":false,"fork":false,"pushed_at":"2025-03-14T04:59:52.000Z","size":13705,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-01T12:59:32.835Z","etag":null,"topics":["api","backend","code-engine","devops","flask","microservices","mongodb","openshift","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Willie-Conway.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2025-03-14T03:56:42.000Z","updated_at":"2025-05-15T03:09:52.000Z","dependencies_parsed_at":"2025-03-14T04:39:54.451Z","dependency_job_id":null,"html_url":"https://github.com/Willie-Conway/Deploying-Microservices","commit_stats":null,"previous_names":["willie-conway/deploying-microservices"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Willie-Conway%2FDeploying-Microservices","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Willie-Conway%2FDeploying-Microservices/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Willie-Conway%2FDeploying-Microservices/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Willie-Conway%2FDeploying-Microservices/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Willie-Conway","download_url":"https://codeload.github.com/Willie-Conway/Deploying-Microservices/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Willie-Conway%2FDeploying-Microservices/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":258660024,"owners_count":22737343,"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":["api","backend","code-engine","devops","flask","microservices","mongodb","openshift","python"],"created_at":"2025-05-17T14:12:18.149Z","updated_at":"2025-06-12T08:31:11.612Z","avatar_url":"https://github.com/Willie-Conway.png","language":"Python","readme":"# 🎶 Deploying Songs Microservices 🎵\n\nWelcome to the **Songs Microservice**! This is a simple microservice that provides access to a collection of songs. It's built using **Flask** and connects to a **MongoDB** database to store song information. 🚀\n\n![Deploying the Songs microservice on RedHat OpenShift](https://github.com/Willie-Conway/Deploying-Microservices/blob/main/Screenshots/Deploying%20the%20Songs%20microservice%20on%20RedHat%20OpenShift.gif)\n\n## 💡 Features\n- 🎤 **Add songs** to the database.\n- 🎧 **Retrieve all songs** from the database.\n- 🎶 **Health Check** endpoint to verify the service is up and running.\n\n## 🛠️ Technologies Used\n- **Python** 🐍\n- **Flask** 🐚\n- **MongoDB** 🗃️\n- **OpenShift** ☁️\n- **GitHub** 💻\n\n## 🎯 Learning Objectives\nAfter completing this lab, you will be able to:\n- Start **Code Engine** service in the lab environment.\n- Deploy a **Flask service** to **Code Engine**.\n- Access the **RedHat OpenShift** platform in the lab environment.\n- Deploy a **Flask service** to **RedHat OpenShift**.\n\n## 📦 Setup Instructions\n\n### 1️⃣ Clone the Repository\nClone the repository to your local machine:\n\n```bash\ngit clone https://github.com/Willie-Conway/Deploying-Microservices.git\n```\n\n### 2️⃣ Install Dependencies\nNavigate to the project directory and set up a virtual environment:\n\n```bash\ncd Back-End-Development-Songs\npython3 -m venv venv\nsource venv/bin/activate  # On Windows use `venv\\Scripts\\activate`\npip install -r requirements.txt\n```\n\n### 3️⃣ Configure MongoDB\nEnsure that the MongoDB service is up and running. Use the internal MongoDB URL for OpenShift or any other connection string.\n\nExample MongoDB URL:\n```\nmongo.sn-labs-hirewillieco.svc.cluster.local\n```\n\n### 4️⃣ Running the Service Locally\nTo run the microservice locally:\n\n```bash\npython app.py\n```\n\nVisit `http://localhost:5000` to see the service in action! 🎉\n\n### 5️⃣ Deploy to OpenShift\nTo deploy the microservice to OpenShift, use the following command:\n\n```bash\noc new-app https://github.com/${GITHUB_ACCOUNT}/Back-End-Development-Songs --strategy=source --name=songs --env MONGODB_SERVICE=mongo.${OPENSHIFT_PROJECT}.svc.cluster.local --name songs\n```\n\n## 🌐 Accessing the Service\n\nOnce deployed, you can access the Songs microservice via the following URL:\n\n```text\nhttp://songs-sn-labs-hirewillieco.labs-prod-openshift-san-a45631dc5778dc6371c67d206ba9ae5c-0000.us-east.containers.appdomain.cloud\n```\n\nUse the `/health` endpoint to check if the service is running smoothly:\n\n```text\nhttp://songs-sn-labs-hirewillieco.labs-prod-openshift-san-a45631dc5778dc6371c67d206ba9ae5c-0000.us-east.containers.appdomain.cloud/health\n```\n\nIt will return a response like:\n```json\n{\n  \"status\": \"OK\"\n}\n```\n\n## 📸 Screenshots\n\n### 1️⃣ Deploying the Songs microservice on RedHat OpenShift\n![Deploying Songs Service on OpenShift](https://github.com/Willie-Conway/Deploying-Microservices/blob/main/Screenshots/deploy-getsong-3.jpg)\n\n### 2️⃣ Exposing the Service\n![Exposing Songs Service](https://github.com/Willie-Conway/Deploying-Microservices/blob/main/Screenshots/deploy-getsong-4.jpg)\n\n### 3️⃣ Health Check Endpoint Response\n![Health Check](https://github.com/Willie-Conway/Deploying-Microservices/blob/main/Screenshots/deploy-getsong-5.jpg)\n\n## 🚧 Contributing\n\nIf you'd like to contribute, feel free to open an issue or pull request. 😊\n\n1. Fork the repo 🍴\n2. Create your feature branch 🧑‍💻\n3. Commit your changes ✍️\n4. Push to the branch 🚀\n5. Open a pull request 👥\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. 📝\n\n## 💬 Contact\n\nFor any questions or suggestions, feel free to reach out to me via:\n\n- Email: hire.willie.conway@gmail.com 📧\n- GitHub: [Willie-Conway](https://github.com/Willie-Conway) 👨‍💻\n\nHappy coding! 🎉\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillie-conway%2Fdeploying-microservices","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwillie-conway%2Fdeploying-microservices","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillie-conway%2Fdeploying-microservices/lists"}