K8S如何部署ActiveMQ(单机、集群)

3.png

前言

大家好,在今天的讨论中,我们将深入研究如何将ActiveMQ迁移到云端,以便更好地利用Kubernetes的容器调度和资源管理能力,确保ActiveMQ的高可用性和可扩展性。

ActiveMQ是Apache开源组织推出的一款开源的、完全支持JMS1.1和J2EE1.4规范的JMS Provider实现的消息中间件(MOM)。它是所有开源项目中最流行也最强大的开源消息中间件,主要用于分布式系统架构中,可以实现高可用、高性能、可伸缩、易用和安全的企业级面向消息服务的系统。

ActiveMQ的核心概念主要包括以下几个方面:

  • 消息:消息是ActiveMQ中最基本的单位,它包含了实际需要传输的数据。
  • 主题(Topic):主题是一种广播类型的消息模式,一个生产者向一个主题发送消息,而所有的消费者都可以接收到这个消息。这种方式非常适合于需要将一条消息分发到多个消费者的场景。
  • 队列(Queue):队列是一种点对点的消息模式,一个生产者向一个队列发送消息,只有一个消费者能接收到这个消息。这种方式非常适合于需要将一条消息发送给一个特定的消费者的场景。
  • 消费者(Consumer):消费者是从队列或主题中获取并处理消息的应用程序。
  • 生产者(Producer):生产者是创建并向队列或主题发送消息的应用程序。
  • 消息代理(Broker):消息代理是ActiveMQ的核心组件,它负责接收、存储和转发消息。在ActiveMQ中,每一个运行的实例都是一个消息代理。
  • JMS(Java Message Service):Java消息服务是关于面向消息中间件的API,用于在两个应用程序之间或者分布式系统中发送消息,进行异步通信。JMS与具体的平台无关,绝大多数MOM(Message Oriented Middleware)提供商都对JMS提供了支持,例如ActiveMQ就是其中一个实现。

一、部署单机ActiveMQ

步骤一:创建ConfigMap

首先,我们需要创建ConfigMap,用来存储和管理ActiveMQ的相关配置。

apiVersion: v1
kind: ConfigMap
metadata:name: activemq-config-singlenamespace: 你实际的namespace
data:activemq.xml: |<beansxmlns="http://www.springframework.org/schema/beans"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsdhttp://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd"><!-- Allows us to use system properties as variables in this configuration file --><bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"><property name="locations"><value>file:${activemq.conf}/credentials.properties</value></property></bean><!-- Allows accessing the server log --><bean id="logQuery" class="io.fabric8.insight.log.log4j.Log4jLogQuery"lazy-init="false" scope="singleton"init-method="start" destroy-method="stop"></bean><!--The <broker> element is used to configure the ActiveMQ broker.--><broker xmlns="http://activemq.apache.org/schema/core" brokerName="activemq-single" dataDirectory="${activemq.data}">	<plugins><simpleAuthenticationPlugin><users><authenticationUser username="my_mq_test" password="my_mq_test" groups="users,admins"/></users></simpleAuthenticationPlugin></plugins><destinationPolicy><policyMap><policyEntries><policyEntry topic=">" ><!-- The constantPendingMessageLimitStrategy is used to preventslow topic consumers to block producers and affect other consumersby limiting the number of messages that are retainedFor more information, see:http://activemq.apache.org/slow-consumer-handling.html--><pendingMessageLimitStrategy><constantPendingMessageLimitStrategy limit="1000"/></pendingMessageLimitStrategy></policyEntry></policyEntries></policyMap></destinationPolicy><!--The managementContext is used to configure how ActiveMQ is exposed inJMX. By default, ActiveMQ uses the MBean server that is started bythe JVM. For more information, see:http://activemq.apache.org/jmx.html--><managementContext><managementContext createConnector="false"/></managementContext><!--Configure message persistence for the broker. The default persistencemechanism is the KahaDB store (identified by the kahaDB tag).For more information, see:http://activemq.apache.org/persistence.html--><persistenceAdapter><kahaDB directory="${activemq.data}/kahadb"/></persistenceAdapter><!--The systemUsage controls the maximum amount of space the broker willuse before disabling caching and/or slowing down producers. For more information, see:http://activemq.apache.org/producer-flow-control.html--><systemUsage><systemUsage><memoryUsage><memoryUsage percentOfJvmHeap="70" /></memoryUsage><storeUsage><storeUsage limit="100 gb"/></storeUsage><tempUsage><tempUsage limit="50 gb"/></tempUsage></systemUsage></systemUsage><!--The transport connectors expose ActiveMQ over a given protocol toclients and other brokers. For more information, see:http://activemq.apache.org/configuring-transports.html--><transportConnectors><!-- DOS protection, limit concurrent connections to 1000 and frame size to 100MB --><transportConnector name="openwire" uri="tcp://0.0.0.0:30226?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/><transportConnector name="amqp" uri="amqp://0.0.0.0:30227?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/><transportConnector name="stomp" uri="stomp://0.0.0.0:30228?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/><transportConnector name="mqtt" uri="mqtt://0.0.0.0:30229?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/><transportConnector name="ws" uri="ws://0.0.0.0:30230?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/></transportConnectors><!-- destroy the spring context on shutdown to stop jetty --><shutdownHooks><bean xmlns="http://www.springframework.org/schema/beans" class="org.apache.activemq.hooks.SpringContextHook" /></shutdownHooks></broker><!--Enable web consoles, REST and Ajax APIs and demosThe web consoles requires by default login, you can disable this in the jetty.xml fileTake a look at ${ACTIVEMQ_HOME}/conf/jetty.xml for more details--><import resource="jetty.xml"/></beans>
---
apiVersion: v1
kind: ConfigMap
metadata:name: activemq-config-jetty-realmnamespace: 你实际的namespace
data:jetty-realm.properties: |admin: my_mq_test, adminuser: user, user

