openshift+SkyDive 监控---离线安装

2023-11-30 10:48

本文主要是介绍openshift+SkyDive 监控---离线安装,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

这里写图片描述
What is Skydive
Skydive is an open source real-time network topology and protocols analyzer providing a comprehensive way of understanding what is happening in your network infrastructure.
Skydive是一种开放源码的实时网络拓扑和协议分析器,
它提供了一种全面的方法来理解网络基础设施中正在发生的事情

SkyDive视频教程 官方学习地址
github—源码查看,skydive-project/skydive

需要用到的yaml文件和镜像,百度网盘下载
链接:https://pan.baidu.com/s/1JqLwEQlSBqLJrCh7eOSGqw 密码:oz0w

下面开始在openshift中部署skydive,简单步骤,及过程中需要注意的几个小问题:

  • 环境:openshift是一个master两个node:
    大概步骤是,参考链接:https://github.com/skydive-project/skydive/tree/master/contrib/openshift
1.oc new-project skydive
2.oc create -f skydive-template.yaml
3.oc adm policy add-scc-to-user privileged system:serviceaccount:skydive:default
4.oc new-app --template=skydive
5.oc get pods
6.oc get ds
7.oc delete route skydive-analyzer
8.oc expose svc skydive-analyzer
  • 下面详细列述,具体操作过程中需要注意的几点内容:

第一步骤:使用oc命令登录,然后创建项目,执行如下:

[root@master skydive]# oc login
Authentication required for https://master.ose.org:8443 (openshift)
Username: redhat
Password: 
Login successful.You don't have any projects. You can try to create a new project, by runningoc new-project <projectname>[root@master skydive]# oc new-project skydive
Now using project "skydive" on server "https://master.ose.org:8443".You can add applications to this project with the 'new-app' command. For example, try:oc new-app centos/ruby-22-centos7~https://github.com/openshift/ruby-ex.gitto build a new example application in Ruby.
[root@master skydive]# oc get project
NAME      DISPLAY NAME   STATUS
skydive                  Active
[root@master skydive]# 

第二步骤:将文件上传openshift master节点服务器某目录下,可以使用sz命令上传或者FileZilla等:
文件下载地址:链接:https://pan.baidu.com/s/1JqLwEQlSBqLJrCh7eOSGqw 密码:oz0w

[root@master skydive]# ls
elasticsearch.tar  skydive.tar  skydive-template.yaml

第三步骤:在skydive-template.yaml目录下Install the template

[root@master skydive]# ls
elasticsearch.tar  skydive.tar  skydive-template.yaml
[root@master skydive]# oc create -f skydive-template.yaml
template "skydive" created

第四步骤:使用管理员登录oc login -u system:admin,执行授权:
oc adm policy add-scc-to-user privileged system:serviceaccount:skydive:default

[root@master skydive]# oc login -u system:admin
Logged into "https://master.ose.org:8443" as "system:admin" using existing credentials.You have access to the following projects and can switch between them with 'oc project <projectname>':defaultkube-systemloggingmanagement-infraopenshiftopenshift-infra* skydiveUsing project "skydive".
[root@master skydive]# oc adm policy add-scc-to-user privileged system:serviceaccount:skydive:default

第五步骤:Instanciate the template,实例化模板:

[root@master skydive]# oc new-app --template=skydive
--> Deploying template skydive--> Creating resources with label app=skydive ...service "skydive-analyzer" createddeploymentconfig "skydive-analyzer" createddaemonset "skydive-agent" createdroute "skydive-analyzer" created
--> SuccessRun 'oc status' to view your app.

第六步骤:Check that everything is working and created,检查是否一切正常:

[root@master skydive]# oc get pod
NAME                       READY     STATUS    RESTARTS   AGE
skydive-agent-5sbcj        1/1       Running   0          7m
skydive-agent-67i3k        1/1       Running   0          7m
skydive-agent-w7i07        1/1       Running   0          7m
skydive-analyzer-1-gbwkq   2/2       Running   1          7m

这里写图片描述
这里写图片描述
注意:http://skydive-analyzer-skydive.apps.ose.org/topology 打开时有些浏览器不兼容,最好用chrome
这里写图片描述
这里写图片描述

ps: 另外一个问题,镜像处理:
由于我的网络原因,我先将镜像下载,然后上传到服务器,使用命令将它上传到docker,然后push到openshift自己镜像仓库,具体操作如下:

oc import-image registry.ose.org:5000/docker.io/skydive/skydive:latest –confirm –insecure -n openshift

