{"id":13451544,"url":"https://github.com/replicatedhq/ship","last_synced_at":"2025-03-23T18:32:53.565Z","repository":{"id":33043243,"uuid":"126047712","full_name":"replicatedhq/ship","owner":"replicatedhq","description":"A better way to deploy Kubernetes Helm charts","archived":true,"fork":false,"pushed_at":"2023-03-20T19:55:30.000Z","size":132884,"stargazers_count":637,"open_issues_count":88,"forks_count":70,"subscribers_count":37,"default_branch":"main","last_synced_at":"2025-03-23T03:33:16.112Z","etag":null,"topics":["docker","gitops","go","helm","kubernetes","kustomize"],"latest_commit_sha":null,"homepage":"https://www.replicated.com/ship","language":"Go","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/replicatedhq.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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}},"created_at":"2018-03-20T16:24:26.000Z","updated_at":"2025-02-28T10:39:32.000Z","dependencies_parsed_at":"2024-01-13T19:24:44.694Z","dependency_job_id":"829d505c-f157-462c-becf-445289fda2ea","html_url":"https://github.com/replicatedhq/ship","commit_stats":{"total_commits":1366,"total_committers":31,"mean_commits":"44.064516129032256","dds":0.7232796486090776,"last_synced_commit":"bdb141a16fc42ce9326eb5ee08b632d0b04f4ecc"},"previous_names":["replicatedcom/ship"],"tags_count":75,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/replicatedhq%2Fship","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/replicatedhq%2Fship/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/replicatedhq%2Fship/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/replicatedhq%2Fship/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/replicatedhq","download_url":"https://codeload.github.com/replicatedhq/ship/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245052649,"owners_count":20553162,"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":["docker","gitops","go","helm","kubernetes","kustomize"],"created_at":"2024-07-31T07:00:55.599Z","updated_at":"2025-03-23T18:32:48.550Z","avatar_url":"https://github.com/replicatedhq.png","language":"Go","readme":"## Replicated Ship has been superseded by [Kots](https://www.github.com/replicatedhq/kots).\n\nKots provides the core functionality of Ship, but with a different architecture.\nWhile Ship will continue to be supported, it is no longer under active development.\n\nReplicated Ship\n=======\n\n[![Test Coverage](https://api.codeclimate.com/v1/badges/a00869c41469d016a3c8/test_coverage)](https://codeclimate.com/github/replicatedhq/ship/test_coverage)\n[![Maintainability](https://api.codeclimate.com/v1/badges/a00869c41469d016a3c8/maintainability)](https://codeclimate.com/github/replicatedhq/ship/maintainability)\n[![CircleCI](https://circleci.com/gh/replicatedhq/ship.svg?style=svg\u0026circle-token=471765bf5ec85ede48fcf02ea6a886dc6c5a73f1)](https://circleci.com/gh/replicatedhq/ship)\n[![Docker Image](https://images.microbadger.com/badges/image/replicated/ship.svg)](https://microbadger.com/images/replicated/ship)\n[![Go Report Card](https://goreportcard.com/badge/github.com/replicatedhq/ship)](https://goreportcard.com/report/github.com/replicatedhq/ship)\n[![GitHub stars](https://img.shields.io/github/stars/replicatedhq/ship.svg)](https://github.com/replicatedhq/ship/stargazers)\n\nReplicated Ship is a Kubernetes app deployment and automation tool that can:\n\n1. Track and automate the maintenance of 3rd-party applications whether packaged as Helm Charts, Kubernetes YAML manifests, or Knative apps.\n1. Quickly develop app [kustomizations](https://www.kustomize.io) using Ship's easy-to-use import \u0026 migration tools.\n1. Enable application developers to package and deliver a canonical version of their application configuration while encouraging last-mile customizations through overlays instead of forking or upstream requests.\n\nRead on for more details on Ship features and objectives, or skip ahead to [getting started](#getting-started).\n\n## Track and automate the maintenance of 3rd-party applications\nShip enables cluster operators to automatically stay in sync with upstream changes while preserving their custom configurations and extensions (adds, deletes and edits) without git merge conflicts. This is possible because of how the [three operating modes](#three-operating-modes) of Ship invoke, store and apply Kustomizations, a type of Kubernetes specific patch, produced by a cluster operator.\n\n## Customizing Helm Charts, Kube YAML and Knative with Kustomize\nShip exposes the power of Kustomize as an advanced custom configuration management tool for [Helm charts](https://www.github.com/helm/charts), Kubernetes manifests and [Knative](https://github.com/knative/) applications. The easy-to-use UI of Ship (launched via `ship init`) calculates the minimal patch YAML required to build an overlay and previews the diff that will be the result of applying the drafted overlay.\n![gif of calculation](https://github.com/replicatedhq/ship/blob/master/logo/calc-n-diff.gif)\n\nAdditionally, the `unfork` command can [migrate forked manifests](#unforking) and environment versions to Kustomize.\n\nThe output of the `init` and `unfork` modes will result in the creation of a directory that includes the finalized overlay YAML files, a kustomization.yaml and a Ship state.json.\n\n\n## Enable app developers to allow for last-mile configuration\nConfiguration workflow `ship.yaml` files can be included in Kubernetes manifest or [Helm](https://helm.sh/) chart repos, to customize the initial `ship init` experience. See [Customizing the Configuration Experience](#customizing-the-configuration-experience) for more details or check out the examples in the [github.com/shipapps](https://github.com/shipapps) org.\n\n\n# Getting Started\n\n## Installation\n\nShip is packaged as a single binary, and Linux and MacOS versions are distributed:\n- To download the latest Linux build, run:\n```shell\ncurl -sSL https://github.com/replicatedhq/ship/releases/download/v0.51.2/ship_0.51.2_linux_amd64.tar.gz | tar zxv \u0026\u0026 sudo mv ship /usr/local/bin\n```\n\n- To download the latest MacOS build, you can either run:\n```shell\ncurl -sSL https://github.com/replicatedhq/ship/releases/download/v0.51.2/ship_0.51.2_darwin_amd64.tar.gz | tar zxv \u0026\u0026 sudo mv ship /usr/local/bin\n```\n\n- ... or you can install with [Homebrew](https://brew.sh/):\n```shell\nbrew install ship\n```\n\n- To download the latest Windows build, grab the tar.gz from the [releases page](https://github.com/replicatedhq/ship/releases).\n\nAlternately, you can run Ship in Docker, in which case you can pull the latest ship image with:\n```shell\ndocker pull replicated/ship\n```\n\n\n## Initializing\nAfter Ship is installed, create a directory for the application you'll be managing with Ship, and launch Ship from there, specifying an upstream Helm chart or Kubernetes yaml:\n\n```shell\nmkdir -p ~/my-ship/example\ncd ~/my-ship/example\nship init \u003cpath-to-chart\u003e # github.com/helm/charts/tree/master/stable/grafana\n```\n\nAlternately, the same command run through Docker:\n```shell\nmkdir -p ~/my-ship/example\ncd ~/my-ship/example\ndocker run -p 8800:8800 -v \"$PWD\":/wd -w /wd \\\n    replicated/ship init \u003cpath-to-chart\u003e # github.com/helm/charts/tree/master/stable/grafana\n```\n_Note: you may need to point your browser to http://127.0.0.1:8800 if ship's suggested localhost URL doesn't resolve._\n\nYou'll be prompted to open a browser and walk through the steps to configure site-specific values for your installation, updating Helm values (if it's a chart), and making direct edits to the Kubernetes yaml (or Helm-generated yaml), which will be converted to patches to apply via Kustomize.\n\nAfter completing the guided 'ship init' workflow, you'll see that Ship has generated several directories and files within the current working directory.\n\n```\n├── .ship\n│   └── state.json\n├── base\n│   ├── clusterrole.yaml\n│   ├── ...\n│   └── serviceaccount.yaml\n├── overlays\n│   └── ship\n│       └── kustomization.yaml\n└── rendered.yaml\n```\n\n`.ship/state.json` - maintains all the configuration decisions made within the `ship init` flow, including the path to the upstream, the upstream's original `values.yaml`, any modifications made to `values.yaml`, and any patch directives configured in the Kustomize phase.\n\nThe `base/` and `overlays/` folders contain the various files that drive the Kustomization process.\n\nThe `rendered.yaml` file is the final output, suitable to deploy to your Kubernetes cluster via\n\n```shell\nkubectl apply -f rendered.yaml\n```\n\nIf you need to revise any of the configuration details, you can re-invoke `ship init \u003cpath-to-chart\u003e` to start fresh, or `ship update --headed` to walk through the configuration steps again, starting with your previously entered values \u0026 patches as a baseline.\n\n# Three operating modes\n\n![Replicated Ship Modes](https://github.com/replicatedhq/ship/blob/master/logo/ship-flow.png)\n\n## ship init\nPrepares a new application for deployment. Use for:\n- Specifying the upstream source for an application to be managed -- typically a repo with raw Kubernetes yaml or a Helm chart\n- Creating and managing [Kustomize](https://kustomize.io/) overlays to be applied before deployment\n- Generating initial config (state.json) for the application, and persisting that config to disk for use with the other modes\n\n## ship watch\nPolls an upstream source, blocking until any change has been published.  Use for:\n- Triggering creation of pull requests in a CI pipeline, so that third party updates can be manually reviewed, and then automatically deployed once merged\n\n## ship update\nUpdates an existing application by merging the latest release with the local state and overlays. Use for:\n- Preparing an update to be deployed to a third party application\n- Automating the update process to start from a continuous integration (CI) service\n\n## Unforking\nAnother initialization option is to start with a Helm chart or Kubernetes manifest that has been forked from an upstream source, and to \"unfork\" it.\n\n```shell\nship unfork \u003cpath-to-forked\u003e --upstream \u003cpath-to-upstream\u003e\n```\nor\n\n```shell\ndocker run -v \"$PWD\":/wd -w /wd \\\n    replicated/ship unfork \u003cpath-to-forked\u003e \\\n    --upstream \u003cpath-to-upstream\u003e\n```\n\nWith this workflow, Ship will attempt to move the changes that prompted the fork into 'overlays' that can be applied as patches onto the unmodified upstream base.  You can inspect the `rendered.yaml` to verify the final output, or run through `ship update --headed` to review the generated overlays in the Ship admin console.\n\n\n# CI/CD Integration\nOnce you've prepared an application using `ship init`, a simple starting CI/CD workflow could be:\n\n```shell\nship watch \u0026\u0026 ship update\n```\n\nor\n```shell\ndocker run -v \"$PWD\":/wd -w /wd replicated/ship watch \u0026\u0026 \\\n    docker run -v \"$PWD\":/wd -w /wd replicated/ship update\n```\n\nThe `watch` command is a trigger for CI/CD processes, watching the upstream application for changes. Running `ship watch` will load the local state file (which includes a content hash of the most recently used upstream) and periodically poll the upstream application and exit when it finds a change. `ship update` will regenerate the deployable application assets, using the most recent upstream version of the application, and any local configuration from `state.json`.  The new `rendered.yaml` output can be deployed directly to the cluster, or submitted as a pull request into a [GitOps](https://www.weave.works/blog/what-is-gitops-really) repo.\n\nWith chart repo you have commit privileges on, you, you can see this flow in action by running `ship init \u003cpath-to-chart\u003e` and going through the workflow, then `ship watch --interval 10s \u0026\u0026 ship update` to start polling, then commit a change to the upstream chart and see the `ship watch` process exit, with `rendered.yaml` updated to reflect the change.\n\n# Customizing the Configuration Experience\n\nMaintainers of OTS (Off the Shelf) software can customize the `ship init` experience by including a `ship.yaml` manifest alongside a Helm Chart or Kubernetes manifest.  The [Replicated Ship YAML](https://help.replicated.com/docs/ship/getting-started/yaml-overview/) format allows further customization of the installation process, including infrastructure automation steps to spin up and configure clusters to deploy to.  (If you're wondering about some of the more obscure Ship CLI option flags, these mostly apply to ship.yaml features)\n\n# Ship Cloud\n\nFor those not interested in operating and maintaining a fleet of Ship instances, [Ship Cloud](https://www.replicated.com/ship) is available as a hosted solution for free.   With Ship Cloud, teams can collaborate and manage multiple OTS Kubernetes application settings in one place, with Ship watching and updating on any upstream or local configuration changes, and creating Pull Requests and other integrations into CI/CD systems.\n\n# Contributions and Local Development\n\nFor instructions for building the project and making contributions, see [Contributing](./CONTRIBUTING.md).\n\n# Community\n\nFor questions about using Ship, there's a [Replicated Community](https://help.replicated.com/community) forum, and a [#kots channel in Kubernetes Slack](https://kubernetes.slack.com/channels/kots).\n\nFor bug reports, please [open an issue](https://github.com/replicatedhq/ship/issues/new) in this repo.\n","funding_links":[],"categories":["Go","kubernetes","Configuration Management"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freplicatedhq%2Fship","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freplicatedhq%2Fship","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freplicatedhq%2Fship/lists"}