在上面的配置中,我们在activemq.xml中使用简单授权配置以及修改了默认的端口号以提高服务的安全性;在jetty-realm.properties中配置了web端控制台的登录用户名和密码,格式为:

用户名 : 密码 ,角色名

步骤二:创建Deployment

接下来,我们需要创建一个Deployment,用来定义ActiveMQ的副本数量、镜像版本等相关信息。

apiVersion: apps/v1
kind: Deployment
metadata:name: activemq-singlenamespace: 你实际的namespace
spec:progressDeadlineSeconds: 600replicas: 1selector:matchLabels:app: activemq-singlestrategy:rollingUpdate:maxSurge: 50%maxUnavailable: 50%type: RollingUpdatetemplate:metadata:labels:app: activemq-singlespec:affinity:nodeAffinity:requiredDuringSchedulingIgnoredDuringExecution:nodeSelectorTerms:- matchExpressions:- key: project.nodeoperator: Invalues:- 你实际的节点名称volumes:- name: timezonehostPath:path: /usr/share/zoneinfo/Asia/Shanghai- name: config-activemqconfigMap: name: activemq-config-single- name: jetty-realmconfigMap: name: activemq-config-jetty-realmcontainers:- name: activemqimage: webcenter/activemq:5.14.3imagePullPolicy: IfNotPresentterminationMessagePath: /dev/termination-logterminationMessagePolicy: FilevolumeMounts: - name: config-activemqmountPath: /opt/activemq/conf/activemq.xmlsubPath: activemq.xml- name: jetty-realmmountPath: /opt/activemq/conf/jetty-realm.propertiessubPath: jetty-realm.propertiesenv:- name: HOST_IPvalueFrom:fieldRef:fieldPath: status.hostIP- name: POD_IPvalueFrom:fieldRef:fieldPath: status.podIP- name: POD_NAMEvalueFrom:fieldRef:fieldPath: metadata.name- name: TZvalue: "Asia/Shanghai"

在上述配置中,我们定义了一个名为activemq-single的Deployment。在这里,我们使用的镜像已经版本为webcenter/activemq:5.14.3,并且使用了之前创建的ConfigMap中的配置文件。

步骤三:创建Service

