本文介绍了开源的微服务管理平台 Fabric8。

  • 2017/04/10
  • DevOps
  • 7 分钟
  • 1495 字
  • 2024/04/26
点击查看目录

无意中发现Fabric8 这个对于 Java 友好的开源微服务管理平台

其实这在这里发现的Achieving CI/CD with Kubernetes (by Ramit Surana,on February 17, 2017),其实是先在slideshare 上看到的。

大家可能以前听过一个叫做fabric 的工具,那是一个 Python (2.5-2.7) 库和命令行工具,用来流水线化执行 SSH 以部署应用或系统管理任务。所以大家不要把 fabric8 跟 fabric 搞混,虽然它们之间有一些共同点,但两者完全不是同一个东西,fabric8 不是 fabric 的一个版本。Fabric 是用 python 开发的,fabric8 是 java 开发的。

如果你想了解简化 Fabric 可以看它的中文官方文档

Fabric8 简介

fabric8是一个开源集成开发平台,为基于KubernetesJenkins 的微服务提供持续发布

使用 fabric 可以很方便的通过Continuous Delivery pipelines 创建、编译、部署和测试微服务,然后通过 Continuous Improvement 和ChatOps 运行和管理他们。

Fabric8 微服务平台 提供:

Fabric8 微服务平台

Fabric8 提供了一个完全集成的开源微服务平台,可在任何的KubernetesOpenShift 环境中开箱即用。

整个平台是基于微服务而且是模块化的,你可以按照微服务的方式来使用它。

微服务平台提供的服务有:

  • 开发者控制台,这是一个富 Web 应用程序,它提供了一个单一的页面来创建、编辑、编译、部署和测试微服务。
  • 持续集成和持续交付,帮助团队以更快更可靠的方式交付软件,可以使用以下开源软件:
  • ChatOps :通过使用hubot 来开发和管理,能够让你的团队拥抱 DevOps,通过聊天和系统通知的方式来approval of release promotion
  • Chaos Monkey :通过干掉pods 来测试系统健壮性和可靠性
  • 管理
    • 日志 统一集群日志和可视化查看状态
    • metris 可查看历史 metrics 和可视化

参考

后记

我在自己笔记本上装了个 minikube,试玩感受将在后续发表。

试玩时需要科学上网。

$gofabric8 start
using the executable /usr/local/bin/minikube
minikube already running
using the executable /usr/local/bin/kubectl
Switched to context "minikube".
Deploying fabric8 to your Kubernetes installation at https://192.168.99.100:8443 for domain  in namespace default

Loading fabric8 releases from maven repository:https://repo1.maven.org/maven2/
Deploying package: platform version: 2.4.24

Now about to install package https://repo1.maven.org/maven2/io/fabric8/platform/packages/fabric8-platform/2.4.24/fabric8-platform-2.4.24-kubernetes.yml
Processing resource kind: Namespace in namespace default name user-secrets-source-admin
Found namespace on kind Secret of user-secrets-source-adminProcessing resource kind: Secret in namespace user-secrets-source-admin name default-gogs-git
Processing resource kind: Secret in namespace default name jenkins-docker-cfg
Processing resource kind: Secret in namespace default name jenkins-git-ssh
Processing resource kind: Secret in namespace default name jenkins-hub-api-token
Processing resource kind: Secret in namespace default name jenkins-master-ssh
Processing resource kind: Secret in namespace default name jenkins-maven-settings
Processing resource kind: Secret in namespace default name jenkins-release-gpg
Processing resource kind: Secret in namespace default name jenkins-ssh-config
Processing resource kind: ServiceAccount in namespace default name configmapcontroller
Processing resource kind: ServiceAccount in namespace default name exposecontroller
Processing resource kind: ServiceAccount in namespace default name fabric8
Processing resource kind: ServiceAccount in namespace default name gogs
Processing resource kind: ServiceAccount in namespace default name jenkins
Processing resource kind: Service in namespace default name fabric8
Processing resource kind: Service in namespace default name fabric8-docker-registry
Processing resource kind: Service in namespace default name fabric8-forge
Processing resource kind: Service in namespace default name gogs
...
-------------------------

Default GOGS admin username/password = gogsadmin/RedHat$1

Checking if PersistentVolumeClaims bind to a PersistentVolume ....
Downloading images and waiting to open the fabric8 console...

-------------------------
.....................................................

启动了半天一直是这种状态:

Waiting, endpoint for service is not ready yet...

我一看下载下来的

https://repo1.maven.org/maven2/io/fabric8/platform/packages/fabric8-platform/2.4.24/fabric8-platform-2.4.24-kubernetes.yml

文件,真是蔚为壮观啊,足足有24712 行(这里面都是实际配置,没有配置充行数),使用了如下这些 docker 镜像,足足有53 个 docker 镜像

fabric8/alpine-caddy:2.2.311
fabric8/apiman-gateway:2.2.168
fabric8/apiman:2.2.168
fabric8/chaos-monkey:2.2.311
fabric8/configmapcontroller:2.3.5
fabric8/eclipse-orion:2.2.311
fabric8/elasticsearch-k8s:2.3.4
fabric8/elasticsearch-logstash-template:2.2.311
fabric8/elasticsearch-v1:2.2.168
fabric8/exposecontroller:2.3.2
fabric8/fabric8-console:2.2.199
fabric8/fabric8-forge:2.3.88
fabric8/fabric8-kiwiirc:2.2.311
fabric8/fluentd-kubernetes:v1.19
fabric8/gerrit:2.2.311
fabric8/git-collector:2.2.311
fabric8/gogs:v0.9.97
fabric8/grafana:2.6.1
fabric8/hubot-irc:2.2.311
fabric8/hubot-letschat:v1.0.0
fabric8/hubot-notifier:2.2.311
fabric8/hubot-slack:2.2.311
fabric8/jenkins-docker:2.2.311
fabric8/jenkinshift:2.2.199
fabric8/kafka:2.2.153
fabric8/kibana-config:2.2.311
fabric8/kibana4:v4.5.3
fabric8/lets-chat:2.2.311
fabric8/maven-builder:2.2.311
fabric8/message-broker:2.2.168
fabric8/message-gateway:2.2.168
fabric8/nexus:2.2.311
fabric8/taiga-back:2.2.311
fabric8/taiga-front:2.2.311
fabric8/turbine-server:1.0.28
fabric8/zookeeper:2.2.153
fabric8/zookeeper:2.2.168
funktion/funktion-nodejs-runtime:1.0.3
funktion/funktion:1.0.9
gitlab/gitlab-ce
jboss/keycloak:2.2.0.Final
jfrog-docker-registry.bintray.io/artifactory/artifactory-oss
jimmidyson/configmap-reload:v0.1
manageiq/manageiq:latest
mongo
mysql:5.7
nginxdemos/nginx-ingress:0.3.1
openzipkin/zipkin:1.13.0
postgres
prom/blackbox-exporter:master
prom/node-exporter
prom/prometheus:v1.3.1
registry:2

你们感受下吧,我果断放弃了在自己笔记本上安装的念头。