当前位置:网站首页>Goldfish rhca memoirs: do447 management list -- Chapter experiment
Goldfish rhca memoirs: do447 management list -- Chapter experiment
2022-06-09 21:02:00 【Hua Weiyun】
Personal profile : Hello everyone , I am a Brother goldfish ,CSDN New star creator in operation and maintenance field , Hua Wei Yun · Cloud sharing experts , Alicloud community · Expert bloggers
Personal qualifications :CCNA、HCNP、CSNA( Network Analyst ), Soft test primary 、 Intermediate network engineer 、RHCSA、RHCE、RHCA、RHCI、ITIL
Maxim : Hard work doesn't necessarily succeed , But if you want to succeed, you must work hard
[[email protected] ~]$ lab inventory-review start
Pull experiment code
[[email protected] ~]$ cd git-repos/[[email protected] git-repos]$ git clone http://git.lab.example.com:8081/git/inventory-review.gitCloning into 'inventory-review'...remote: Enumerating objects: 56, done.remote: Counting objects: 100% (56/56), done.remote: Compressing objects: 100% (42/42), done.remote: Total 56 (delta 5), reused 0 (delta 0)Unpacking objects: 100% (56/56), done.[[email protected] git-repos]$ cd inventory-reviewRun the script and verify
[[email protected] inventory-review]$ cat inventory [lb_servers]servera.lab.example.com[web_servers][web_servers:children]a_web_serversb_web_servers# Group "A" of Web Servers[a_web_servers]serverb.lab.example.com# Group "B" of Web Servers[b_web_servers]serverc.lab.example.com[[email protected] inventory-review]$ ansible-playbook site.yml[[email protected] inventory-review]$ curl http://serveraHello from serverb.lab.example.com. (version v1.1)[[email protected] inventory-review]$ curl http://serveraHello from serverc.lab.example.com. (version v1.1)Create host group variables as required
[[email protected] inventory-review]$ mkdir -pv group_vars/{a,b}_web_serversmkdir: created directory 'group_vars/a_web_servers'mkdir: created directory 'group_vars/b_web_servers'[[email protected] inventory-review]$ echo "webapp_version: v1.1a" > group_vars/a_web_servers/webapp.yml[[email protected] inventory-review]$ echo "webapp_version: v1.1b" > group_vars/b_web_servers/webapp.ymlRun the script and verify
[[email protected] inventory-review]$ ansible-playbook deploy_webapp.yml[[email protected] inventory-review]$ curl http://serveraHello from serverb.lab.example.com. (version v1.1a)[[email protected] inventory-review]$ curl http://serveraHello from serverc.lab.example.com. (version v1.1b)Submit changes to workspace
[[email protected] inventory-review]$ git statusOn branch masterYour branch is up to date with 'origin/master'.Untracked files: (use "git add <file>..." to include in what will be committed) group_vars/a_web_servers/ group_vars/b_web_servers/nothing added to commit but untracked files present (use "git add" to track)[[email protected] inventory-review]$ git add group_vars/{a,b}_web_servers[[email protected] inventory-review]$ git statusOn branch masterYour branch is up to date with 'origin/master'.Changes to be committed: (use "git reset HEAD <file>..." to unstage) new file: group_vars/a_web_servers/webapp.yml new file: group_vars/b_web_servers/webapp.yml[[email protected] inventory-review]$ git commit -m "Created variable files for the A and B groups."[master 05c2080] Created variable files for the A and B groups. 2 files changed, 2 insertions(+) create mode 100644 group_vars/a_web_servers/webapp.yml create mode 100644 group_vars/b_web_servers/webapp.ymlTo write yaml Manifest file and test execution
[[email protected] inventory-review]$ cat inventory.yml lb_servers: hosts: servera.lab.example.com:web_servers: children: a_web_servers: hosts: serverb.lab.example.com: b_web_servers: hosts: serverc.lab.example.com:[[email protected] inventory-review]$ ansible-playbook site.yml -i inventory.ymlRewrite as a variable, identify the host and test run
[[email protected] inventory-review]$ cat inventory.yml lb_servers: hosts: loadbalancer_1: ansible_host: servera.lab.example.comweb_servers: children: a_web_servers: hosts: backend_a1: ansible_host: serverb.lab.example.com b_web_servers: hosts: backend_b1: ansible_host: serverc.lab.example.com[[email protected] inventory-review]$ ansible-playbook site.yml -i inventory.ymlSubmit the modified code project
[[email protected] inventory-review]$ git add inventory.yml[[email protected] inventory-review]$ git commit -m "Added YAML inventory"[master 3fc697d] Added YAML inventory 1 file changed, 15 insertions(+) create mode 100644 inventory.yml[[email protected] inventory-review]$ git statusOn branch masterYour branch is ahead of 'origin/master' by 2 commits. (use "git push" to publish your local commits)nothing to commit, working tree clean[[email protected] inventory-review]$ git pushEnumerating objects: 12, done.Counting objects: 100% (12/12), done.Delta compression using up to 4 threads.Compressing objects: 100% (6/6), done.Writing objects: 100% (10/10), 920 bytes | 920.00 KiB/s, done.Total 10 (delta 2), reused 0 (delta 0)To http://git.lab.example.com:8081/git/inventory-review.git e1de24a..3fc697d master -> masterEvaluation and elimination experiment
[[email protected] inventory-review]$ lab inventory-review grade[[email protected] inventory-review]$ lab inventory-review finishsummary
RHCA Certification requires experience 5 Study and examination of the door , It still takes a lot of time to study and prepare for the exam , Come on , Can GA 🤪.