然后,我们还需要创建一个Service,用来将K8S集群中运行的ActiveMQ实例暴露为可访问的服务。

apiVersion: v1  
kind: Service  
metadata:  name: service-activemq-singlenamespace: 你实际的namespace
spec:  selector:  app: activemq-singletype: NodePortsessionAffinity: Noneports:- name: activemq-adminport: 8161targetPort: 8161nodePort: 30225- name: activemq-tcpport: 30226targetPort: 30226nodePort: 30226- name: activemq-amqpport: 30227targetPort: 30227nodePort: 30227- name: activemq-stompport: 30228targetPort: 30228nodePort: 30228- name: activemq-mqttport: 30229targetPort: 30229nodePort: 30229- name: activemq-wsport: 30230targetPort: 30230nodePort: 30230

步骤四:验证单机ActiveMQ

  • 首先,我们启动一个生产者链接到刚部署的单机ActiveMQ上,并且向名称为mdm_distribute_CostCenter的队列中发送了一条消息,消息内容为mdm_distribute_CostCenter

3.png

  • 接下来,我们再启动一个消息者同样链接到刚部署的单机ActiveMQ上,并且监听名为mdm_distribute_CostCenter的队列。

4.png

  • 最后,我们可以在web端的admin页面查看相应队列中的记录

6.png

小结

以上就是在K8S中部署单机ActiveMQ的相关步骤。通过这些步骤,我们成功地使用无状态的Deployment部署了一个可用的单机ActiveMQ。

二、部署ActiveMQ集群(networks of brokers)

步骤一:创建ConfigMap

与单机版类似,我们同样需要创建一个ConfigMap来存储和管理ActiveMQ的相关配置。

