{"id":13624020,"url":"https://github.com/rmarting/gitops-monorepo-sample","last_synced_at":"2026-01-04T07:56:48.310Z","repository":{"id":85168441,"uuid":"468275924","full_name":"rmarting/gitops-monorepo-sample","owner":"rmarting","description":"Monorepo sample to integrate with GitOps and trunk-based development practices","archived":false,"fork":false,"pushed_at":"2022-03-25T12:49:35.000Z","size":1256,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-26T11:08:08.639Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","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/rmarting.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2022-03-10T09:30:23.000Z","updated_at":"2022-06-24T23:41:39.000Z","dependencies_parsed_at":"2023-03-23T17:07:50.358Z","dependency_job_id":null,"html_url":"https://github.com/rmarting/gitops-monorepo-sample","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmarting%2Fgitops-monorepo-sample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmarting%2Fgitops-monorepo-sample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmarting%2Fgitops-monorepo-sample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmarting%2Fgitops-monorepo-sample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rmarting","download_url":"https://codeload.github.com/rmarting/gitops-monorepo-sample/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244822802,"owners_count":20516173,"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-08-01T21:01:37.897Z","updated_at":"2026-01-04T07:56:48.284Z","avatar_url":"https://github.com/rmarting.png","language":"HTML","funding_links":[],"categories":["HTML"],"sub_categories":[],"readme":"# GitOps Product Monorepo Sample\n\nDeveloping cloud native products following Agile, and DevOps practices could require\nto use different approaches, patterns and processes to do it in a fast pace. Many of the\nmost common patterns in this space are:\n\n* Product Monorepo\n* Trunk-based development\n* GitOps\n* Cloud Native Application\n* Continuous Integration, Continuous Delivery and Continuous Deployment\n* Sealed Secrets\n\nUse all of them at the same time could be a challenge for a new team, but it is possible\ngetting the best benefits from each of them. I have working in many different use cases and products\nfor a long time, many times using these patterns in somehow, learning from the pitfalls, and\ngetting the best benefits. This repo represents an *opinionated* manner to \ndo it for a new product team, combining all these practices in the same place. \n\nHoping this approach could help in your use case. Use carefully all the assess, and land into\nyour specif use case.\n\nThe `product` is the software solution created for a business scenario, adding the value and solution\nto achieve the goals of the business. We build software to resolve business scenarios.\n\n❗ Soon a blog post will try to clarify many of the aspects related with this repo. Stay tunned!❗\n\n## Product Monorepo\n\nProduct [Monorepo](https://en.wikipedia.org/wiki/Monorepo) means to have everything related with a software product\nin one single place, shared with the product team, to implement the full Software Delivery Life cycle of the product.\n\nOne of the most important topics for a Product Monorepo is to have a clear folder structure, otherwise\nyou could get a chaotic layout with more pains that gains.\n\nThis repo is organized as:\n\n* [bootstrap](./bootstrap/README.md) folder includes the initial components to setup the environment, mainly\ntools to define the base of the rest of the solution.\n* [apps](./apps/) folder includes the list of applications or components of the product.\n* [charts](./charts/README.md) folder includes the Helm Charts to accelerate the deployment of any component,\ntool or application related with the product.\n* [argocd](./argocd/README.md) folder includes the items related with ArgoCD and GitOps.\n* [tekton](./tekton/README.md) folder includes the items related with Tekton and Pipelines.\n* [e2e-test](./e2e-test/README.md) folder includes the end-to-end test suites of the product.\n\n## Trunk-based Development\n\nA Monorepo is a specific [Trunk-Based Development](https://trunkbaseddevelopment.com/) implementation where\nthe product team puts its source for all applications/services/libraries/frameworks into one repository and\nforces team members to commit together in that trunk - atomically.\n\nThe `trunk` branch is defined basically as productive and any change merged there is candidate to be deployed\nin any environment, including production. There are not any other starting point to promote changes, as everything\nis integrated in the trunk. Other branches are considered ephemeral, to manage short pieces of changes, with\na review process (by [pair programming](https://openpracticelibrary.com/practice/pair-programming/) or by a\nPull Request) before to be merged into the trunk.\n\nThis method allows the team members to develop fast small chunks (many times as [features flags](https://openpracticelibrary.com/practice/feature-toggles/)\nor not), with sooner integrations cycles, reducing merge conflicts, and promoting changes to others faster.\n\n## GitOps\n\n[GitOps](https://openpracticelibrary.com/practice/gitops/) defines the source of truth a Git repository,\nwhere everything starts from there and defining the desired state of our product. \n\n## Cloud Native Application\n\nDesigning our product as a [Cloud Native](https://en.wikipedia.org/wiki/Cloud_native_computing) solution will bring us\nmany benefits in cloud environments. Most of the cases a Microservice architecture following the [Twelve-Factor App](https://12factor.net/)\nmethodology is the right starting point. Our product will implement that methodology.\n\n## Continuous Integration, Continuous Delivery and Continuous Deployment\n\nAny product in the new automated era must be done without the most well-known benefits of\n[Continuous Integration](https://openpracticelibrary.com/practice/continuous-integration/),\n[Continuous Delivery](https://openpracticelibrary.com/practice/continuous-delivery/) and\n[Continuous Deployment](https://openpracticelibrary.com/practice/continuous-deployment/). Otherwise\nyou are failing from the beginning.\n\n## Sealed Secrets\n\nGitOps means **“if it’s not in Git, it’s NOT REAL”**, so it is a challenge to store sensitive data, like credentials,\nin Git repositories, where many people can access?. OpenShift provides a good way to manage sensitive data in the platform, but\nwe need to extend it with other great tools to store sensitive data in Git without any break of security.\n\nHere [Sealed Secrets](https://github.com/bitnami-labs/sealed-secrets) arrives to help us.\n\n## Playing with our Product Monorepo\n\nNow, it is time to play :game_die:. \n\nThis repository defines a sample product with the following applications:\n\n* A sample Angular application as frontend for the final users. Details [here](./apps/sample-frontend/README.md)\n* A sample Quarkus application as backend to manage the *business logic* of our product. Details [here](./apps/sample-backend/README.md)\n\n![Product Monorepo Topology](./img/product-deployment-topology.png)\n\n### Requirements\n\nThis repository had been developed and tested in the following environment:\n\n* Red Hat OpenShift Container Platform 4.10\n* Red Hat OpenShift GitOps 1.4.3 (ArgoCD)\n* Red Hat OpenShift Pipelines 1.6.2 (Tekton)\n* Sealed Secrets Helm Chart 1.16.1\n\n### Bootstrapping Red Hat OpenShift Container Platform\n\nTo prepare your OCP environment, review and follow the [bootstrap instructions](./bootstrap/README.md)\n\nIf everything goes fine, your environment should look like as:\n\n![CICD Tools Deployment Topology](./img/cicd-tools-deployment-topology.png)\n\n### GitOps with ArgoCD\n\nTo prepare the GitOps scenario with ArgoCD, review and follow the [instructions](./argocd/README.md).\n\nIf everything goes fine, your ArgoCD should look like as:\n\n![ArgoCD Deployment Topology](./img/argocd-deployment-topology.png)\n\n### CICD with Tekton Pipelines\n\nThis Product Monorepo has a set of different pipelines to cover the Software Delivery Life cycle, integrated\nin our GitOps approach. The pipelines are described [here](./tekton/README.md).\n\n## Feedback, Comments, and improvements\n\nAs this is an *opinionated* approach, from my field experience in real scenarios and use cases, I am always\nopen to learn from other experiences and use cases. Feel free to comment, improve or change my mind with your\ngreat ideas. Don't forget to review our [Contribution Guide](./CONTRIBUTING.md) do it in many different\nways (issues, pull-request, comments, ...), don't miss the chance to do it.\n\nI also open to share this approach, techniques and tools in community, meetup or simple group of colleagues around\ntopics such as DevOps, Agile, GitOps, Cloud Native, ... If you think that I can participate, please, let me know it.\n\nIf you are here, thank you so much. :smile: :tada:\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frmarting%2Fgitops-monorepo-sample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frmarting%2Fgitops-monorepo-sample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frmarting%2Fgitops-monorepo-sample/lists"}