[root@master skydive]# docker load -i skydive.tar
[root@master skydive]# docker load -i elasticsearch.tar
[root@master skydive]# docker tag docker.io/skydive/skydive registry.ose.org:5000/docker.io/skydive/skydive
[root@master skydive]# docker push registry.ose.org:5000/docker.io/skydive/skydive
The push refers to a repository [registry.ose.org:5000/docker.io/skydive/skydive]
918cda4ac29c: Already exists 
7fb731a2e174: Already exists 
91d4719b3ccf: Already exists 
Pushing tag for rev [ee05e2e60a85] on {http://registry.ose.org:5000/v1/repositories/docker.io/skydive/skydive/tags/latest}
-- 导入到openshift默认的镜像仓库:
[root@master skydive]# oc import-image docker.io/skydive/skydive:latest --confirm --insecure -n openshift
The import completed successfully.Name:                   skydive
Namespace:              openshift
Created:                3 days ago
Labels:                 <none>
Annotations:            openshift.io/image.dockerRepositoryCheck=2018-06-08T01:47:11Z
Docker Pull Spec:       172.30.97.33:5000/openshift/skydive
Unique Images:          0
Tags:                   1latesttagged from docker.io/skydive/skydive:latestwill use insecure HTTPS or HTTP connections! error: Import failed (InternalError): Internal error occurred: Get http://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io on 10.10.31.101:53: server misbehaving3 days ago

大概命令如下:

docker load -i skydive.tar
docker load -i elasticsearch.tardocker tag docker.io/skydive/skydive registry.ose.org:5000/docker.io/skydive/skydive
docker push registry.ose.org:5000/docker.io/skydive/skydive
oc import-image registry.ose.org:5000/docker.io/skydive/skydive --confirm --insecure -n openshiftdocker tag docker.io/elasticsearch:2 registry.ose.org:5000/docker.io/elasticsearch
docker push registry.ose.org:5000/docker.io/elasticsearch
oc import-image registry.ose.org:5000/docker.io/elasticsearch --confirm --insecure -n openshift

这里写图片描述

记得,pod和deployments的images,要修改下yaml文件 ,对应就可以启动了。

这篇关于openshift+SkyDive 监控---离线安装的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/436739

相关文章

最详细安装 PostgreSQL方法及常见问题解决

《最详细安装PostgreSQL方法及常见问题解决》:本文主要介绍最详细安装PostgreSQL方法及常见问题解决,介绍了在Windows系统上安装PostgreSQL及Linux系统上安装Po... 目录一、在 Windows 系统上安装 PostgreSQL1. 下载 PostgreSQL 安装包2.

Maven如何手动安装依赖到本地仓库

《Maven如何手动安装依赖到本地仓库》:本文主要介绍Maven如何手动安装依赖到本地仓库问题,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录一、下载依赖二、安装 JAR 文件到本地仓库三、验证安装四、在项目中使用该依赖1、注意事项2、额外提示总结一、下载依赖登

如何在Mac上安装并配置JDK环境变量详细步骤

《如何在Mac上安装并配置JDK环境变量详细步骤》:本文主要介绍如何在Mac上安装并配置JDK环境变量详细步骤,包括下载JDK、安装JDK、配置环境变量、验证JDK配置以及可选地设置PowerSh... 目录步骤 1:下载JDK步骤 2:安装JDK步骤 3:配置环境变量1. 编辑~/.zshrc(对于zsh

如何在pycharm安装torch包

《如何在pycharm安装torch包》:本文主要介绍如何在pycharm安装torch包方式,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录在pycharm安装torch包适http://www.chinasem.cn配于我电脑的指令为适用的torch包为总结在p

在PyCharm中安装PyTorch、torchvision和OpenCV详解

《在PyCharm中安装PyTorch、torchvision和OpenCV详解》:本文主要介绍在PyCharm中安装PyTorch、torchvision和OpenCV方式,具有很好的参考价值,... 目录PyCharm安装PyTorch、torchvision和OpenCV安装python安装PyTor

Python Transformer 库安装配置及使用方法

《PythonTransformer库安装配置及使用方法》HuggingFaceTransformers是自然语言处理(NLP)领域最流行的开源库之一,支持基于Transformer架构的预训练模... 目录python 中的 Transformer 库及使用方法一、库的概述二、安装与配置三、基础使用:Pi

如何解决mmcv无法安装或安装之后报错问题

《如何解决mmcv无法安装或安装之后报错问题》:本文主要介绍如何解决mmcv无法安装或安装之后报错问题,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录mmcv无法安装或安装之后报错问题1.当我们运行YOwww.chinasem.cnLO时遇到2.找到下图所示这里3.

Python 安装和配置flask, flask_cors的图文教程

《Python安装和配置flask,flask_cors的图文教程》:本文主要介绍Python安装和配置flask,flask_cors的图文教程,本文通过图文并茂的形式给大家介绍的非常详细,... 目录一.python安装:二,配置环境变量,三:检查Python安装和环境变量,四:安装flask和flas

AJAX请求上传下载进度监控实现方式

《AJAX请求上传下载进度监控实现方式》在日常Web开发中,AJAX(AsynchronousJavaScriptandXML)被广泛用于异步请求数据,而无需刷新整个页面,:本文主要介绍AJAX请... 目录1. 前言2. 基于XMLHttpRequest的进度监控2.1 基础版文件上传监控2.2 增强版多

Win11安装PostgreSQL数据库的两种方式详细步骤

《Win11安装PostgreSQL数据库的两种方式详细步骤》PostgreSQL是备受业界青睐的关系型数据库,尤其是在地理空间和移动领域,:本文主要介绍Win11安装PostgreSQL数据库的... 目录一、exe文件安装 (推荐)下载安装包1. 选择操作系统2. 跳转到EDB(PostgreSQL 的