khipkin / k8s-service-catalog

Commandline tool to manage Service Catalog lifecycle and GCP Service Broker atop Kubernetes Cluster

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Service Catalog Installer

Service Catalog Installer is a CLI tool to manage Service Catalog and GCP Service Broker atop Kubernetes Cluster.

Intro

Service Catalog Installer sc lets you do the following:

  • Install Service Catalog
  • Uninstall Service Catalog
  • Install GCP Service Broker
  • Uninstall GCP Service Broker

Requirements

Before installing Service Catalog atop Kubernetes cluster, you need to ensure following requirements are met.

  • cfssl tools are needed for generating SSL artifacts. Install cfssl using following command
    go get -u github.com/cloudflare/cfssl/cmd/...
    which cfssl
    /home/sunil/go/bin/cfssl
    which cfssljson
    /home/sunil/go/bin/cfssljson
  • Service Catalog requires Kubernetes version 1.7 onwards.
  • Kubectl installed and configured to connect to a Kubernetes v1.7+ cluster.
  • Kubectl user should have cluster-admin role to be able to install Service Catalog. Run following command to ensure that:
    kubectl create clusterrolebinding cluster-admin-binding --clusterrole=cluster-admin --user=<user-name>
  • gcloud should be installed and configured with following commands in order to be used by the sc to configure GCP broker.
    gcloud components install beta
    gcloud auth login
    gcloud auth application-default login

Installation

sc is written in Go and can be installed using go get.

go get -u github.com/GoogleCloudPlatform/k8s-service-catalog/installer/cmd/sc

After running the above command, sc should get installed in your GOPATH/bin dir.

Usage

  • To print usage instructions, run

    sc --help
  • To check if all the dependencies are installed, run

    sc check
    Dependency check passed. You are good to go.
  • To install Service Catalog in Kubernetes cluster, run install help. If you are running on a non-GCP environment, specify the storageclass that you want to use for the backup.

    sc install --help
    installs Service Catalog in Kubernetes cluster.
    assumes kubectl is configured to connect to the Kubernetes cluster.
    
    Usage:
      sc install [flags]
    
    Flags:
          --etcd-backup-storageclass string   Etcd Backup StorageClass (default "standard")
          --etcd-cluster-size int32           Etcd cluster size (default 3)
      -h, --help                              help for install
    
    Global Flags:
          --alsologtostderr                  log to standard error as well as files
          --log_backtrace_at traceLocation   when logging hits line file:N, emit a stack trace (default :0)
          --log_dir string                   If non-empty, write log files in this directory
          --logtostderr                      log to standard error instead of files
          --stderrthreshold severity         logs at or above this threshold go to stderr (default 2)
      -v, --v Level                          log level for V logs
          --vmodule moduleSpec               comma-separated list of pattern=N settings for file-filtered logging
  • To uninstall Service Catalog in Kubernetes cluster, run

    sc uninstall
  • To add GCP Service Broker to the Service Catalog, run

    sc add-gcp-broker
  • To remove GCP Service Broker from the Service Catalog, run

    sc remove-gcp-broker

Build

If you want to build the installer yourself, here are the instructions to do so.

# Install [Go Dep](https://github.com/golang/dep) for dependency management using `go get`
go get -u github.com/golang/dep/cmd/dep

# Install `go-bindata` using `go get`
go get -u github.com/jteeuwen/go-bindata/...

# To build `sc` binary, run
make
# You should `sc` binary created in output/bin directory.

Tutorial

Once you have Service Catalog installed and GCP broker added to the cluster. Follow this basic tutorial to get started with Service Catalog.

Contribution

We are always looking for contributors, so if you want to contribute to the installer codebase, please follow the workflow instructions.

About

Commandline tool to manage Service Catalog lifecycle and GCP Service Broker atop Kubernetes Cluster

License:Apache License 2.0


Languages

Language:Go 89.0%Language:Shell 10.5%Language:Makefile 0.5%