fabric8io / fabric8-platform

Generates the distribution of the fabric8 microservices platform
Apache License 2.0
104 stars 66 forks source link
ci-cd continuous continuous-delivery continuous-integration developer developer-experience developer-tools docker fabric8 jenkins kubernetes microservices openshift

Fabric8 Developer Platform

This project generates the distribution of the fabric8 developer platform

fabric8 logo

To install the early access of this on Minishift check out the installation guide

Fabric8 Platform Overview

From version 4.x onwards of the fabric8 platform there are a core set of shared services which are shared by all users then a set of services created for each user/team which we refer to as tenant services.

Shared Services

when installing on premise we also use these microservices:

Tenant Services

Each user/team can get their own Jenkins, Che and Content Repository.

Our Jenkins image includes the jenkins sync plugin and kubernetes-pipeline-plugin along with the fabric8-pipeline-library

Other components

Changes in 4.x

Version 4.x of fabric8 differs a little bit from previous 3.x releases as follows:

Github Organisations

There are lots of github repositories which make up the full platform!

To make things easier to navigate we've created a few different organisations to contain the various parts of fabric8:

Detailed List of Projects

The fabric8 developer platform is based on lots of different open source projects. Here's the main repositories:

Maven Tooling

Developer Console

Version 4.x or later

The new shiny Angular console is here fabric8-ui along with a bunch of other NPM modules in the fabric8-ui organisation

The new console works directly with

Version 3.x and earlier

The angular JS 1.x version of the Developer Console is made up of:

CI / CD

DevOps

iPaaS

kubeflix

Tools

Suppport for non-docker

Some folks have work loads they need to orchestrate on operating systems that don't yet have production quality docker support (e.g. Windows, AIX, Solaris, HPUX).

Java Libraries

If you want to write any Java/JVM based tools to interact with Kubernetes we have a number of libraries to help:

Kubernetes

Kubernetes provides the main REST API for working with the Kubernetes Platform. It should provide all you need for writing most services and plugins for Kubernetes.

Testing

 Spring

ActiveMQ

Camel

CDI

DevOps

 Git Repos

 Hubot

 Letschat

 Taiga

Additional projects

The web console uses many different hawtio 2 modules. In particular the main dependency of is hawtio-kubernetes

Docker images

There are numerous docker images created via separate github repositories such as the following:

Base images

The above-packaged docker images leverage some of these base Docker images:

Java Alpine Linux

Java Centos Linux

JBoss

Jetty

Karaf

Tomcat

s2i

v 4.x pre-release development

Steps to run the in development 4.x fabric8-platform using the latest mnishift please see the new Install Guide

Here's the old way we were installing it via gofabric8:

minishift  start --vm-driver=xhyve --memory=6144 --cpus=4 --disk-size=50g --openshift-version=v3.6.0-alpha.1
minishift openshift config set --patch '{"corsAllowedOrigins": [".*"]}'
oc new-project fabric8
git clone https://github.com/fabric8io/fabric8-platform.git
cd fabric8-platform
mvn clean install -DskipTests=true
gofabric8 deploy --package=packages/fabric8-system/target/classes/META-INF/fabric8/openshift.yml

Pods may be restarted a few times whilst configuration is updated and applied.

Once all pods are seen running with oc get pods

NOTE these next steps will be automated soon

Apply manual step as an admin user:

oc login -u system:admin
cat <<EOF | oc create -f -
kind: OAuthClient
apiVersion: v1
metadata:
  name: fabric8-online-platform
secret: fabric8
redirectURIs:
- "https://$(oc get route keycloak -o jsonpath="{.spec.host}")/auth/realms/fabric8/broker/openshift-v3/endpoint"
grantMethod: prompt
EOF
oc adm policy add-cluster-role-to-user cluster-admin system:serviceaccount:fabric8:init-tenant
oc login -u developer -p developer

Configure Keycloak

We now have GitHub integration which for now requires a manual OAuth setup to obtain a clientid and secret that we will give to keycloak. Follow these steps using the output of:

echo https://$(oc get route keycloak -o jsonpath="{.spec.host}")/auth/realms/fabric8/broker/github/endpoint

as the Authorization callback URL and http://fabric8.io as a sample homepage URL.

https://developer.github.com/apps/building-integrations/setting-up-and-registering-oauth-apps/registering-oauth-apps/

Register OAuth App

open https://$(oc get route keycloak -o jsonpath="{.spec.host}")

Log in with username admin and password admin

Now in Keycloak navigate to the GitHub Identity Provider and edit now you can replace the Client ID and Secret with the values you get from the GitHub setup above.

GitHub provider