RHCA之路---EX280(5)
RHCA之路—EX280(5)
1. 题目
Using the example files from the wordpress directory under
http://materials.example.com/exam280/wordpress create a WordPress application in the farm project
For permanent storage use the NFS shares /exports/wordpress and /exports/mysql from services.lab.example.com.
Use the files from http://materials.example.com/exam280/wordpress for the volumes
For the WordPress pod, use the Docker image from
http://materials.example.com/exam280/wordpress.tar
(Note: it is normal if the WordPress pod initially restarts a couple of times due to permaission issues)
For the MySQL pod use the Docker image rhscl/mysql-57-rhel7
Once deployed,the application must be reachable at the following address:
http://blog.apps.lab.example.com
Finally, complete the WordPress installation by setting ayumi as the admin user with password redhat and ayumi@master.lab.example.com for the email address
Set the blog name to EX280 Blog
Create your first post with title faber est quisque fortunae suae.
The text in the post does not matter
2. 解题
2.1 切换项目
切记一定不要漏这步
[root@master php-helloworld]# oc project farm
Now using project "farm" on server "https://master.lab.example.com".
[root@master php-helloworld]# mkdir ~/farm
[root@master php-helloworld]# cd ~/farm
[root@master farm]# oc projects
You have access to the following projects and can switch between them with 'oc project <projectname>':defaultditto* farmkube-publickube-service-catalogkube-systemloggingmanagement-infraopenshiftopenshift-ansible-service-brokeropenshift-infraopenshift-nodeopenshift-template-service-brokeropenshift-web-consoleromesamplesshrimpUsing project "farm" on server "https://master.lab.example.com".
2.2 下载模板文件
wget http://materials.example.com/exam280/wordpress/pv.yaml
wget http://materials.example.com/exam280/wordpress/pvc.yaml
wget http://materials.example.com/exam280/wordpress/pod-mysql.yaml
wget http://materials.example.com/exam280/wordpress/pod-wordpress.yaml
wget http://materials.example.com/exam280/wordpress/service-mysql.yaml
wget http://materials.example.com/exam280/wordpress/service-wp.yaml
cp pv.yaml mypv.yaml
cp pvc.yaml mypvc.yaml
cp pv.yaml wppv.yaml
cp pvc.yaml wppvc.yaml
2.3 配置mysql
2.3.1 mypv.yaml
apiVersion: v1
kind: PersistentVolume
metadata:name: mypv
spec:capacity:storage: 3GiaccessModes:- ReadWriteOncenfs:path: /exports/mysqlserver: services.lab.example.compersistentVolumeReclaimPolicy: Recycle
2.3.2 mypvc.yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:name: dbclaim
spec:accessModes:- ReadWriteOnceresources:requests:storage: 3Gi
2.3.3 pod-mysql.yaml
apiVersion: v1
kind: Pod
metadata:name: mysqllabels:name: mysql
spec:containers:- image: registry.lab.example.com/rhscl/mysql-57-rhel7:latestname: mysqlenv:- name: MYSQL_ROOT_PASSWORDvalue: redhat- name: MYSQL_USERvalue: tom- name: MYSQL_PASSWORDvalue: redhat- name: MYSQL_DATABASEvalue: blogports:- containerPort: 3306name: mysqlvolumeMounts:- name: mysql-persistent-storagemountPath: /var/lib/mysql/datavolumes:- name: mysql-persistent-storagepersistentVolumeClaim:claimName: dbclaim
2.3.4 service-mysql.yaml
apiVersion: v1
kind: Service
metadata:labels:name: mysqlname: mysql
spec:ports:# the port that this service should serve on- port: 3306# label keys and values that must match in order to receive traffic for this serviceselector:name: mysql
2.3.5 创建mysql
[root@master farm]# oc create -f mypv.yaml
persistentvolume "mypv" created
[root@master farm]# oc create -f mypvc.yaml
persistentvolumeclaim "dbclaim" created
[root@master farm]# oc create -f pod-mysql.yaml
pod "mysql" created
[root@master farm]# oc create -f service-mysql.yaml
service "mysql" created
2.4 配置wordpress
2.4.1 wordpress镜像准备
[root@master farm]# wget http://materials.example.com/exam280/wordpress.tar
--2023-09-04 15:49:32-- http://materials.example.com/exam280/wordpress.tar
Resolving materials.example.com (materials.example.com)... 172.25.254.254
Connecting to materials.example.com (materials.example.com)|172.25.254.254|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 419054592 (400M) [application/x-tar]
Saving to: ‘wordpress.tar’100%[===========================================================================================================>] 419,054,592 70.6MB/s in 5.7s2023-09-04 15:49:38 (70.7 MB/s) - ‘wordpress.tar’ saved [419054592/419054592][root@master farm]# docker load -i wordpress.tar
2c40c66f7667: Loading layer [==================================================>] 129.3 MB/129.3 MB
ddd6dcab19ff: Loading layer [==================================================>] 204.7 MB/204.7 MB
f0c367fa8636: Loading layer [==================================================>] 3.584 kB/3.584 kB
0fd7a67d49b3: Loading layer [==================================================>] 7.699 MB/7.699 MB
53da01089a82: Loading layer [==================================================>] 10.24 kB/10.24 kB
3d2582fdede2: Loading layer [==================================================>] 9.728 kB/9.728 kB
315db89f9acb: Loading layer [==================================================>] 4.096 kB/4.096 kB
2da371244fc1: Loading layer [==================================================>] 7.68 kB/7.68 kB
354b4ef9664b: Loading layer [==================================================>] 13.01 MB/13.01 MB
adfd7c98cdf6: Loading layer [==================================================>] 4.096 kB/4.096 kB
8747705a74d9: Loading layer [==================================================>] 33.01 MB/33.01 MB
5a151fa4136e: Loading layer [==================================================>] 11.78 kB/11.78 kB
c8c6d352c96e: Loading layer [==================================================>] 4.608 kB/4.608 kB
fed26d7fe7b9: Loading layer [==================================================>] 6.04 MB/6.04 MB
4214911d5945: Loading layer [==================================================>] 4.608 kB/4.608 kB
6671cb9eb6b3: Loading layer [==================================================>] 7.168 kB/7.168 kB
562dd11ed871: Loading layer [==================================================>] 25.12 MB/25.12 MB
53e16fa1f104: Loading layer [==================================================>] 10.24 kB/10.24 kB
Loaded image: 192.168.122.250:5000/openshift/wordpress:latest
[root@master farm]# docker tag 192.168.122.250:5000/openshift/wordpress:latest registry.lab.example.com/openshift/wordpress:latest
[root@master farm]# docker push registry.lab.example.com/openshift/wordpress:latest
The push refers to a repository [registry.lab.example.com/openshift/wordpress]
53e16fa1f104: Pushed
562dd11ed871: Pushed
6671cb9eb6b3: Pushed
4214911d5945: Pushed
fed26d7fe7b9: Pushed
c8c6d352c96e: Pushed
5a151fa4136e: Pushed
8747705a74d9: Pushed
adfd7c98cdf6: Pushed
354b4ef9664b: Pushed
2da371244fc1: Pushed
315db89f9acb: Pushed
3d2582fdede2: Pushed
53da01089a82: Pushed
0fd7a67d49b3: Pushed
f0c367fa8636: Pushed
ddd6dcab19ff: Pushed
2c40c66f7667: Pushed
latest: digest: sha256:ca4cf4692b7bebd81f229942c996b1c4e6907d6733e977e93d671a54b8053a22 size: 4078
2.4.2 wppv.yaml
apiVersion: v1
kind: PersistentVolume
metadata:name: wppv
spec:capacity:storage: 4GiaccessModes:- ReadWriteOncenfs:path: /exports/wordpressserver: services.lab.example.compersistentVolumeReclaimPolicy: Recycle
2.4.3 wppvc.yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:name: blogclaim
spec:accessModes:- ReadWriteOnceresources:requests:storage: 4Gi
2.4.4 pod-wordpress.yaml
apiVersion: v1
kind: Pod
metadata:name: wordpresslabels:name: wordpress
spec:containers:- image: registry.lab.example.com/openshift/wordpress:latestname: wordpressenv:- name: WORDPRESS_DB_USERvalue: root- name: WORDPRESS_DB_PASSWORDvalue: redhat- name: WORDPRESS_DB_NAMEvalue: blog- name: WORDPRESS_DB_HOST# this is the name of the mysql service fronting the mysql pod in the same namespace# expands to mysql.<namespace>.svc.cluster.local - where <namespace> is the current namespacevalue: mysqlports:- containerPort: 80name: wordpressvolumeMounts:- name: wordpress-persistent-storagemountPath: /var/www/htmlvolumes:- name: wordpress-persistent-storagepersistentVolumeClaim:claimName: blogclaim
2.4.5 service-wp.yaml
apiVersion: v1
kind: Service
metadata:labels:name: wpfrontendname: wpfrontend
spec:ports:# the port that this service should serve on- port: 80targetPort: 80# label keys and values that must match in order to receive traffic for this serviceselector:name: wordpress
2.4.6 创建wordpress
[root@master farm]# oc create -f wppv.yaml
persistentvolume "wppv" created
[root@master farm]# oc create -f wppvc.yaml
persistentvolumeclaim "blogclaim" created
[root@master farm]# oc create -f pod-wordpress.yaml
pod "wordpress" created
[root@master farm]# oc create -f service-wp.yaml
service "wpfrontend" created
2.4.7 创建wordpress路由
[root@master farm]# oc expose svc wpfrontend --hostname=blog.apps.lab.example.com
route "wpfrontend" exposed
2.5 配置wordpress
3. 确认
可以看到这个页面基本没问题了
相关文章:
![](https://img-blog.csdnimg.cn/d072dccd84d04fd68e112a5cb14a1037.png)
RHCA之路---EX280(5)
RHCA之路—EX280(5) 1. 题目 Using the example files from the wordpress directory under http://materials.example.com/exam280/wordpress create a WordPress application in the farm project For permanent storage use the NFS shares /exports/wordpress and /export…...
![](https://www.ngui.cc/images/no-images.jpg)
”轻舟已过万重山“-----我回归更新了-----
嘿,朋友们,很久不见,甚是想念,经历过漫长的暑期生活,也许你已然收获满满。有可能你拿到了那梦寐以求的机动车行驶证,开着家长的小车在道路上自由的兜风;有可能你来了一场说走就走的旅行…...
![](https://img-blog.csdnimg.cn/32f9d91d94da490b9726e5b4053ebdc7.png)
win11右键菜单恢复win10风格
按 winx 输入以下命令 reg.exe add "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" /f /ve...
![](https://www.ngui.cc/images/no-images.jpg)
Nginx安装及配置负载均衡
文章目录 官网下载Nginx解压安装常用命令配置负载均衡七层负载均衡nginx的负载均衡语法nginx的负载均衡策略故障下线和备份服务设置proxy_pass参数 官网下载Nginx http://nginx.org/en/download.html 注:下载稳定版,即Stateable Version的,…...
![](https://img-blog.csdnimg.cn/230c74bf3c054d8e93367413c28195fa.png)
C# OpenCvSharp 通道分离
效果 项目 代码 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using OpenCvSharp; using OpenCvSharp.Extensions;namespac…...
![](https://www.ngui.cc/images/no-images.jpg)
oracle 自定义存储过程(非常简单明了)
语法说明 CREATE OR REPLACE PROCEDURE 存储过程名字 ( 参数1 IN %TYPE, 参数2 IN %TYPE, 参数3 OUT %TYPE) IS 变量1 %TYPE; 变量2 %TYPE; BEGIN存储过程执行语句块 END 存储过程名字;举例说明 1.举一个简单的例子 定义存储过程 easyProcedure 入参为 两个数 出参为 他们的…...
![](https://img-blog.csdnimg.cn/9d46f6d8637b493ea9fe78d039cbf6aa.png)
layui--记录
layui 行点击事件:点了没反应? //监听行工具事件layui.table.on(tool(demo), function (obj) {//alert(222) });原因:检查下id与lay-filter是否一致;id与lay-filter必须一致。 <table id"demo" lay-filter"dem…...
![](https://img-blog.csdnimg.cn/37087d67088e45169c28e5cbbe4ddf94.png)
【校招VIP】测试技术考点之单元测试集成测试
考点介绍: 单元测试,集成测试的区别是:方式不同、粒度不同、内容不同。单元测试用用于验证编码单元的正确性。集成测试用于验证详细设计。体现了测试由小到大、又内至外、循序渐进的测试过程和分而治之的思想。 测试技术考点之单元测试&集成测试-相…...
![](https://img-blog.csdnimg.cn/0fa11f261fdd438cb032a522cba54a6c.png)
【Redis专题】Redis核心数据结构实战与高性能原理解析
目录 前言课程内容一、redis数据类型1.1 字符串(string)类型:比较简单的一种使用存储模型常用命令:(截取自【菜鸟教程】)部分演示应用场景 1.2 哈希(hash)类型:同类数据归…...
![](https://img-blog.csdnimg.cn/9ff4f002aa0f4dd8a61217d776a57c83.gif)
常见的几种排序算法
目录 一、插入排序 1、直接插入排序 1.1、排序方法 1.2、图解分析 1.3、代码实现 2、希尔排序 2.1、排序方法 2.2、图解分析 2.3、代码实现 二、选择排序 1、直接选择排序 1.1、排序方法 1.2、图解分析 1.3、代码实现 2、堆排序 2.1、排序方法 2.2、图解分析 …...
![](https://img-blog.csdnimg.cn/1755dbef8a994f0eb6be25c2b35c510c.png#pic_center)
动态贴纸、美颜SDK与AR:创造独特的互动体验
目前,动态贴纸、美颜SDK、增强现实(AR)等技术是比较热门的话题,它们所结合的新兴玩法更是收到大家推崇,正潜移默化的改变我们与数字世界互动的方式。 一、动态贴纸:个性化互动的开始 动态贴纸,…...
![](https://img-blog.csdnimg.cn/e0f7173c9ead4863941ab518a3126e6c.gif#pic_center)
〔021〕Stable Diffusion 之 提示词反推、自动补全、中文输入 篇
✨ 目录 🎈 反推提示词 / Tagger🎈 反推提示词 Tagger 使用🎈 英文提示词自动补全 / Booru tag🎈 英文提示词自动补全 Booru tag 使用🎈 中文提示词自动补全 / tagcomplete🎈 中文提示词自动补全 tagcomple…...
![](https://www.ngui.cc/images/no-images.jpg)
如何实现响应式布局
要实现响应式布局,您可以采用以下方法: 视口设置: 在HTML的<head>部分中使用meta标签设置视口: <meta name"viewport" content"widthdevice-width, initial-scale1.0">使用百分比: 使…...
![](https://www.ngui.cc/images/no-images.jpg)
HTML <tr> 标签
实例 一个简单的 HTML 表格,包含两行两列: <table border="1"><tr><th>Month</th><th>Savings</th></tr><tr><td>January</td><td>$100</td></tr> </table>定义和用法 &l…...
![](https://www.ngui.cc/images/no-images.jpg)
点云从入门到精通技术详解100篇-点云多尺度分类网络
目录 前言 研究现状与发展趋势 国内外研究现状 点云处理应用研究现状...
![](https://csdnimg.cn/release/blog_editor_html/release2.3.6/ckeditor/plugins/CsdnLink/icons/icon-default.png?t=N7T8)
电脑怎么设置定时关机,2个简单的操作
电脑作为现代生活中不可或缺的工具,我们通常会在工作或娱乐过程中使用它。但有时候,我们可能需要在一段时间后自动关机,例如在下载完成后或在睡觉前。那么电脑怎么设置定时关机呢?为了满足这种需求,电脑提供了多种定时…...
![](https://www.ngui.cc/images/no-images.jpg)
Uboot指令与烧录
目录 1 NAND Flash: 1)地址空间说明 2)烧写u-boot 3)烧写内核 4)烧写文件系统 5)设置启动参数 2 SPI Flash: 1)地址空间说明 2)烧写u-boot 3)烧写内…...
![](https://www.ngui.cc/images/no-images.jpg)
Visual Studio中使用预编译头文件
预编译头文件(Precompiled Header,PCH)是一种C/C编译优化技术,用于提高大型项目的编译速度。PCH 文件包含了常用的头文件的预编译结果,它可以在编译其他源文件之前被加载到内存中,从而减少了重复的头文件解…...
![](https://img-blog.csdnimg.cn/c90de1178d0345148d109f22b2169307.jpeg)
C语言:选择+编程(每日一练Day15)
目录 选择题: 题一: 题二: 题三: 题四: 题五: 编程题: 题一:寻找奇数 思路一: 题二:寻找峰值 思路一: 本人实力有限可能对一些地方解…...
![](https://www.ngui.cc/images/no-images.jpg)
确定Mac\Linux系统的架构类型是 x86-64(amd64),还是 arm64 架构
我们在下载软件或镜像时会有很多版本,那需要根据我们的系统架构选择正确的软件或镜像版本。 要确定你的系统使用的是 x86-64(amd64) 还是 arm64 架构,可以使用以下方法之一: 使用 uname 命令: 打开终端&am…...
![](https://www.ngui.cc/images/no-images.jpg)
Python脚本
update_format.py 批量转视频格式,超级慢,没什么卵用 import os import asyncio import subprocess import concurrent.futures import tracemalloctracemalloc.start()# 创建日志文件 log_file open(conversion_log.txt, w)async def convert_mkv_t…...
![](https://www.ngui.cc/images/no-images.jpg)
Kotlin的遍历方法
for循环 在下面代码中1…10表示的是1到10,两边都是闭包,输出12345678910 for (i in 1..10) println(i)加上花括号也支持 for (i: Int in 1..10) {println(i)}另外,当对整数进行for循环时,Kotlin还提供了一个step函数来定义迭代的…...
![](https://www.ngui.cc/images/no-images.jpg)
AskIt: Unified Programming Interface for Programming with Large Language Models
本文是LLM系列文章,针对《AskIt: Unified Programming Interface for Programming with Large Language Models》的翻译。 AskIt:用于大型语言模型编程的统一编程接口 摘要1 引言2 动机例子3 设计与实现4 实验评估5 相关工作6 结论 摘要 在不断发展的软…...
![](https://img-blog.csdnimg.cn/a231d305b3aa4b39a90c0401a1de8d0d.png)
【wireshark抓取数据包-PGSQL协议】
测试查看PGSQL协议的网络流量数据明细 1)捕获过滤的条件设置,tcp.port5432(数据库的端口) 2)上面是wireshark的主窗口,分三大主块:Packlist List(数据包列表)…...
![](https://www.ngui.cc/images/no-images.jpg)
【idea学习】
1.debug: 文章详解 2.导入SpringBoot项目 文章详情...
![](https://img-blog.csdnimg.cn/a63e5a01911a4594ac93b33d41b62e9b.png)
ZooKeeper数据模型/znode节点深入
1、Znode的数据模型 1.1 Znode是什么? Znode维护了一个stat结构,这个stat包含数据变化的版本号、访问控制列表变化、还有时间戳。版本号和时间戳一起,可让Zookeeper验证缓存和协调更新。每次znode的数据发生了变化,版本号就增加。…...
![](https://img-blog.csdnimg.cn/img_convert/09f96fe0e543af28d4b85935600c506d.jpeg)
容器编排工具的比较:Kubernetes、Docker Swarm、Nomad
随着容器化技术的普及,容器编排工具成为了现代应用部署和管理的重要组成部分。容器编排工具能够自动化容器的部署、扩展和管理,从而提高应用的可靠性和可伸缩性。在众多的容器编排工具中,Kubernetes、Docker Swarm和Nomad是三个备受关注的主要…...
![](https://www.ngui.cc/images/no-images.jpg)
nginx--技术文档--架构体系--底层核心-原理
Nginx的架构体系可以概括为“一个核心、两个模型。” “一个核心”指Nginx的核心功能,即HTTP请求处理。Nginx作为一个高性能的Web服务器,其核心功能是处理HTTP请求,包括接收请求、解析请求、处理请求和返回响应等。 “两个模型”指Nginx的多…...
![](https://img-blog.csdnimg.cn/ab0cb3e0a6a64c878688b9c6e4719d2b.jpeg)
Java23种设计模式之【单例模式】
目录 一.单例模式的起源,和应用场景 1.单例模式的前世今生! 2.什么是单例模式? 2.1使用单例模式的注意事项 2.2如何理解单例模式? 2.3单例模式的优势以及不足! 2.4使用场景 二.实现 1.实现思路 1.1创建一个 S…...
![](https://www.ngui.cc/images/no-images.jpg)
SQLserver基础入门理论(超基础)二
♥️作者:小刘在C站 ♥️个人主页: 小刘主页 ♥️努力不一定有回报,但一定会有收获加油!一起努力,共赴美好人生! ♥️学习两年总结出的运维经验,以及思科模拟器全套网络实验教程。专栏…...
![](https://img-blog.csdnimg.cn/20201011215347650.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L1Jlc3VtZVByb2plY3Q=,size_16,color_FFFFFF,t_70#pic_center)
哈尔滨网站建设哪家好/广州优化网站排名
xy,x-y是xxy,xx-y的简写 x(a>b)?a:b 三目运算符,若a大于b为真,则把a赋值给x,若a小于b 则把b赋值给x #include <stdio.h>int main () {int a3333;int b345;int x(a>b)?a:b;;printf("%d\n",x);return 0; }...
wordpress wp_query 排序/网址注册在哪里注册
ATMEGA128ADS111012864液晶显示程序和电路图,调试成功。 主控芯片为ATMEGA128,开发环境为ICCAVR。实现了ATMEGA128对16位ADC芯片ADS1110的读写控制, 实时采集的数据通过LCD12864进行显示。 ATMEGA128晶振选用8Mhz,电路原理图如图所示。 共同学习 q …...
![](/images/no-images.jpg)
免费做外贸网站/百度号码认证平台
int a 1%2; //结果为1 int b -1%2; //结果为-1 double c 5.2%2; //结果为1.2000000000000002 转载于:https://www.cnblogs.com/YESheng/p/3673308.html...
![](/images/no-images.jpg)
百度蜘蛛抓取网站/公司网站建设费
abstractclassPerson{publicintage;publicStringname;publicStringoccupation;//publicPerson()//这里应该不会被调用吧构造方法只会调用一个呀~为什么这里去掉就报错了求大哥指教指教...abstract class Person{public int age;public String name;public String occupation;//…...
![](/images/no-images.jpg)
手机制作网站的软件/定制网站
今天nowcoder上笔试做了一道字符移动的题目,大概意思就是把类似 *ab*cd***ef 的字符串移动为 *****abcdef ,开始用String做的,提交后提示50%的case过了,其他的case超时了。然后换成用StringBuilder就全部通过了,amazin…...
![](https://img-blog.csdnimg.cn/img_convert/5a446e858d10bc798e88a98acef41116.png)
音频网站建设/网上在哪里打广告最有效
证书管理(SQL Server 配置管理器)01/12/2021本文内容适用于:SQL Server(所有支持的版本) - 仅限 Windows本主题介绍如何在 SQL Server Always On 故障转移群集或可用性组拓扑上部署和管理证书。SSL/TLS 证书广泛用于保护对 SQL Server 的访问。 对于早期版本的 SQL …...