ship

module
v0.29.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 18, 2018 License: Apache-2.0

README

Ship

Test Coverage Maintainability CircleCI Docker Image Go Report Card GitHub stars

Replicated Ship

Replicated Ship is an open source project by Replicated designed to extend Google’s Kustomize project in a way that can reduce the operational overhead of maintaining 3rd party applications (open source or proprietary) deployed to a Kubernetes cluster.

The initial release of Replicated Ship exposes the power of Kustomize as an advanced custom configuration management tool for Helm charts, Kubernetes manifests and Knative applications. With Ship, cluster operators can automatically stay in sync with upstream changes (ie. via automated pull requests or another form of automation) while preserving their local, custom configurations and extensions (add, deletes and edits) without git merge conflicts. This is possible because of how the three operating modes of Ship invoke, store and apply Kustomizations made by the cluster operator.

Three operating modes

ship init

Prepares a new application for deployment. Use for:

  • Generating initial config (state.json) for an application
  • Creating and managing Kustomize overlays to be applied before deployment

ship watch

Polls an upstream source, blocking until any change has been published. Use for:

  • Triggering creation of pull requests in a CI pipeline, so that third party updates can be manually reviewed, and then automatically deployed once merged

ship update

Updates an existing application by merging the latest release with the local state and overlays. Use for:

  • Preparing an update to be deployed to a third party application
  • Automating the update process to start from a continuous integration (CI) service

Features

Ship is designed to provide first-time configuration UI and/or be used headless in a CI/CD pipeline to automate deployment of third party applications.

  • Web based "admin console" provides initial configuration of Helm values and creates Kustomize overlays
  • Headless mode supports automated pipelines
  • Merge Helm charts with override values and apply custom overlays with Kustomize to avoid merge conflicts when upstream or local values are changed
  • Watch upstream repos for updates & sync changes to your local version.
  • Deploy Helm charts to a Kubernetes cluster without Tiller
  • Enables GitOps workflows to update third party applications
  • Configuration workflow ship.yaml files can be included in Helm chart repos, to customize the initial ship init experience

Installation

There are two ways you can get started with Ship:

Installing locally

Ship is packaged as a single binary, and Linux and MacOS versions are distributed:

  • To download the latest Linux build, run:
curl -sSL https://github.com/replicatedhq/ship/releases/download/v0.28.0/ship_0.28.0_linux_amd64.tar.gz | tar xv && sudo mv ship /usr/local/bin
  • To download the latest MacOS build, run:
curl -sSL https://github.com/replicatedhq/ship/releases/download/v0.28.0/ship_0.28.0_darwin_amd64.tar.gz | tar xv && sudo mv ship /usr/local/bin

Ship is also available through Homebrew:

brew tap replicatedhq/ship
brew install ship

After ship is installed, run it with:

ship init <path-to-chart> # github.com/helm/charts/stable/mysql

Running in Docker

To run ship in Docker:

docker run -p 8800:8800 replicated/ship init <path-to-chart> # github.com/helm/charts/stable/mysql

Note, you will need to mount and configure a shared volume, in order to persist any changes made within the Ship admin console when launched via Docker.

Ship Modes

Replicated Ship Modes

CI/CD Integration

Once you've prepared an application using ship init, the deployable application assets can be generated, using any version of the application, by running:

ship update

The watch command is designed to be a trigger for a CI/CD process by watching the upstream application for changes. Running ship watch will load the state file and periodically poll the upstream application and exit when it finds a change. A simple, starting workflow could be to run ship watch && ship update after completing ship init. This will apply an update to the base directory.

Community

For questions about using Ship, there's a Replicated Community forum.

For bug reports, please open an issue in this repo.

For instructions on building the project and making contributions, see Contributing

Directories

Path Synopsis
cmd
pkg
api
cli
e2e
fs
lifecycle/daemon
Thanks Gin! https://github.com/gin-gonic/contrib/blob/master/static/example/bindata/example.go
Thanks Gin! https://github.com/gin-gonic/contrib/blob/master/static/example/bindata/example.go
specs/replicatedapp
local.go has methods for resolving a local ship.yaml file, and patching in api.Release info that would usually be returned by pg.replicated.com
local.go has methods for resolving a local ship.yaml file, and patching in api.Release info that would usually be returned by pg.replicated.com
test-mocks/apptype
Package apptype is a generated GoMock package.
Package apptype is a generated GoMock package.
test-mocks/config
Package config is a generated GoMock package.
Package config is a generated GoMock package.
test-mocks/daemon
Package daemon is a generated GoMock package.
Package daemon is a generated GoMock package.
test-mocks/docker
Package docker is a generated GoMock package.
Package docker is a generated GoMock package.
test-mocks/dockerlayer
Package dockerlayer is a generated GoMock package.
Package dockerlayer is a generated GoMock package.
test-mocks/github
Package github is a generated GoMock package.
Package github is a generated GoMock package.
test-mocks/githubclient
Package githubclient is a generated GoMock package.
Package githubclient is a generated GoMock package.
test-mocks/helm
Package helm is a generated GoMock package.
Package helm is a generated GoMock package.
test-mocks/images
Package images is a generated GoMock package.
Package images is a generated GoMock package.
test-mocks/images/saver
Package saver is a generated GoMock package.
Package saver is a generated GoMock package.
test-mocks/inline
Package inline is a generated GoMock package.
Package inline is a generated GoMock package.
test-mocks/lifecycle
Package lifecycle is a generated GoMock package.
Package lifecycle is a generated GoMock package.
test-mocks/planner
Package planner is a generated GoMock package.
Package planner is a generated GoMock package.
test-mocks/replicatedapp
Package replicatedapp is a generated GoMock package.
Package replicatedapp is a generated GoMock package.
test-mocks/state
Package state is a generated GoMock package.
Package state is a generated GoMock package.
test-mocks/tfplan
Package tfplan is a generated GoMock package.
Package tfplan is a generated GoMock package.
test-mocks/ui
Package ui is a generated GoMock package.
Package ui is a generated GoMock package.
test-mocks/util
Package util is a generated GoMock package.
Package util is a generated GoMock package.
testing/tmpfs
in some cases we have to use a real os fs and not a mem map because of how Afero handles readdir on a file
in some cases we have to use a real os fs and not a mem map because of how Afero handles readdir on a file
ui

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL