openshift

【译文连载】 理解Istio服务网格(第二章 安装)

孤街浪徒 提交于 2020-02-23 08:16:54
【译文连载】 理解Istio服务网格(第二章 安装) https://www.cnblogs.com/sammyliu/p/12324399.html 全书目录 第一章 概述 本文目录 1.命令行工具安装 2. Kubernetes/OpenShift安装 3. Istio安装 4.示例Java微服务安装 4.1 源码概览 4.2 编译和部署customer服务 4.3 编译和部署Preference服务 4.4 编译和部署recommendation服务 本章中,我们会介绍如何在Kubernetes上安装Istio。Istio并没有和Kubernets绑定,实际上,它合适很多种基础架构平台。但是,Kubernetes因为原生支持边车部署(sidecar deployment)概念,因此它是运行Istio的最佳平台之一。你可以使用任何版本的Kubernetes。本章中,我们将使用Minishift,这是一个可以让你的OpenShift安装并运行在本地虚拟机上的工具,而OpenShift则是一个面向开发者的Kubernetes企业发行版。 1. 命令行工具安装 ​作为一个开发者,你可能已有了各种工具,但为了清晰起见,我们还是给个本书所需的工具列表: Minishift:这是minikube的红帽发行版 VirtualBox:提供虚拟机的虚拟化工具 Mac

Why does leading slash not match my RewriteRule?

