{"id":22053583,"url":"https://github.com/joshdover/parastage-example","last_synced_at":"2026-04-12T02:34:38.836Z","repository":{"id":147188172,"uuid":"111172382","full_name":"joshdover/parastage-example","owner":"joshdover","description":"Example scripts for deploying branch-specific stage environments with Helm","archived":false,"fork":false,"pushed_at":"2017-11-18T03:20:51.000Z","size":7,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-23T15:46:47.563Z","etag":null,"topics":["ci","gitlab","helm","kubernetes"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/joshdover.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":"2017-11-18T03:15:14.000Z","updated_at":"2020-02-14T20:32:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"ecdb81f9-d1dd-43c9-aeff-816bf877ec72","html_url":"https://github.com/joshdover/parastage-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/joshdover/parastage-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshdover%2Fparastage-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshdover%2Fparastage-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshdover%2Fparastage-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshdover%2Fparastage-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joshdover","download_url":"https://codeload.github.com/joshdover/parastage-example/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshdover%2Fparastage-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31702580,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-11T21:17:31.016Z","status":"online","status_checked_at":"2026-04-12T02:00:06.763Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["ci","gitlab","helm","kubernetes"],"created_at":"2024-11-30T15:17:41.230Z","updated_at":"2026-04-12T02:34:38.804Z","avatar_url":"https://github.com/joshdover.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# parastage-example\n\nThis is the example project that accommodates [my talk given at PyTexas 2017](https://docs.google.com/a/tidaltexts.com/presentation/d/12gs8zknj1r6aOQSys7y3bLVVdjw0R5JqCdQKKv-abI4/edit?usp=sharing).\n\nThis repo contains example scripts and Helm chart for deploying your own \"review apps\" or parallel\nstaging environments for each branch of your repo. The approach we use at Cratejoy follows this\nworkflow:\n- User pushes their branch to Github\n- CircleCI pushes the branch over to GitLab\n- GitLab builds a new docker image for the branch + deploys the helm chart with the new image\n- GitLab then reports status back to Github pull request + adds links to access the deployment\n\n## What this repo contains\n\n- A set of scripts (build.sh, deploy.sh, destroy.sh) that can be run by GitLab CI to build a docker\n  image and deploy your Helm chart to a connected Kubernetes cluster.\n- An example helm chart (charts/parastage) that what a complete config for a set of Python web apps\n  with underlying data services (postgres, redis, memcache) and how they would connect.\n- An example .gitlab-ci.yaml file that you could drop into your repo to orchestrate this entire\n  workflow.\n\n## Tuning Kubernetes\n\nIn my talk, I mentioned that tuning Kubernetes for this workflow is something you'll run into. There\nare a few reasons you'll have to do this, not the least of which is cost.\n\n### Just keeping things running smoothly\n\nThe nodes in your kubernetes cluster are going to be running a lot of containers and new deployments\nall the time. Keeping things clean and tidy is important. Adjustments we made:\n- Make sure to add extra disk space to your nodes. You're going to moving lots of images around and\n  they will constantly be changing. We found that having an extra 32GB of disk went a long way, but\n  you may need more or less depending on the size of your images and how many you need.\n- You may need to customize the AMI you're using to launch your nodes. We found the logrotate rules\n  set in the default image lead to very very large log files (syslog, daemon.log, etc) that would\n  put nodes in strange states and disrupt deployments after running for a couple weeks.\n- Ensure that you're using the `--purge` option when deleting the Helm releases. This will ensure\n  you don't have thousands of old configs laying around, filling up your etcd cluster.\n\n### Optimizing costs\n\nKeep in mind that the usage pattern of your stage deployments is likely to be quite different than\nthat of production. Your probably going to be using these deployments really sporadically/bursty.\nWe found that setting really low CPU requests in the Helm chart allowed us to stuff many more\ndeployments on to a single node. This works fine since most deployments are not service traffic at\nany given time.\n\nIf this works for you, you may find that you get more mileage out of the higher memory instance\ntypes on your cloud provider. On AWS, the r4 class may be a better choice for this bursty type of\ntraffic.\n\n# Questions?\n\nFeel free to reach out to me on Twitter with any questions you might have:\n[@joshdover](https://twitter.com/joshdover)\n\nLooking for a new challenge? [Come work with me](https://jobs.lever.co/cratejoy) at\n[Cratejoy](https://cratejoy.com)!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoshdover%2Fparastage-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoshdover%2Fparastage-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoshdover%2Fparastage-example/lists"}