That's all 【 Brother goldfish 】 Yes Chapter two Management list – Chapter experiment Brief introduction and explanation of . I hope it can be helpful to the little friends who see this article .
Red hat Certification Column series :
RHCSA special column : entertain RHCSA authentication
RHCE special column : entertain RHCE authentication
This article is included in RHCA special column :RHCA memoir
If this article 【 article 】 It helps you , I hope I can give 【 Brother goldfish 】 Point a praise , It's not easy to create , Compared with the official statement , I prefer to use 【 Easy to understand 】 To explain every point of knowledge with your writing .
If there is a pair of 【 Operation and maintenance technology 】 Interested in , You are welcome to pay attention to ️️️ 【 Brother goldfish 】️️️, I will bring you great 【 Harvest and surprise 】!

边栏推荐
- Analysis of source code data anti leakage solution
- Huawei's cloud industrial intelligence hub provides new momentum for accelerating the upgrading of industrial intelligence
- A consistent friend
- Latex数学符号大全
- Internal volume of Dachang series "line segment tree - meeting room problem"
- 二叉树的层序遍历
- GBase 8s 扩展外连接
- KubeVirt网络源码分析(2)
- Knowledge points of string in C #
- 03 Wireshark TCP
猜你喜欢

The browser cannot open Baidu, and others can be opened normally

浏览器无法打开百度,别的可以正常打开

Force buckle 84- the largest rectangle in the histogram (monotone stack)

Go installation tutorial

搭建ngrok服务器,实现内网穿透服务,实现外网到内网的在线访问

03 Wireshark TCP

dump. Pcapng packet parsing

(I) apple has open source, but so what?

Le navigateur ne peut pas ouvrir Baidu, d'autres peuvent être ouverts normalement

Lambda Exception
随机推荐
Changshu science and technology applet SQL injection
Problems and solutions of VFP accessing Oracle under 64 bit win10 environment
Internal volume of Dachang series "line segment tree - meeting room problem"
Kubernetes native cicd:tekton Hello World
Dataframe merge
How Bi makes SaaS products have a "sense of security" and "sensitivity" (Part I)
二叉树的层序遍历
每日一题——leecode59( 螺旋矩阵 II)
Some problems encountered in deploying cinder CSI plugin
Who says redis can't save big keys
Usage of memberwiseclone in C #
The browser cannot open Baidu, and others can be opened normally
区间值(单调栈)
Gbase8s database select Clause 2
Kubevirt network source code analysis (2)
Gbase8s database select clause 4
Analysis of source code data anti leakage solution
加密狗驱动解决方案
idea:new没有class
二叉搜索树