{"id":25202088,"url":"https://github.com/salsadigitalauorg/rockpool","last_synced_at":"2025-05-12T18:02:50.116Z","repository":{"id":37289500,"uuid":"479650982","full_name":"salsadigitalauorg/rockpool","owner":"salsadigitalauorg","description":"Simple tool to set up a Lagoon instance locally","archived":false,"fork":false,"pushed_at":"2024-05-02T15:52:32.000Z","size":284,"stargazers_count":5,"open_issues_count":2,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-06-19T20:51:47.793Z","etag":null,"topics":["cli","go","kubernetes"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/salsadigitalauorg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2022-04-09T07:22:03.000Z","updated_at":"2024-05-17T16:53:17.000Z","dependencies_parsed_at":"2023-12-18T03:31:05.809Z","dependency_job_id":"a412d3a5-351d-453c-8359-b8c12d0d9c1c","html_url":"https://github.com/salsadigitalauorg/rockpool","commit_stats":{"total_commits":135,"total_committers":2,"mean_commits":67.5,"dds":"0.014814814814814836","last_synced_commit":"a567098cd4c952e51d44c1b7389ceb17b2f081c2"},"previous_names":["yusufhm/rockpool"],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salsadigitalauorg%2Frockpool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salsadigitalauorg%2Frockpool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salsadigitalauorg%2Frockpool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salsadigitalauorg%2Frockpool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/salsadigitalauorg","download_url":"https://codeload.github.com/salsadigitalauorg/rockpool/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238065554,"owners_count":19410619,"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":["cli","go","kubernetes"],"created_at":"2025-02-10T06:17:05.019Z","updated_at":"2025-02-10T06:17:06.397Z","avatar_url":"https://github.com/salsadigitalauorg.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rockpool\n[![Release](https://img.shields.io/github/v/release/salsadigitalauorg/rockpool)](https://github.com/salsadigitalauorg/rockpool/releases/latest)\n\nrockpool is a CLI tool aiming to set up a local [Lagoon](https://github.com/uselagoon/lagoon) instance as painlessly as possible.\n\n## Requirements\n\nThe following tools are needed for rockpool to work:\n- [Docker](https://docs.docker.com/get-docker/)\n- [k3d](https://github.com/k3d-io/k3d/#get)\n- [kubectl](https://kubernetes.io/docs/tasks/tools/)\n- [helm](https://helm.sh/docs/intro/install/)\n- [lagoon](https://github.com/uselagoon/lagoon-cli#install)\n\n## Install\n\nRecommended installation on MacOs is using Homebrew:\n```sh\nbrew install salsadigitalauorg/rockpool/rockpool\n```\n\nAlternative method:\n```sh\ncurl -L -o rockpool https://github.com/salsadigitalauorg/rockpool/releases/latest/download/rockpool-$(uname -s)-$(uname -m)\n\nchmod +x rockpool\nmv rockpool /usr/local/bin/rockpool\n```\n\n## Usage\n\n### Set up the platform\n\n```sh\nrockpool up\n```\nIf there are failures, the same command can be run over and over again until it all succeeds. Failures could currently occur for a number of reasons, such as\n\n- Waiting for ingress to be created\n- Waiting for a certificate to be created\n- Pods not yet ready\n\n### Create a Lagoon project\n**NOTE** on using Lagoon CLI:\n\u003e Currently the Lagoon CLI is built with `CGO_ENABLED=0`, which means that DNS lookups do not use the MacOs `/etc/resolver/*` files - see [here](https://github.com/golang/go/issues/12524#issuecomment-1006174901) - which means that `lagoon` commands interacting with the local instance will fail with an error similar to the following:\n\u003e\n\u003e ```Error: Post \"http://api.lagoon.rockpool.k3d.local/graphql\": dial tcp: lookup api.lagoon.rockpool.k3d.local on x.x.x.x:53: no such host```\n\u003e\n\u003e To get around that, the current option is to build the Lagoon CLI locally on MacOs with `CGO_ENABLED=1`:\n\u003e ```\n\u003e git clone git@github.com:uselagoon/lagoon-cli.git ~/go/src/github.com/uselagoon/lagoon-cli\n\u003e cd ~/go/src/github.com/uselagoon/lagoon-cli\n\u003e GO111MODULE=on CGO_ENABLED=1 go build -ldflags=\"-s -w\" -o ~/go/bin/lagoon -v\n\u003e ```\n\u003e The built binary can now be used with rockpool:\n\u003e ```\n\u003e ~/go/bin/lagoon --lagoon rockpool list projects\n\u003e ```\n\nThe `rockpool up` command creates a test repository in gitea at `http://gitea.rockpool.k3d.local/rockpool/test.git` and a config for the Lagoon CLI. The test project can therefore be added to Lagoon using the following:\n\n```sh\nlagoon --lagoon rockpool add project \\\n  --gitUrl http://gitea.rockpool.k3d.local/rockpool/test.git \\\n  --openshift 1 \\\n  --productionEnvironment main \\\n  --branches \"^(main|develop)$\" \\\n  --project rockpool-test\n```\n\nPush some code to the test repository:\n```sh\ngit clone https://github.com/lagoon-examples/drupal9-base.git rockpool-test \u0026\u0026 cd $_\ngit remote remove origin\ngit remote add origin http://gitea.rockpool.k3d.local/rockpool/test.git\ngit push -u origin main\n```\n\nDeploy the `main` environment:\n\n```sh\nlagoon --lagoon rockpool deploy branch \\\n  --project rockpool-test \\\n  --branch main\n```\n\nYou can follow the progress of the deployment using the following:\n```sh\nkubectl --kubeconfig ~/.k3d/kubeconfig-rockpool-target-1.yaml \\\n  -n rockpool-test-main \\\n  logs -f -l lagoon.sh/jobType=build\n```\n\n## How it works\n\nThe `rockpool up` command:\n* Creates two clusters:\n  * controller - contains most of the components of the platform:\n    * mailhog\n    * ingress-nginx\n    * cert-manager - for self-signed certificates, especially for harbor\n    * Gitea - instead of Gitlab, since the latter consumes too much resources, and it was conflicting with one of the Lagoon Core components\n    * Harbor\n    * Lagoon core\n  * target-1 - contains Lagoon Remote \u0026 [nfs provisioner](https://github.com/kubernetes-sigs/nfs-ganesha-server-and-external-provisioner)\n* Sets up some development defaults:\n  * Configures keycloak to use mailhog, as per the [docs](https://docs.lagoon.sh/installing-lagoon/lagoon-core/#configure-keycloak)\n  * Adds dns records to the target clusters' coredns config so it can access required services from the controller cluster\n  * Registers the target clusters as remotes via the Lagoon API\n  * Creates a self-signed certificate for Harbor on the controller and installs it on the target clusters\n\n\n## Further usage\n\nA number of flags can be used when creating the pool, as can be seen in the help:\n```\n$ rockpool up -h\nup is for creating or starting all the clusters, or the ones\nspecified in the arguments, e.g, 'rockpool up controller target-1'\n\nUsage:\n  rockpool up [name...] [flags]\n\nFlags:\n  -h, --help                         help for up\n  -k, --ssh-key string               The ssh key to add to the lagoonadmin user. If empty, rockpool tries\n                                     to use ~/.ssh/id_ed25519.pub first, then ~/.ssh/id_rsa.pub.\n\n  -t, --targets int                  Number of targets (lagoon remotes) to create (default 1)\n      --upgrade-components strings   A list of components to upgrade, e.g, ingress-nginx,harbor\n  -u, --url string                   The base url of rockpool; ancillary services will be created\n                                     as subdomains of this url, e.g, gitlab.rockpool.k3d.local\n                                      (default \"rockpool.k3d.local\")\n\nGlobal Flags:\n  -n, --name string   The name of the platform (default \"rockpool\")\n```\n\nThere are also other commands for controlling the platform:\n```\n$ rockpool\nUsage:\n  rockpool [command] [flags]\n  rockpool [command]\n\nAvailable Commands:\n  completion  Generate the autocompletion script for the specified shell\n  down        Stop the clusters and delete them\n  help        Help about any command\n  restart     Restart the clusters\n  start       Start the clusters\n  status      View the status of the clusters\n  stop        Stop the clusters\n  up          Create and/or start the clusters\n\nFlags:\n  -h, --help          help for rockpool\n  -n, --name string   The name of the platform (default \"rockpool\")\n\nUse \"rockpool [command] --help\" for more information about a command.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsalsadigitalauorg%2Frockpool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsalsadigitalauorg%2Frockpool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsalsadigitalauorg%2Frockpool/lists"}