apiVersion: v1
kind: ConfigMap
metadata:name: activemq-config-node-0namespace: 你实际的namespace
data:activemq.xml: |<beansxmlns="http://www.springframework.org/schema/beans"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsdhttp://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd"><!-- Allows us to use system properties as variables in this configuration file --><bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"><property name="locations"><value>file:${activemq.conf}/credentials.properties</value></property></bean><!-- Allows accessing the server log --><bean id="logQuery" class="io.fabric8.insight.log.log4j.Log4jLogQuery"lazy-init="false" scope="singleton"init-method="start" destroy-method="stop"></bean><!--The <broker> element is used to configure the ActiveMQ broker.--><broker xmlns="http://activemq.apache.org/schema/core" brokerName="activemq-node-0" dataDirectory="${activemq.data}"><networkConnectors><networkConnector userName="my_mq_test" password="my_mq_test" uri="static:(tcp://你的实际ip:30220)" duplex="true"/></networkConnectors>		<plugins><simpleAuthenticationPlugin><users><authenticationUser username="my_mq_test" password="my_mq_test" groups="users,admins"/></users></simpleAuthenticationPlugin></plugins><destinationPolicy><policyMap><policyEntries><policyEntry topic=">" ><!-- The constantPendingMessageLimitStrategy is used to preventslow topic consumers to block producers and affect other consumersby limiting the number of messages that are retainedFor more information, see:http://activemq.apache.org/slow-consumer-handling.html--><pendingMessageLimitStrategy><constantPendingMessageLimitStrategy limit="1000"/></pendingMessageLimitStrategy></policyEntry></policyEntries></policyMap></destinationPolicy><!--The managementContext is used to configure how ActiveMQ is exposed inJMX. By default, ActiveMQ uses the MBean server that is started bythe JVM. For more information, see:http://activemq.apache.org/jmx.html--><managementContext><managementContext createConnector="false"/></managementContext><!--Configure message persistence for the broker. The default persistencemechanism is the KahaDB store (identified by the kahaDB tag).For more information, see:http://activemq.apache.org/persistence.html--><persistenceAdapter><kahaDB directory="${activemq.data}/kahadb"/></persistenceAdapter><!--The systemUsage controls the maximum amount of space the broker willuse before disabling caching and/or slowing down producers. For more information, see:http://activemq.apache.org/producer-flow-control.html--><systemUsage><systemUsage><memoryUsage><memoryUsage percentOfJvmHeap="70" /></memoryUsage><storeUsage><storeUsage limit="100 gb"/></storeUsage><tempUsage><tempUsage limit="50 gb"/></tempUsage></systemUsage></systemUsage><!--The transport connectors expose ActiveMQ over a given protocol toclients and other brokers. For more information, see:http://activemq.apache.org/configuring-transports.html--><transportConnectors><!-- DOS protection, limit concurrent connections to 1000 and frame size to 100MB --><transportConnector name="openwire" uri="tcp://0.0.0.0:30218?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/><transportConnector name="amqp" uri="amqp://0.0.0.0:30221?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/><transportConnector name="stomp" uri="stomp://0.0.0.0:30222?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/><transportConnector name="mqtt" uri="mqtt://0.0.0.0:30223?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/><transportConnector name="ws" uri="ws://0.0.0.0:30224?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/></transportConnectors><!-- destroy the spring context on shutdown to stop jetty --><shutdownHooks><bean xmlns="http://www.springframework.org/schema/beans" class="org.apache.activemq.hooks.SpringContextHook" /></shutdownHooks></broker><!--Enable web consoles, REST and Ajax APIs and demosThe web consoles requires by default login, you can disable this in the jetty.xml fileTake a look at ${ACTIVEMQ_HOME}/conf/jetty.xml for more details--><import resource="jetty.xml"/></beans>
---
apiVersion: v1
kind: ConfigMap
metadata:name: activemq-config-node-1namespace: 你实际的namespace
data:activemq.xml: |<beansxmlns="http://www.springframework.org/schema/beans"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsdhttp://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd"><!-- Allows us to use system properties as variables in this configuration file --><bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"><property name="locations"><value>file:${activemq.conf}/credentials.properties</value></property></bean><!-- Allows accessing the server log --><bean id="logQuery" class="io.fabric8.insight.log.log4j.Log4jLogQuery"lazy-init="false" scope="singleton"init-method="start" destroy-method="stop"></bean><!--The <broker> element is used to configure the ActiveMQ broker.--><broker xmlns="http://activemq.apache.org/schema/core" brokerName="activemq-node-0" dataDirectory="${activemq.data}">		<networkConnectors><networkConnector userName="my_mq_test" password="my_mq_test" uri="static:(tcp://你的实际ip:30218)" duplex="true"/></networkConnectors><plugins><simpleAuthenticationPlugin><users><authenticationUser username="my_mq_test" password="my_mq_test" groups="users,admins"/></users></simpleAuthenticationPlugin></plugins><destinationPolicy><policyMap><policyEntries><policyEntry topic=">" ><!-- The constantPendingMessageLimitStrategy is used to preventslow topic consumers to block producers and affect other consumersby limiting the number of messages that are retainedFor more information, see:http://activemq.apache.org/slow-consumer-handling.html--><pendingMessageLimitStrategy><constantPendingMessageLimitStrategy limit="1000"/></pendingMessageLimitStrategy></policyEntry></policyEntries></policyMap></destinationPolicy><!--The managementContext is used to configure how ActiveMQ is exposed inJMX. By default, ActiveMQ uses the MBean server that is started bythe JVM. For more information, see:http://activemq.apache.org/jmx.html--><managementContext><managementContext createConnector="false"/></managementContext><!--Configure message persistence for the broker. The default persistencemechanism is the KahaDB store (identified by the kahaDB tag).For more information, see:http://activemq.apache.org/persistence.html--><persistenceAdapter><kahaDB directory="${activemq.data}/kahadb"/></persistenceAdapter><!--The systemUsage controls the maximum amount of space the broker willuse before disabling caching and/or slowing down producers. For more information, see:http://activemq.apache.org/producer-flow-control.html--><systemUsage><systemUsage><memoryUsage><memoryUsage percentOfJvmHeap="70" /></memoryUsage><storeUsage><storeUsage limit="100 gb"/></storeUsage><tempUsage><tempUsage limit="50 gb"/></tempUsage></systemUsage></systemUsage><!--The transport connectors expose ActiveMQ over a given protocol toclients and other brokers. For more information, see:http://activemq.apache.org/configuring-transports.html--><transportConnectors><!-- DOS protection, limit concurrent connections to 1000 and frame size to 100MB --><transportConnector name="openwire" uri="tcp://0.0.0.0:30220?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/><transportConnector name="amqp" uri="amqp://0.0.0.0:30221?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/><transportConnector name="stomp" uri="stomp://0.0.0.0:30222?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/><transportConnector name="mqtt" uri="mqtt://0.0.0.0:30223?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/><transportConnector name="ws" uri="ws://0.0.0.0:30224?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/></transportConnectors><!-- destroy the spring context on shutdown to stop jetty --><shutdownHooks><bean xmlns="http://www.springframework.org/schema/beans" class="org.apache.activemq.hooks.SpringContextHook" /></shutdownHooks></broker><!--Enable web consoles, REST and Ajax APIs and demosThe web consoles requires by default login, you can disable this in the jetty.xml fileTake a look at ${ACTIVEMQ_HOME}/conf/jetty.xml for more details--><import resource="jetty.xml"/></beans>
---
apiVersion: v1
kind: ConfigMap
metadata:name: activemq-config-jetty-realmnamespace: 你实际的namespace
data:jetty-realm.properties: |admin: my_mq_test, adminuser: user, user

