RHCA之路---EX280(8)

RHCA之路—EX280(8)

1. 题目

在这里插入图片描述
On master.lab.example.com using the template file in http://materials.example.com/exam280/gogs as a basis,
install an application in the ditto project according to the following requirements:
All of the registry entries must point to your local registry at registry.lab.example.com
The version in the ImageStream line for the postgresql image must be changed from postgresql:9.5 to postgresql:9.2
For the Gogs pod, use the Docker image from http://materials.example.com/exam280/gogs.tar and make sure it is tagged as registry.lab.example.com/openshiftdemos/gogs:0.9.97 and pushed to your local registry
Mask the template gogs available across all projects and for all users
Deploy the appllication using the template, setting the parameter HOSTNAME to gogs.apps.lab.example.com
Create a user salvo with password redhat and email address salvo@master.lab.example.com on the application frontend
(use the Register link on the top right of the page at http://gogs.apps.lab.example.com) and, as this user, create a Git repository named ex280
If there isn’t one already, create a file named README.md in the repository ex280 and put the line faber est quisque fortunae suae in it and commit it.
The repository must be visible and accessible

2. 解题

2.1 切换项目

[root@master shrimp]# oc project ditto
Now using project "ditto" on server "https://master.lab.example.com".
[root@master shrimp]# mkdir ~/ditto
[root@master shrimp]# cd ~/ditto
[root@master ditto]# oc projects
You have access to the following projects and can switch between them with 'oc project <projectname>':default* dittofarmkube-publickube-service-catalogkube-systemloggingmanagement-infraopenshiftopenshift-ansible-service-brokeropenshift-infraopenshift-nodeopenshift-template-service-brokeropenshift-web-consoleromesamplesshrimpUsing project "ditto" on server "https://master.lab.example.com".

2.2 创建模板

2.2.1 下载模板

[root@master ditto]# wget http://materials.example.com/exam280/gogs/gogs-temp.yaml
--2023-09-04 16:33:37--  http://materials.example.com/exam280/gogs/gogs-temp.yaml
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: 10037 (9.8K) [text/plain]
Saving to: ‘gogs-temp.yaml’100%[===========================================================================================================>] 10,037      --.-K/s   in 0s2023-09-04 16:33:37 (285 MB/s) - ‘gogs-temp.yaml’ saved [10037/10037]

2.2.3 替换yaml

[root@master ditto]# sed -ir 's/postgresql:9.5/postgresql:9.2/g' gogs-temp.yaml
[root@master ditto]# grep gogs: gogs-temp.yamlname: services.lab.example.com/openshiftdemos/gogs:0.9.97
[root@master ditto]# sed -ir 's#services.lab.example.com/openshiftdemos/gogs:0.9.97#registry.lab.example.com/openshiftdemos/gogs:0.9.97#g' gogs-temp.yaml

2.2.4 创建template

[root@master ditto]# oc create -f gogs-temp.yaml -n openshift
template "gogs" created

2.3 创建镜像

[root@master ditto]# wget http://materials.example.com/exam280/gogs.tar
--2023-09-04 16:38:12--  http://materials.example.com/exam280/gogs.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: 467157504 (446M) [application/x-tar]
Saving to: ‘gogs.tar’100%[===========================================================================================================>] 467,157,504  106MB/s   in 4.7s2023-09-04 16:38:17 (95.1 MB/s) - ‘gogs.tar’ saved [467157504/467157504][root@master ditto]# docker load -i gogs.tar
34e7b85d83e4: Loading layer [==================================================>] 199.9 MB/199.9 MB
addf85492fbe: Loading layer [==================================================>] 6.144 kB/6.144 kB
126a150d0743: Loading layer [==================================================>] 189.6 MB/189.6 MB
b93687778caa: Loading layer [==================================================>] 77.66 MB/77.66 MB
Loaded image: openshiftdemos/gogs:latest
[root@master ditto]# docker tag openshiftdemos/gogs:latest registry.lab.example.com/openshiftdemos/gogs:0.9.97
[root@master ditto]# docker push registry.lab.example.com/openshiftdemos/gogs:0.9.97
The push refers to a repository [registry.lab.example.com/openshiftdemos/gogs]
b93687778caa: Pushed
126a150d0743: Pushed
addf85492fbe: Pushed
34e7b85d83e4: Pushed
0.9.97: digest: sha256:483a06aac04eb028ae1ddbd294954ba28d7c16b32fc5fca495f37d8e6c9295de size: 1160

2.4 根据template创建app

[root@master ditto]# oc new-app --template=gogs --param=HOSTNAME=gogs.apps.lab.example.com
--> Deploying template "openshift/gogs" to project dittogogs---------The Gogs git server (https://gogs.io/)* With parameters:* APPLICATION_NAME=gogs* HOSTNAME=gogs.apps.lab.example.com* GOGS_VOLUME_CAPACITY=1Gi* DB_VOLUME_CAPACITY=2Gi* Database Username=gogs* Database Password=gogs* Database Name=gogs* Database Admin Password=605BtU1L # generated* Maximum Database Connections=100* Shared Buffer Amount=12MB* Gogs Version=0.9.97* Installation lock=true* Skip TLS verification on webhooks=false--> Creating resources ...persistentvolume "gogs-postgres-data" createdpersistentvolume "gogs-data" createdserviceaccount "gogs" createdservice "gogs-postgresql" createddeploymentconfig "gogs-postgresql" createdservice "gogs" createdroute "gogs" createddeploymentconfig "gogs" createdimagestream "gogs" createdpersistentvolumeclaim "gogs-data" createdpersistentvolumeclaim "gogs-postgres-data" createdconfigmap "gogs-config" created
--> SuccessAccess your application via route 'gogs.apps.lab.example.com'Run 'oc status' to view your app.

2.5 创建git仓库

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

2.6 git clone

[root@master ditto]# git clone http://gogs.apps.lab.example.com/salvo/ex280.git
Cloning into 'ex280'...
warning: You appear to have cloned an empty repository.
[root@master ditto]# cd ex280/
[root@master ex280]# vim README.md
[root@master ex280]# cat README.md
faber est quisque fortunae suae
[root@master ex280]# git add .
[root@master ex280]# git commit -m 8
[master (root-commit) 5f37403] 81 file changed, 1 insertion(+)create mode 100644 README.md
[root@master ex280]# git push
Counting objects: 3, done.
Writing objects: 100% (3/3), 229 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
Username for 'http://gogs.apps.lab.example.com': salvo
Password for 'http://salvo@gogs.apps.lab.example.com':redhat
To http://gogs.apps.lab.example.com/salvo/ex280.git* [new branch]      master -> master

3. 确认

刷新git仓库,可以看到README.md已经被提交
在这里插入图片描述

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

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

相关文章

微信小程序源码【195套】【源码导入视频教程+源码导入文档教程+详细图文文档教程】

一、项目说明 盒马鲜生.zip 轻客洗衣.zip 云文档.zip 仿ofo共享单车.zip 仿美团外卖.zip 仿饿了么.zip 灵犀外卖.zip 小契约&#xff08;交友互动小程序&#xff09;.zip 信息科技公司展示小程序.zip 华云智慧园区.zip 房地产公司展示.zip 企业OA系统小程序.zip 优惠券卡卷小程…

整理mongodb文档:事务(一)

个人博客 整理mongodb文档:事务(一) 原文链接&#xff0c;个人博客 求关注&#xff0c;本文主要讲下怎么在mongose下使用事务&#xff0c;建议电脑端看 文章概叙 本文的开发环境为Nodejs&#xff0c;在‘单机模式’讲解最基本的事务概念。并没有涉及分片以及集群&#xff0…

ESP32C3 LuatOS RC522②写入字符串

编写了字符串转16进制表函数 -- 将字符串转换为十六进制表 local function stringToHexTable(str)local hexTable {}local maxLength 16 -- 最大长度为16个元素-- 将字符串转换为十六进制for i 1, #str doif i > maxLength thenbreakendlocal hex string.format("…

QT第一天

创建登录界面 #include "widget.h" #include "ui_widget.h"Widget::Widget(QWidget *parent): QWidget(parent), ui(new Ui::Widget) {ui->setupUi(this);this->setFixedSize(700,800);//1.实例化一个标签,设置上面界面QLabel *lab1 new QLabel(th…

基于Mendix移动原生的离线应用

一、前言 不同行业的企业会有特殊的业务场景&#xff0c;比如某些制造业的企业的工厂是物理隔离的&#xff0c;但工程师需要拿着平板输入很多生产数据&#xff1b;某些煤炭和矿业企业&#xff0c;在实际的工作区都是比较偏远&#xff0c;信号比较差&#xff0c;但是又需要用手…

【python技巧】替换文件中的某几行

【python技巧】替换文件中的某几行 1. 背景描述2. 单行修改-操作步骤3. 多行修改-操作步骤 1. 背景描述 最近在写一个后端项目&#xff0c;主要的操作就是根据用户的前端数据&#xff0c;在后端打开项目中的代码文件&#xff0c;修改对应位置的参数&#xff0c;因为在目前的后…

浏览器安全-同源策略和CORS

同源策略 同源策略是浏览器的一个安全功能&#xff0c;浏览器禁止在当前域读写其他域的资源&#xff0c;如限制跨域发送ajax请求 不受同源策略限制的 1&#xff09;页面中的链接&#xff0c;重定向表单以及表单提交 2&#xff09;跨域资源引入 如script不受跨域限制&#xff0…

Elasticsearch:wildcard - 通配符搜索

Elasticsearch 是一个分布式、免费和开放的搜索和分析引擎&#xff0c;适用于所有类型的数据&#xff0c;例如文本、数字、地理空间、结构化和非结构化数据。 它基于 Apache Lucene 构建&#xff0c;Apache Lucene 是一个全文搜索引擎&#xff0c;可用于各种编程语言。 由于其速…

远程工作面试:特殊情况下的面试技巧

&#x1f337;&#x1f341; 博主猫头虎&#xff08;&#x1f405;&#x1f43e;&#xff09;带您 Go to New World✨&#x1f341; &#x1f984; 博客首页——&#x1f405;&#x1f43e;猫头虎的博客&#x1f390; &#x1f433; 《面试题大全专栏》 &#x1f995; 文章图文…

【Vue3 知识第四讲】数据双向绑定、事件绑定、事件修饰符详解

文章目录 一、数据双向绑定二、事件绑定详解2.1 **Vue中的事件绑定指令**2.2 **事件函数的调用方式**2.3 **事件函数参数传递** 三、事件修饰符3.1 **Vue中常用的事件修饰符**3.2 **按键修饰符** 四、属性绑定五、类与样式的绑定5.1 class 类的绑定5.2 style 样式绑定 一、数据…

一文了解Android App Bundle 格式文件

1. Android App Bundle 是什么&#xff1f; 从 2021 年 8 月起&#xff0c;新应用需要使用 Android App Bundle 才能在 Google Play 中发布。 Android App Bundle是一种发布格式&#xff0c;打包出来的格式为aab&#xff0c;而之前我们打包出来的格式为apk。编写完代码之后&a…

uni-app语音转文字功能demo(同声传译)

目录 首先去微信开发者官网申请一下同声传译的插件 微信公众平台 在文件中开始引用&#xff1a; 首先去微信开发者官网申请一下同声传译的插件 微信公众平台 后续使用的时候可以看详情里面的信息进行使用 在文件中开始引用&#xff1a; 注意&#xff01;&#xff01;在这个…

2023年了,java后端还有未来吗?

前言 Java当下确实是比较的内卷&#xff0c;但关键在于个人&#xff0c;可以看看不同地方&#xff08;这里主要举例北上广深一线城市&#xff09;对于Java开发工程师这个职位的具体要求&#xff1a; 在以下北上广深这些一线大城市的面试招聘当中不难看出&#xff0c;凡是工资…

二维码智慧门牌管理系统:让城市管理更智能、便捷

文章目录 前言一、二维码智慧门牌管理系统的特点二、数据集约化与规范化三、管理智能化与长效化四、标识规范化与易维护五、服务多元化与便捷化 前言 随着城市化进程的加速&#xff0c;城市管理面临着越来越多的挑战。为了解决地名地址管理交织错综、地名地址支撑政府管理成效…

自动驾驶中间件

自动驾驶中间件 1. 什么是中间件2. 中间件的分类3. 自动驾驶为什么需要中间件4. 通信中间件 Reference&#xff1a; 自动驾驶中间件&#xff1a;量产落地的关键技术通俗易懂的告诉你什么是中间件 对于初入自动驾驶行业的人来说&#xff0c;各色各样的新型传感器、线控系统、芯…

QT 初识多线程

1.QThread线程基础 QThread是Qt线程中有一个公共的抽象类&#xff0c;所有的线程类都是从QThread抽象类中派生的&#xff0c;需要实现QThread中的虚函数run(),通过start()函数来调用run函数。 void run&#xff08;&#xff09;函数是线程体函数&#xff0c;用于定义线程的功能…

第 2 章 线性表 (线性表的单链表存储结构实现)

1. 背景说明 2. 示例代码 1) status.h /* DataStructure 预定义常量和类型头文件 */#ifndef STATUS_H #define STATUS_H/* 函数结果状态码 */ #define TRUE 1 /* 返回值为真 */ #define FALSE 0 /* 返回值为假 */ #define RET_OK 0 /* 返回值正确 */ #d…

计算机网络的故事——HTTP首部

HTTP首部 在HTTP协议通信交互中使用的首部字段。不限于RFC2616中定义的47种首部字段&#xff0c;还有Cookie、setCookie和Content-Disposition等 HTTP 首部字段将定义成缓存代理和非缓存代理的行为&#xff0c;分成 2 种类型。端到端首部和逐跳首部

关于vscode的GitLens插件里的FILE HISTORY理解

最近在用vscode的GitLens插件开发项目遇到这个疑问&#xff0c;先看图&#xff1a; 每当我点击FILE HISTORY 一个commit时&#xff0c;正常来说显示器会自动将点击的提交版本和它上一个提交版本进行比较&#xff0c;如果单纯这么理解的话就错了&#xff0c;因为GitLens的File …

企业工程项目管理系统源码(三控:进度组织、质量安全、预算资金成本、二平台:招采、设计管理)

工程项目管理软件&#xff08;工程项目管理系统&#xff09;对建设工程项目管理组织建设、项目策划决策、规划设计、施工建设到竣工交付、总结评估、运维运营&#xff0c;全过程、全方位的对项目进行综合管理 工程项目各模块及其功能点清单 一、系统管理 1、数据字典&am…