1 Star 0 Fork 1

tarena/nsd2104

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
7月8日作业参考.txt 2.05 KB
一键复制 编辑 原始数据 按行查看 历史
tarena 提交于 2021-07-08 19:57 . 作业
资源文件
---
kind: DaemonSet
apiVERSION: apps/V1
metadata:
name: mayapache
sepc:
selector
matchLabels:
myapp: httpd
template:
metadata:
labels:
myapp: httpd
spec:
contianers:
- name: webcluser
image: 192.168.1.100:5000/myos:httpd
stdin: false
tty: false
ports:
- protocol: TCP
containerPort: 80
restartPolicy: Always
---
kind: Service
appVersion: v1
metadata:
name: apache
spec:
ports:
- protocol: TCP
port: 80
targetPort: 80
selector:
myapp: httpd
type: ClusterIP
作业2
[root@ecs-proxy ~]# mkdir es-setup
[root@ecs-proxy ~]# cd es-setup
[root@ecs-proxy es-setup]# vim ansible.cfg
[defaults]
inventory = myhost
host_key_checking = False
[root@ecs-proxy es-setup]# vim myhost
[es]
192.168.1.[41:45]
[root@ecs-proxy es-setup]# vim hosts
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
192.168.1.41 es-0001
192.168.1.42 es-0002
192.168.1.43 es-0003
192.168.1.44 es-0004
192.168.1.45 es-0005
[root@ecs-proxy es-setup]# vim elasticsearch.yml
17: cluster.name: my-es
23: node.name: {{ ansible_hostname }}
55: network.host: 0.0.0.0
68: discovery.zen.ping.unicast.hosts: ["es-0001", "es-0002"]
[root@ecs-proxy es-setup]# vim essetup.yaml
---
- name: elasticsearch 集群批量安装部署
hosts: es
tasks:
- copy:
src: hosts
dest: /etc/hosts
owner: root
group: root
mode: 0644
- name: install elasticsearch
yum:
name: java-1.8.0-openjdk,elasticsearch
state: installed
- template:
src: elasticsearch.yml
dest: /etc/elasticsearch/elasticsearch.yml
owner: root
group: root
mode: 0644
- service:
name: elasticsearch
state: restarted
enabled: yes
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/helon8214/nsd2104.git
git@gitee.com:helon8214/nsd2104.git
helon8214
nsd2104
nsd2104
master

搜索帮助