步骤二:创建Deployment

接下来,我们需要创建2个Deployment,分别对应ActiveMQ集群中的2个节点。主要区别在于使用ConfigMap中的配置文件的不同和containers中暴露的端口不同。

apiVersion: apps/v1
kind: Deployment
metadata:name: activemq-node-0namespace: 你实际的namespace
spec:progressDeadlineSeconds: 600replicas: 1selector:matchLabels:app: activemq-node-0strategy:rollingUpdate:maxSurge: 50%maxUnavailable: 50%type: RollingUpdatetemplate:metadata:labels:app: activemq-node-0name: activemq-nodespec:affinity:nodeAffinity:requiredDuringSchedulingIgnoredDuringExecution:nodeSelectorTerms:- matchExpressions:- key: project.nodeoperator: Invalues:- 你实际的节点名称volumes:- name: timezonehostPath:path: /usr/share/zoneinfo/Asia/Shanghai- name: config-activemqconfigMap: name: activemq-config-node-0- name: jetty-realmconfigMap: name: activemq-config-jetty-realmcontainers:- name: activemqimage: webcenter/activemq:5.14.3imagePullPolicy: IfNotPresentterminationMessagePath: /dev/termination-logterminationMessagePolicy: FilevolumeMounts: - name: config-activemqmountPath: /opt/activemq/conf/activemq.xmlsubPath: activemq.xml- name: jetty-realmmountPath: /opt/activemq/conf/jetty-realm.propertiessubPath: jetty-realm.propertiesenv:- name: HOST_IPvalueFrom:fieldRef:fieldPath: status.hostIP- name: POD_IPvalueFrom:fieldRef:fieldPath: status.podIP- name: POD_NAMEvalueFrom:fieldRef:fieldPath: metadata.name- name: TZvalue: "Asia/Shanghai"
---
apiVersion: apps/v1
kind: Deployment
metadata:name: activemq-node-1namespace: 你实际的namespace
spec:progressDeadlineSeconds: 600replicas: 1selector:matchLabels:app: activemq-node-1strategy:rollingUpdate:maxSurge: 50%maxUnavailable: 50%type: RollingUpdatetemplate:metadata:labels:app: activemq-node-1name: activemq-nodespec:affinity:nodeAffinity:requiredDuringSchedulingIgnoredDuringExecution:nodeSelectorTerms:- matchExpressions:- key: project.nodeoperator: Invalues:- 你实际的节点名称volumes:- name: timezonehostPath:path: /usr/share/zoneinfo/Asia/Shanghai- name: config-activemqconfigMap: name: activemq-config-node-1- name: jetty-realmconfigMap: name: activemq-config-jetty-realmcontainers:- name: activemqimage: webcenter/activemq:5.14.3imagePullPolicy: IfNotPresentterminationMessagePath: /dev/termination-logterminationMessagePolicy: FilevolumeMounts: - name: config-activemqmountPath: /opt/activemq/conf/activemq.xmlsubPath: activemq.xml- name: jetty-realmmountPath: /opt/activemq/conf/jetty-realm.propertiessubPath: jetty-realm.propertiesenv:- name: HOST_IPvalueFrom:fieldRef:fieldPath: status.hostIP- name: POD_IPvalueFrom:fieldRef:fieldPath: status.podIP- name: POD_NAMEvalueFrom:fieldRef:fieldPath: metadata.name- name: TZvalue: "Asia/Shanghai"

