{"id":27165016,"url":"https://github.com/mocdaniel/stackconf-berlin-2024","last_synced_at":"2025-04-09T02:50:48.433Z","repository":{"id":246351889,"uuid":"816254492","full_name":"mocdaniel/stackconf-berlin-2024","owner":"mocdaniel","description":null,"archived":false,"fork":false,"pushed_at":"2024-06-27T09:20:01.000Z","size":18928,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-06-27T10:30:55.062Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mocdaniel.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":"2024-06-17T11:11:40.000Z","updated_at":"2024-06-27T10:31:00.321Z","dependencies_parsed_at":"2024-06-27T10:41:04.001Z","dependency_job_id":null,"html_url":"https://github.com/mocdaniel/stackconf-berlin-2024","commit_stats":null,"previous_names":["mocdaniel/stackconf-berlin-2024"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mocdaniel%2Fstackconf-berlin-2024","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mocdaniel%2Fstackconf-berlin-2024/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mocdaniel%2Fstackconf-berlin-2024/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mocdaniel%2Fstackconf-berlin-2024/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mocdaniel","download_url":"https://codeload.github.com/mocdaniel/stackconf-berlin-2024/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247968240,"owners_count":21025798,"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":"2025-04-09T02:50:47.945Z","updated_at":"2025-04-09T02:50:48.425Z","avatar_url":"https://github.com/mocdaniel.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Codespell][codespell-badge]][codespell-link]\n[![E2E][e2e-badge]][e2e-link]\n[![Go Report Card][report-badge]][report-link]\n[![Commit Activity][commit-activity-badge]][commit-activity-link]\n\n# IDP Builder\n\nInternal development platform binary launcher.\n\n\u003e **WORK IN PROGRESS**: This tool is in a pre-release stage and is under active development.\n\n## About\n\nSpin up a complete internal developer platform using industry standard technologies like Kubernetes, Argo, and backstage with only Docker required as a dependency.\n\nThis can be useful in several ways:\n* Create a single binary which can demonstrate an IDP reference implementation.\n* Use within CI to perform integration testing.\n* Use as a local development environment for IDP engineers.\n\n## Prerequisites\n\nA container engine is needed locally such as:\n\n| Name                                                  | Supported | Remark                                                                                                                              |\n|-------------------------------------------------------|-----------|-------------------------------------------------------------------------------------------------------------------------------------|\n| [Docker desktop](https://www.docker.com/get-started/) | Yes       |                                                                                                                                     |\n| [Podman desktop](https://podman-desktop.io/)          | No        | idpbuilder can create a cluster using podman [rootful](https://docs.podman.io/en/latest/markdown/podman-machine-set.1.html#rootful) | \n\n\n**Note**: Set the `DOCKER_HOST` env var property using `podman` to let idpbuilder to talk with the engine (e.g  export DOCKER_HOST=\"unix:///var/run/docker.sock\")\n\n## Getting Started\n\nIf you are interested in running idpbuilder in Codespaces through your browser, check out the [Codespaces](#running-in-codespaces) section.\n\n### Quick Install\n\nThe following command can be used as a convenience for installing `idpbuilder`, (be sure to check the script first if you are concerned):\n```\ncurl -fsSL https://raw.githubusercontent.com/cnoe-io/idpbuilder/main/hack/install.sh | bash\n```\n\nor download the latest release with the following commands:\n\n```bash\nversion=$(curl -Ls -o /dev/null -w %{url_effective} https://github.com/cnoe-io/idpbuilder/releases/latest)\nversion=${version##*/}\ncurl -L -o ./idpbuilder.tar.gz \"https://github.com/cnoe-io/idpbuilder/releases/download/${version}/idpbuilder-$(uname | awk '{print tolower($0)}')-$(uname -m | sed 's/x86_64/amd64/').tar.gz\"\ntar xzf idpbuilder.tar.gz\n\n./idpbuilder version\n# example output\n# idpbuilder 0.4.1 go1.21.5 linux/amd64\n```\n\nAlternatively, you can download the latest binary from [the latest release page](https://github.com/cnoe-io/idpbuilder/releases/latest).\n\n## Using the idpbuilder\n\n### Basic usage\n\nThe most basic command which creates a Kubernetes Cluster (Kind cluster) with the core packages installed.\n\n```bash\n./idpbuilder create\n```\n\n\u003cdetails\u003e\n  \u003csummary\u003eWhat are the core packages?\u003c/summary\u003e\n\n  * **ArgoCD** is the GitOps solution to deploy manifests to Kubernetes clusters. In this project, a package is an ArgoCD application. \n  * **Gitea** server is the in-cluster Git server that ArgoCD can be configured to sync resources from. You can sync from local file systems to this.\n  * **Ingress-nginx** is used as a method to access in-cluster resources such as ArgoCD UI and Gitea UI.\n\n    #### Core package versions\n    \n    | Name     | Version |\n    | -------- | ------- |\n    | Argo CD  | v2.10.7 |\n    | Gitea    | v9.5.1  |\n    | Nginx    | v1.8.1  |\n\n  The default manifests for the core packages are available [here](pkg/controllers/localbuild/resources).\n  See the [contribution doc](./CONTRIBUTING.md) for more information on how core packages are installed and configured.\n\n\u003c/details\u003e\n\n\nOnce idpbuilder finishes provisioning cluster and packages, you can access GUIs by going to the following addresses in your browser.\n\n* ArgoCD: https://argocd.cnoe.localtest.me:8443/\n* Gitea: https://gitea.cnoe.localtest.me:8443/\n\nYou can obtain credentials for them by running the following command:\n\n```bash\n./idpbuilder get secrets\n```\n\n\u003cdetails\u003e\n  \u003csummary\u003e The \"get secrets\" command \u003c/summary\u003e\n\n  The `get secrets` command retrieves the following:\n  - ArgoCD initial admin password.\n  - Gitea admin user credentials.\n  -  Any secrets labeled with `cnoe.io/cli-secret=true`.\n\n  You can think of the command as executing the following kubectl commands:\n\n  ```bash\n  kubectl -n argocd get secret argocd-initial-admin-secret\n  kubectl get secrets -n gitea gitea-admin-secret\n  kubectl get secrets -A -l cnoe.io/cli-secret=true\n  ```\n  In addition, secrets labeled with `cnoe.io/package-name` can be specified with the `-p` flag. For example, for Gitea:\n\n  ```bash\n  ./idpbuilder get secrets -p gitea\n  ```\n\n\u003c/details\u003e\n\n###  Example commands\n\n**For more advanced use cases, check out the [examples](./examples) directory.**\n\nYou can specify the kubernetes version by using the `--kube-version` flag. Supported versions are available [here](https://github.com/kubernetes-sigs/kind/releases).\n\n```\n./idpbuilder create --kube-version v1.27.3\n```\n\nIf you want to specify your own kind configuration file, use the `--kind-config` flag.\n\n```\n./idpbuilder create --build-name local --kind-config ./my-kind.yaml`\n```\n\nIf you want to specify ArgoCD configmap.\n\n```\n./idpbuilder create --package-custom-file=argocd:pkg/k8s/test-resources/input/argocd-cm.yaml\n```\n\nRun the following commands for available flags and subcommands:\n\n```\n./idpbuilder --help\n./idpbuilder create --help\n```\n\n### Custom Packages\n\nIdpbuilder supports specifying custom packages using the flag `--package-dir` flag. \nThis flag expects a directory (local or remote) containing ArgoCD application files and / or ArgoCD application set files.\nIn case of a remote directory, it must be a directory in a git repository, \nand the URL format must be a [kustomize remote URL format](https://github.com/kubernetes-sigs/kustomize/blob/master/examples/remoteBuild.md).\n\nExamples of using custom packages are available in the [example](./examples) directory. \nLet's take a look at [this example](examples/basic). This defines two custom package directories to deploy to the cluster.\n\nTo deploy these packages, run the following commands from this repository's root.\n\n```\n./idpbuilder create --package-dir examples/basic/package1  --package-dir examples/basic/package2\n```\n\nAlternatively, you can use the URL format:\n\n```\n./idpbuilder create  --package-dir https://github.com/cnoe-io/idpbuilder//examples/basic/package1 --package-dir https://github.com/cnoe-io/idpbuilder//examples/basic/package2\n```\n\nRunning this command should create three additional ArgoCD applications in your cluster.\n\n```sh\n$ kubectl get Applications -n argocd  -l example=basic\nNAME         SYNC STATUS   HEALTH STATUS\nguestbook    Synced        Healthy\nguestbook2   Synced        Healthy\nmy-app       Synced        Healthy\n```\n\nLet's break this down. The [first package directory](examples/basic/package1) defines an application. This corresponds to the `my-app` application above. In this application, we want to deploy manifests from local machine in GitOps way.\n\nThe directory contains an [ArgoCD application file](examples/basic/package1/app.yaml). This is a normal ArgoCD application file except for one field.\n\n```yaml\napiVersion: argoproj.io/v1alpha1\nkind: Application\nspec:\n  source:\n    repoURL: cnoe://manifests\n```\n\nThe `cnoe://` prefix in the `repoURL` field indicates that we want to sync from a local directory.\nValues after `cnoe://` is treated as a relative path from this file. In this example, we are instructing idpbuilder to make ArgoCD sync from files in the [manifests directory](examples/basic/package1/manifests).\n\nAs a result the following actions were taken by idpbuilder: \n1. Create a Gitea repository.\n2. Fill the repository with contents from the manifests directory.\n3. Update the Application spec to use the newly created repository.\n\nYou can verify this by going to this address in your browser: https://gitea.cnoe.localtest.me:8443/giteaAdmin/idpbuilder-localdev-my-app-manifests\n\n![img.png](docs/images/my-app-repo.png)\n\n\nThis is the repository that corresponds to the [manifests](examples/basic/package1/manifests) folder.\nIt contains a file called `alpine.yaml`, synced from the `manifests` directory above.\n\nYou can also view the updated Application spec by going to this address: https://argocd.cnoe.localtest.me:8443/applications/argocd/my-app\n\n![myapp](docs/images/my-app.png)\n\n\nThe second package directory defines two normal ArgoCD applications referencing a remote repository.\nThey are applied as-is.\n\n\n## Contributing\n\nIf you'd like to contribute to the project or know the architecture and internals of this project, check out the [contribution doc](./CONTRIBUTING.md).\n\n## Running in Codespaces\n\n1. Create a Codespaces instance. ![img](examples/ref-implementation/images/codespaces-create.png)\n2. Wait for it to be ready. It may take several minutes.\n3. Get the latest release of idpbuilder:\n   ```bash\n    version=$(curl -Ls -o /dev/null -w %{url_effective} https://github.com/cnoe-io/idpbuilder/releases/latest)\n    version=${version##*/}\n    curl -L -o ./idpbuilder.tar.gz \"https://github.com/cnoe-io/idpbuilder/releases/download/${version}/idpbuilder-$(uname | awk '{print tolower($0)}')-$(uname -m | sed 's/x86_64/amd64/').tar.gz\"\n    tar xzf idpbuilder.tar.gz\n   ```\n4. Run idpbuilder:\n   ```\n    idpbuilder create --protocol http  \\\n    --host ${CODESPACE_NAME}-8080.${GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN} \\\n    --port 8080 --use-path-routing\n   ```\n5. Because Codespaces gives a single externally routable host name for an instance, idpbuilder must deploy with path based routing. \n   This means ArgoCD and Gitea UIs are given with the following commands.\n   * ArgoCD: `echo https://${CODESPACE_NAME}-8080.${GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN}/argocd`\n   * Gitea: `echo https://${CODESPACE_NAME}-8080.${GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN}/gitea`\n6. Note that not all examples work with path based routing. \n\n## Extending the IDP builder\n\nWe are actively working to include more patterns and examples of extending idpbuilder to get started easily.\n\n\u003c!-- JUST BADGES \u0026 LINKS --\u003e\n[codespell-badge]: https://github.com/cnoe-io/idpbuilder/actions/workflows/codespell.yaml/badge.svg\n[codespell-link]: https://github.com/cnoe-io/idpbuilder/actions/workflows/codespell.yaml\n\n[e2e-badge]: https://github.com/cnoe-io/idpbuilder/actions/workflows/e2e.yaml/badge.svg\n[e2e-link]: https://github.com/cnoe-io/idpbuilder/actions/workflows/e2e.yaml\n\n[report-badge]: https://goreportcard.com/badge/github.com/cnoe-io/idpbuilder\n[report-link]: https://goreportcard.com/report/github.com/cnoe-io/idpbuilder\n\n[commit-activity-badge]: https://img.shields.io/github/commit-activity/m/cnoe-io/idpbuilder\n[commit-activity-link]: https://github.com/cnoe-io/idpbuilder/pulse\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmocdaniel%2Fstackconf-berlin-2024","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmocdaniel%2Fstackconf-berlin-2024","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmocdaniel%2Fstackconf-berlin-2024/lists"}