半世苍凉 提交于 2020-02-16 05:27:09
问题 I hope I'm missing something silly. I'm trying to redirect URLs using .htaccess on Apache 2.2 using the PHP 5.4 cartridge on OpenShift's free hosting service. This matches the URI /permalink/a123 (note the lack of leading slash in the rule's filter pattern): RewriteEngine On RewriteRule permalink/a.*$ /permalink/b [R=301,L] This does not match the URI /permalink/a123 (note the leading slash in the rule's filter pattern): RewriteEngine On RewriteRule /permalink/a.*$ /permalink/b [R=301,L] So

Why does leading slash not match my RewriteRule?

人盡茶涼 提交于 2020-02-16 05:26:12
问题 I hope I'm missing something silly. I'm trying to redirect URLs using .htaccess on Apache 2.2 using the PHP 5.4 cartridge on OpenShift's free hosting service. This matches the URI /permalink/a123 (note the lack of leading slash in the rule's filter pattern): RewriteEngine On RewriteRule permalink/a.*$ /permalink/b [R=301,L] This does not match the URI /permalink/a123 (note the leading slash in the rule's filter pattern): RewriteEngine On RewriteRule /permalink/a.*$ /permalink/b [R=301,L] So

openshift 4.3中安装helm3并通过helm方式部署应用

安稳与你 提交于 2020-02-16 00:10:29
openshift 4.3中安装helm3并通过helm方式部署应用 简介 Helm是一个命令行界面(CLI)工具,可简化将应用程序和服务部署到OpenShift Container Platform集群的过程。 Helm使用一种称为chart的包格式。 Helm chart 是描述OpenShift容器平台资源的文件集。 在openshift中部署Helm,我们可以获得以下效益: 充分利用k8s helm部署大量ocp operator hub没有的应用,比如gitlab新版本就只支持helm方式在ocp中部署。 搜索存储在chart repository中的chart。 修改现有chart。 使用OpenShift Container Platform或Kubernetes资源创建自己的chart。 将应用程序打包并共享为chart。 安装Helm 前提条件 已经安装了1.13版或更高版本的Go。 安装过程 下载helm二进制文件到path curl -L https://mirror.openshift.com/pub/openshift-v4/clients/helm/latest/helm-linux-amd64 -o /usr/local/bin/helm 给文件添加执行权限 chmod +x /usr/local/bin/helm 检查安装的helm版本 [root

OpenShift 4 Hands-on Lab (4) - 用Build、Builder Trigger、Webhook构建和更新镜像

China☆狼群 提交于 2020-02-12 20:48:32
文章目录 构建(Build)镜像的相关概念 BuildConfig Build Builder Image Build Trigger和Build Chain 触发Build,创建或更新镜像 基于Webhook的Build Trigger 利用Build Trigger自动更新Image 构建(Build)镜像的相关概念 运行在OpenShift上应用最终必须是以容器的形式运行。在传统方式中,应用容器镜像必须由用户配置Dockerfile,然后运行docker build后才能得到。为了简化这种基于Dockerfile构建镜像的过程,OpenShift提出了构建(即Build)的概念,用它和相关对象来定义、管理镜像构建。这其中就包括非常易于使用的Source-2-Image(简称S2I)的工具,它可以根据最佳实践,直接从应用源码构建出应用容器镜像,因此S2I功能成为OpenShift优于Kubernetes的一大功能。 为了运行构建过程和管理构建,OpenShift使用了两种内部对象:BuildConfig和Build。 BuildConfig BuildConfig是用来定义构建策略的对象,即定义做什么以及怎么做。BuildConfig支持以下四种构建策略: Dockerfile - 即直接使用Dockerfile构建出镜像。 S2I -

Openshift Admin Token

青春壹個敷衍的年華 提交于 2020-02-06 07:34:08
问题 I am trying to create a script that records project resources every 15 minutes. How do I authenticate with Openshift API? Is there a token I can use that has read access on all namespaces? How do I create a service account that has access over all namespaces? 回答1: You'll need to create a ClusterRole that has read access to the resources and use ClusterRoleBinding to associate the ServiceAccount to that ClusterRole. Rough example, not tested but it should work: # creates the service account

How to change OpenShift console URL and API URL

北慕城南 提交于 2020-02-05 05:20:08
问题 My company runs OpenShift v3.10 cluster consisting of 3 masters and 4 nodes. We would like to change URL of the OpenShift API and also the URL of the OpenShift web console. Which steps we need to take to successfully do so? We have already tried to update the o penshift_master_cluster_hostname and openshift_master_cluster_public_hostname variables to new DNS names, which resolve our F5 virtual hosts which load balances the traffic between our masters, and then started the upgrade Ansible

打算用容器跑生产系统?备份怎么做才靠谱?

我们两清 提交于 2020-02-03 18:05:38
PX-Backup: 云原生应用备份与恢复利器 对于IT系统来说,备份是至关重要的。 很多情况下需要用到备份数据。例如系统被发现有Bug后,运维团队需要从某个具体时间点的备份数据来重新恢复之前的应用。或者需要调出3年前的某批数据,来供审计部门调查合规性。 对于容器化的应用来说,目前的应用备份操作,以及在多环境中追踪数据的完整性和一致性的操作,都是手动且比较复杂的。 有些工具能够启动备份的过程,但是这些工具需要能跟传统的企业级存储系统集成。它们并不能很好的支持Kubernetes的环境,并且不能够提供完整的、端到端的企业级云原生备份解决方案。 PX-Backup能够很好的解决问题。一个端到端的备份解决方案,专门为基于Kubernetes的应用而设计,PX-Backup有效管理容器数据的生命周期,对相关元数据进行归类,增加了数据访问的可见性。 通过简单的鼠标点击即可完成Kubernetes应用的整体备份和恢复,包括数据、应用配置、以及Kubernetes对象。PX-Backup支持应用的备份,不论数据是存储在Portworx Enterprise上,还是存储在公有云中并通过Kubernetes CSI插件进行管理的块存储里:包括微软Azure,亚马逊AWS,Google云。 PX – Backup 一个Kubernetes应用一般包括一个/多个Pods以及其他的Kubernetes对象

OpenShift 4 Hands-on Lab (3) - ImageStream

白昼怎懂夜的黑 提交于 2020-02-03 11:28:49
文章目录 什么是ImageStream 从Image生成ImageStream ImageStream的操作 生成ImageStream过程的选项 常见问题 什么是ImageStream Image Stream是OpenShift中的一种对象,它并不是用来存储Image的,而是用来记录并管理Image信息的。它就像是所有Image的虚拟视图,可以通过它访问存放在不同Image Registry(OpenShift外部独立运行的Registry、或是OpenShift内置的Registry)上的Image。通过这个视图可以简化对那些来自不同Registry的Image的访问。Image Stream中会记录需要访问的Image的访问标识(Image Stream Tag),并通过指针(Image Stream Image)记录它们的实际保存位置,其中指向Image的指针是由Image Stream name和Image ID构成的。 根据Image Stream所在项目,可将其分为集群级和项目级的Image Stream。无论当前在哪个项目中,任何用户都可访问到集群级的Image Stream;而项目级Image Stream只能该项目用户或被授权用户才可访问。 从Image生成ImageStream 如果我们跟随《 OpenShift 4 Hands-on Lab (1) -

Zookeeper on OpenShift

和自甴很熟 提交于 2020-01-25 04:03:05
问题 Trying to run Zookeeper on OpenShift. This is not so straightforward due to Zookeeper's hard-coded and static configuration requirements. Can anyone suggest some recommendation or web resources that discuss ways to overcome these issues. Regards 回答1: I tried this a while back on 3.4 https://github.com/smarterclayton/openshift-zookeeper-cart - the gap was that the internal zookeeper leader port needs to be the same as the external port, and that's hard in V2. In V3 that's easier - here's the