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

相关文章

Python中win32包的安装及常见用途介绍

《Python中win32包的安装及常见用途介绍》在Windows环境下,PythonWin32模块通常随Python安装包一起安装,:本文主要介绍Python中win32包的安装及常见用途的相关... 目录前言主要组件安装方法常见用途1. 操作Windows注册表2. 操作Windows服务3. 窗口操作

gitlab安装及邮箱配置和常用使用方式

《gitlab安装及邮箱配置和常用使用方式》:本文主要介绍gitlab安装及邮箱配置和常用使用方式,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录1.安装GitLab2.配置GitLab邮件服务3.GitLab的账号注册邮箱验证及其分组4.gitlab分支和标签的

MySQL MCP 服务器安装配置最佳实践

《MySQLMCP服务器安装配置最佳实践》本文介绍MySQLMCP服务器的安装配置方法,本文结合实例代码给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友参考下... 目录mysql MCP 服务器安装配置指南简介功能特点安装方法数据库配置使用MCP Inspector进行调试开发指

在Windows上使用qemu安装ubuntu24.04服务器的详细指南

《在Windows上使用qemu安装ubuntu24.04服务器的详细指南》本文介绍了在Windows上使用QEMU安装Ubuntu24.04的全流程:安装QEMU、准备ISO镜像、创建虚拟磁盘、配置... 目录1. 安装QEMU环境2. 准备Ubuntu 24.04镜像3. 启动QEMU安装Ubuntu4

Python UV安装、升级、卸载详细步骤记录

《PythonUV安装、升级、卸载详细步骤记录》:本文主要介绍PythonUV安装、升级、卸载的详细步骤,uv是Astral推出的下一代Python包与项目管理器,主打单一可执行文件、极致性能... 目录安装检查升级设置自动补全卸载UV 命令总结 官方文档详见:https://docs.astral.sh/

Nexus安装和启动的实现教程

《Nexus安装和启动的实现教程》:本文主要介绍Nexus安装和启动的实现教程,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录一、Nexus下载二、Nexus安装和启动三、关闭Nexus总结一、Nexus下载官方下载链接:DownloadWindows系统根

Java SWT库详解与安装指南(最新推荐)

《JavaSWT库详解与安装指南(最新推荐)》:本文主要介绍JavaSWT库详解与安装指南,在本章中,我们介绍了如何下载、安装SWTJAR包,并详述了在Eclipse以及命令行环境中配置Java... 目录1. Java SWT类库概述2. SWT与AWT和Swing的区别2.1 历史背景与设计理念2.1.

安装centos8设置基础软件仓库时出错的解决方案

《安装centos8设置基础软件仓库时出错的解决方案》:本文主要介绍安装centos8设置基础软件仓库时出错的解决方案,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐... 目录安装Centos8设置基础软件仓库时出错版本 8版本 8.2.200android4版本 javas

Pytorch介绍与安装过程

《Pytorch介绍与安装过程》PyTorch因其直观的设计、卓越的灵活性以及强大的动态计算图功能,迅速在学术界和工业界获得了广泛认可,成为当前深度学习研究和开发的主流工具之一,本文给大家介绍Pyto... 目录1、Pytorch介绍1.1、核心理念1.2、核心组件与功能1.3、适用场景与优势总结1.4、优

conda安装GPU版pytorch默认却是cpu版本

《conda安装GPU版pytorch默认却是cpu版本》本文主要介绍了遇到Conda安装PyTorchGPU版本却默认安装CPU的问题,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的... 目录一、问题描述二、网上解决方案罗列【此节为反面方案罗列!!!】三、发现的根本原因[独家]3.1 p