步骤三:创建Service

然后,我们还需要来创建Service,用来将K8S集群中运行的ActiveMQ实例暴露为可访问的服务。这里同样需要创建2个Service,分别对应步骤二中的2个Deployment,还需要1个Service来暴露公共的端口。

apiVersion: v1  
kind: Service  
metadata:  name: service-activemq-commonnamespace: 你实际的namespace
spec:  selector:  name: activemq-nodetype: NodePortsessionAffinity: Noneports:- name: activemq-amqpport: 30221targetPort: 30221nodePort: 30221- name: activemq-stompport: 30222targetPort: 30222nodePort: 30222- name: activemq-mqttport: 30223targetPort: 30223nodePort: 30223- name: activemq-wsport: 30224targetPort: 30224nodePort: 30224
---
apiVersion: v1
kind: Service
metadata:name: service-activemq-node-0namespace: 你实际的namespace
spec:selector:app: activemq-node-0type: NodePortsessionAffinity: Noneports:- name: activemq-adminport: 8161targetPort: 8161nodePort: 30217- name: activemq-tcpport: 30218targetPort: 30218nodePort: 30218
---
apiVersion: v1
kind: Service
metadata:name: service-activemq-node-1namespace: 你实际的namespace
spec:selector:app: activemq-node-1type: NodePortsessionAffinity: Noneports:- name: activemq-adminport: 8161targetPort: 8161nodePort: 30219- name: activemq-tcpport: 30220targetPort: 30220nodePort: 30220

步骤五:验证ActiveMQ集群

  • 首先,我们启动一个生产者链接到刚部署的集群ActiveMQ上,并且向名称为mdm_distribute_Employee的队列中发送了一条消息,消息内容为mdm_distribute_Employee

2.png

  • 接下来,我们再启动一个消息者同样链接到刚部署的集群ActiveMQ上,并且监听名为mdm_distribute_Employee的队列。

1.png

  • 最后,我们可以在web端的admin页面查看相应队列中的记录

5.png

小结

在K8S中部署ActiveMQ集群的相关步骤已经介绍完毕。通过这些步骤,我们成功地使用无状态的Deployment部署了一个可用的ActiveMQ集群。

结论

本文详尽地探讨了在K8S环境中部署ActiveMQ单机与集群的详细步骤。细读全文,我们可以发现,ActiveMQ的数据存储仍在POD中,这是由于业务需求所决定的。当发送MQ消息时,数据需要先被写入数据库,然后再进行发送,因此ActiveMQ的数据存储变得无关紧要。当然,我们还可以选择使用pvc或者直接挂载到宿主机等方式来保存数据。相较于传统的手动部署方式,利用K8S进行部署能够带来更高的便捷性和效率,从而更快速地完成ActiveMQ集群的部署和管理任务。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.hqwc.cn/news/214293.html

如若内容造成侵权/违法违规/事实不符,请联系编程知识网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

opencv-背景减除

背景减除&#xff08;Background Subtraction&#xff09;是一种用于从视频序列中提取前景对象的计算机视觉技术。该技术的主要思想是通过建模和维护场景的背景&#xff0c;从而检测出在不同时间点出现的前景对象。 OpenCV 提供了一些用于背景减除的函数&#xff0c;其中最常用…

【Python】生死簿管理系统,估值5毛

