ship

module
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2018 License: Apache-2.0

README

Ship

Test Coverage Maintainability CircleCI Docker Image

Replicated Ship

Ship enables the operation of third-party applications through modern software deployment pipelines (i.e. GitOps). Ship is a command line and UI that prepares workflows to enable deploying and updating of Helm charts, Kubernetes applications and other third-party software. Ship handles the process of merging custom settings (state.json) with custom overlays (using Kustomize), and preparing a deployable set of assets (an application). 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.

Ship includes first-class support for Helm charts, and automates the "last-mile" of custom configuration via Kustomize.

Features

  • 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
  • Deploy Helm charts to a Kubernetes cluster without Tiller
  • Enables GitOps workflows to update third party applications
  • Configuration workflow ship.yml files can be included in Helm chart repos, to customize the initial ship init experience

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 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

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

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.14.0/ship_0.14.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.14.0/ship_0.14.0_darwin_amd64.tar.gz | tar xv && sudo mv ship /usr/local/bin

After ship is installed, run it with:

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

Running in Docker

To run ship in Docker:

docker run replicated/ship init <path-to-chart> # github.com/kubernetes/charts/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
hack-docs command
ship command
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
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/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.
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