• This repository has been archived on 16/Jul/2018
  • Stars
    star
    147
  • Rank 242,527 (Top 5 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created almost 9 years ago
  • Updated over 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

CLI used when working with fabric8 running on Kubernetes or OpenShift

gofabric8

Go Report Card APACHEv2 License

gofabric8 is used to validate & deploy fabric8 components on to your Kubernetes or OpenShift environment

Find more information at http://fabric8.io.

Getting started

Install gofabric8

Get the latest gofabric8 or use the following script to download it.

curl -sS https://get.fabric8.io/download.txt | bash

Add '~/.fabric8/bin' to your path so you can execute the new binaries, for example: edit your ~/.zshrc or ~/.bashrc and append to the end of the file

export PATH=$PATH:~/.fabric8/bin
source ~/.zshrc or ~/.bashrc

Install dependencies

The gofabric8 install installs the dependencies to locally run the fabric8 microservices platform - either minishift and openshift client or minikube and kubectl along with necessary drivers. The binaries are downloaded to ~/.fabric8/bin.

Install minikube

gofabric8 install

Install minishift

gofabric8 install --minishift

Install the fabric8 microservices platform

To install the fabric8 microservices platform then run the following:

gofabric8 deploy

If you are deploying to a remote OpenShift instance make sure to set the domain so we can generate routes to access applications

gofabric8 deploy --domain=your.domain.io

Reusing the Docker daemon

When developing locally and using a single VM its really handy to reuse the Docker daemon inside the VM; as this means you don't have to build on your host machine and push the image into a docker registry - you can just build inside the same docker daemon as minikube which speeds up local experiments.

To be able to work with the docker daemon on your mac/linux host use the docker-env command in your shell:

eval $(gofabric8 docker-env)

You should now be able to use docker on the command line on your host mac/linux machine talking to the docker daemon inside the minikube VM:

docker ps

Remember to turn off the imagePullPolicy:Always, as otherwise kubernetes won't use images you built locally.

Run different versions

When deploying, by default the latest release version is used. In order to deploy a specific version you can use the various--version-xxxx flags as detailed under

gofabric8 deploy help

Usage

gofabric8 help
gofabric8 is used to validate & deploy fabric8 components on to your Kubernetes or OpenShift environment
								Find more information at http://fabric8.io.

Usage:
  gofabric8 [flags]
  gofabric8 [command]

Available Commands:
  bdd-env          Generates the BDD environment variables for use by the BDD test pipeline
  che              Opens a shell in a Che workspace pod
  clean            Clean up a resource type without deleting it
  completion       Output shell completion code for the given shell (bash or zsh)
  console          Open the fabric8 console
  copy-endpoints   Copies endpoints from the current namespace to a target namespace
  create           Create a resource type
  delete           Delete a resource type
  deploy           Deploy fabric8 to your Kubernetes or OpenShift environment
  docker-env       Sets up docker env variables; Usage 'eval $(gofabric8 docker-env)'
  e2e              Runs the end to end system tests
  e2e-console      Points the jenkins namespace at the console to use for E2E tests
  e2e-env          Generates the E2E environment variables for use by the E2E test pipeline
  e2e-secret       Creates or updates a Secret for the user for E2E tests
  erase-pvc        Erase PVC
  get              Get a resource type
  ingress          Creates any missing Ingress resources for services
  install          Installs the dependencies to locally run the fabric8 microservices platform
  ip               Returns the IP for the cluster gofabric8 is connected to
  log              Tails the log of the newest pod for the given named Deployment or DeploymentConfig
  package-versions Displays the versions available for a package
  packages         Lists the packages that are currently installed
  pull             Pulls the docker images for the given templates
  routes           Creates any missing Routes for services
  run              Runs a fabric8 microservice from one of the installed templates
  secrets          Set up Secrets on your Kubernetes or OpenShift environment
  service          Opens the specified Kubernetes service in your browser
  start            Starts a local cloud development environment
  status           Gets the status of a local cluster
  stop             Stops a running local cluster
  tenant           Commands for working on your tenant
  test             Runs the end to end system tests
  upgrade          Upgrades the packages if there is a newer version available
  validate         Validate your Kubernetes or OpenShift environment
  version          Display version & exit
  volumes          Creates a persisent volume for any pending persistance volume claims
  wait-for         Waits for the listed deployments to be ready - useful for automation and testing

Flags:
      --as string                         Username to impersonate for the operation
  -b, --batch export FABRIC8_BATCH=true   Run in batch mode to avoid prompts. Can also be enabled via export FABRIC8_BATCH=true
      --certificate-authority string      Path to a cert. file for the certificate authority
      --client-certificate string         Path to a client certificate file for TLS
      --client-key string                 Path to a client key file for TLS
      --cluster string                    The name of the kubeconfig cluster to use
      --context string                    The name of the kubeconfig context to use
      --insecure-skip-tls-verify          If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure
      --kubeconfig string                 Path to the kubeconfig file to use for CLI requests.
      --match-server-version              Require server version to match client version
  -n, --namespace string                  If present, the namespace scope for this CLI request
      --password string                   Password for basic authentication to the API server
      --request-timeout string            The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0")
  -s, --server string                     The address and port of the Kubernetes API server
      --token string                      Bearer token for authentication to the API server
      --user string                       The name of the kubeconfig user to use
      --username string                   Username for basic authentication to the API server
      --version-console string            fabric8 version (default "latest")
      --work-project string               The work project (default "autodetect")
  -y, --yes                               Assume yes

Use "gofabric8 [command] --help" for more information about a command.

Shell completion

gofabric8 provides shell completions, so you can easily complete commands while in the shell.

Simply add this to your ~/.bashrc if you use bash :

  source <(gofabric8 completion bash)

or to your ~/.zshrc if you use zsh ::

  source <(gofabric8 completion zsh)

Development

Prerequisites

Install go version 1.7.4

Developing

git clone [email protected]:fabric8io/gofabric8.git $GOPATH/src/github.com/fabric8io/gofabric8
make

Make changes to *.go files, rerun make and execute the generated binary

e.g.

./build/gofabric8 deploy

More Repositories

1

kubernetes-client

Java client for Kubernetes & OpenShift
Java
3,266
star
2

docker-maven-plugin

Maven plugin for running and creating Docker images
Java
1,822
star
3

fabric8

fabric8 is an open source microservices platform based on Docker, Kubernetes and Jenkins
1,773
star
4

spring-cloud-kubernetes

Kubernetes integration with Spring Cloud
Java
703
star
5

fabric8-pipeline-library

Fabric8 Pipeline for Jenkins
Groovy
431
star
6

fluent-plugin-kubernetes_metadata_filter

Enrich your fluentd events with Kubernetes metadata
Ruby
349
star
7

fabric8-maven-plugin

📢 This project is migrated to 👉 https://github.com/eclipse/jkube
Java
335
star
8

jenkins-pipeline-library

a collection of reusable jenkins pipelines and pipeline functions
Groovy
274
star
9

kubeflix

Kubernetes integration with Netflix OSS
267
star
10

kansible

Kansible lets you orchestrate operating system processes on Windows or any Unix in the same way as you orchestrate your Docker containers with Kubernetes by using Ansible to provision the software onto hosts and Kubernetes to orchestate the processes
Go
263
star
11

configmapcontroller

Go
206
star
12

fabric8-jenkinsfile-library

This repository contains a library of reusable Jenkinsfiles that you can use on your projects. Its reused by the fabric8 console to associate Jenkinsfiles to projects
Groovy
187
star
13

elasticsearch-cloud-kubernetes

Java
169
star
14

mockwebserver

An extension of okhttp's mockwebserver, that provides a DSL and is easier to use
Java
112
star
15

fabric8-platform

Generates the distribution of the fabric8 microservices platform
Shell
104
star
16

shootout-docker-maven

A comparison between the four major docker-maven-plugins
Java
84
star
17

jenkins-docker

docker file for a jenkins docker image
Groovy
82
star
18

kubernetes-zipkin

Kubernetes integration with OpenZipkin
Java
69
star
19

ipaas-quickstarts

quickstarts for the fabric8 project
Java
66
star
20

fabric8-devops

Contains the pluggable apps that can be run as part of the fabric8 DevOps platform on any OpenShift v3 or Kubernetes environment
63
star
21

agent-bond

A Super Java Agent
Java
46
star
22

gitcontroller

A simple microservice which watches Kubernetes Deployments which are using gitRepo volumes and if git has changed, updates the Deployment
Go
44
star
23

docker-fluentd-kubernetes

Shell
43
star
24

kubernetes-model

JSON schema generator for OpenShift Origin API objects
36
star
25

fabric8-docker

Dockerfiles to create Fuse containers in docker.io
Shell
33
star
26

fabric8-console

Angular 1.x console for fabric8
28
star
27

openshift-elasticsearch-plugin

Java
27
star
28

jube

jube is a deprecated pure java implementation of kubernetes. Please look at kansible now instead!
Java
27
star
29

vertx-maven-plugin

Vert.x Maven Plugin - moved to https://github.com/reactiverse/vertx-maven-plugin
Java
25
star
30

openshift-auth-proxy

A reverse proxy that authenticates the request against OpenShift, retrieving user information & setting the configured header with the appropriate details.
JavaScript
18
star
31

fabric8-zookeeper-docker

Shell
18
star
32

fluent-plugin-kubernetes

Ruby
16
star
33

fabric8-ipaas

This repository contains the iPaaS related apps that can be run as part of the fabric8 platform on any OpenShift v3 and Kubernetes environment
14
star
34

osio-pipeline

DSL and utility functions in groovy for running Jenkins OSIO Pipeline
Groovy
13
star
35

fabric8-installer

To install fabric8 into a Kubernetes, OpenShift or Atomic environment
Ruby
12
star
36

kubernetes-alexa

A skill that allows Alexa to interact with a Kubernetes / Openshift cluster
Java
12
star
37

docker-gerrit

a docker image for gerrit
Shell
12
star
38

sandbox-fabric8-devops

A repository of devops examples for automatically provisioning and testing fabrics on different infrastructure
Ruby
12
star
39

fabric8-jenkins-workflow-steps

fabric8 based jenkins workflow steps
11
star
40

docker-client

11
star
41

kubernetes-assertions

This library provides a bunch of helpful assertj assertions for working with the kubernetes-api
Java
10
star
42

fabric8-forge

Supports JBoss Forge plugins for the Fabric8 iPaaS along with using Forge as a REST service inside Fabric8 DevOps
Java
10
star
43

docker-gogs

Go
9
star
44

fabric8-ansible-spring-boot

an Ansible playbook for provisioning Spring Boot apps
9
star
45

docker-dirsrv-389ds

Docker Image repo for 389ds Fedora Directory Server
Shell
9
star
46

fabric8-kit

Building blocks for the fabric8 Developer Toolbox (i.e. the Maven plugins)
Java
9
star
47

templates

the default templates to use inside the fabric8 console
Shell
9
star
48

data-mapper

data mapper tooling
7
star
49

jenkins-pipeline-dsl

Groovy
7
star
50

fabric8-online-docs

Shell
7
star
51

docker-cfssl

Shell
7
star
52

docker-grafana

Shell
7
star
53

hawtio-docker

NOTE: now replaced by fabric8/fabric8-console image. This project creates the fabric8/hawtio docker image
Shell
6
star
54

fluent-plugin-docker_metadata_filter

Ruby
6
star
55

default-jenkins-dsl

The default jenkins job DSL build for automatically performing CI and CD on local gogs repositories inside fabric8
Groovy
6
star
56

jenkins_exporter

Prometheus exporter for Jenkins
Go
4
star
57

fabric8-test

Python
4
star
58

fabric8-ansible-hawtapp

a sample Ansible playbook that provisions a fabric8 hawtapp onto boxes
Shell
4
star
59

docker-kibana4

Shell
4
star
60

jadvisor

Go
4
star
61

fabric8-keycloak-theme

CSS
4
star
62

fabric8-envoy

a distribution of Envoy for running on kubernetes or openshift
Shell
4
star
63

grafana-kubernetes-app

JavaScript
4
star
64

fabric8-eclipse-orion

docker packaging of eclipse orion web based IDE
3
star
65

jenkinshift

A simple REST Facade that makes Jenkins Jobs and Build Runs appear as if they are OpenShift BuildConfig / Build objects so that the fabric8-console can still view apps/builds when using Jenkins on vanilla kubernetes
Go
3
star
66

traefik

a kubernetes app for running traefik.io
3
star
67

envsubst

docker image to replace placeholders in a file with env var values
Shell
3
star
68

docker-iptables-redirector

A simple Docker image that redirects traffic via DNAT to a different address/port
Shell
3
star
69

hubot-mattermost

2
star
70

docker-prometheus

2
star
71

hubot-slack

2
star
72

fabric8-release-pipelines

fabric8 release pipeline project that contains the Jenkinsfiles for multi project release
Groovy
2
star
73

hubot-base

2
star
74

jenkins-jnlp-client

Jenkins JNLP Client Docker Image
Shell
2
star
75

fabric8-ci-seed

a Jenkins Job DSL script to auto generate pull request CI jobs for projects such as the quickstarts
Groovy
2
star
76

fabric8-online

Groovy
2
star
77

fabric8-hubot-scripts

scripts for running hubot on fabric8
CoffeeScript
2
star
78

jenkins-slave-docker

Jenkins Slave Docker Image
Shell
2
star
79

dirsrv-389ds

389ds application for OpenShift/Kubernetes
Groovy
2
star
80

jenkernetes-docker

Shell
2
star
81

fabric8-gogs-find-projects

creates a docker container to find repos in gogs for use in jenkins workflow scripts
Java
2
star
82

fabric8-spring

A project to help folks use Spring Boot with Kubernetes or OpenShift
2
star
83

go-builder

Builder image used by Kubernetes Workflow and Jenkinsfile to build golang images
1
star
84

hubot-irc

1
star
85

insight

1
star
86

fabric8-brackets

a docker package for the http://brackets.io/ editor
1
star
87

django-examples

Camel iPaaS functionality examples
1
star
88

docker-logstash

Shell
1
star
89

maven-nexus-docker

a nexus aware docker image for maven
1
star
90

jenkins-slave-dind-maven

a jenkins slave with dind and a pre-installed maven docker image
Shell
1
star
91

ianaservicehelper

Java
1
star
92

gitcollector

collects git and github related events from projects inside OpenShift
Go
1
star
93

jenkins-slave-dind

A Docker in Docker Jenkins Slave
Shell
1
star
94

docker-fluentd

1
star
95

caddy-server

1
star
96

ipaas-platform

Generates the distribution of the ipaas platform
Groovy
1
star
97

docker-influxdb

Go
1
star
98

fabric8-generator

a jboss forge add on for the fabric8 upstream and SaaS generator wizards
Java
1
star
99

fabric8-jbpm-designer

Shell
1
star
100

fabric8-profiles

fabric8-profiles provides an abstraction for sharing configuration across apps in a convention over configuration way
1
star