生死簿管理系统 代码 """ 生死簿管理系统 """ import os import timefile_name data.txtdef main():while True:main_menu()choice (int)(input("请选择: "))if choice in [0, 1, 2, 3, 4, 5, 6, 7]:if choice 0:answer input(&…

制作一个成功的虚拟主持人需要具备哪些要素?

随着多媒体技术的广泛应用&#xff0c;这种数字展厅的建设形式&#xff0c;逐渐成为了展示产品和服务的重要途径&#xff0c;而在多媒体技术的展示形式中&#xff0c;虚拟主持人成为高人气互动展项之一&#xff0c;它在其中扮演着引导观众、传递信息的角色&#xff0c;并发挥着…

OpenAI创始人山姆·阿尔特曼重返公司;LLM持续学习

&#x1f989; AI新闻 &#x1f680; OpenAI创始人山姆阿尔特曼重返公司并与微软建立合作伙伴关系 摘要&#xff1a;OpenAI创始人山姆阿尔特曼回归OpenAI&#xff0c;担任首席执行官&#xff0c;并与微软建立牢固的合作伙伴关系。这解决了近期的争论&#xff0c;微软对OpenAI…

ubuntu22.04 arrch64版在线安装redis

脚本 apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5 apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32 echo "deb http://archive.ubuntu.com/ubuntu/ trusty main universe restricted multiverse" >…

97、Text2NeRF: Text-Driven 3D Scene Generation with Neural Radiance Fields

简介 论文地址 使用扩散模型来推断文本相关图像作为内容先验&#xff0c;并使用单目深度估计方法来提供几何先验&#xff0c;并引入了一种渐进的场景绘制和更新策略&#xff0c;保证不同视图之间纹理和几何的一致性 实现流程 简单而言&#xff1a; 文本-图片扩散模型生成一…

ruoyi 若依框架采用第三方登录

在项目中&#xff0c;前后端分离的若依项目&#xff0c;需要通过统一认证&#xff0c;或者是第三方协带认证信息跳转到本系统的指定页面。需要前后端都做相应的改造&#xff0c;由于第一次实现时已过了很久&#xff0c;再次重写时&#xff0c;发现还是搞了很长时间&#xff0c;…

CMS指纹识别方式

一、手工识别 1.robots.txt文件 robots.txt文件我们写过爬虫的就知道,这个文件是告诉我们哪些目录是禁止爬取的。但是大部分的时候我们都能通过robots.txt文件来判断出cms的类型 如: 从wp路径可以看出这个是WordPress的cms 这个就比较明显了直接告诉我们是PageAdmin cms 也…

CentOS 7 使用异步网络框架Libevent

CentOS 7 安装Libevent库 libevent github地址&#xff1a;https://github.com/libevent/libevent 步骤1&#xff1a;首先&#xff0c;你需要下载libevent的源代码。你可以从github或者源代码官方网站下载。并上传至/usr/local/source_code/ 步骤2&#xff1a;下载完成后&…

实用高效 无人机光伏巡检系统助力电站可持续发展

近年来&#xff0c;我国光伏发电行业规模日益壮大&#xff0c;全球领先地位愈发巩固。为解决光伏电站运维中的难题&#xff0c;浙江某光伏电站与复亚智能达成战略合作&#xff0c;共同推出全自动无人机光伏巡检系统&#xff0c;旨在提高发电效率、降低运维成本&#xff0c;最大…

Python 入门指南!

Python 入门指南 欢迎进入 Python 领域。作为程序员&#xff0c;我们总是在寻找能提高效率、编写优雅的代码的工具&#xff0c;而 Python 正是其中之一。它的语法简洁&#xff0c;库资源丰富&#xff0c;不仅适合初学者快速上手&#xff0c;也为资深开发者提供了大量的深度开发…

【漏洞复现】好视通视频会议系统(fastmeeting) toDownload.do接口存在任意文件读取漏洞 附POC

漏洞描述 “好视通”是国内云视频会议知名品牌,拥有多项创新核心技术优势、多方通信服务牌照及行业全面资质 [5] ,专注为政府、公检法司、教育、集团企业等用户提供“云+端+业务全场景”解决方案。用全国产、高清流畅、安全稳定的云视频服务助力各行各业数字化转型。 其视频…